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

How to instruct Helm not to add "managed-by" label to the STS #13051

Open
Vlad-Stryapko opened this issue May 21, 2024 · 2 comments
Open

How to instruct Helm not to add "managed-by" label to the STS #13051

Vlad-Stryapko opened this issue May 21, 2024 · 2 comments

Comments

@Vlad-Stryapko
Copy link

Hi,

My use case is that I have an existing STS which does not have "managed-by: Helm" label. Now, changing it and updating it via helm results in this label being added, which is not allowed since Sets are immutable (see kubernetes/kubernetes#90519).

Is there any way to prevent Helm from adding this label?

I suppose it could be done with post-processing by something like kustomize, though I'd like not to generate the label in the first place instead of generating and then removing it.

Note: running "helm template" does not result in this label being present in the generated yaml, but running "helm apply" afterwards results in actual k8s STS having it.

@mattfarina
Copy link
Collaborator

Hi. I'm not entirely sure what you're doing. For example, you bring up the helm apply command. Helm does not have an apply command.

The labels are part of the charts (the packages). Helm does not inject any labels. You will need to look at the chart you are working with to find how the label is handled.

@Vlad-Stryapko
Copy link
Author

Apologies, helm install. I got it confused with helmfile I guess.

As to your second sentence, there is this comment from the same repo:
#8083 (comment)

Since Helm 3.2.0 (via #7649), we now automatically add two annotations in meta.helm.sh/ and a label app.kubernetes.io/managed-by: Helm.

This label is the exact one I'd like not to have since adding it to STS is not supported by k8s as of now and deleting the STS is an option with downtime, sadly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants