fix(helm): Add --tiller-tls-hostname flag to 'helm init'

This will fix the bug where 'helm init --wait' fails when TLS is used.

Signed-off-by: aswinkarthik <aswinkarthik93@gmail.com>
pull/4461/head
aswinkarthik 6 years ago
parent 3f0c6c5404
commit 1b34a511d4
No known key found for this signature in database
GPG Key ID: 9B68445C36434960

@ -286,7 +286,7 @@ func newClient() helm.Interface {
if tlsKeyFile == "" {
tlsKeyFile = settings.Home.TLSKey()
}
debug("Host=%q, Key=%q, Cert=%q, CA=%q\n", tlsKeyFile, tlsCertFile, tlsCaCertFile)
debug("Host=%q, Key=%q, Cert=%q, CA=%q\n", tlsServerName, tlsKeyFile, tlsCertFile, tlsCaCertFile)
tlsopts := tlsutil.Options{
ServerName: tlsServerName,
KeyFile: tlsKeyFile,

@ -126,6 +126,7 @@ func newInitCmd(out io.Writer) *cobra.Command {
f.StringVar(&tlsKeyFile, "tiller-tls-key", "", "path to TLS key file to install with Tiller")
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(&tlsServerName, "tiller-tls-hostname", settings.TillerHost, "the server name used to verify the hostname on the returned certificates from Tiller")
f.StringVar(&stableRepositoryURL, "stable-repo-url", stableRepositoryURL, "URL for stable repository")
f.StringVar(&localRepositoryURL, "local-repo-url", localRepositoryURL, "URL for local repository")

@ -50,6 +50,7 @@ helm init [flags]
-i, --tiller-image string override Tiller image
--tiller-tls install Tiller with TLS enabled
--tiller-tls-cert string path to TLS certificate file to install with Tiller
--tiller-tls-hostname string the server name used to verify the hostname on the returned certificates from Tiller
--tiller-tls-key string path to TLS key file to install with Tiller
--tiller-tls-verify install Tiller with TLS enabled and to verify remote certificates
--tls-ca-cert string path to CA root certificate
@ -73,4 +74,4 @@ helm init [flags]
* [helm](helm.md) - The Helm package manager for Kubernetes.
###### Auto generated by spf13/cobra on 1-Aug-2018
###### Auto generated by spf13/cobra on 1-Sep-2018

Loading…
Cancel
Save