Skip to content

chore: cleaning up (unused?) variables, using the generated secret for sensitive ones (fixes #235) - #243

Merged
pmauduit merged 4 commits into
mainfrom
df-use-secret-for-sensitive-variables-235
Nov 17, 2026
Merged

pmauduit merged 4 commits into
mainfrom
df-use-secret-for-sensitive-variables-235

Conversation

@pmauduit

@pmauduit pmauduit commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

A secret was already generated by the chart, but the data from it were not consumed by the underlying deployment.

Also grepping the chart, it looked like secretKey and encryptionKey are not used.

And I actually took the liberty to rename the secret, suffixing it with "-secret" to make it clear of what it is (and to distinguish from other objects).

Tests: very basic checks on the output of helm template .

@pmauduit
pmauduit requested a review from f-necas November 17, 2026 12:52
@pmauduit pmauduit changed the title chore: cleaning up (unused?) variables, using the generated secret for r sensitive ones (fixes #235) chore: cleaning up (unused?) variables, using the generated secret for sensitive ones (fixes #235) Nov 17, 2026

@edevosc2c edevosc2c 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.

Thanks for moving the credentials out of plain value: entries, that's a good direction. Two issues block merging though (details inline):

  1. Backend pods won't start: the envFrom.secretRef at backend-deployment.yaml:115-117 still references {{ fullname }}-backend, which no longer exists after the rename. Since it isn't optional, pods end up in CreateContainerConfigError (confirmed with helm template).
  2. secretKey / encryptionKey are used: they reach the container as SECRET_KEY / ENCRYPTION_KEY through that same envFrom, and the backend reads both (georchestra/datafeeder apps/backend/src/core/config.py).

Also:

  • datafeeder-python/Chart.yaml version isn't bumped (still 0.1.6).

Comment thread datafeeder-python/values.yaml Resolved
* reverting back with secretKey/encryptionKey which are actually
  injected via envFrom
* removing guards from secret templates
* removing redundant references to secret
* bumping chart version

@edevosc2c edevosc2c 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.

Thanks, LGTM!

Optional nit: setting one of these values to null makes rendering fail with a cryptic backend-secret.yaml:11:44 error. Using required would give a clearer message, e.g.:

SECRET_KEY: {{ required "backend.config.secretKey is required" $webapp.config.secretKey | b64enc | quote }}

@edevosc2c

Copy link
Copy Markdown
Member

Thanks for adding required, looks good to me! Feel free to merge once the lint-test check is green.

@pmauduit

pmauduit commented Nov 17, 2026 •

Copy link
Copy Markdown
Member Author

once the lint-test check is green.

I could not manage to figure out why, but the lint-test does not set up chart dependencies, so the check cannot pass. If you have any idea why

Seems to relate to: helm/chart-testing-action#85 (comment)

@edevosc2c

Copy link
Copy Markdown
Member

Yes, that's the issue: ct lint runs helm dependency build, which needs the chart repository to be known locally. I pushed 724c050, which adds helm repo add airflow https://airflow.apache.org before linting (the workaround from that issue, and the same step the publish workflow already uses). Let's see if lint-test passes now.

@pmauduit

Copy link
Copy Markdown
Member Author

ok thanks for this

@pmauduit
pmauduit merged commit a9ee9e2 into main Nov 17, 2026
1 check passed
@pmauduit
pmauduit deleted the df-use-secret-for-sensitive-variables-235 branch November 17, 2026 18:34
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.

df-python - credentials could be passed as kubernetes secrets instead of plain environment variable values

2 participants