Helm 阻止在 helm init 上添加默认图表存储库

L. *_*per 2 openshift gitlab kubernetes kubernetes-helm

我想使用 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
Run Code Online (Sandbox Code Playgroud)

我的主要问题是我想知道是否可以禁用 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
Run Code Online (Sandbox Code Playgroud)

我已经删除了 IP 地址,但它在运行此helm version命令时试图从错误的 IP 地址解析 Tiller 服务器。

Mau*_*ldi 6

您可以通过 option 定义要使用的稳定存储库-o --stable-repo-url url

例子: helm init --client-only --stable-repo-url https://path.to.my.repo

你可以在这里找到更多信息