diff --git a/manifests/cluster-manager/hub/cluster-manager-registration-webhook-clustersetbinding-validatingconfiguration-v1beta1.yaml b/manifests/cluster-manager/hub/cluster-manager-registration-webhook-clustersetbinding-validatingconfiguration-v1beta1.yaml deleted file mode 100644 index f6c533d03..000000000 --- a/manifests/cluster-manager/hub/cluster-manager-registration-webhook-clustersetbinding-validatingconfiguration-v1beta1.yaml +++ /dev/null @@ -1,27 +0,0 @@ -apiVersion: admissionregistration.k8s.io/v1 -kind: ValidatingWebhookConfiguration -metadata: - name: managedclustersetbindingv1beta1validators.admission.cluster.open-cluster-management.io -webhooks: -- name: managedclustersetbindingv1beta1validators.admission.cluster.open-cluster-management.io - failurePolicy: Fail - clientConfig: - service: - namespace: {{ .ClusterManagerNamespace }} - name: cluster-manager-registration-webhook - path: /validate-cluster-open-cluster-management-io-v1beta1-managedclustersetbinding - port: {{.RegistrationWebhook.Port}} - caBundle: {{ .RegistrationAPIServiceCABundle }} - rules: - - operations: - - CREATE - - UPDATE - apiGroups: - - cluster.open-cluster-management.io - apiVersions: - - v1beta1 - resources: - - managedclustersetbindings - admissionReviewVersions: ["v1beta1","v1"] - sideEffects: None - timeoutSeconds: 10 diff --git a/pkg/operator/operators/clustermanager/controllers/clustermanagercontroller/clustermanager_controller_test.go b/pkg/operator/operators/clustermanager/controllers/clustermanagercontroller/clustermanager_controller_test.go index d1c4d928a..b2b56d798 100644 --- a/pkg/operator/operators/clustermanager/controllers/clustermanagercontroller/clustermanager_controller_test.go +++ b/pkg/operator/operators/clustermanager/controllers/clustermanagercontroller/clustermanager_controller_test.go @@ -321,7 +321,7 @@ func TestSyncDeploy(t *testing.T) { // Check if resources are created as expected // We expect create the namespace twice respectively in the management cluster and the hub cluster. - testingcommon.AssertEqualNumber(t, len(createKubeObjects), 29) + testingcommon.AssertEqualNumber(t, len(createKubeObjects), 28) for _, object := range createKubeObjects { ensureObject(t, object, clusterManager) } @@ -403,7 +403,7 @@ func TestSyncDelete(t *testing.T) { deleteKubeActions = append(deleteKubeActions, deleteKubeAction) } } - testingcommon.AssertEqualNumber(t, len(deleteKubeActions), 29) // delete namespace both from the hub cluster and the mangement cluster + testingcommon.AssertEqualNumber(t, len(deleteKubeActions), 28) // delete namespace both from the hub cluster and the mangement cluster var deleteCRDActions []clienttesting.DeleteActionImpl crdActions := tc.apiExtensionClient.Actions() diff --git a/pkg/operator/operators/clustermanager/controllers/clustermanagercontroller/clustermanager_webhook_reconcile.go b/pkg/operator/operators/clustermanager/controllers/clustermanagercontroller/clustermanager_webhook_reconcile.go index ee3d7b2d6..807243824 100644 --- a/pkg/operator/operators/clustermanager/controllers/clustermanagercontroller/clustermanager_webhook_reconcile.go +++ b/pkg/operator/operators/clustermanager/controllers/clustermanagercontroller/clustermanager_webhook_reconcile.go @@ -29,7 +29,6 @@ var ( "cluster-manager/hub/cluster-manager-registration-webhook-validatingconfiguration.yaml", "cluster-manager/hub/cluster-manager-registration-webhook-mutatingconfiguration.yaml", "cluster-manager/hub/cluster-manager-registration-webhook-clustersetbinding-validatingconfiguration.yaml", - "cluster-manager/hub/cluster-manager-registration-webhook-clustersetbinding-validatingconfiguration-v1beta1.yaml", } hubWorkWebhookResourceFiles = []string{ "cluster-manager/hub/cluster-manager-work-webhook-validatingconfiguration.yaml", diff --git a/test/integration/operator/clustermanager_hosted_test.go b/test/integration/operator/clustermanager_hosted_test.go index 1b0a4e789..7c3238072 100644 --- a/test/integration/operator/clustermanager_hosted_test.go +++ b/test/integration/operator/clustermanager_hosted_test.go @@ -400,8 +400,8 @@ var _ = ginkgo.Describe("ClusterManager Hosted Mode", func() { if err != nil { return err } - if len(actual.Status.RelatedResources) != 42 { - return fmt.Errorf("should get 42 relatedResources, actual got %v, %v", + if len(actual.Status.RelatedResources) != 41 { + return fmt.Errorf("should get 41 relatedResources, actual got %v, %v", len(actual.Status.RelatedResources), actual.Status.RelatedResources) } return nil @@ -479,8 +479,8 @@ var _ = ginkgo.Describe("ClusterManager Hosted Mode", func() { if err != nil { return err } - if len(actual.Status.RelatedResources) != 46 { - return fmt.Errorf("should get 46 relatedResources, actual got %v, %v", + if len(actual.Status.RelatedResources) != 45 { + return fmt.Errorf("should get 45 relatedResources, actual got %v, %v", len(actual.Status.RelatedResources), actual.Status.RelatedResources) } return nil @@ -552,8 +552,8 @@ var _ = ginkgo.Describe("ClusterManager Hosted Mode", func() { if err != nil { return err } - if len(actual.Status.RelatedResources) != 41 { - return fmt.Errorf("should get 41 relatedResources, actual got %v, %v", + if len(actual.Status.RelatedResources) != 40 { + return fmt.Errorf("should get 40 relatedResources, actual got %v, %v", len(actual.Status.RelatedResources), actual.Status.RelatedResources) } return nil @@ -613,8 +613,8 @@ var _ = ginkgo.Describe("ClusterManager Hosted Mode", func() { if err != nil { return err } - if len(actual.Status.RelatedResources) != 46 { - return fmt.Errorf("should get 46 relatedResources, actual got %v, %v", len(actual.Status.RelatedResources), actual.Status.RelatedResources) + if len(actual.Status.RelatedResources) != 45 { + return fmt.Errorf("should get 45 relatedResources, actual got %v, %v", len(actual.Status.RelatedResources), actual.Status.RelatedResources) } return nil }, eventuallyTimeout, eventuallyInterval).ShouldNot(gomega.HaveOccurred()) @@ -688,8 +688,8 @@ var _ = ginkgo.Describe("ClusterManager Hosted Mode", func() { if err != nil { return err } - if len(actual.Status.RelatedResources) != 46 { - return fmt.Errorf("should get 46 relatedResources, actual got %v", len(actual.Status.RelatedResources)) + if len(actual.Status.RelatedResources) != 45 { + return fmt.Errorf("should get 45 relatedResources, actual got %v", len(actual.Status.RelatedResources)) } return nil }, eventuallyTimeout, eventuallyInterval).ShouldNot(gomega.HaveOccurred()) diff --git a/test/integration/operator/clustermanager_test.go b/test/integration/operator/clustermanager_test.go index 42d30b3d5..cf0b4a6d6 100644 --- a/test/integration/operator/clustermanager_test.go +++ b/test/integration/operator/clustermanager_test.go @@ -374,8 +374,8 @@ var _ = ginkgo.Describe("ClusterManager Default Mode", func() { if err != nil { return err } - if len(actual.Status.RelatedResources) != 42 { - return fmt.Errorf("should get 42 relatedResources, actual got %v, %v", + if len(actual.Status.RelatedResources) != 41 { + return fmt.Errorf("should get 41 relatedResources, actual got %v, %v", len(actual.Status.RelatedResources), actual.Status.RelatedResources) } return nil @@ -453,8 +453,8 @@ var _ = ginkgo.Describe("ClusterManager Default Mode", func() { if err != nil { return err } - if len(actual.Status.RelatedResources) != 46 { - return fmt.Errorf("should get 46 relatedResources, actual got %v, %v", + if len(actual.Status.RelatedResources) != 45 { + return fmt.Errorf("should get 45 relatedResources, actual got %v, %v", len(actual.Status.RelatedResources), actual.Status.RelatedResources) } return nil @@ -524,8 +524,8 @@ var _ = ginkgo.Describe("ClusterManager Default Mode", func() { if err != nil { return err } - if len(actual.Status.RelatedResources) != 41 { - return fmt.Errorf("should get 41 relatedResources, actual got %v", len(actual.Status.RelatedResources)) + if len(actual.Status.RelatedResources) != 40 { + return fmt.Errorf("should get 40 relatedResources, actual got %v", len(actual.Status.RelatedResources)) } return nil }, eventuallyTimeout, eventuallyInterval).ShouldNot(gomega.HaveOccurred()) @@ -580,8 +580,8 @@ var _ = ginkgo.Describe("ClusterManager Default Mode", func() { if err != nil { return err } - if len(actual.Status.RelatedResources) != 46 { - return fmt.Errorf("should get 46 relatedResources, actual got %v", len(actual.Status.RelatedResources)) + if len(actual.Status.RelatedResources) != 45 { + return fmt.Errorf("should get 45 relatedResources, actual got %v", len(actual.Status.RelatedResources)) } return nil }, eventuallyTimeout, eventuallyInterval).ShouldNot(gomega.HaveOccurred()) @@ -651,8 +651,8 @@ var _ = ginkgo.Describe("ClusterManager Default Mode", func() { if err != nil { return err } - if len(actual.Status.RelatedResources) != 46 { - return fmt.Errorf("should get 46 relatedResources, actual got %v", len(actual.Status.RelatedResources)) + if len(actual.Status.RelatedResources) != 45 { + return fmt.Errorf("should get 45 relatedResources, actual got %v", len(actual.Status.RelatedResources)) } return nil }, eventuallyTimeout, eventuallyInterval).ShouldNot(gomega.HaveOccurred())