Commit 48649fe0 authored by Justin Scott's avatar Justin Scott

WIP feat(tiller): add --net-host flag to 'helm init'

When 'helm init --net-host=true' is run, Tiller will be installed with access to the host network (net=host in Docker)

Closes #2222
parent 01f8dcdc
...@@ -115,6 +115,8 @@ func newInitCmd(out io.Writer) *cobra.Command { ...@@ -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 { ...@@ -164,6 +164,9 @@ func generateDeployment(opts *Options) *extensions.Deployment {
}, },
}, },
}, },
SecurityContext: &api.PodSecurityContext{
HostNetwork: opts.EnableHostNetwork,
},
}, },
}, },
}, },
......
...@@ -65,6 +65,9 @@ type Options struct { ...@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment