-
Notifications
You must be signed in to change notification settings - Fork 622
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
remove helm chart version from labels #1114
Conversation
@miles-w-3 do you mind taking a look at this? If you are OK with this change, I can merge. |
I would be in favor of changing the label to just be the chart name rather than including the version, but it is not a functionality blocker to remove it. Generally, the I'm fine with removing it altogether, but maybe the best compromise would be to put just
on all chart resources. |
@FlorianLaunay what do you think about the approach of changing the label? |
@miles-w-3 @rooftopcellist TBH I hadn't thought about just removing the version in all labels 😇 but this is also fine for me. This will allow to continue to adhere to Helm best practices by having a relationship between |
Do it in this PR. |
Rebase and PR modification done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution @FlorianLaunay !
SUMMARY
Remove the Helm chart version from
helm.sh/chart
labels in all Helm templates.Fixes #1057
ISSUE TYPE
ADDITIONAL INFORMATION
Including chart version in the
matchLabel
selector of the AWX deployment template causes problem during thehelm upgrade
of the AWX operator. Indeed this field is now immutable for deployments in recent versions of Kubernetes (https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#label-selector-updates). So running ahelm upgrade
with a chart containing a deployment template with a different content in thespec.selector.matchLabels
field is not allowed and causes an error.An acceptable solution when using
kustomize
is to remove chart version in labels. This will allow to continue to adhere to Helm best practices by having a relationship betweenmetadata.labels
andselector.matchLabels
fields.Tested on
devel
withmake helm-chart
and executing multiplehelm upgrade