Helm hook not deleting previous release resource on upgrade

8/29/2018

I have the below annotation for my secrets

annotations:
     "helm.sh/hook": "pre-install,pre-upgrade"
     "helm.sh/hook-weight": "1"
     "helm.sh/hook-delete-policy": "before-hook-creation"

it's giving me the following error when I try to upgrade.

Error: UPGRADE FAILED: secrets "my-secret" already exists

My expectation is it should delete previous release hook and create a new one

Helm Version:

  • Client: 2.7.2
  • Server: 2.7.2
-- Coding Ninja
kubectl
kubernetes
kubernetes-helm

1 Answer

10/9/2018

after digging docs, came to know that "helm.sh/hook-delete-policy": "before-hook-creation" is not available in Helm version 2.7.2 it is available in 2.9.0

-- Coding Ninja
Source: StackOverflow