Skip to content

feat: support sourcing compartment-id from a Secret via env var - #25

Merged
syscod3 merged 1 commit into
mainfrom
feat/compartment-id-env-fallback
Aug 8, 2026
Merged

feat: support sourcing compartment-id from a Secret via env var#25
syscod3 merged 1 commit into
mainfrom
feat/compartment-id-env-fallback

Conversation

@syscod3

@syscod3 syscod3 commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • --compartment-id was only settable via a Helm-render-time CLI arg — a chart-based deployment had no way to source it from a runtime Secret (e.g. External Secrets Operator) without a plain Helm value ending up in git
  • Adds OCI_COMPARTMENT_ID env var as a fallback default for the flag
  • Adds extraEnvFrom to the chart so it can be wired to envFrom: - secretRef: {name: ...}

Test plan

  • go build ./... passes
  • gofmt clean
  • golangci-lint passes (pre-commit)
  • helm lint passes
  • helm template with extraEnvFrom set renders envFrom correctly, and correctly omits --compartment-id when oci.compartmentId is unset

--compartment-id was Helm-render-time only, so a chart-based deployment
could never source it from a runtime Secret (e.g. via External Secrets
Operator) without baking it into a plain Helm value. Adds an
OCI_COMPARTMENT_ID env var fallback for the flag, and extraEnvFrom on the
chart so it can be wired to a Secret's envFrom.
@syscod3
syscod3 merged commit edff3f4 into main Aug 8, 2026
12 of 13 checks passed
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.

1 participant