Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upinvalid yaml in chart: service monitor additionalLabels not guaranteed to be unique #6363
Comments
|
Pull requests are welcome |
|
I was able to choose other labels and worked around it. Imo this is a big issue in the k8s arena, and I hope it will get more attention in the future. |
|
/assign |


NGINX Ingress controller version: v0.34.1
Kubernetes version (use
kubectl version): 1.18Chart version: 1.41.3
What happened:
Generated templates include duplicated yaml keys when giving overrides for labels. These are not accepted by static analysis tools (which are increasinlgy used in user space to detect faulty manifests).
However, these are accepted by helm and kubectl, and probably to allow these unstrict overrides and not have to worry about it. However, this is forcibly allowing invalid yaml to be created and propagated as ok practice, which it is not imo.
Example:
What you expected to happen:
The chart maintainers do not iterate over override labels provided to skip printing the chart provided defaults, leading to duplicate yaml keys.
How to reproduce it:
in the values set:
and deploy the chart
/kind bug