Skip to content

Commit

Permalink
Merge pull request #20645 from pmorie/namespace-controller-config
Browse files Browse the repository at this point in the history
Auto commit by PR queue bot
  • Loading branch information
k8s-merge-robot committed Feb 10, 2016
2 parents 86a7a95 + 3a505ac commit afc5564
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/controller/namespace/namespace_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ func testSyncNamespaceThatIsTerminating(t *testing.T, versions *unversioned.APIV
strings.Join([]string{"list", "pods", ""}, "-"),
strings.Join([]string{"delete-collection", "resourcequotas", ""}, "-"),
strings.Join([]string{"delete-collection", "secrets", ""}, "-"),
strings.Join([]string{"delete-collection", "configmaps", ""}, "-"),
strings.Join([]string{"delete-collection", "limitranges", ""}, "-"),
strings.Join([]string{"delete-collection", "events", ""}, "-"),
strings.Join([]string{"delete-collection", "serviceaccounts", ""}, "-"),
Expand Down
8 changes: 8 additions & 0 deletions pkg/controller/namespace/namespace_controller_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@ func deleteAllContent(kubeClient clientset.Interface, versions *unversioned.APIV
if err != nil {
return estimate, err
}
err = deleteConfigMaps(kubeClient, namespace)
if err != nil {
return estimate, err
}
err = deletePersistentVolumeClaims(kubeClient, namespace)
if err != nil {
return estimate, err
Expand Down Expand Up @@ -315,6 +319,10 @@ func deleteSecrets(kubeClient clientset.Interface, ns string) error {
return kubeClient.Core().Secrets(ns).DeleteCollection(nil, api.ListOptions{})
}

func deleteConfigMaps(kubeClient clientset.Interface, ns string) error {
return kubeClient.Core().ConfigMaps(ns).DeleteCollection(nil, api.ListOptions{})
}

func deletePersistentVolumeClaims(kubeClient clientset.Interface, ns string) error {
return kubeClient.Core().PersistentVolumeClaims(ns).DeleteCollection(nil, api.ListOptions{})
}
Expand Down

1 comment on commit afc5564

@k8s-teamcity-mesosphere

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TeamCity OSS :: Kubernetes Mesos :: 4 - Smoke Tests Build 15296 outcome was FAILURE
Summary: Exit code 1 Build time: 00:05:07

Please sign in to comment.