Skip to content

XS✔ ◾ fix: require extractKey when the ExternalSecret is enabled - #11

Merged
dimoschi merged 1 commit into
mainfrom
fix/require-external-secret-extract-key
Oct 6, 2026
Merged

dimoschi merged 1 commit into
mainfrom
fix/require-external-secret-extract-key

Conversation

@dimoschi

@dimoschi dimoschi commented Oct 6, 2026

Copy link
Copy Markdown
Collaborator

With secrets.externalSecret.enabled: true and no extractKey, the chart rendered key: null under spec.dataFrom[0].extract. The external-secrets.io/v1 ExternalSecret schema requires extract.key as a string, so the API server rejects the resource and the release fails at apply time with a schema error.

The template now uses required, so the same mistake fails at render time with secrets.externalSecret.extractKey is required when secrets.externalSecret.enabled is true. The key is also quoted.

No working config changes: a release that deploys today already sets extractKey. The kubernetes-deploy base sets ${env_name}/services/typesense.

Ported from the same fix in hackthebox/helm-charts#453, made there before the chart moved to this repo.

Tests: added a case for the empty key. mise run test (94/94) and mise run lint pass. No version bump, which is left to the release commit.

An empty secrets.externalSecret.extractKey rendered key: null, which the ExternalSecret CRD rejects because extract.key is a required string. Fail at render time with a clear message instead, and quote the key.
@dimoschi
dimoschi requested a review from a team as a code owner October 6, 2026 13:07
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown

PR Metrics

✔ Thanks for keeping your pull request small.
✔ Thanks for adding tests.

Lines
Product Code 1
Test Code 10
Subtotal 11
Ignored Code -
Total 11

Metrics computed by PR Metrics. Add it to your Azure DevOps and GitHub PRs!

@github-actions github-actions Bot changed the title fix: require extractKey when the ExternalSecret is enabled XS✔ ◾ fix: require extractKey when the ExternalSecret is enabled Oct 6, 2026
@dimoschi
dimoschi merged commit 94455b3 into main Oct 6, 2026
3 checks passed
@dimoschi
dimoschi deleted the fix/require-external-secret-extract-key branch October 6, 2026 14:20
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.

2 participants