Adds a Helm check for a new version of Helm

Part of #4329

Signed-off-by: Matt Farina <matt@mattfarina.com>
pull/4353/head
Matt Farina 7 years ago
parent 5ce95c6ea3
commit d71515ef84
No known key found for this signature in database
GPG Key ID: 9436E80BFBA46909

@ -21,6 +21,7 @@ import (
"io/ioutil" "io/ioutil"
"log" "log"
"os" "os"
"path/filepath"
"strings" "strings"
"github.com/spf13/cobra" "github.com/spf13/cobra"
@ -34,6 +35,7 @@ import (
_ "k8s.io/client-go/plugin/pkg/client/auth" _ "k8s.io/client-go/plugin/pkg/client/auth"
"k8s.io/helm/pkg/helm" "k8s.io/helm/pkg/helm"
helm_env "k8s.io/helm/pkg/helm/environment" helm_env "k8s.io/helm/pkg/helm/environment"
"k8s.io/helm/pkg/helm/notify"
"k8s.io/helm/pkg/helm/portforwarder" "k8s.io/helm/pkg/helm/portforwarder"
"k8s.io/helm/pkg/kube" "k8s.io/helm/pkg/kube"
"k8s.io/helm/pkg/tlsutil" "k8s.io/helm/pkg/tlsutil"
@ -79,6 +81,8 @@ Environment:
` `
func newRootCmd(args []string) *cobra.Command { func newRootCmd(args []string) *cobra.Command {
updateMessages := make(chan string)
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "helm", Use: "helm",
Short: "The Helm package manager for Kubernetes.", Short: "The Helm package manager for Kubernetes.",
@ -88,9 +92,29 @@ func newRootCmd(args []string) *cobra.Command {
tlsCaCertFile = os.ExpandEnv(tlsCaCertFile) tlsCaCertFile = os.ExpandEnv(tlsCaCertFile)
tlsCertFile = os.ExpandEnv(tlsCertFile) tlsCertFile = os.ExpandEnv(tlsCertFile)
tlsKeyFile = os.ExpandEnv(tlsKeyFile) tlsKeyFile = os.ExpandEnv(tlsKeyFile)
// Check for update in pre-run via goroutine and print update in post-run
// This allows the update check to happen concurrently from the command
if !settings.SkipSelfUpdateCheck {
lastUpdatePath := filepath.Join(settings.Home.String(), "last_update_check")
go func() {
// 604800 = 60 seconds * 60 minutes * 24 hours * 7 days
newVer, err := notify.IfTimeFromFile(lastUpdatePath, 604800, "https://mattfarina.github.io/test_helm_releases_url/releases.json")
if err != nil {
debug("Error checking for newer version of Helm: %q", err)
}
updateMessages <- newVer
}()
}
}, },
PersistentPostRun: func(*cobra.Command, []string) { PersistentPostRun: func(cmd *cobra.Command, args []string) {
teardown() teardown()
msg := <-updateMessages
if msg != "" {
out := cmd.OutOrStdout()
fmt.Fprintf(out, "A new release of Helm is available at the version %s\n", msg)
}
}, },
} }
flags := cmd.PersistentFlags() flags := cmd.PersistentFlags()

@ -36,6 +36,7 @@ Environment:
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm") --home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--host string address of Tiller. Overrides $HELM_HOST --host string address of Tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use --kube-context string name of the kubeconfig context to use
--skip-self-update-check disable checking for updates to Helm
--tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300)
--tiller-namespace string namespace of Tiller (default "kube-system") --tiller-namespace string namespace of Tiller (default "kube-system")
``` ```
@ -68,4 +69,4 @@ Environment:
* [helm verify](helm_verify.md) - verify that a chart at the given path has been signed and is valid * [helm verify](helm_verify.md) - verify that a chart at the given path has been signed and is valid
* [helm version](helm_version.md) - print the client/server version information * [helm version](helm_version.md) - print the client/server version information
###### Auto generated by spf13/cobra on 14-Mar-2018 ###### Auto generated by spf13/cobra on 18-Jul-2018

@ -28,6 +28,7 @@ helm completion SHELL
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm") --home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--host string address of Tiller. Overrides $HELM_HOST --host string address of Tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use --kube-context string name of the kubeconfig context to use
--skip-self-update-check disable checking for updates to Helm
--tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300)
--tiller-namespace string namespace of Tiller (default "kube-system") --tiller-namespace string namespace of Tiller (default "kube-system")
``` ```
@ -35,4 +36,4 @@ helm completion SHELL
### 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 8-Mar-2018 ###### Auto generated by spf13/cobra on 18-Jul-2018

@ -47,6 +47,7 @@ helm create NAME
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm") --home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--host string address of Tiller. Overrides $HELM_HOST --host string address of Tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use --kube-context string name of the kubeconfig context to use
--skip-self-update-check disable checking for updates to Helm
--tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300)
--tiller-namespace string namespace of Tiller (default "kube-system") --tiller-namespace string namespace of Tiller (default "kube-system")
``` ```
@ -54,4 +55,4 @@ helm create NAME
### 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 8-Mar-2018 ###### Auto generated by spf13/cobra on 18-Jul-2018

@ -39,6 +39,7 @@ helm delete [flags] RELEASE_NAME [...]
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm") --home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--host string address of Tiller. Overrides $HELM_HOST --host string address of Tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use --kube-context string name of the kubeconfig context to use
--skip-self-update-check disable checking for updates to Helm
--tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300)
--tiller-namespace string namespace of Tiller (default "kube-system") --tiller-namespace string namespace of Tiller (default "kube-system")
``` ```
@ -46,4 +47,4 @@ helm delete [flags] RELEASE_NAME [...]
### 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 13-Apr-2018 ###### Auto generated by spf13/cobra on 18-Jul-2018

@ -61,6 +61,7 @@ for this case.
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm") --home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--host string address of Tiller. Overrides $HELM_HOST --host string address of Tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use --kube-context string name of the kubeconfig context to use
--skip-self-update-check disable checking for updates to Helm
--tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300)
--tiller-namespace string namespace of Tiller (default "kube-system") --tiller-namespace string namespace of Tiller (default "kube-system")
``` ```
@ -71,4 +72,4 @@ for this case.
* [helm dependency list](helm_dependency_list.md) - list the dependencies for the given chart * [helm dependency list](helm_dependency_list.md) - list the dependencies for the given chart
* [helm dependency update](helm_dependency_update.md) - update charts/ based on the contents of requirements.yaml * [helm dependency update](helm_dependency_update.md) - update charts/ based on the contents of requirements.yaml
###### Auto generated by spf13/cobra on 8-Mar-2018 ###### Auto generated by spf13/cobra on 18-Jul-2018

@ -34,6 +34,7 @@ helm dependency build [flags] CHART
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm") --home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--host string address of Tiller. Overrides $HELM_HOST --host string address of Tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use --kube-context string name of the kubeconfig context to use
--skip-self-update-check disable checking for updates to Helm
--tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300)
--tiller-namespace string namespace of Tiller (default "kube-system") --tiller-namespace string namespace of Tiller (default "kube-system")
``` ```
@ -41,4 +42,4 @@ helm dependency build [flags] CHART
### SEE ALSO ### SEE ALSO
* [helm dependency](helm_dependency.md) - manage a chart's dependencies * [helm dependency](helm_dependency.md) - manage a chart's dependencies
###### Auto generated by spf13/cobra on 8-Mar-2018 ###### Auto generated by spf13/cobra on 18-Jul-2018

@ -26,6 +26,7 @@ helm dependency list [flags] CHART
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm") --home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--host string address of Tiller. Overrides $HELM_HOST --host string address of Tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use --kube-context string name of the kubeconfig context to use
--skip-self-update-check disable checking for updates to Helm
--tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300)
--tiller-namespace string namespace of Tiller (default "kube-system") --tiller-namespace string namespace of Tiller (default "kube-system")
``` ```
@ -33,4 +34,4 @@ helm dependency list [flags] CHART
### SEE ALSO ### SEE ALSO
* [helm dependency](helm_dependency.md) - manage a chart's dependencies * [helm dependency](helm_dependency.md) - manage a chart's dependencies
###### Auto generated by spf13/cobra on 8-Mar-2018 ###### Auto generated by spf13/cobra on 18-Jul-2018

@ -39,6 +39,7 @@ helm dependency update [flags] CHART
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm") --home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--host string address of Tiller. Overrides $HELM_HOST --host string address of Tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use --kube-context string name of the kubeconfig context to use
--skip-self-update-check disable checking for updates to Helm
--tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300)
--tiller-namespace string namespace of Tiller (default "kube-system") --tiller-namespace string namespace of Tiller (default "kube-system")
``` ```
@ -46,4 +47,4 @@ helm dependency update [flags] CHART
### SEE ALSO ### SEE ALSO
* [helm dependency](helm_dependency.md) - manage a chart's dependencies * [helm dependency](helm_dependency.md) - manage a chart's dependencies
###### Auto generated by spf13/cobra on 8-Mar-2018 ###### Auto generated by spf13/cobra on 18-Jul-2018

@ -50,9 +50,12 @@ helm fetch [flags] [chart URL | repo/chartname] [...]
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm") --home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--host string address of Tiller. Overrides $HELM_HOST --host string address of Tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use --kube-context string name of the kubeconfig context to use
--skip-self-update-check disable checking for updates to Helm
--tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300)
--tiller-namespace string namespace of Tiller (default "kube-system") --tiller-namespace string namespace of Tiller (default "kube-system")
``` ```
### 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 18-Jul-2018

@ -40,6 +40,7 @@ helm get [flags] RELEASE_NAME
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm") --home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--host string address of Tiller. Overrides $HELM_HOST --host string address of Tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use --kube-context string name of the kubeconfig context to use
--skip-self-update-check disable checking for updates to Helm
--tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300)
--tiller-namespace string namespace of Tiller (default "kube-system") --tiller-namespace string namespace of Tiller (default "kube-system")
``` ```
@ -50,4 +51,4 @@ helm get [flags] RELEASE_NAME
* [helm get manifest](helm_get_manifest.md) - download the manifest for a named release * [helm get manifest](helm_get_manifest.md) - download the manifest for a named release
* [helm get values](helm_get_values.md) - download the values file for a named release * [helm get values](helm_get_values.md) - download the values file for a named release
###### Auto generated by spf13/cobra on 8-Mar-2018 ###### Auto generated by spf13/cobra on 18-Jul-2018

@ -33,6 +33,7 @@ helm get hooks [flags] RELEASE_NAME
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm") --home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--host string address of Tiller. Overrides $HELM_HOST --host string address of Tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use --kube-context string name of the kubeconfig context to use
--skip-self-update-check disable checking for updates to Helm
--tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300)
--tiller-namespace string namespace of Tiller (default "kube-system") --tiller-namespace string namespace of Tiller (default "kube-system")
``` ```
@ -40,4 +41,4 @@ helm get hooks [flags] RELEASE_NAME
### SEE ALSO ### SEE ALSO
* [helm get](helm_get.md) - download a named release * [helm get](helm_get.md) - download a named release
###### Auto generated by spf13/cobra on 8-Mar-2018 ###### Auto generated by spf13/cobra on 18-Jul-2018

@ -35,6 +35,7 @@ helm get manifest [flags] RELEASE_NAME
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm") --home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--host string address of Tiller. Overrides $HELM_HOST --host string address of Tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use --kube-context string name of the kubeconfig context to use
--skip-self-update-check disable checking for updates to Helm
--tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300)
--tiller-namespace string namespace of Tiller (default "kube-system") --tiller-namespace string namespace of Tiller (default "kube-system")
``` ```
@ -42,4 +43,4 @@ helm get manifest [flags] RELEASE_NAME
### SEE ALSO ### SEE ALSO
* [helm get](helm_get.md) - download a named release * [helm get](helm_get.md) - download a named release
###### Auto generated by spf13/cobra on 8-Mar-2018 ###### Auto generated by spf13/cobra on 18-Jul-2018

@ -32,6 +32,7 @@ helm get values [flags] RELEASE_NAME
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm") --home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--host string address of Tiller. Overrides $HELM_HOST --host string address of Tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use --kube-context string name of the kubeconfig context to use
--skip-self-update-check disable checking for updates to Helm
--tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300)
--tiller-namespace string namespace of Tiller (default "kube-system") --tiller-namespace string namespace of Tiller (default "kube-system")
``` ```
@ -39,4 +40,4 @@ helm get values [flags] RELEASE_NAME
### SEE ALSO ### SEE ALSO
* [helm get](helm_get.md) - download a named release * [helm get](helm_get.md) - download a named release
###### Auto generated by spf13/cobra on 8-Mar-2018 ###### Auto generated by spf13/cobra on 18-Jul-2018

@ -45,6 +45,7 @@ helm history [flags] RELEASE_NAME
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm") --home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--host string address of Tiller. Overrides $HELM_HOST --host string address of Tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use --kube-context string name of the kubeconfig context to use
--skip-self-update-check disable checking for updates to Helm
--tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300)
--tiller-namespace string namespace of Tiller (default "kube-system") --tiller-namespace string namespace of Tiller (default "kube-system")
``` ```
@ -52,4 +53,4 @@ helm history [flags] RELEASE_NAME
### 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 14-Mar-2018 ###### Auto generated by spf13/cobra on 18-Jul-2018

@ -21,6 +21,7 @@ helm home
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm") --home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--host string address of Tiller. Overrides $HELM_HOST --host string address of Tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use --kube-context string name of the kubeconfig context to use
--skip-self-update-check disable checking for updates to Helm
--tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300)
--tiller-namespace string namespace of Tiller (default "kube-system") --tiller-namespace string namespace of Tiller (default "kube-system")
``` ```
@ -28,4 +29,4 @@ helm home
### 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 8-Mar-2018 ###### Auto generated by spf13/cobra on 18-Jul-2018

@ -64,6 +64,7 @@ helm init
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm") --home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--host string address of Tiller. Overrides $HELM_HOST --host string address of Tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use --kube-context string name of the kubeconfig context to use
--skip-self-update-check disable checking for updates to Helm
--tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300)
--tiller-namespace string namespace of Tiller (default "kube-system") --tiller-namespace string namespace of Tiller (default "kube-system")
``` ```
@ -71,4 +72,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 8-Mar-2018 ###### Auto generated by spf13/cobra on 18-Jul-2018

@ -37,6 +37,7 @@ helm inspect [CHART]
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm") --home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--host string address of Tiller. Overrides $HELM_HOST --host string address of Tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use --kube-context string name of the kubeconfig context to use
--skip-self-update-check disable checking for updates to Helm
--tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300)
--tiller-namespace string namespace of Tiller (default "kube-system") --tiller-namespace string namespace of Tiller (default "kube-system")
``` ```
@ -47,4 +48,4 @@ helm inspect [CHART]
* [helm inspect readme](helm_inspect_readme.md) - shows inspect readme * [helm inspect readme](helm_inspect_readme.md) - shows inspect readme
* [helm inspect values](helm_inspect_values.md) - shows inspect values * [helm inspect values](helm_inspect_values.md) - shows inspect values
###### Auto generated by spf13/cobra on 14-Mar-2018 ###### Auto generated by spf13/cobra on 18-Jul-2018

@ -35,6 +35,7 @@ helm inspect chart [CHART]
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm") --home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--host string address of Tiller. Overrides $HELM_HOST --host string address of Tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use --kube-context string name of the kubeconfig context to use
--skip-self-update-check disable checking for updates to Helm
--tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300)
--tiller-namespace string namespace of Tiller (default "kube-system") --tiller-namespace string namespace of Tiller (default "kube-system")
``` ```
@ -42,4 +43,4 @@ helm inspect chart [CHART]
### SEE ALSO ### SEE ALSO
* [helm inspect](helm_inspect.md) - inspect a chart * [helm inspect](helm_inspect.md) - inspect a chart
###### Auto generated by spf13/cobra on 8-Mar-2018 ###### Auto generated by spf13/cobra on 18-Jul-2018

@ -33,6 +33,7 @@ helm inspect readme [CHART]
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm") --home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--host string address of Tiller. Overrides $HELM_HOST --host string address of Tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use --kube-context string name of the kubeconfig context to use
--skip-self-update-check disable checking for updates to Helm
--tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300)
--tiller-namespace string namespace of Tiller (default "kube-system") --tiller-namespace string namespace of Tiller (default "kube-system")
``` ```
@ -40,4 +41,4 @@ helm inspect readme [CHART]
### SEE ALSO ### SEE ALSO
* [helm inspect](helm_inspect.md) - inspect a chart * [helm inspect](helm_inspect.md) - inspect a chart
###### Auto generated by spf13/cobra on 14-Mar-2018 ###### Auto generated by spf13/cobra on 18-Jul-2018

@ -35,6 +35,7 @@ helm inspect values [CHART]
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm") --home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--host string address of Tiller. Overrides $HELM_HOST --host string address of Tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use --kube-context string name of the kubeconfig context to use
--skip-self-update-check disable checking for updates to Helm
--tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300)
--tiller-namespace string namespace of Tiller (default "kube-system") --tiller-namespace string namespace of Tiller (default "kube-system")
``` ```
@ -42,4 +43,4 @@ helm inspect values [CHART]
### SEE ALSO ### SEE ALSO
* [helm inspect](helm_inspect.md) - inspect a chart * [helm inspect](helm_inspect.md) - inspect a chart
###### Auto generated by spf13/cobra on 8-Mar-2018 ###### Auto generated by spf13/cobra on 18-Jul-2018

@ -112,6 +112,7 @@ helm install [CHART]
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm") --home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--host string address of Tiller. Overrides $HELM_HOST --host string address of Tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use --kube-context string name of the kubeconfig context to use
--skip-self-update-check disable checking for updates to Helm
--tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300)
--tiller-namespace string namespace of Tiller (default "kube-system") --tiller-namespace string namespace of Tiller (default "kube-system")
``` ```
@ -119,4 +120,4 @@ helm install [CHART]
### 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 5-Jun-2018 ###### Auto generated by spf13/cobra on 18-Jul-2018

@ -35,6 +35,7 @@ helm lint [flags] PATH
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm") --home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--host string address of Tiller. Overrides $HELM_HOST --host string address of Tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use --kube-context string name of the kubeconfig context to use
--skip-self-update-check disable checking for updates to Helm
--tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300)
--tiller-namespace string namespace of Tiller (default "kube-system") --tiller-namespace string namespace of Tiller (default "kube-system")
``` ```
@ -42,4 +43,4 @@ helm lint [flags] PATH
### 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 20-May-2018 ###### Auto generated by spf13/cobra on 18-Jul-2018

@ -67,6 +67,7 @@ helm list [flags] [FILTER]
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm") --home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--host string address of Tiller. Overrides $HELM_HOST --host string address of Tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use --kube-context string name of the kubeconfig context to use
--skip-self-update-check disable checking for updates to Helm
--tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300)
--tiller-namespace string namespace of Tiller (default "kube-system") --tiller-namespace string namespace of Tiller (default "kube-system")
``` ```
@ -74,4 +75,4 @@ helm list [flags] [FILTER]
### 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 17-Apr-2018 ###### Auto generated by spf13/cobra on 18-Jul-2018

@ -40,6 +40,7 @@ helm package [flags] [CHART_PATH] [...]
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm") --home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--host string address of Tiller. Overrides $HELM_HOST --host string address of Tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use --kube-context string name of the kubeconfig context to use
--skip-self-update-check disable checking for updates to Helm
--tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300)
--tiller-namespace string namespace of Tiller (default "kube-system") --tiller-namespace string namespace of Tiller (default "kube-system")
``` ```
@ -47,4 +48,4 @@ helm package [flags] [CHART_PATH] [...]
### 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-2018 ###### Auto generated by spf13/cobra on 18-Jul-2018

@ -16,6 +16,7 @@ Manage client-side Helm plugins.
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm") --home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--host string address of Tiller. Overrides $HELM_HOST --host string address of Tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use --kube-context string name of the kubeconfig context to use
--skip-self-update-check disable checking for updates to Helm
--tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300)
--tiller-namespace string namespace of Tiller (default "kube-system") --tiller-namespace string namespace of Tiller (default "kube-system")
``` ```
@ -27,4 +28,4 @@ Manage client-side Helm plugins.
* [helm plugin remove](helm_plugin_remove.md) - remove one or more Helm plugins * [helm plugin remove](helm_plugin_remove.md) - remove one or more Helm plugins
* [helm plugin update](helm_plugin_update.md) - update one or more Helm plugins * [helm plugin update](helm_plugin_update.md) - update one or more Helm plugins
###### Auto generated by spf13/cobra on 8-Mar-2018 ###### Auto generated by spf13/cobra on 18-Jul-2018

@ -29,6 +29,7 @@ helm plugin install [options] <path|url>...
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm") --home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--host string address of Tiller. Overrides $HELM_HOST --host string address of Tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use --kube-context string name of the kubeconfig context to use
--skip-self-update-check disable checking for updates to Helm
--tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300)
--tiller-namespace string namespace of Tiller (default "kube-system") --tiller-namespace string namespace of Tiller (default "kube-system")
``` ```
@ -36,4 +37,4 @@ helm plugin install [options] <path|url>...
### SEE ALSO ### SEE ALSO
* [helm plugin](helm_plugin.md) - add, list, or remove Helm plugins * [helm plugin](helm_plugin.md) - add, list, or remove Helm plugins
###### Auto generated by spf13/cobra on 8-Mar-2018 ###### Auto generated by spf13/cobra on 18-Jul-2018

@ -18,6 +18,7 @@ helm plugin list
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm") --home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--host string address of Tiller. Overrides $HELM_HOST --host string address of Tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use --kube-context string name of the kubeconfig context to use
--skip-self-update-check disable checking for updates to Helm
--tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300)
--tiller-namespace string namespace of Tiller (default "kube-system") --tiller-namespace string namespace of Tiller (default "kube-system")
``` ```
@ -25,4 +26,4 @@ helm plugin list
### SEE ALSO ### SEE ALSO
* [helm plugin](helm_plugin.md) - add, list, or remove Helm plugins * [helm plugin](helm_plugin.md) - add, list, or remove Helm plugins
###### Auto generated by spf13/cobra on 8-Mar-2018 ###### Auto generated by spf13/cobra on 18-Jul-2018

@ -18,6 +18,7 @@ helm plugin remove <plugin>...
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm") --home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--host string address of Tiller. Overrides $HELM_HOST --host string address of Tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use --kube-context string name of the kubeconfig context to use
--skip-self-update-check disable checking for updates to Helm
--tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300)
--tiller-namespace string namespace of Tiller (default "kube-system") --tiller-namespace string namespace of Tiller (default "kube-system")
``` ```
@ -25,4 +26,4 @@ helm plugin remove <plugin>...
### SEE ALSO ### SEE ALSO
* [helm plugin](helm_plugin.md) - add, list, or remove Helm plugins * [helm plugin](helm_plugin.md) - add, list, or remove Helm plugins
###### Auto generated by spf13/cobra on 8-Mar-2018 ###### Auto generated by spf13/cobra on 18-Jul-2018

@ -18,6 +18,7 @@ helm plugin update <plugin>...
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm") --home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--host string address of Tiller. Overrides $HELM_HOST --host string address of Tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use --kube-context string name of the kubeconfig context to use
--skip-self-update-check disable checking for updates to Helm
--tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300)
--tiller-namespace string namespace of Tiller (default "kube-system") --tiller-namespace string namespace of Tiller (default "kube-system")
``` ```
@ -25,4 +26,4 @@ helm plugin update <plugin>...
### SEE ALSO ### SEE ALSO
* [helm plugin](helm_plugin.md) - add, list, or remove Helm plugins * [helm plugin](helm_plugin.md) - add, list, or remove Helm plugins
###### Auto generated by spf13/cobra on 8-Mar-2018 ###### Auto generated by spf13/cobra on 18-Jul-2018

@ -20,6 +20,7 @@ Example usage:
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm") --home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--host string address of Tiller. Overrides $HELM_HOST --host string address of Tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use --kube-context string name of the kubeconfig context to use
--skip-self-update-check disable checking for updates to Helm
--tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300)
--tiller-namespace string namespace of Tiller (default "kube-system") --tiller-namespace string namespace of Tiller (default "kube-system")
``` ```
@ -32,4 +33,4 @@ Example usage:
* [helm repo remove](helm_repo_remove.md) - remove a chart repository * [helm repo remove](helm_repo_remove.md) - remove a chart repository
* [helm repo update](helm_repo_update.md) - update information of available charts locally from chart repositories * [helm repo update](helm_repo_update.md) - update information of available charts locally from chart repositories
###### Auto generated by spf13/cobra on 8-Mar-2018 ###### Auto generated by spf13/cobra on 18-Jul-2018

@ -29,6 +29,7 @@ helm repo add [flags] [NAME] [URL]
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm") --home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--host string address of Tiller. Overrides $HELM_HOST --host string address of Tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use --kube-context string name of the kubeconfig context to use
--skip-self-update-check disable checking for updates to Helm
--tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300)
--tiller-namespace string namespace of Tiller (default "kube-system") --tiller-namespace string namespace of Tiller (default "kube-system")
``` ```
@ -36,4 +37,4 @@ helm repo add [flags] [NAME] [URL]
### SEE ALSO ### SEE ALSO
* [helm repo](helm_repo.md) - add, list, remove, update, and index chart repositories * [helm repo](helm_repo.md) - add, list, remove, update, and index chart repositories
###### Auto generated by spf13/cobra on 8-Mar-2018 ###### Auto generated by spf13/cobra on 18-Jul-2018

@ -34,6 +34,7 @@ helm repo index [flags] [DIR]
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm") --home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--host string address of Tiller. Overrides $HELM_HOST --host string address of Tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use --kube-context string name of the kubeconfig context to use
--skip-self-update-check disable checking for updates to Helm
--tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300)
--tiller-namespace string namespace of Tiller (default "kube-system") --tiller-namespace string namespace of Tiller (default "kube-system")
``` ```
@ -41,4 +42,4 @@ helm repo index [flags] [DIR]
### SEE ALSO ### SEE ALSO
* [helm repo](helm_repo.md) - add, list, remove, update, and index chart repositories * [helm repo](helm_repo.md) - add, list, remove, update, and index chart repositories
###### Auto generated by spf13/cobra on 8-Mar-2018 ###### Auto generated by spf13/cobra on 18-Jul-2018

@ -18,6 +18,7 @@ helm repo list [flags]
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm") --home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--host string address of Tiller. Overrides $HELM_HOST --host string address of Tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use --kube-context string name of the kubeconfig context to use
--skip-self-update-check disable checking for updates to Helm
--tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300)
--tiller-namespace string namespace of Tiller (default "kube-system") --tiller-namespace string namespace of Tiller (default "kube-system")
``` ```
@ -25,4 +26,4 @@ helm repo list [flags]
### SEE ALSO ### SEE ALSO
* [helm repo](helm_repo.md) - add, list, remove, update, and index chart repositories * [helm repo](helm_repo.md) - add, list, remove, update, and index chart repositories
###### Auto generated by spf13/cobra on 8-Mar-2018 ###### Auto generated by spf13/cobra on 18-Jul-2018

@ -18,6 +18,7 @@ helm repo remove [flags] [NAME]
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm") --home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--host string address of Tiller. Overrides $HELM_HOST --host string address of Tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use --kube-context string name of the kubeconfig context to use
--skip-self-update-check disable checking for updates to Helm
--tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300)
--tiller-namespace string namespace of Tiller (default "kube-system") --tiller-namespace string namespace of Tiller (default "kube-system")
``` ```
@ -25,4 +26,4 @@ helm repo remove [flags] [NAME]
### SEE ALSO ### SEE ALSO
* [helm repo](helm_repo.md) - add, list, remove, update, and index chart repositories * [helm repo](helm_repo.md) - add, list, remove, update, and index chart repositories
###### Auto generated by spf13/cobra on 8-Mar-2018 ###### Auto generated by spf13/cobra on 18-Jul-2018

@ -24,6 +24,7 @@ helm repo update
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm") --home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--host string address of Tiller. Overrides $HELM_HOST --host string address of Tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use --kube-context string name of the kubeconfig context to use
--skip-self-update-check disable checking for updates to Helm
--tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300)
--tiller-namespace string namespace of Tiller (default "kube-system") --tiller-namespace string namespace of Tiller (default "kube-system")
``` ```
@ -31,4 +32,4 @@ helm repo update
### SEE ALSO ### SEE ALSO
* [helm repo](helm_repo.md) - add, list, remove, update, and index chart repositories * [helm repo](helm_repo.md) - add, list, remove, update, and index chart repositories
###### Auto generated by spf13/cobra on 8-Mar-2018 ###### Auto generated by spf13/cobra on 18-Jul-2018

@ -34,6 +34,7 @@ helm reset
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm") --home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--host string address of Tiller. Overrides $HELM_HOST --host string address of Tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use --kube-context string name of the kubeconfig context to use
--skip-self-update-check disable checking for updates to Helm
--tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300)
--tiller-namespace string namespace of Tiller (default "kube-system") --tiller-namespace string namespace of Tiller (default "kube-system")
``` ```
@ -41,4 +42,4 @@ helm reset
### 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 8-Mar-2018 ###### Auto generated by spf13/cobra on 18-Jul-2018

@ -41,6 +41,7 @@ helm rollback [flags] [RELEASE] [REVISION]
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm") --home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--host string address of Tiller. Overrides $HELM_HOST --host string address of Tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use --kube-context string name of the kubeconfig context to use
--skip-self-update-check disable checking for updates to Helm
--tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300)
--tiller-namespace string namespace of Tiller (default "kube-system") --tiller-namespace string namespace of Tiller (default "kube-system")
``` ```
@ -48,4 +49,4 @@ helm rollback [flags] [RELEASE] [REVISION]
### 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 13-Apr-2018 ###### Auto generated by spf13/cobra on 18-Jul-2018

@ -32,6 +32,7 @@ helm search [keyword]
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm") --home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--host string address of Tiller. Overrides $HELM_HOST --host string address of Tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use --kube-context string name of the kubeconfig context to use
--skip-self-update-check disable checking for updates to Helm
--tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300)
--tiller-namespace string namespace of Tiller (default "kube-system") --tiller-namespace string namespace of Tiller (default "kube-system")
``` ```
@ -39,4 +40,4 @@ helm search [keyword]
### 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 23-Apr-2018 ###### Auto generated by spf13/cobra on 18-Jul-2018

@ -39,6 +39,7 @@ helm serve
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm") --home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--host string address of Tiller. Overrides $HELM_HOST --host string address of Tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use --kube-context string name of the kubeconfig context to use
--skip-self-update-check disable checking for updates to Helm
--tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300)
--tiller-namespace string namespace of Tiller (default "kube-system") --tiller-namespace string namespace of Tiller (default "kube-system")
``` ```
@ -46,4 +47,4 @@ helm serve
### 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 8-Mar-2018 ###### Auto generated by spf13/cobra on 18-Jul-2018

@ -39,6 +39,7 @@ helm status [flags] RELEASE_NAME
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm") --home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--host string address of Tiller. Overrides $HELM_HOST --host string address of Tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use --kube-context string name of the kubeconfig context to use
--skip-self-update-check disable checking for updates to Helm
--tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300)
--tiller-namespace string namespace of Tiller (default "kube-system") --tiller-namespace string namespace of Tiller (default "kube-system")
``` ```
@ -46,4 +47,4 @@ helm status [flags] RELEASE_NAME
### 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 8-Mar-2018 ###### Auto generated by spf13/cobra on 18-Jul-2018

@ -45,6 +45,7 @@ helm template [flags] CHART
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm") --home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--host string address of Tiller. Overrides $HELM_HOST --host string address of Tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use --kube-context string name of the kubeconfig context to use
--skip-self-update-check disable checking for updates to Helm
--tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300)
--tiller-namespace string namespace of Tiller (default "kube-system") --tiller-namespace string namespace of Tiller (default "kube-system")
``` ```
@ -52,4 +53,4 @@ helm template [flags] CHART
### 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 22-May-2018 ###### Auto generated by spf13/cobra on 18-Jul-2018

@ -35,6 +35,7 @@ helm test [RELEASE]
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm") --home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--host string address of Tiller. Overrides $HELM_HOST --host string address of Tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use --kube-context string name of the kubeconfig context to use
--skip-self-update-check disable checking for updates to Helm
--tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300)
--tiller-namespace string namespace of Tiller (default "kube-system") --tiller-namespace string namespace of Tiller (default "kube-system")
``` ```
@ -42,4 +43,4 @@ helm test [RELEASE]
### 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 8-Mar-2018 ###### Auto generated by spf13/cobra on 18-Jul-2018

@ -75,6 +75,7 @@ helm upgrade [RELEASE] [CHART]
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm") --home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--host string address of Tiller. Overrides $HELM_HOST --host string address of Tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use --kube-context string name of the kubeconfig context to use
--skip-self-update-check disable checking for updates to Helm
--tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300)
--tiller-namespace string namespace of Tiller (default "kube-system") --tiller-namespace string namespace of Tiller (default "kube-system")
``` ```
@ -82,4 +83,4 @@ helm upgrade [RELEASE] [CHART]
### 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 4-Apr-2018 ###### Auto generated by spf13/cobra on 18-Jul-2018

@ -33,6 +33,7 @@ helm verify [flags] PATH
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm") --home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--host string address of Tiller. Overrides $HELM_HOST --host string address of Tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use --kube-context string name of the kubeconfig context to use
--skip-self-update-check disable checking for updates to Helm
--tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300)
--tiller-namespace string namespace of Tiller (default "kube-system") --tiller-namespace string namespace of Tiller (default "kube-system")
``` ```
@ -40,4 +41,4 @@ helm verify [flags] PATH
### 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 8-Mar-2018 ###### Auto generated by spf13/cobra on 18-Jul-2018

@ -48,6 +48,7 @@ helm version
--home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm") --home string location of your Helm config. Overrides $HELM_HOME (default "~/.helm")
--host string address of Tiller. Overrides $HELM_HOST --host string address of Tiller. Overrides $HELM_HOST
--kube-context string name of the kubeconfig context to use --kube-context string name of the kubeconfig context to use
--skip-self-update-check disable checking for updates to Helm
--tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) --tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300)
--tiller-namespace string namespace of Tiller (default "kube-system") --tiller-namespace string namespace of Tiller (default "kube-system")
``` ```
@ -55,4 +56,4 @@ helm version
### 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 8-Mar-2018 ###### Auto generated by spf13/cobra on 18-Jul-2018

@ -49,6 +49,8 @@ type EnvSettings struct {
Debug bool Debug bool
// KubeContext is the name of the kubeconfig context. // KubeContext is the name of the kubeconfig context.
KubeContext string KubeContext string
// SkipSelfUpdateCheck tells helm to skip checking if there is an update to itself.
SkipSelfUpdateCheck bool
} }
// AddFlags binds flags to the given flagset. // AddFlags binds flags to the given flagset.
@ -59,6 +61,7 @@ func (s *EnvSettings) AddFlags(fs *pflag.FlagSet) {
fs.BoolVar(&s.Debug, "debug", false, "enable verbose output") fs.BoolVar(&s.Debug, "debug", false, "enable verbose output")
fs.StringVar(&s.TillerNamespace, "tiller-namespace", "kube-system", "namespace of Tiller") fs.StringVar(&s.TillerNamespace, "tiller-namespace", "kube-system", "namespace of Tiller")
fs.Int64Var(&s.TillerConnectionTimeout, "tiller-connection-timeout", int64(300), "the duration (in seconds) Helm will wait to establish a connection to tiller") fs.Int64Var(&s.TillerConnectionTimeout, "tiller-connection-timeout", int64(300), "the duration (in seconds) Helm will wait to establish a connection to tiller")
fs.BoolVar(&s.SkipSelfUpdateCheck, "skip-self-update-check", false, "disable checking for updates to Helm")
} }
// Init sets values from the environment. // Init sets values from the environment.

@ -0,0 +1,183 @@
/*
Copyright The Helm maintainers
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package notify // import "k8s.io/helm/pkg/helm/notify"
import (
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"sort"
"strings"
"time"
"github.com/Masterminds/semver"
"k8s.io/helm/pkg/version"
)
var (
// The time format used in the file recording the last check
timeLayout = time.RFC1123Z
)
// Release contains information for a release
type Release struct {
// Version is the version for the release (e.g., `v2.11.0`)
Version string `json:"version"`
// Checksums is a map of the file checksums for a release. For example,
// a key might be "darwin-amd64" and the value is the checksum for the release
// in that environment
Checksums map[string]string `json:"checksums,omitempty"`
}
// Releases is an array of Release
type Releases []Release
// IfTime checks if there is a newer version of Helm if the wait period is over
// Arguments are:
// - lastUpdateTime: The last time an update was checked
// - waitTime: The period to wait before checking again
// - checkURL: A URL with a JSON file containing the updates
// TODO: Change checkURL to the internal object
// The return data includes:
// - bool: true if an was checked for and false otherwise
// - string: the latest version if there is a newer version and an empty string otherwise
func IfTime(lastUpdateTime time.Time, waitTime time.Duration, checkURL string) (bool, string, error) {
// Check if current time has waited long enough
curr := time.Since(lastUpdateTime)
if curr <= waitTime {
return false, "", nil
}
// Check for an update
releases, err := getJSON(checkURL)
if err != nil {
return true, "", err
}
// Check if there is a new release
curSemVer, err := semver.NewVersion(version.GetVersion())
if err != nil {
return true, "", err
}
var vs []*semver.Version
for _, release := range releases {
tmpVer, err := semver.NewVersion(release.Version)
if err == nil {
vs = append(vs, tmpVer)
}
}
sort.Sort(semver.Collection(vs))
if len(vs) > 0 && vs[len(vs)-1].GreaterThan(curSemVer) {
return true, vs[len(vs)-1].String(), nil
}
// Return new release if one found
return true, "", nil
}
// IfTimeFromFile will notify of a new version available if:
// - The current time is greater than waitTime + the last time it was updated
// - There is a newer version available
// This is a helper function wrapping IfTime, reading from the filesystem,
// and pretty printing if there is a new version.
// The arguments are:
// - lastUpdatePath: The path to the local filesystem location containing the
// last time an update was checked for
// - waitTime: The time in seconds to wait from the last check before checking
// again.
// - checkURL: A URL to a JSON file with version information to check for updates
func IfTimeFromFile(lastUpdatePath string, waitTime int64, checkURL string) (string, error) {
// Read contents of the time file
content, err := ioutil.ReadFile(lastUpdatePath)
if err != nil {
// The file does not exist so we will assume this is a first run and create
// the file with a time of now so it will tell about an update in the future
errStr := err.Error()
if strings.Contains(errStr, "no such file or directory") {
curTime := time.Now().Format(timeLayout)
ioutil.WriteFile(lastUpdatePath, []byte(curTime), 0644)
content = []byte(curTime)
} else {
return "", err
}
}
// Convert the string time to a usable Time instance
lastChecked, err := time.Parse(timeLayout, strings.TrimSpace(string(content)))
if err != nil {
return "", err
}
// Convert the wait period to a Duration instance
waitPeriod := time.Duration(waitTime) * time.Second
// Call NotifyIfTime
checked, newVersion, err := IfTime(lastChecked, waitPeriod, checkURL)
if err != nil {
return "", err
}
// Update the check time if a check happened
if checked {
curTime := time.Now().Format(timeLayout)
ioutil.WriteFile(lastUpdatePath, []byte(curTime), 0644)
// If there is a new version and a check happened print the message
return newVersion, nil
}
return "", nil
}
func getJSON(href string) (Releases, error) {
client := &http.Client{}
// Construct the request
req, err := http.NewRequest("GET", href, nil)
if err != nil {
return nil, err
}
req.Header.Set("User-Agent", "Helm/"+strings.TrimPrefix(version.GetVersion(), "v"))
// Perform the request and handle errors
resp, err := client.Do(req)
if err != nil {
return nil, err
}
defer resp.Body.Close()
if resp.StatusCode != 200 {
return nil, fmt.Errorf("Failed to fetch update information at %s : %s", href, resp.Status)
}
// Get the contents of the JSON file
target := Releases{}
err = json.NewDecoder(resp.Body).Decode(&target)
if err != nil {
return nil, err
}
return target, nil
}

@ -0,0 +1,209 @@
/*
Copyright The Helm maintainers
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package notify
import (
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"net/http/httptest"
"os"
"path/filepath"
"testing"
"time"
"github.com/Masterminds/semver"
"k8s.io/helm/pkg/version"
)
type URLHandler struct {
releases Releases
}
func (h *URLHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
b, err := json.Marshal(h.releases)
if err != nil {
fmt.Println(err)
return
}
w.Header().Set("Content-Type", "application/javascript")
fmt.Fprintf(w, string(b))
}
func TestWorkingIfTime(t *testing.T) {
curSemVer, err := semver.NewVersion(version.GetVersion())
if err != nil {
t.Errorf("internal version (%s) could not be parsed: %s", version.GetVersion(), err)
}
nextVer := curSemVer.IncMinor()
nextVerString := "v" + nextVer.String()
tests := []struct {
checked bool
version string
newVersion string
duration int64
}{
{true, nextVerString, nextVer.String(), 10},
{true, "v" + curSemVer.String(), "", 10},
{false, nextVerString, "", 10000},
}
tmpTime := time.Now()
tmpTime = tmpTime.Add(-100 * time.Second)
for i, tc := range tests {
handler := &URLHandler{
releases: []Release{{Version: tc.version}},
}
server := httptest.NewServer(handler)
checked, newVer, err := IfTime(tmpTime, time.Duration(tc.duration)*time.Second, server.URL)
if err != nil {
t.Errorf("unexpected error checking IfTime: %s", err)
}
if checked != tc.checked {
t.Errorf("new version check of %t but got %t for test case %d", tc.checked, checked, i)
}
if tc.newVersion != newVer {
t.Errorf("expected a new version of %qbut got %q for test case %d", tc.newVersion, newVer, i)
}
}
}
func TestWorkingIfTimeFromFile(t *testing.T) {
curSemVer, err := semver.NewVersion(version.GetVersion())
if err != nil {
t.Errorf("internal version (%s) could not be parsed: %s", version.GetVersion(), err)
}
nextVer := curSemVer.IncMinor()
tests := []struct {
version *semver.Version
newVersion string
duration int64
}{
{&nextVer, nextVer.String(), 10},
{curSemVer, "", 10},
{&nextVer, "", 10000},
}
tempDir, err := ioutil.TempDir("", "helm-update_check-")
if err != nil {
t.Fatal(err)
}
defer os.RemoveAll(tempDir)
lastUpdatePath := filepath.Join(tempDir, "last_update_check")
for i, tc := range tests {
tmpTime := time.Now()
tmpTime = tmpTime.Add(-100 * time.Second)
ioutil.WriteFile(lastUpdatePath, []byte(tmpTime.Format(timeLayout)), 0644)
handler := &URLHandler{
releases: []Release{{Version: "v" + tc.version.String()}},
}
server := httptest.NewServer(handler)
newVer, err := IfTimeFromFile(lastUpdatePath, tc.duration, server.URL)
if err != nil {
t.Errorf("unexpected error checking IfTime: %s", err)
}
if tc.newVersion != newVer {
t.Errorf("expected a new version of %qbut got %q for test case %d", tc.newVersion, newVer, i)
}
}
}
type URLHandlerNone struct{}
func (h *URLHandlerNone) ServeHTTP(w http.ResponseWriter, r *http.Request) {
}
func TestBadURLIfTime(t *testing.T) {
handler := &URLHandlerNone{}
server := httptest.NewServer(handler)
tmpTime := time.Now()
tmpTime = tmpTime.Add(-100 * time.Second)
_, _, err := IfTime(tmpTime, time.Duration(10)*time.Second, server.URL)
if err == nil {
t.Error("expected error with handler but did not get one")
}
}
func TestBadURLIfTimeFromFile(t *testing.T) {
handler := &URLHandlerNone{}
server := httptest.NewServer(handler)
tmpTime := time.Now()
tmpTime = tmpTime.Add(-100 * time.Second)
tempDir, err := ioutil.TempDir("", "helm-update_check-")
if err != nil {
t.Fatal(err)
}
defer os.RemoveAll(tempDir)
lastUpdatePath := filepath.Join(tempDir, "last_update_check")
ioutil.WriteFile(lastUpdatePath, []byte(tmpTime.Format(timeLayout)), 0644)
_, err = IfTimeFromFile(lastUpdatePath, 10, server.URL)
if err == nil {
t.Error("expected error with handler but did not get one")
}
}
func TestNoFileIfTimeFromFile(t *testing.T) {
handler := &URLHandler{
releases: []Release{{Version: "v1.2.3"}},
}
server := httptest.NewServer(handler)
tempDir, err := ioutil.TempDir("", "helm-update_check-")
if err != nil {
t.Fatal(err)
}
defer os.RemoveAll(tempDir)
lastUpdatePath := filepath.Join(tempDir, "last_update_check")
newVer, err := IfTimeFromFile(lastUpdatePath, 10, server.URL)
if err != nil {
t.Errorf("unexpected error: %s", err)
}
if newVer != "" {
t.Errorf("expected an empty string version but got %s", newVer)
}
content, err := ioutil.ReadFile(lastUpdatePath)
if err != nil {
t.Errorf("unexpected error: %s", err)
}
_, err = time.Parse(timeLayout, string(content))
if err != nil {
t.Errorf("unexpected error: %s", err)
}
}
Loading…
Cancel
Save