How does flux pass env variables dynamically to helm charts using terraform #3130
-
|
Auto deploying helm charts with Flux. I have deployed helm charts using flux in EKS cluster and wanted to pass the env variables to helm charts from terraform. I have some services deployed with terraform (infra repo) and would like to pass some of those values dynamically to helm charts (helm-repo) as env varaibles . And I have envVariables in I have defined HelmRelease |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
|
From TF create a Secret or ConfigMap a in the Then in the HelmRelease use the Secret: |
Beta Was this translation helpful? Give feedback.
-
|
I’d love to see this called out in the flux documentation, seems like something we could put into a section of how to integrate it into tool chains like terraform etc.. I’d imagine there’s a few folks out there asking the same qn |
Beta Was this translation helpful? Give feedback.
-
|
Is there another format for declaring the values in the secret? The drawback of the solution @stefanprodan offered is that even the keys will be hidden when encrypting the secret with SOPS. The only remaining key will be "values.yaml". From a documentation standpoint, that doesn't seem ideal. |
Beta Was this translation helpful? Give feedback.
-
|
Is there any examples or doc for the "How does flux pass env variables dynamically to helm charts"? |
Beta Was this translation helpful? Give feedback.
From TF create a Secret or ConfigMap a in the
flux-systemnamespace in this format:Then in the HelmRelease use the Secret: