How to fix the common issue during helm based On Prem Upgrade

Introduction
This article discusses how to fix the common issue during helm-based On-Prem Upgrade.

Error

Error: UPGRADE FAILED: execution error at (harness-demo/charts/harness/charts/platform/charts/minio/templates/NOTES.txt:91:4):
PASSWORDS ERROR: You must provide your current passwords when upgrading the release.
Note that even after reinstallation, old credentials may be needed as they may be kept in persistent volume claims.
Further information can be obtained at Troubleshoot Bitnami Helm chart issues

‘auth.rootPassword’ must not be empty, please add ‘–set auth.rootPassword=$ROOT_PASSWORD’ to the command. To get the current value:

export ROOT_PASSWORD=$(kubectl get secret --namespace “harness-test” minio -o jsonpath=“{.data.root-password}” | base64 -d)

Process to resolve the Issue
Fix 1

  • Run the last command printed in the error:

    • export ROOT_PASSWORD=$(kubectl get secret --namespace "harness-test" minio -o jsonpath="{.data.root-password}" | base64 -d)
  • Add this argument to your helm upgrade additionally
    --set harness.platform.minio.auth.rootPassword=$ROOT_PASSWORD

    • so it looks like
      helm upgrade <chartname> <chartsource> -n <namespace> -f override.yaml --set harness.platform.minio.auth.rootPassword=$ROOT_PASSWORD

Fix 2 (Works if Fix 1 has been applied once)

  • helm get values <chartname> -n <namespace> > oldvalues.yaml
  • Edit the oldvalues.yaml with new changes, you should notice it already has the minio password encrypted.
  • helm upgrade <chartname> <chartsource> -n <namespace> -f oldvalues.yaml
  • Delete oldvalues.yaml
1 Like