Skip to content

Commit

Permalink
Cleanup legacy gardener-resource-manager-server secret deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
rfranzke committed Oct 24, 2022
1 parent 740ba99 commit ee0cf78
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,7 @@ func (r *resourceManager) Deploy(ctx context.Context) error {
}
}

// TODO(rfranzke): Remove in a future release.
return kutil.DeleteObject(ctx, r.client, &corev1.Secret{ObjectMeta: metav1.ObjectMeta{Name: "gardener-resource-manager-server", Namespace: r.namespace}})
return nil
}

func (r *resourceManager) Destroy(ctx context.Context) error {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1118,7 +1118,6 @@ subjects:
Do(func(ctx context.Context, obj runtime.Object, _ client.Patch, _ ...client.PatchOption) {
Expect(obj).To(DeepEqual(networkPolicy))
}),
c.EXPECT().Delete(ctx, &corev1.Secret{ObjectMeta: metav1.ObjectMeta{Namespace: deployNamespace, Name: "gardener-resource-manager-server"}}),
)
})
Context("Kubernetes version >= 1.21", func() {
Expand Down Expand Up @@ -1222,7 +1221,6 @@ subjects:
Do(func(ctx context.Context, obj runtime.Object, _ client.Patch, _ ...client.PatchOption) {
Expect(obj).To(DeepEqual(networkPolicy))
}),
c.EXPECT().Delete(ctx, &corev1.Secret{ObjectMeta: metav1.ObjectMeta{Namespace: deployNamespace, Name: "gardener-resource-manager-server"}}),
)
})
Context("Kubernetes version >= 1.21", func() {
Expand Down Expand Up @@ -1324,7 +1322,6 @@ subjects:
Do(func(ctx context.Context, obj runtime.Object, _ client.Patch, _ ...client.PatchOption) {
Expect(obj).To(DeepEqual(networkPolicy))
}),
c.EXPECT().Delete(ctx, &corev1.Secret{ObjectMeta: metav1.ObjectMeta{Namespace: deployNamespace, Name: "gardener-resource-manager-server"}}),
)
Expect(resourceManager.Deploy(ctx)).To(Succeed())
})
Expand Down Expand Up @@ -1437,7 +1434,6 @@ subjects:
Do(func(ctx context.Context, obj runtime.Object, _ client.Patch, _ ...client.PatchOption) {
Expect(obj).To(DeepEqual(mutatingWebhookConfiguration))
}),
c.EXPECT().Delete(ctx, &corev1.Secret{ObjectMeta: metav1.ObjectMeta{Namespace: deployNamespace, Name: "gardener-resource-manager-server"}}),
)
Expect(resourceManager.Deploy(ctx)).To(Succeed())
})
Expand Down

0 comments on commit ee0cf78

Please sign in to comment.