-
-
Notifications
You must be signed in to change notification settings - Fork 264
Description
Is your feature request related to a problem? Please describe.
Yes. The current chart injects environment variables by iterating over a fixed list of keys in the template. This works but does not scale well: any new environment variable requires modifying the chart templates, and users cannot easily inject their own secrets without changing the chart itself.
Describe the solution you'd like
I would like to load environment variables using envFrom, based on a new values field, for example:
existingSecrets:
- myapp-env
- external-db-credentials
Which would be used in the Deployment as:
envFrom:
{{- range .Values.existingSecrets }}
- secretRef:
name: {{ . }}
{{- end }}
This keeps backwards compatibility while allowing users to provide their own secrets without modifying the chart.
Describe alternatives you've considered
Extending the current fixed list of environment variables inside the template, but this is not scalable.
Adding new explicit variables in values.yaml, but that still requires changing the chart every time.
Creating a single secret with all variables, but this is not flexible enough for different deployments.
Additional context
I’m happy to implement this and open a PR, but I would like to confirm the preferred approach before doing so.