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(&stableRepositoryURL, "stable-repo-url", stableRepositoryURL, "URL for stable repository")
f.StringVar(&localRepositoryURL, "local-repo-url", localRepositoryURL, "URL for local 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 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. // Required and valid if and only if VerifyTLS is set.
TLSCaCertFile string TLSCaCertFile string
// EnableHostNetwork installs Tiller with net=host
EnableHostNetwork bool
} }
func (opts *Options) selectImage() string { func (opts *Options) selectImage() string {

@ -37,6 +37,7 @@ helm init
-c, --client-only if set does not install tiller -c, --client-only if set does not install tiller
--dry-run do not install local or remote --dry-run do not install local or remote
--local-repo-url string URL for local repository (default "http://127.0.0.1:8879/charts") --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 --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") --stable-repo-url string URL for stable repository (default "https://kubernetes-charts.storage.googleapis.com")
-i, --tiller-image string override tiller image -i, --tiller-image string override tiller image
@ -61,4 +62,4 @@ helm init
### SEE ALSO ### SEE ALSO
* [helm](helm.md) - The Helm package manager for Kubernetes. * [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] \[la]http://127.0.0.1:8879/charts"\[ra]
URL for local repository URL for local repository
.PP
\fB\-\-net\-host\fP[=false]
install tiller with net=host
.PP .PP
\fB\-\-skip\-refresh\fP[=false] \fB\-\-skip\-refresh\fP[=false]
do not refresh (download) the local repository cache 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 .SH HISTORY
.PP .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") local_nonpersistent_flags+=("--dry-run")
flags+=("--local-repo-url=") flags+=("--local-repo-url=")
local_nonpersistent_flags+=("--local-repo-url=") local_nonpersistent_flags+=("--local-repo-url=")
flags+=("--net-host")
local_nonpersistent_flags+=("--net-host")
flags+=("--skip-refresh") flags+=("--skip-refresh")
local_nonpersistent_flags+=("--skip-refresh") local_nonpersistent_flags+=("--skip-refresh")
flags+=("--stable-repo-url=") flags+=("--stable-repo-url=")

Loading…
Cancel
Save