Skip to content

fix(helm): make health path take root path into account.#189

Merged
pantierra merged 4 commits into
mainfrom
fix/helm-root-path
Jul 22, 2026
Merged

fix(helm): make health path take root path into account.#189
pantierra merged 4 commits into
mainfrom
fix/helm-root-path

Conversation

@pantierra

Copy link
Copy Markdown
Contributor

Fixes Bug 2 reported in developmentseed/eoapi-k8s#568

Makes the probes to automatically use ROOT_PATH (if set) before the HEALTH_PREFIX.

@claude

claude Bot commented Jul 21, 2026

Copy link
Copy Markdown

Claude finished @pantierra's task in 2m 57s —— View job


Review of PR #189

  • Gather context (diff, changed files, related app source)
  • Review for correctness/security/best-practice issues
  • Apply ponytail-review for over-engineering
  • Post final review

✅ No blocking issues — safe to merge.

Traced the fix end-to-end against RemoveRootPathMiddleware (src/stac_auth_proxy/middleware/RemoveRootPathMiddleware.py:32): when ROOT_PATH is set, incoming requests must already include that prefix (or the middleware 404s), so probes do need {ROOT_PATH}{HEALTHZ_PREFIX} as this PR implements. The stac-auth-proxy.healthzPath/stac-auth-proxy.probe helpers (helm/templates/_helpers.tpl:97-113) correctly: trim the trailing slash from ROOT_PATH, no-op when httpGet.path is already set explicitly, and no-op when a probe has no httpGet (e.g. exec/tcpSocket probes) — the deepCopy before set avoids mutating the shared .Values map. New helm/tests/deployment_test.yaml cases cover default, ROOT_PATH-only, ROOT_PATH + custom HEALTHZ_PREFIX, and explicit-override — matches the implementation.

One non-blocking gap, same root cause the PR is fixing:

  • helm/templates/NOTES.txt:37,50,52,57 — the post-install "Health check" output still prints {{ .Values.env.HEALTHZ_PREFIX | default "/healthz" }} without ROOT_PATH. When ROOT_PATH is set, the curl command Helm prints after install will 404, since it needs the same {ROOT_PATH}{HEALTHZ_PREFIX} this PR derives for the probes. Consider reusing include "stac-auth-proxy.healthzPath" . there too, e.g.:
    curl http://{{ .Values.ingress.host }}{{ include "stac-auth-proxy.healthzPath" . }}
    

No security issues found (chart doesn't touch auth/secrets), and no correctness issues in deployment.yaml/values.schema.json/values.yaml changes.

Simplify (ponytail): nothing to flag — the two small helpers are each used 3x (startup/liveness/readiness probes), so the factoring pays for itself; no speculative abstraction or unneeded dependency introduced.


💰 Estimated review cost: $1.01 · 2m57s · 37 turns

@codecov

codecov Bot commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.49%. Comparing base (fec33b6) to head (f8782a6).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #189   +/-   ##
=======================================
  Coverage   89.49%   89.49%           
=======================================
  Files          29       29           
  Lines        1276     1276           
  Branches      171      171           
=======================================
  Hits         1142     1142           
  Misses         92       92           
  Partials       42       42           
Flag Coverage Δ
unittests 89.49% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@alukach alukach left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As usual, I barely understand this stuff. I'll leave it to your discretion to consider Claude's input from the above comment.

@pantierra
pantierra merged commit 5236a0e into main Jul 22, 2026
10 checks passed
@pantierra
pantierra deleted the fix/helm-root-path branch July 22, 2026 08:44
alukach pushed a commit that referenced this pull request Jul 23, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.2.0](v1.1.1...v1.2.0)
(2026-07-23)


### Features

* add optional prometheus metrics endpoint.
([#186](#186))
([6825f23](6825f23))


### Bug Fixes

* add ROOT_PATH_SKIP_PREFIXES to exempt sibling-service links from
root_path rewriting 2
([#198](#198))
([349986b](349986b))
* allow , delimited string in configuration
([#191](#191))
([df530a2](df530a2))
* allow Any type for classInput
([#182](#182))
([56aa3f5](56aa3f5))
* configurable upstream timeout.
([#174](#174))
([533bac6](533bac6))
* **helm:** make health path take root path into account.
([#189](#189))
([5236a0e](5236a0e))
* publish helm chart only on release
([#178](#178))
([c89f650](c89f650))
* **tests:** fix flaky health-check retry test caused by global
asyncio.sleep patch
([#193](#193))
([fec33b6](fec33b6))

---
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants