2
votes

When I run kubectl get secrets after doing a helm upgrade --install <release-name> in Kubernetes cluster, our secrets got messy.

Is there any way to stop having sh.helm.release.v1. whenever I declare kubectl get secrets?

enter image description here

1
Sounds like this is related to the Chart you're deploying. Have you checked what's in there? Have you tried to remove previous copies (don't do this on prod/check on a lab before, or read Charts sources: I don't know anything about your Chart, I don't want you to break something, ...) - SYN
@SYN I tried to remove previous copies but after I do helm upgrade again, it shows new garbage things like the above image. Is there a way to stop having this? - Felix Labayen
My bad, doesn't seem at all related with airflow -- codeengineered.com/blog/2020/helm-secret-storage . Though I can't find any of these on my own clusters (helm3.5.0). - SYN

1 Answers

4
votes

No, these secrets are where Helm stores its state.

When you install or upgrade a release, Helm creates a new secret. The secret who’s name ends in .airflow.v29 contains all the information Helm has about revision number 29 of the airflow release.

Whenever you run commands like helm list, helm history, or helm upgrade, Helm reads these secrets to know what it did in the past.

By default, Helm keeps up to 10 revisions in its state for each release, so up to 10 secrets per release in your namespace. You can have Helm keep a different number of revisions in its state with the --history-max flag.

If you don’t want to keep a history of changes made to your release, you can keep as little as a single revision in Helm’s state.

Running helm upgrade --history-max=1 will keep the number of secrets Helm creates to a minimum.