Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add health handler #140

Merged
merged 1 commit into from
Jul 6, 2018
Merged

Add health handler #140

merged 1 commit into from
Jul 6, 2018

Conversation

zhouzhuojie
Copy link
Collaborator

@zhouzhuojie zhouzhuojie commented Jul 6, 2018

Tested locally for the health endpoint

curl localhost:18000/api/v1/health 

@zhouzhuojie
Copy link
Collaborator Author

Fixes #102

@zhouzhuojie zhouzhuojie merged commit 3e8098c into master Jul 6, 2018
@zhouzhuojie zhouzhuojie deleted the zz/add-health-handler branch July 6, 2018 20:09
@marceloboeira
Copy link
Member

👍

@mukesh-panigrahi-searce
Copy link

I was setting this health-check for a pod in GKE as a readiness probe. By default when I hit the server with curl from localhost on the path given it returns with "Not authorized" response. When I passed authorization headers along with curl then it worked. The problem is these authorization headers are not ideal for GKE HC probes and Ingress is always marked as unhealthy. Do we have some URL paths that gives back a 200 OK response without any need to authorize? I believe for HC probes it should be as simple as possible to get know about the server health.

@zhouzhuojie
Copy link
Collaborator Author

@Mukesh-P did you turn on the FLAGR_BASIC_AUTH_ENABLED? If so, you may also want to whitelist the /api/v1/health endpoint.

You can set

# Default
FLAGR_BASIC_AUTH_WHITELIST_PATHS=/api/v1/flags,/api/v1/evaluation

# You can add /api/v1/health or change it
FLAGR_BASIC_AUTH_WHITELIST_PATHS=/api/v1/flags,/api/v1/evaluation,/api/v1/health

I'm also thinking of adding /api/v1/health to the default.

@zhouzhuojie
Copy link
Collaborator Author

Related #407

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants