Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up deprecated APIServices #6002

Merged
merged 1 commit into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions build/charts/antrea/templates/controller/clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,18 +112,6 @@ rules:
verbs:
- list
- update
- apiGroups:
- apiregistration.k8s.io
resources:
- apiservices
resourceNames:
- v1beta1.networking.antrea.tanzu.vmware.com
- v1beta1.controlplane.antrea.tanzu.vmware.com
- v1alpha1.stats.antrea.tanzu.vmware.com
- v1beta1.system.antrea.tanzu.vmware.com
- v1beta2.controlplane.antrea.tanzu.vmware.com
verbs:
- delete
- apiGroups:
- admissionregistration.k8s.io
resources:
Expand Down
12 changes: 0 additions & 12 deletions build/yamls/antrea-aks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6556,18 +6556,6 @@ rules:
verbs:
- list
- update
- apiGroups:
- apiregistration.k8s.io
resources:
- apiservices
resourceNames:
- v1beta1.networking.antrea.tanzu.vmware.com
- v1beta1.controlplane.antrea.tanzu.vmware.com
- v1alpha1.stats.antrea.tanzu.vmware.com
- v1beta1.system.antrea.tanzu.vmware.com
- v1beta2.controlplane.antrea.tanzu.vmware.com
verbs:
- delete
- apiGroups:
- admissionregistration.k8s.io
resources:
Expand Down
12 changes: 0 additions & 12 deletions build/yamls/antrea-eks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6556,18 +6556,6 @@ rules:
verbs:
- list
- update
- apiGroups:
- apiregistration.k8s.io
resources:
- apiservices
resourceNames:
- v1beta1.networking.antrea.tanzu.vmware.com
- v1beta1.controlplane.antrea.tanzu.vmware.com
- v1alpha1.stats.antrea.tanzu.vmware.com
- v1beta1.system.antrea.tanzu.vmware.com
- v1beta2.controlplane.antrea.tanzu.vmware.com
verbs:
- delete
- apiGroups:
- admissionregistration.k8s.io
resources:
Expand Down
12 changes: 0 additions & 12 deletions build/yamls/antrea-gke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6556,18 +6556,6 @@ rules:
verbs:
- list
- update
- apiGroups:
- apiregistration.k8s.io
resources:
- apiservices
resourceNames:
- v1beta1.networking.antrea.tanzu.vmware.com
- v1beta1.controlplane.antrea.tanzu.vmware.com
- v1alpha1.stats.antrea.tanzu.vmware.com
- v1beta1.system.antrea.tanzu.vmware.com
- v1beta2.controlplane.antrea.tanzu.vmware.com
verbs:
- delete
- apiGroups:
- admissionregistration.k8s.io
resources:
Expand Down
12 changes: 0 additions & 12 deletions build/yamls/antrea-ipsec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6569,18 +6569,6 @@ rules:
verbs:
- list
- update
- apiGroups:
- apiregistration.k8s.io
resources:
- apiservices
resourceNames:
- v1beta1.networking.antrea.tanzu.vmware.com
- v1beta1.controlplane.antrea.tanzu.vmware.com
- v1alpha1.stats.antrea.tanzu.vmware.com
- v1beta1.system.antrea.tanzu.vmware.com
- v1beta2.controlplane.antrea.tanzu.vmware.com
verbs:
- delete
- apiGroups:
- admissionregistration.k8s.io
resources:
Expand Down
12 changes: 0 additions & 12 deletions build/yamls/antrea.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6556,18 +6556,6 @@ rules:
verbs:
- list
- update
- apiGroups:
- apiregistration.k8s.io
resources:
- apiservices
resourceNames:
- v1beta1.networking.antrea.tanzu.vmware.com
- v1beta1.controlplane.antrea.tanzu.vmware.com
- v1alpha1.stats.antrea.tanzu.vmware.com
- v1beta1.system.antrea.tanzu.vmware.com
- v1beta2.controlplane.antrea.tanzu.vmware.com
verbs:
- delete
- apiGroups:
- admissionregistration.k8s.io
resources:
Expand Down
8 changes: 1 addition & 7 deletions pkg/apiserver/apiserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,13 +277,7 @@ func CleanupDeprecatedAPIServices(aggregatorClient clientset.Interface) error {
// deprecates a registered APIService, the APIService should be deleted,
// otherwise K8s will fail to delete an existing Namespace.
// Also check: https://github.com/antrea-io/antrea/issues/494
deprecatedAPIServices := []string{
"v1beta1.networking.antrea.tanzu.vmware.com",
"v1beta1.controlplane.antrea.tanzu.vmware.com",
"v1alpha1.stats.antrea.tanzu.vmware.com",
"v1beta1.system.antrea.tanzu.vmware.com",
"v1beta2.controlplane.antrea.tanzu.vmware.com",
}
deprecatedAPIServices := []string{}
luolanzone marked this conversation as resolved.
Show resolved Hide resolved
for _, as := range deprecatedAPIServices {
err := aggregatorClient.ApiregistrationV1().APIServices().Delete(context.TODO(), as, metav1.DeleteOptions{})
if err == nil {
Expand Down
Loading