我想结合使用 Helm 和 Gitlab 将我的服务部署到 OpenShift。
我在 OpenShift 中部署了一个 Gitlab Runner。
我已经在 Openshift 中的 tiller
命名空间下安装了 Tiller,并且正在使用 docker 镜像 docker.greater.com.au/platform/images/dtzar/helm-kubectl:latest
我的系统也有一个我无法通过的代理。
作为我的 Gitlab CI 构建步骤之一的一部分,我有以下内容:
$ helm init --client-only
Creating /root/.helm
Creating /root/.helm/repository
Creating /root/.helm/repository/cache
Creating /root/.helm/repository/local
Creating /root/.helm/plugins
Creating /root/.helm/starters
Creating /root/.helm/cache/archive
Creating /root/.helm/repository/repositories.yaml
Adding stable repo with URL: https://kubernetes-charts.storage.googleapis.com
Error: Looks like "https://kubernetes-charts.storage.googleapis.com" is not a valid chart repository or cannot be reached: Get https://kubernetes-charts.storage.googleapis.com/index.yaml: Proxy Authorization Required
我的主要问题是我想知道是否可以禁止 Helm 尝试将 https://kubernetes-charts.storage.googleapis.com
作为 repostiory 添加到 helm 的一部分初始化
?
可能值得注意的是,我不知道 helm init --client-only 是否是在此设置中使用 helm 的必需步骤。
我还尝试了一个简单的 helm 版本
,服务器正在响应需要代理授权错误。
Client: &version.Version{SemVer:"v2.12.1",
GitCommit:"02a47c7249b1fc6d8fd3b94e6b4babf9d818144e", GitTreeState:"clean"}
Error: Get https://---.---.---.---:---/api/v1/namespaces/tiller/pods?labelSelector=app%3Dhelm%2Cname%3Dtiller: Proxy Authorization Required
我已经删除了 IP 地址,但它在运行此 helm version
命令时试图从错误的 IP 地址解析 Tiller 服务器。
最佳答案
您可以使用选项 -o --stable-repo-url url
定义要使用的稳定存储库。
示例:helm init --client-only --stable-repo-url https://path.to.my.repo
您可以找到更多信息 here
关于kubernetes - Helm 防止在 helm init 上添加默认图表 repo ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54190531/