https://github.com/maelvls/helm-leftover
https://github.com/maelvls/helm-leftover
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/maelvls/helm-leftover
- Owner: maelvls
- Created: 2020-12-11T09:48:35.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2020-12-11T09:52:18.000Z (over 4 years ago)
- Last Synced: 2025-01-24T19:44:20.243Z (4 months ago)
- Language: HTML
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Helm 2 removes old objects
Just a quick test that shows that Helm 2 is able to remove objects that
have been deleted in the new release. `test/` contains a release that has
an ingress; `test2` contains the same release except the ingress has been
removed.To test it, first get helm2 and kind and create a cluster with tiller:
```sh
GO111MODULE="on" go get sigs.k8s.io/[email protected]
kind create clustercurl -L https://get.helm.sh/helm-v2.16.9-linux-amd64.tar.gz | tar xz -C /tmp && install /tmp/linux-amd64/helm ~/go/bin/helm2
helm2 init
kubectl create serviceaccount --namespace kube-system tiller
kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
kubectl patch deploy --namespace kube-system tiller-deploy -p '{"spec":{"template":{"spec":{"serviceAccount":"tiller"}}}}'
```Then, let's install the chart with the ingress enabled. If we disable the
ingress, the object disappears from the cluster:```sh
# The first release has an ingress.
helm2 install --name test ./test --set ingress.enabled=true --set ingress.enabled=true --set "ingress.hosts[0].paths[0]=/"
kubectl get ingress# The second one doesn't have an ingress.
helm2 upgrade test ./test --set ingress.enabled=false
kubectl get ingress
```