Skip to content

Commit

Permalink
Fix: remove managedclustersetbinding v1beta1 in webhook.
Browse files Browse the repository at this point in the history
Signed-off-by: xuezhaojun <zxue@redhat.com>
  • Loading branch information
xuezhaojun committed Nov 22, 2023
1 parent 6571a8a commit fbbd9fe
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 33 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ webhooks:
- v1beta2
resources:
- managedclustersetbindings
admissionReviewVersions: ["v1beta1","v1"]
admissionReviewVersions: ["v1beta2","v1"]
sideEffects: None
timeoutSeconds: 10
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions test/integration/operator/clustermanager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fbbd9fe

Please sign in to comment.