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
- so it looks like
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