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

[feature] add option to force/override "Release.Service" back to "Tiller" #7211

Closed
jkirkham-ratehub opened this issue Dec 11, 2019 · 7 comments

Comments

@jkirkham-ratehub
Copy link

This is an issue that blocks upgrades of StatefulSets that use the lable heritage=Tiller. In Helm v3 the value of Release.Service has changed to Helm, but these fields in a StatefulSet must be immutable.
See this chart issue for a specific instance of the underlying issue, though I am now seeing many more charts with this problem. helm/charts#19231

To Reproduce:

  1. Install a chart with a StatefulSet, such as stable/mariadb with Helm v2.
  2. Upgrade to Helm v3, and convert the release with the 2to3 plugin.
  3. Attempt to upgrade the release with the StatefulSet -- this will fail because the upgrade will want to change an immutable label.

Suggested Solution:
Add an option to Helm v3 allowing Release.Service to be set back to Tiller for backwards compatability.

Temporary Workaround:
Fetch the affected chart(s) and edit all template files to hard-code the value "Tiller" in place of {{ .Release.Service }}.

Output of helm version:
version.BuildInfo{Version:"v3.0.1", GitCommit:"7c22ef9ce89e0ebeb7125ba2ebf7d421f3e82ffa", GitTreeState:"clean", GoVersion:"go1.13.4"}
(Also reproduced with v3.0.0.)

Output of kubectl version:

Server Version: version.Info{Major:"1", Minor:"14+", GitVersion:"v1.14.8-gke.12", GitCommit:"188432a69210ca32cafded81b4dd1c063720cac0", GitTreeState:"clean", BuildDate:"2019-11-07T19:27:01Z", GoVersion:"go1.12.11b4", Compiler:"gc", Platform:"linux/amd64"}```

Cloud Provider/Platform (AKS, GKE, Minikube etc.): 
GKE "v1.14.8-gke.12", DigitalOcean Kubernetes "v1.14.8"
@dominik-bln
Copy link

I could imagine trying my hand on implementing this in the near future if a PR for this would be considered. This blocks us from updating some of our releases to Helm 3, but I am not that experienced with Go, so would likely take some time (and wouldn't mind if someone else gets to it first 😉).

Any suggestions on the name for the option? Some ideas:

  • --use-legacy-tiller-release-service
  • --helm-2-compat-release-service

@dominik-bln
Copy link

@bacongobbler Sorry to ping you here, but is there any update on this? This is blocking our update to Helm3 and since Helm 2 EOL is approaching it would be really good to have.

If this is not implemented we'd need to recreate our Redis PVCs and to be honest this is a path I'd like to avoid.

@joejulian
Copy link
Contributor

joejulian commented Sep 18, 2020

This is also a problem for Deployments in any chart that used the .Release.Service values in the selector.

@mattfarina
Copy link
Collaborator

We have a potential quick fix. But first, the issue is in the chart. For matchLabels it's injecting the heritage. This isn't a good idea as matchLabels cannot change. When you run helm create it creates a lighter function that just has the chart and instance names for the matchLabels used for selecting. This is on purpose. Kubernetes manifests should have a limited list of things for selector labels.

The quick fix is to update the chart so that "heritage" under matchLabels has a value of Tiller instead of {{ .Release.Service }}. Instead of Helm injecting it... have it as a hard coded value in the chart. This would work for the selector label situations.

@scottrigby
Copy link
Member

Cross referencing #7173 (comment)

@alice-sawatzky
Copy link

evil workaround: delete the offending statefulsets with --cascade=false before running the helm upgrade command.

@github-actions
Copy link

github-actions bot commented Jan 8, 2021

This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs.

@github-actions github-actions bot added the Stale label Jan 8, 2021
@github-actions github-actions bot closed this as completed Feb 8, 2021
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

7 participants