Skip to content

Conversation

emmanuelmathot
Copy link
Contributor

Problem

When deploying stac-auth-proxy in front of the eoapi service, users need to set stac.overrideRootPath to an empty string to remove the --root-path argument from the STAC FastAPI application. However, this configuration didn't work because:

  1. In Helm templates, empty strings evaluate to false
  2. The template logic {{- if .Values.stac.overrideRootPath}} would fail for empty strings
  3. This caused the template to fall back to using .Values.stac.ingress.path instead of respecting the empty string

Solution

Changed the template logic to use hasKey function to check for key existence in deployment.

Behavior Change:

  • Key not set: Uses fallback value .Values.stac.ingress.path (e.g., "/stac")
  • Key set to empty string (overrideRootPath: ""): Omits --root-path argument entirely
  • Key set to any value (overrideRootPath: "/custom"): Uses that specific value

Breaking Changes

None. This change is backward compatible:

  • Existing deployments without overrideRootPath continue to work
  • Existing deployments with non-empty overrideRootPath continue to work
  • Only adds support for the previously broken empty string case

Related Issues

Fixes #306

@batpad to be tested

@emmanuelmathot
Copy link
Contributor Author

emmanuelmathot commented Sep 30, 2025

@batpad Please test the go use case from this branch

@batpad
Copy link
Member

batpad commented Sep 30, 2025

@emmanuelmathot testing now.

@emmanuelmathot emmanuelmathot changed the title Fix: Allow setting stac.overrideRootPath to empty string for stac-auth-proxy integration fix: Allow setting stac.overrideRootPath to empty string for stac-auth-proxy integration Sep 30, 2025
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.

Cannot set stac.overrideRootPath to empty string
2 participants