Skip to content

Commit

Permalink
namespace: backport CleanObjects update (#895)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajaggapa authored Jan 28, 2025
1 parent 0c632e3 commit cd2f34d
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pkg/namespace/namespace.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/utils/ptr"
"k8s.io/utils/strings/slices"
)

Expand Down Expand Up @@ -257,9 +256,7 @@ func (builder *Builder) CleanObjects(cleanTimeout time.Duration, objects ...sche
resource.Resource, builder.Definition.Name)

err := builder.apiClient.Resource(resource).Namespace(builder.Definition.Name).DeleteCollection(
context.TODO(), metav1.DeleteOptions{
GracePeriodSeconds: ptr.To(int64(0)),
}, metav1.ListOptions{})
context.TODO(), metav1.DeleteOptions{}, metav1.ListOptions{})

if err != nil {
glog.V(100).Infof("Failed to remove resources: %s in namespace: %s",
Expand Down

0 comments on commit cd2f34d

Please sign in to comment.