Correct comments and usage instructions. Update helm_init.md.

reviewable/pr2557/r5
Justin Scott 8 years ago
parent 26fa96cc42
commit 3759850954

@ -121,8 +121,8 @@ func newInitCmd(out io.Writer) *cobra.Command {
f.BoolVar(&i.opts.EnableHostNetwork, "net-host", false, "install tiller with net=host") f.BoolVar(&i.opts.EnableHostNetwork, "net-host", false, "install tiller with net=host")
f.StringVar(&i.serviceAccount, "service-account", "", "name of service account") f.StringVar(&i.serviceAccount, "service-account", "", "name of service account")
f.StringVar(&i.opts.NodeSelectors, "node-selectors", "", "labels to select which node tiller lands on") f.StringVar(&i.opts.NodeSelectors, "node-selectors", "", "labels to specify the node on which tiller is installed (app=tiller,helm=rocks)")
f.StringVarP(&i.opts.Output, "output", "o", "", "skip installation and output tiller's manifest in specified format (json,yaml)") f.StringVarP(&i.opts.Output, "output", "o", "", "skip installation and output tiller's manifest in specified format (json or yaml)")
f.StringArrayVar(&i.opts.Values, "set", []string{}, "set values for the Tiller Deployment manifest (can specify multiple or separate values with commas: key1=val1,key2=val2)") f.StringArrayVar(&i.opts.Values, "set", []string{}, "set values for the Tiller Deployment manifest (can specify multiple or separate values with commas: key1=val1,key2=val2)")
return cmd return cmd
@ -189,7 +189,6 @@ func (i *initCmd) run() error {
return err return err
} }
if len(i.opts.Output) > 0 { if len(i.opts.Output) > 0 {
var body string var body string
var err error var err error
if body, err = installer.DeploymentManifest(&i.opts); err != nil { if body, err = installer.DeploymentManifest(&i.opts); err != nil {

@ -26,46 +26,46 @@ import (
const defaultImage = "gcr.io/kubernetes-helm/tiller" const defaultImage = "gcr.io/kubernetes-helm/tiller"
// Options control how to install tiller into a cluster, upgrade, and uninstall tiller from a cluster. // Options control how to install Tiller into a cluster, upgrade, and uninstall tiller from a cluster.
type Options struct { type Options struct {
// EnableTLS instructs tiller to serve with TLS enabled. // EnableTLS instructs Tiller to serve with TLS enabled.
// //
// Implied by VerifyTLS. If set the TLSKey and TLSCert are required. // Implied by VerifyTLS. If set the TLSKey and TLSCert are required.
EnableTLS bool EnableTLS bool
// VerifyTLS instructs tiller to serve with TLS enabled verify remote certificates. // VerifyTLS instructs Tiller to serve with TLS enabled verify remote certificates.
// //
// If set TLSKey, TLSCert, TLSCaCert are required. // If set TLSKey, TLSCert, TLSCaCert are required.
VerifyTLS bool VerifyTLS bool
// UseCanary indicates that tiller should deploy using the latest tiller image. // UseCanary indicates that Tiller should deploy using the latest Tiller image.
UseCanary bool UseCanary bool
// Namespace is the kubernetes namespace to use to deploy tiller. // Namespace is the kubernetes namespace to use to deploy Tiller.
Namespace string Namespace string
// ServiceAccount is the Kubernetes service account to add to tiller // ServiceAccount is the Kubernetes service account to add to Tiller
ServiceAccount string ServiceAccount string
// ImageSpec indentifies the image tiller will use when deployed. // ImageSpec indentifies the image Tiller will use when deployed.
// //
// Valid if and only if UseCanary is false. // Valid if and only if UseCanary is false.
ImageSpec string ImageSpec string
// TLSKeyFile identifies the file containing the pem encoded TLS private // TLSKeyFile identifies the file containing the pem encoded TLS private
// key tiller should use. // key Tiller should use.
// //
// Required and valid if and only if EnableTLS or VerifyTLS is set. // Required and valid if and only if EnableTLS or VerifyTLS is set.
TLSKeyFile string TLSKeyFile string
// TLSCertFile identifies the file containing the pem encoded TLS // TLSCertFile identifies the file containing the pem encoded TLS
// certificate tiller should use. // certificate Tiller should use.
// //
// Required and valid if and only if EnableTLS or VerifyTLS is set. // Required and valid if and only if EnableTLS or VerifyTLS is set.
TLSCertFile string TLSCertFile string
// TLSCaCertFile identifies the file containing the pem encoded TLS CA // TLSCaCertFile identifies the file containing the pem encoded TLS CA
// certificate tiller should use to verify remotes certificates. // certificate Tiller should use to verify remotes certificates.
// //
// Required and valid if and only if VerifyTLS is set. // Required and valid if and only if VerifyTLS is set.
TLSCaCertFile string TLSCaCertFile string
@ -76,7 +76,7 @@ type Options struct {
// NodeSelectors determine which nodes Tiller can land on // NodeSelectors determine which nodes Tiller can land on
NodeSelectors string NodeSelectors string
// Output dumps the Tiller manifest in the specified format (e.g. json) but skips Helm/Tiller installation // Output dumps the Tiller manifest in the specified format (e.g. JSON) but skips Helm/Tiller installation
Output string Output string
// Set merges additional values into the Tiller Deployment manifest // Set merges additional values into the Tiller Deployment manifest
@ -106,8 +106,7 @@ func (opts *Options) tls() bool { return opts.EnableTLS || opts.VerifyTLS }
// valuesMap returns user set values in map format // valuesMap returns user set values in map format
func (opts *Options) valuesMap(m map[string]interface{}) (map[string]interface{}, error) { func (opts *Options) valuesMap(m map[string]interface{}) (map[string]interface{}, error) {
for _, skv := range opts.Values { for _, skv := range opts.Values {
err := strvals.ParseInto(skv, m) if err := strvals.ParseInto(skv, m); err != nil {
if err != nil {
return nil, err return nil, err
} }
} }

@ -38,9 +38,10 @@ helm init
--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 --net-host install tiller with net=host
--node-selectors string labels to select which node tiller lands on --node-selectors string labels to specify the node on which tiller is installed (app=tiller,helm=rocks)
-o, --output string skip installation and output tiller's manifest in specified format -o, --output string skip installation and output tiller's manifest in specified format (json or yaml)
--service-account string name of service account --service-account string name of service account
--set stringArray set values for the Tiller Deployment manifest (can specify multiple or separate values with commas: key1=val1,key2=val2)
--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
@ -65,4 +66,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 7-Jun-2017 ###### Auto generated by spf13/cobra on 16-Jun-2017

Loading…
Cancel
Save