fix(helm): add liveliness and readiness probes to helm chart#143
fix(helm): add liveliness and readiness probes to helm chart#143
Conversation
b88b60f to
3d046b5
Compare
There was a problem hiding this comment.
Do we need to enable the health endpoint?
Currently, when running this inside a stac-auth-proxy pod container, it returns a 404:
>>> import httpx
>>> httpx.get("http://localhost:8000/healthz")
<Response [404 Not Found]>There was a problem hiding this comment.
The healthz path DOES include the root_path, are you using that? ie does http://localhost:8000/stac/healthz work?
|
Note Findings from a live environment test (tested in a separate internal cluster): Config used - repoURL: https://github.com/developmentseed/stac-auth-proxy.git
targetRevision: v1.0.3-rc2
path: helm/
helm:
valuesObject:
env:
UPSTREAM_URL: "http://ifrcgo-montandon-eoapi-{{ $i }}-stac:8080"
OIDC_DISCOVERY_URL: "https://goadmin-stage.ifrc.org/o/.well-known/openid-configuration"
OVERRIDE_HOST: "0"
ROOT_PATH: "/stac"
COLLECTIONS_FILTER_CLS: stac_auth_proxy.montandon_filters:CollectionsFilter
ITEMS_FILTER_CLS: stac_auth_proxy.montandon_filters:ItemsFilter
ingress:
enabled: "true"
host: "montandon-eoapi-{{ $i }}-auth-proxy.ifrc-go.dev.togglecorp.com"
className: "nginx"
tls:
enabled: "false"
replicaCount: 1
extraVolumes:
- name: filters
configMap:
name: stac-auth-proxy-filters
extraVolumeMounts:
- name: filters
mountPath: /app/src/stac_auth_proxy/montandon_filters.py
subPath: montandon_filters.py
readOnly: trueWhen setting
|
@thenav56 Am I correct that even though you're using the newer helm chart, that helm chart is still pointing at the Perhaps we should hardcode this value to the helm chart version? stac-auth-proxy/helm/values.yaml Lines 5 to 8 in 647dfa0 |
|
Hey @alukach, I was also wondering the same thing for the image tag After including this, everything is working as expected:
Would it be feasible to expose the health endpoint at It was also a bit confusing since all requests under If the chart consumer need to include that, then we should also update the documentation and note this as a breaking change in the release. |
|
👋🏽 @alukach @pantierra |
|
@thenav56 Apologies for the delay, I was away last week.
This is a bit more challenging than it would seem. The root path ( stac-auth-proxy/src/stac_auth_proxy/app.py Lines 214 to 218 in 0c3173d stac-auth-proxy/src/stac_auth_proxy/app.py Lines 81 to 85 in 0c3173d Removing the root path from the health check endpoint would be challenging. Not saying that we shouldn't do it, moreso it's something we could track in another issue. |
| type: integer | ||
| minimum: 0 | ||
| description: "Seconds to sleep in preStop hook before SIGTERM, allowing Kubernetes endpoint propagation. Set to 0 to disable." | ||
| default: 15 |
There was a problem hiding this comment.
Default value below is 5. Please make sure they are the same, either 5 or 15.
There was a problem hiding this comment.
How can we make these types of check in a helm chart?
There was a problem hiding this comment.
Currently the schema is ignored in the checks because it is a yaml not json. This should fix. I am not entirely sure if checks would include the standard values, though.
In this PR i just changed the preStopSleepSeconds in values.yaml to 15.
| terminationGracePeriodSeconds: | ||
| type: integer | ||
| minimum: 1 | ||
| description: "Duration in seconds the pod needs to terminate gracefully. Must be greater than preStopSleepSeconds." |
There was a problem hiding this comment.
Must be greater than preStopSleepSeconds.
Can we have a check for this?
There was a problem hiding this comment.
Added a check for this in the helm/templates/_helpers.tpl
|
Overall looks good to me, only a couple of small things I would improve, see my comments. |
2996543 to
2b70f3b
Compare
🤖 I have created a release *beep* *boop* --- ## [1.0.3](v1.0.2...v1.0.3) (2026-03-28) ### Bug Fixes * **auth-extension:** consider link method when adding auth:refs ([158f507](158f507)) * disable server reload by default ([c109801](c109801)), closes [#142](#142) * **helm:** add liveliness and readiness probes to helm chart ([#143](#143)) ([ba55f64](ba55f64)) * **lifespan:** handle gateway errors on server health checks ([4e00c0e](4e00c0e)), closes [#141](#141) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: ds-release-bot[bot] <116609932+ds-release-bot[bot]@users.noreply.github.com>


What I'm changing
This PR attempts to integrate our existing
/healthzendpoint into K8s environmentsHow I did it
I admittedly know very little about Helm/K8s and reached for Claude Code (Opus 4.6) to complete this. Please review thoroughly
closes #140