|
|
|
@ -33,6 +33,7 @@ import (
|
|
|
|
|
"k8s.io/kubernetes/pkg/client/restclient"
|
|
|
|
|
|
|
|
|
|
"k8s.io/helm/cmd/helm/helmpath"
|
|
|
|
|
"k8s.io/helm/pkg/helm/portforwarder"
|
|
|
|
|
"k8s.io/helm/pkg/kube"
|
|
|
|
|
"k8s.io/helm/pkg/tiller/environment"
|
|
|
|
|
)
|
|
|
|
@ -49,6 +50,8 @@ var (
|
|
|
|
|
tillerHost string
|
|
|
|
|
tillerNamespace string
|
|
|
|
|
kubeContext string
|
|
|
|
|
// TODO refactor out this global var
|
|
|
|
|
tillerTunnel *kube.Tunnel
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// flagDebug is a signal that the user wants additional output.
|
|
|
|
@ -156,7 +159,12 @@ func markDeprecated(cmd *cobra.Command, notice string) *cobra.Command {
|
|
|
|
|
|
|
|
|
|
func setupConnection(c *cobra.Command, args []string) error {
|
|
|
|
|
if tillerHost == "" {
|
|
|
|
|
tunnel, err := newTillerPortForwarder(tillerNamespace, kubeContext)
|
|
|
|
|
config, client, err := getKubeClient(kubeContext)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
tunnel, err := portforwarder.New(tillerNamespace, client, config)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|