Merge pull request #2287 from jascott1/2222/nethost_tiller

feat(tiller): add --net-host flag to 'helm init'
pull/2301/head
Matt Butcher 8 years ago committed by GitHub
commit 5af676cda1

@ -115,6 +115,8 @@ func newInitCmd(out io.Writer) *cobra.Command {
f.StringVar(&stableRepositoryURL, "stable-repo-url", stableRepositoryURL, "URL for stable repository")
f.StringVar(&localRepositoryURL, "local-repo-url", localRepositoryURL, "URL for local repository")
f.BoolVar(&i.opts.EnableHostNetwork, "net-host", false, "install tiller with net=host")
return cmd
}

@ -164,6 +164,9 @@ func generateDeployment(opts *Options) *extensions.Deployment {
},
},
},
SecurityContext: &api.PodSecurityContext{
HostNetwork: opts.EnableHostNetwork,
},
},
},
},

@ -65,6 +65,9 @@ type Options struct {
//
// Required and valid if and only if VerifyTLS is set.
TLSCaCertFile string
// EnableHostNetwork installs Tiller with net=host
EnableHostNetwork bool
}
func (opts *Options) selectImage() string {

@ -37,6 +37,7 @@ helm init
-c, --client-only if set does not install tiller
--dry-run do not install local or remote
--local-repo-url string URL for local repository (default "http://127.0.0.1:8879/charts")
--net-host install tiller with net=host
--skip-refresh do not refresh (download) the local repository cache
--stable-repo-url string URL for stable repository (default "https://kubernetes-charts.storage.googleapis.com")
-i, --tiller-image string override tiller image
@ -61,4 +62,4 @@ helm init
### SEE ALSO
* [helm](helm.md) - The Helm package manager for Kubernetes.
###### Auto generated by spf13/cobra on 16-Apr-2017
###### Auto generated by spf13/cobra on 18-Apr-2017

@ -57,6 +57,10 @@ To dump a manifest containing the Tiller deployment YAML, combine the
\[la]http://127.0.0.1:8879/charts"\[ra]
URL for local repository
.PP
\fB\-\-net\-host\fP[=false]
install tiller with net=host
.PP
\fB\-\-skip\-refresh\fP[=false]
do not refresh (download) the local repository cache
@ -124,4 +128,4 @@ To dump a manifest containing the Tiller deployment YAML, combine the
.SH HISTORY
.PP
16\-Apr\-2017 Auto generated by spf13/cobra
18\-Apr\-2017 Auto generated by spf13/cobra

@ -636,6 +636,8 @@ _helm_init()
local_nonpersistent_flags+=("--dry-run")
flags+=("--local-repo-url=")
local_nonpersistent_flags+=("--local-repo-url=")
flags+=("--net-host")
local_nonpersistent_flags+=("--net-host")
flags+=("--skip-refresh")
local_nonpersistent_flags+=("--skip-refresh")
flags+=("--stable-repo-url=")

Loading…
Cancel
Save