helm v3.6.1 and acr stopped working
Hello!
The latest version of helm (v3.6.1) changed how credentials are handled. Now az acr helm repo add generates non-working configuration. Please add support for helm flag --pass-credentials to set pass_credentials_all: true in ~/.config/helm/repositories.yaml. Without this entry, helm install/upgrade/pull and similar fail with error 401/unauthorized.
for more information please see this helm issue
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @toddysm, @yugangw-MSFT, @luisdlp.
Issue Details
Hello!
The latest version of helm (v3.6.1) changed how credentials are handled. Now az acr helm repo add generates non-working configuration. Please add support for helm flag --pass-credentials to set pass_credentials_all: true in ~/.config/helm/repositories.yaml. Without this entry, helm install/upgrade/pull and similar fail with error 401/unauthorized.
for more information please see this helm issue
| Author: | josefschabasser |
|---|---|
| Assignees: | - |
| Labels: |
|
| Milestone: | - |
route to service team
MS just reverted back to an image with helm v3.6.0. I think this change isn't needed, as the new helm version isn't used (for now), az acr helm repo add is deprecated and manually adding the repository is veeery easy.
REPO=myrepo
CRED=($(az acr credential show --name ${REPO} --query '{username: username, password: passwords[0].value}' -o tsv))
HOST=$(az acr show --name ${REPO} --query 'loginServer' -o tsv)
REPO_URL="https://${HOST}/helm/v1/repo"
ARGS=()
dpkg --compare-versions $(helm version --template "{{.Version}}" | tr -d v) eq 3.6.1
if [[ $? -eq 0 ]]; then
echo "helm v3.6.1 detected, using '--pass-credentials'"
ARGS+=('--pass-credentials')
fi
helm repo add ${REPO} ${REPO_URL} \
--username ${CRED[0]} \
--password ${CRED[1]} \
${ARGS[@]}
EDIT: brought back snippet EDIT 2: only helm v3.6.1 is affected; replaced npm semver with dpkg
UPDATE: there was a bug which is fixed in helm v3.6.2. This issue can now be closed.