Correct comments and usage instructions. Update helm_init.md.

reviewable/pr2557/r6
Justin Scott 8 years ago
parent 4114c5f7f2
commit 586c978e10

@ -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.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.StringVarP(&i.opts.Output, "output", "o", "", "skip installation and output tiller's manifest in specified format (json,yaml)")
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 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)")
return cmd
@ -189,7 +189,6 @@ func (i *initCmd) run() error {
return err
}
if len(i.opts.Output) > 0 {
var body string
var err error
if body, err = installer.DeploymentManifest(&i.opts); err != nil {

@ -26,46 +26,46 @@ import (
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 {
// 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.
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.
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
// Namespace is the kubernetes namespace to use to deploy tiller.
// Namespace is the kubernetes namespace to use to deploy Tiller.
Namespace string
// ServiceAccount is the Kubernetes service account to add to tiller
// ServiceAccount is the Kubernetes service account to add to Tiller
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.
ImageSpec string
// 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.
TLSKeyFile string
// 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.
TLSCertFile string
// 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.
TLSCaCertFile string
@ -76,7 +76,7 @@ type Options struct {
// NodeSelectors determine which nodes Tiller can land on
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
// 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
func (opts *Options) valuesMap(m map[string]interface{}) (map[string]interface{}, error) {
for _, skv := range opts.Values {
err := strvals.ParseInto(skv, m)
if err != nil {
if err := strvals.ParseInto(skv, m); err != nil {
return nil, err
}
}

@ -38,9 +38,10 @@ helm init
--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
--node-selectors string labels to select which node tiller lands on
-o, --output string skip installation and output tiller's manifest in specified format
--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 (json or yaml)
--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
--stable-repo-url string URL for stable repository (default "https://kubernetes-charts.storage.googleapis.com")
-i, --tiller-image string override tiller image
@ -65,4 +66,4 @@ helm init
### SEE ALSO
* [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