[bitnami/external-dns] chart adds podLabels to all resources and can cause duplicates #14542
Labels
external-dns
on-hold
Issues or Pull Requests with this label will never be considered stale
tech-issues
The user has a technical issue about an application
Name and Version
bitnami/external-dns 6.13.1
What steps will reproduce the bug?
Specify any labels in
values.podLabels
Are you using any custom parameters or values?
No response
What is the expected behavior?
podLabels
should only be added to Pods (via Deploymentspec.template.metadata.labels
)What do you see instead?
Pod Labels are treated as "common" labels and when any exist are added to ALL resources (ServiceAccount, Deployment, Cluster Role, etc.)
Additional information
While obviously incorrect, this caused an issue for us during deployment as we have a label that must be specified for both ServiceAccount and Pods. As such, we added the label to both
podLabels
andserviceAccount.labels
. Because they are treated as "common", a duplicate label was added to the ServiceAccount, causing helm to error during deploymentIt's due to lines 40-42 here:
charts/bitnami/external-dns/templates/_helpers.tpl
Lines 34 to 42 in f64c2cc
The inclusion in
external-dns.labels
causes the labels to be propogated to all resources, since they all call that template.Note that this chart already has a
commonLabels
which is probably what should be in the block above instead:charts/bitnami/external-dns/values.yaml
Line 33 in f64c2cc
(however output of
commonLabels
appears in all the manifest templates individually, not as part of the helper)The fix is to remove the
podLabels
from theexternal-dns.labels
template and to incorporate them directly into the Deployment manifest, similar to other labels and annotationsThe text was updated successfully, but these errors were encountered: