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

helm:After destroying the helm chart the secrets for token /Service Account/PSP are not getting deleted #678

Closed
junaid18183 opened this issue Feb 13, 2020 · 5 comments

Comments

@junaid18183
Copy link
Contributor

If you deploy the helm chart with bootstrapACLs: true the helm chart creates the following secrets

NAME                                        TYPE                                  DATA   AGE
consul-consul-bootstrap-acl-token           Opaque                                1      22h
consul-consul-client-acl-token              Opaque                                1      22h
consul-consul-tls-init-token-vzrvg          kubernetes.io/service-account-token   3      85s

Those are not getting deleted if we delete the helm chart.

This causes the issue if you redeploy the helm chart again.

@lkysow
Copy link
Member

lkysow commented Feb 13, 2020

Hi Juned, for now you'll need to manually delete the secrets and the persistent volume claims:

	kubectl delete pvc -l release=$release
	kubectl get secret | grep $release | awk '{print $1}' | xargs kubectl delete secret

@ashwinkupatkar
Copy link

Is this secret deletion going to be part of helm uninstall in any upcoming consul helm releases ? It would be great to have them.

@lkysow
Copy link
Member

lkysow commented Jun 24, 2021

Is this secret deletion going to be part of helm uninstall in any upcoming consul helm releases ? It would be great to have them.

we could potentially tie deleting secrets to deleting a resource like the server statefulset or the client daemonset. Only danger with that is that someone might accidentally delete critical secrets.

@ashwinkupatkar
Copy link

Right. I followed up with this document https://www.consul.io/docs/k8s/operations/uninstall to perform a cleanup and it works well.

@t-eckert t-eckert changed the title After destroying the helm chart the secrets for token /Service Account/PSP are not getting deleted helm:After destroying the helm chart the secrets for token /Service Account/PSP are not getting deleted Aug 24, 2021
@t-eckert t-eckert transferred this issue from hashicorp/consul-helm Aug 24, 2021
lawliet89 pushed a commit to lawliet89/consul-k8s that referenced this issue Sep 13, 2021
* Add field descriptions for Service Intentions CRD
@david-yu
Copy link
Contributor

We now have a CLI that is currently in Alpha, and this would handle deletion of PVCs, Service Accounts and secrets for you: https://www.consul.io/docs/k8s/k8s-cli#uninstall. Closing the issue as that is better addressed through a CLI interface instead of Helm.

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

No branches or pull requests

4 participants