Skip to content

Commit

Permalink
Merge pull request helm#3008 from adamreese/ref/kube-1.8
Browse files Browse the repository at this point in the history
ref(*): kubernetes v1.8 support
  • Loading branch information
adamreese authored Oct 12, 2017
2 parents 500c998 + 2b43ecd commit 13912b3
Show file tree
Hide file tree
Showing 16 changed files with 392 additions and 208 deletions.
8 changes: 4 additions & 4 deletions cmd/helm/helm.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,16 +239,16 @@ func getKubeClient(context string) (*rest.Config, kubernetes.Interface, error) {
// getInternalKubeClient creates a Kubernetes config and an "internal" client for a given kubeconfig context.
//
// Prefer the similar getKubeClient if you don't need to use such an internal client.
func getInternalKubeClient(context string) (*rest.Config, internalclientset.Interface, error) {
func getInternalKubeClient(context string) (internalclientset.Interface, error) {
config, err := configForContext(context)
if err != nil {
return nil, nil, err
return nil, err
}
client, err := internalclientset.NewForConfig(config)
if err != nil {
return nil, nil, fmt.Errorf("could not get Kubernetes client: %s", err)
return nil, fmt.Errorf("could not get Kubernetes client: %s", err)
}
return config, client, nil
return client, nil
}

// ensureHelmClient returns a new helm client impl. if h is not nil.
Expand Down
4 changes: 2 additions & 2 deletions cmd/helm/init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ import (

"github.com/ghodss/yaml"

"k8s.io/api/core/v1"
"k8s.io/api/extensions/v1beta1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/client-go/kubernetes/fake"
"k8s.io/client-go/pkg/api/v1"
"k8s.io/client-go/pkg/apis/extensions/v1beta1"
testcore "k8s.io/client-go/testing"

"encoding/json"
Expand Down
4 changes: 2 additions & 2 deletions cmd/helm/installer/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ import (
"strings"

"github.com/ghodss/yaml"
"k8s.io/api/core/v1"
"k8s.io/api/extensions/v1beta1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/intstr"
"k8s.io/client-go/kubernetes"
corev1 "k8s.io/client-go/kubernetes/typed/core/v1"
extensionsclient "k8s.io/client-go/kubernetes/typed/extensions/v1beta1"
"k8s.io/client-go/pkg/api/v1"
"k8s.io/client-go/pkg/apis/extensions/v1beta1"
"k8s.io/helm/pkg/chartutil"
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/helm/installer/install_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ import (
"testing"

"github.com/ghodss/yaml"
"k8s.io/api/core/v1"
"k8s.io/api/extensions/v1beta1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/client-go/kubernetes/fake"
"k8s.io/client-go/pkg/api/v1"
"k8s.io/client-go/pkg/apis/extensions/v1beta1"
testcore "k8s.io/client-go/testing"

"k8s.io/helm/pkg/chartutil"
Expand Down
2 changes: 1 addition & 1 deletion cmd/helm/installer/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package installer // import "k8s.io/helm/cmd/helm/installer"
import (
"fmt"

"k8s.io/client-go/pkg/api/v1"
"k8s.io/api/core/v1"
"k8s.io/helm/pkg/strvals"
"k8s.io/helm/pkg/version"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/helm/installer/uninstall.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package installer // import "k8s.io/helm/cmd/helm/installer"
import (
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/pkg/apis/extensions"
"k8s.io/kubernetes/pkg/apis/extensions"
"k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset"
coreclient "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion"
"k8s.io/kubernetes/pkg/kubectl"
Expand Down
2 changes: 1 addition & 1 deletion cmd/helm/reset.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func newResetCmd(client helm.Interface, out io.Writer) *cobra.Command {
// runReset uninstalls tiller from Kubernetes Cluster and deletes local config
func (d *resetCmd) run() error {
if d.kubeClient == nil {
_, c, err := getInternalKubeClient(settings.KubeContext)
c, err := getInternalKubeClient(settings.KubeContext)
if err != nil {
return fmt.Errorf("could not get kubernetes client: %s", err)
}
Expand Down
Loading

0 comments on commit 13912b3

Please sign in to comment.