My service uses a url like this:
<google_url>/v1/lookup_stuff
<google_url>/v1/
is the base url for everything in the service, so when the health check pings <google_url>
it gets a 404. I need to update to ping <google_url>/v1/
(Possibly useful information, the service is in Docker, and is accessible when I manually go to the right URL)
How do I point gcloud's health service at the correct URL for my service?
Ok for clarity:
- Google url:
service-something.appspot.com
- All urls for service are under:
service-something.appspot.com/v1
I need to point health checker to:
service-something.appspot.com/v1/_ah/health
instead of
service-something.appspot.com/_ah/health
Really cryptic-ly exposed question, anyway:
if<google_url>
is a tag that you designed then split it in two:<google_base_url>/v1/
and<google_path_url>lookup_stuff
then you can ping<google_base_url>/v1/
and when you need the original<google_url> = <google_base_url> + <google_path_url>
if
<google_url>
is given to you by some framework, etc, then you need to interpret it, to get the initial part that you need. Maybe you can use a regex pattern, check out this so searchLast, check out this nice example on kubernetes-health-check about how configure the liveness probe, there is a path parameter that should be useful
Update:
The flexible environment now supports the Updated health checks, consisting of separately configurable liveness checks and/or readiness checks, both with a configurable
path
capability.Note that these updated health checks are not compatible and cannot coexit with the legacy health checks:
Original answer, applicable only to the legacy health checks:
The path is not currently configurable. From Health checking:
So you can leave it like that - your app being always considered healthy. Or you can teach your app to correctly answer to the health check requests at
/_ah/health
.