Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support env vars from an existing secret #482

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

aogier
Copy link

@aogier aogier commented Dec 28, 2024

This simple one allows to inject environment variables from an existing secret, which is a very common pattern when using helm and let users stick to their k8s workflow. Also, keeping plaintext secrets in values file is an ultimate blocker for zulip adoption where I work.

I don't see any concern about this change, especially in respect of not changing anything in docker image inner workings but only simplifying our k8s life :)

How did you test this PR?

$ diff -u \
 <(helm template zulip . -s templates/statefulset.yaml) \
 <(helm template zulip . --set=zulip.secretEnvironment=my-secret -s templates/statefulset.yaml)
--- /proc/self/fd/11    2024-12-28 15:31:19.264000000 +0100
+++ /proc/self/fd/22    2024-12-28 15:31:19.264000000 +0100
@@ -86,6 +86,9 @@
               value: "self-signed"
             - name: ZULIP_AUTH_BACKENDS
               value: "EmailAuthBackend"
+          envFrom:
+            - secretRef:
+                name: my-secret
           resources:
             {}
           livenessProbe:

Hope this helps, ciao!

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