Skip to content

Add health handler#140

Merged
zhouzhuojie merged 1 commit into
masterfrom
zz/add-health-handler
Jul 6, 2018
Merged

Add health handler#140
zhouzhuojie merged 1 commit into
masterfrom
zz/add-health-handler

Conversation

@zhouzhuojie
Copy link
Copy Markdown
Collaborator

@zhouzhuojie zhouzhuojie commented Jul 6, 2018

Tested locally for the health endpoint

curl localhost:18000/api/v1/health 

@zhouzhuojie
Copy link
Copy Markdown
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
Copy Markdown
Member

👍

@mukesh-panigrahi-searce
Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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