Skip to content

Loki helm problem when templating backend statefulset with extraEnv #17284

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

Open
joe-pll opened this issue Apr 17, 2025 · 0 comments
Open

Loki helm problem when templating backend statefulset with extraEnv #17284

joe-pll opened this issue Apr 17, 2025 · 0 comments

Comments

@joe-pll
Copy link

joe-pll commented Apr 17, 2025

Describe the bug
When defining global.extraEnv the helm templating add the extraEnv in the envFrom in the statefulset for the backend.

This is the bit of the template for the templates/backend/statefulset-backend.yaml

{{- with (concat .Values.global.extraEnv .Values.backend.extraEnv) | uniq }}
env:
  {{- toYaml . | nindent 12 }}
{{- end }}
{{- with (concat .Values.global.extraEnv .Values.backend.extraEnvFrom) | uniq }}
envFrom:
  {{- toYaml . | nindent 12 }}
{{- end }}

The with statement is

{{- with (concat .Values.global.extraEnv .Values.backend.extraEnvFrom) | uniq }}

while it should be

{{- with (concat .Values.global.extraEnvFrom .Values.backend.extraEnvFrom) | uniq }}

To Reproduce
Define global.extraEnv in the helm chart values.

Expected behavior
Kubernetes fails to apply because the field envFrom has the wrong format.

Environment:
Kubernetes 1.32

Thanks a lot in advance and let me know if you want me to fix it.

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

No branches or pull requests

1 participant