Closed wy65701436 closed 4 years ago
Root cause seems that the push plugin tries to read repositories.yaml
under helm home
which no longer exists in helm v3:
https://helm.sh/docs/faq/#xdg-base-directory-support
这个问题 很简单 可以加入helm的微信交流群 ,需要交流的加我微信 easonak185
This is a quickfix until the push pluging comes with support for helm3 You may need to declare your repositories at two different place :
helm repo add harbor-staging --username=${HARBOR_USER} --password=${HARBOR_PASSWORD} ${HARBOR_HELMCHART_PROJECT} --repository-config=/$HOME/.helm/repository/repositories.yaml
with a tiny modification
'sed -i -e "s/apiVersion: ""/apiVersion: v1/g" /$HOME/.helm/repository/repositories.yaml'
helm repo add harbor-staging --username=${HARBOR_USER} --password=${HARBOR_PASSWORD} ${HARBOR_HELMCHART_PROJECT}
Thanks @LinuxArchitects With this workaround I can push chart to my harbor chart repo successfully with:
helm push --ca-file /data/cert/ca.crt mysql-1.4.0.tgz myharborrepo
I still need to specify --ca-file even the repositories.yml contains "- caFile: /data/cert/ca.crt". But after that when I fetch it I got the error again:
helm --ca-file /data/cert/ca.crt --username test --password Test1234! --key-file /data/cert/myharbor.test.com.key --cert-file /data/cert/myharbor.test.com.crt fetch myharborrepo/mysql
Error: Get https://myharbor.test.com/chartrepo/myharborrepo/charts/mysql-1.4.0.tgz: x509: certificate signed by unknown authority
You don’t need to specify the certificate unless it’s a self signed one :
Please retry without specifying certificates and send the result :
helm --username test --password Test1234! fetch myharborrepo/mysql
@LinuxArchitects ah my local harbor is self singed cert so I have to:)
Per comments, https://github.com/chartmuseum/helm-push/issues/37#issuecomment-565845431. the helm-push v0.8.0 has been fixed this issue, close the issue as resovled.
这个问题 很简单 可以加入helm的微信交流群 ,需要交流的加我微信 easonak185
make a fool of oneself
I have tried to push a chart to Harbor with helm v3 client, which already has a push plugin installed. But, get the following error:
To workaround it, use the URL to do the helm push.
After that, I can push a chart into Harbor.
The issue on the push plugin: https://github.com/chartmuseum/helm-push/issues/37