diff --git a/cmd/helm/init.go b/cmd/helm/init.go index d368945ec..401b897c5 100644 --- a/cmd/helm/init.go +++ b/cmd/helm/init.go @@ -27,9 +27,9 @@ import ( "github.com/spf13/cobra" apierrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/util/yaml" "k8s.io/client-go/kubernetes" - "k8s.io/apimachinery/pkg/util/yaml" "k8s.io/helm/cmd/helm/installer" "k8s.io/helm/pkg/getter" "k8s.io/helm/pkg/helm" @@ -303,9 +303,6 @@ func (i *initCmd) run() error { if err := installer.Upgrade(i.kubeClient, &i.opts); err != nil { return fmt.Errorf("error when upgrading: %s", err) } - if err := i.ping(); err != nil { - return err - } fmt.Fprintln(i.out, "\nTiller (the Helm server-side component) has been upgraded to the current version.") } else { fmt.Fprintln(i.out, "Warning: Tiller is already installed in the cluster.\n"+ @@ -316,9 +313,6 @@ func (i *initCmd) run() error { "Please note: by default, Tiller is deployed with an insecure 'allow unauthenticated users' policy.\n"+ "For more information on securing your installation see: https://docs.helm.sh/using_helm/#securing-your-helm-installation") } - if err := i.ping(); err != nil { - return err - } } else { fmt.Fprintln(i.out, "Not installing Tiller due to 'client-only' flag having been set") } @@ -327,29 +321,6 @@ func (i *initCmd) run() error { return nil } -func (i *initCmd) ping() error { - if i.wait { - _, kubeClient, err := getKubeClient(settings.KubeContext) - if err != nil { - return err - } - if !watchTillerUntilReady(settings.TillerNamespace, kubeClient, settings.TillerConnectionTimeout) { - return fmt.Errorf("tiller was not found. polling deadline exceeded") - } - - // establish a connection to Tiller now that we've effectively guaranteed it's available - if err := setupConnection(); err != nil { - return err - } - i.client = newClient() - if err := i.client.PingTiller(); err != nil { - return fmt.Errorf("could not ping Tiller: %s", err) - } - } - - return nil -} - // ensureDirectories checks to see if $HELM_HOME exists. // // If $HELM_HOME does not exist, this function will create it. diff --git a/pkg/helm/client.go b/pkg/helm/client.go index e4b8615e1..05ed1c6fd 100644 --- a/pkg/helm/client.go +++ b/pkg/helm/client.go @@ -284,12 +284,6 @@ func (h *Client) RunReleaseTest(rlsName string, opts ...ReleaseTestOption) (<-ch return h.test(ctx, req) } -// PingTiller pings the Tiller pod and ensure's that it is up and running -func (h *Client) PingTiller() error { - ctx := NewContext() - return h.ping(ctx) -} - // connect returns a gRPC connection to Tiller or error. The gRPC dial options // are constructed here. func (h *Client) connect(ctx context.Context) (conn *grpc.ClientConn, err error) { diff --git a/pkg/helm/fake.go b/pkg/helm/fake.go index 5e0044318..4adcd8c87 100644 --- a/pkg/helm/fake.go +++ b/pkg/helm/fake.go @@ -175,11 +175,6 @@ func (c *FakeClient) RunReleaseTest(rlsName string, opts ...ReleaseTestOption) ( return results, errc } -// PingTiller pings the Tiller pod and ensure's that it is up and running -func (c *FakeClient) PingTiller() error { - return nil -} - // MockHookTemplate is the hook template used for all mock release objects. var MockHookTemplate = `apiVersion: v1 kind: Job diff --git a/pkg/helm/interface.go b/pkg/helm/interface.go index d8b1eebb3..08aa7564c 100644 --- a/pkg/helm/interface.go +++ b/pkg/helm/interface.go @@ -34,5 +34,4 @@ type Interface interface { ReleaseContent(rlsName string, opts ...ContentOption) (*rls.GetReleaseContentResponse, error) ReleaseHistory(rlsName string, opts ...HistoryOption) (*rls.GetHistoryResponse, error) RunReleaseTest(rlsName string, opts ...ReleaseTestOption) (<-chan *rls.TestReleaseResponse, <-chan error) - PingTiller() error }