Helm 防止在 helm init 上添加默认图表回购

Helm prevent from adding the default chart repo on helm init

我想使用 Helm 和 Gitlab 将我的服务部署到 OpenShift。

我在 OpenShift 中部署了一个 Gitlab Runner。

我已经在 tiller 命名空间下的 Openshift 中安装了 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 添加为存储库作为 helm init 的一部分?

可能值得注意的是,我不知道 helm init --client-only 是否是在此设置中使用 helm 的必需步骤。

我也尝试了一个简单的 helm version 并且服务器响应需要代理授权错误。

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