Skip to content

Commit

Permalink
ref(*): kubernetes v1.11 support
Browse files Browse the repository at this point in the history
  • Loading branch information
adamreese committed Aug 10, 2018
1 parent 13d67a9 commit efadbd8
Show file tree
Hide file tree
Showing 12 changed files with 119 additions and 235 deletions.
5 changes: 1 addition & 4 deletions cmd/helm/installer/uninstall.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@ 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/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"
)

const (
Expand Down Expand Up @@ -52,8 +50,7 @@ func deleteService(client coreclient.ServicesGetter, namespace string) error {
// We need to use the reaper instead of the kube API because GC for deployment dependents
// is not yet supported at the k8s server level (<= 1.5)
func deleteDeployment(client internalclientset.Interface, namespace string) error {
reaper, _ := kubectl.ReaperFor(extensions.Kind("Deployment"), client)
err := reaper.Stop(namespace, deploymentName, 0, nil)
err := client.Extensions().Deployments(namespace).Delete(deploymentName, &metav1.DeleteOptions{})
return ingoreNotFound(err)
}

Expand Down
16 changes: 8 additions & 8 deletions cmd/helm/installer/uninstall_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ func TestUninstall(t *testing.T) {
t.Errorf("unexpected error: %#+v", err)
}

if actions := fc.Actions(); len(actions) != 7 {
t.Errorf("unexpected actions: %v, expected 7 actions got %d", actions, len(actions))
if actions := fc.Actions(); len(actions) != 3 {
t.Errorf("unexpected actions: %v, expected 3 actions got %d", actions, len(actions))
}
}

Expand All @@ -50,8 +50,8 @@ func TestUninstall_serviceNotFound(t *testing.T) {
t.Errorf("unexpected error: %#+v", err)
}

if actions := fc.Actions(); len(actions) != 7 {
t.Errorf("unexpected actions: %v, expected 7 actions got %d", actions, len(actions))
if actions := fc.Actions(); len(actions) != 3 {
t.Errorf("unexpected actions: %v, expected 3 actions got %d", actions, len(actions))
}
}

Expand All @@ -66,8 +66,8 @@ func TestUninstall_deploymentNotFound(t *testing.T) {
t.Errorf("unexpected error: %#+v", err)
}

if actions := fc.Actions(); len(actions) != 7 {
t.Errorf("unexpected actions: %v, expected 7 actions got %d", actions, len(actions))
if actions := fc.Actions(); len(actions) != 3 {
t.Errorf("unexpected actions: %v, expected 3 actions got %d", actions, len(actions))
}
}

Expand All @@ -82,7 +82,7 @@ func TestUninstall_secretNotFound(t *testing.T) {
t.Errorf("unexpected error: %#+v", err)
}

if actions := fc.Actions(); len(actions) != 7 {
t.Errorf("unexpected actions: %v, expect 7 actions got %d", actions, len(actions))
if actions := fc.Actions(); len(actions) != 3 {
t.Errorf("unexpected actions: %v, expect 3 actions got %d", actions, len(actions))
}
}
Loading

0 comments on commit efadbd8

Please sign in to comment.