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

Error when upgrading to Loki helm chart 6.27.0 #16617

Open
Tolsto opened this issue Mar 7, 2025 · 0 comments
Open

Error when upgrading to Loki helm chart 6.27.0 #16617

Tolsto opened this issue Mar 7, 2025 · 0 comments

Comments

@Tolsto
Copy link
Contributor

Tolsto commented Mar 7, 2025

Upgrading from Loki helm chart 6.26.0 to 6.27.0 results in error:

error while running post render on files: map[string]interface {}(nil): yaml: unmarshal errors: line 38: mapping key "my-label" already defined at line 37

This issue appears to arise when certain pod labels are unexpectedly duplicated in the rendered manifests. In my specific case, the labels under .Values.write.podLabels suddenly appear in all deployments and statefulsets because they are inadvertently leaked into .Values.loki.podLabels.
The root cause of this problem can be traced back to a change in #16062, which incorrectly utilizes the merge function. The merge function modifies the source object, which explains why the {{- with merge .Values.loki.podLabels .Values.write.podLabels }} block in templates/write/statefulset-write.yaml effectively merges the write pod labels into .Values.loki.podLabels, causing it to be mutated for subsequent accesses from other template files. For more information, refer to helm/helm#13308

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