From 5431f33cb1feed93f50318569913afc180928368 Mon Sep 17 00:00:00 2001 From: Sushil Kumar <Sushil.Kumar@suse.com> Date: Thu, 13 Apr 2017 11:30:28 -0700 Subject: [PATCH] Exposes repository-URLs as flags on helm init command Fixes issues/2272 stable-repository-url is currently hard-coded for helm init, so if a user wants to make a different intranet repository as stable repo, only option left is to first do an init, followed by repo delete and repo add. --- cmd/helm/init.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/cmd/helm/init.go b/cmd/helm/init.go index 256ba6e3f..be3d05528 100644 --- a/cmd/helm/init.go +++ b/cmd/helm/init.go @@ -53,8 +53,11 @@ To dump a manifest containing the Tiller deployment YAML, combine the ` const ( - stableRepository = "stable" - localRepository = "local" + stableRepository = "stable" + localRepository = "local" +) + +var ( stableRepositoryURL = "https://kubernetes-charts.storage.googleapis.com" // This is the IPv4 loopback, not localhost, because we have to force IPv4 // for Dockerized Helm: https://github.com/kubernetes/helm/issues/1410 @@ -108,6 +111,9 @@ func newInitCmd(out io.Writer) *cobra.Command { f.StringVar(&tlsCertFile, "tiller-tls-cert", "", "path to TLS certificate file to install with tiller") f.StringVar(&tlsCaCertFile, "tls-ca-cert", "", "path to CA root certificate") + f.StringVar(&stableRepositoryURL, "stable-repo-url", stableRepositoryURL, "URL for stable repository") + f.StringVar(&localRepositoryURL, "local-repo-url", localRepositoryURL, "URL for local repository") + return cmd } -- GitLab