Skip to content
This repository was archived by the owner on Sep 1, 2026. It is now read-only.

Ability to use secrets as environment variables - #186

Draft
worldtiki wants to merge 3 commits into
datainfrahq:masterfrom
worldtiki:secrets_as_envs
Draft

worldtiki wants to merge 3 commits into
datainfrahq:masterfrom
worldtiki:secrets_as_envs

Conversation

@worldtiki

@worldtiki worldtiki commented Oct 18, 2024 •

Copy link
Copy Markdown

Description

In order to improve the security posture of druid installations using helm chart, I propose this change where environment variables can be set using kubernetes secrets.
This would be useful, for example, when configuring a Postgres extension where one needs to provide credentials.

Example of usage:

envFromSecrets:
  - name: "DATABASE_USER"
    secretKeyRefKey: "databaseSecrets"
    secretKeyRefName: "username"
  - name: "DATABASE_PASSWORD"
    secretKeyRefKey: "databaseSecrets"
    secretKeyRefName: "password"

I'm opening as a draft to get initial feedback. If you agree with the proposal I'll polish the code and update the docs.


This PR has:

  • been tested on a real K8S cluster to ensure creation of a brand new Druid cluster works.
  • been tested for backward compatibility on a real K*S cluster by applying the changes introduced here on an existing Druid cluster. If there are any backward incompatible changes then they have been noted in the PR description.
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added documentation for new or modified features or behaviors.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant