From b6058f112610c5e46b31ae1cba05e8bf17d45ca7 Mon Sep 17 00:00:00 2001 From: Jian Qiu Date: Fri, 21 Jun 2024 15:25:59 +0800 Subject: [PATCH] Update deps of api and library to 0.14.0 (#532) Signed-off-by: Jian Qiu --- ...cluster-manager.clusterserviceversion.yaml | 2 +- .../klusterlet.clusterserviceversion.yaml | 2 +- go.mod | 6 ++--- go.sum | 12 ++++----- ...anagement.io_managedclusteraddons.crd.yaml | 1 + ...ster-management.io_addontemplates.crd.yaml | 1 + .../registration/addon_registration_test.go | 25 ------------------- vendor/modules.txt | 6 ++--- ...anagement.io_managedclusteraddons.crd.yaml | 1 + ...ster-management.io_addontemplates.crd.yaml | 1 + .../api/addon/v1alpha1/types_addontemplate.go | 1 + .../v1alpha1/types_managedclusteraddon.go | 1 + 12 files changed, 20 insertions(+), 39 deletions(-) diff --git a/deploy/cluster-manager/olm-catalog/latest/manifests/cluster-manager.clusterserviceversion.yaml b/deploy/cluster-manager/olm-catalog/latest/manifests/cluster-manager.clusterserviceversion.yaml index bae910cd7..ca22da13b 100644 --- a/deploy/cluster-manager/olm-catalog/latest/manifests/cluster-manager.clusterserviceversion.yaml +++ b/deploy/cluster-manager/olm-catalog/latest/manifests/cluster-manager.clusterserviceversion.yaml @@ -59,7 +59,7 @@ metadata: categories: Integration & Delivery,OpenShift Optional certified: "false" containerImage: quay.io/open-cluster-management/registration-operator:latest - createdAt: "2024-06-19T00:22:24Z" + createdAt: "2024-06-19T07:23:22Z" description: Manages the installation and upgrade of the ClusterManager. operators.operatorframework.io/builder: operator-sdk-v1.32.0 operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 diff --git a/deploy/klusterlet/olm-catalog/latest/manifests/klusterlet.clusterserviceversion.yaml b/deploy/klusterlet/olm-catalog/latest/manifests/klusterlet.clusterserviceversion.yaml index 3a82ae4b6..53c35e2f3 100644 --- a/deploy/klusterlet/olm-catalog/latest/manifests/klusterlet.clusterserviceversion.yaml +++ b/deploy/klusterlet/olm-catalog/latest/manifests/klusterlet.clusterserviceversion.yaml @@ -31,7 +31,7 @@ metadata: categories: Integration & Delivery,OpenShift Optional certified: "false" containerImage: quay.io/open-cluster-management/registration-operator:latest - createdAt: "2024-06-19T00:22:24Z" + createdAt: "2024-06-19T07:23:23Z" description: Manages the installation and upgrade of the Klusterlet. operators.operatorframework.io/builder: operator-sdk-v1.32.0 operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 diff --git a/go.mod b/go.mod index 53cb9f2b5..09042ed92 100644 --- a/go.mod +++ b/go.mod @@ -34,9 +34,9 @@ require ( k8s.io/klog/v2 v2.120.1 k8s.io/kube-aggregator v0.29.3 k8s.io/utils v0.0.0-20240310230437-4693a0247e57 - open-cluster-management.io/addon-framework v0.9.1-0.20240617015910-660e21bcfd3b - open-cluster-management.io/api v0.13.1-0.20240605083248-f9e7f50520fc - open-cluster-management.io/sdk-go v0.13.1-0.20240618022514-b2c1dd175afd + open-cluster-management.io/addon-framework v0.10.0 + open-cluster-management.io/api v0.14.0 + open-cluster-management.io/sdk-go v0.14.0 sigs.k8s.io/controller-runtime v0.17.3 sigs.k8s.io/kube-storage-version-migrator v0.0.6-0.20230721195810-5c8923c5ff96 ) diff --git a/go.sum b/go.sum index 150c3a2b3..22f04b6d3 100644 --- a/go.sum +++ b/go.sum @@ -465,12 +465,12 @@ k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/A k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= k8s.io/utils v0.0.0-20240310230437-4693a0247e57 h1:gbqbevonBh57eILzModw6mrkbwM0gQBEuevE/AaBsHY= k8s.io/utils v0.0.0-20240310230437-4693a0247e57/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -open-cluster-management.io/addon-framework v0.9.1-0.20240617015910-660e21bcfd3b h1:6M9IdEa71Qegl5HjaRcsuLAZvimIafweix2aUBzwot0= -open-cluster-management.io/addon-framework v0.9.1-0.20240617015910-660e21bcfd3b/go.mod h1:HayKCznnlyW+0dUJQGj5sNR6i3tvylSySD3YnvZkBtY= -open-cluster-management.io/api v0.13.1-0.20240605083248-f9e7f50520fc h1:tcfncubZRFphYtDXBE7ApBNlSnj1RNazhW+8F01XYYg= -open-cluster-management.io/api v0.13.1-0.20240605083248-f9e7f50520fc/go.mod h1:ltijKJhDifrPH0csvCUmFt5lzaERv+BBfh6X3l83rT0= -open-cluster-management.io/sdk-go v0.13.1-0.20240618022514-b2c1dd175afd h1:kTVZOR7bTdh4ID7EoliyGhPR5CItpx8GehN581IxoPA= -open-cluster-management.io/sdk-go v0.13.1-0.20240618022514-b2c1dd175afd/go.mod h1:muWzHWsgK8IsopltwTnsBjf4DN9IcC9rF0G2uEq/Pjw= +open-cluster-management.io/addon-framework v0.10.0 h1:bwI1XujcbkDoqlCFG1mKuwXNzoED4im/9/9BVu4xpRo= +open-cluster-management.io/addon-framework v0.10.0/go.mod h1:HayKCznnlyW+0dUJQGj5sNR6i3tvylSySD3YnvZkBtY= +open-cluster-management.io/api v0.14.0 h1:yjhnNeO/QudiIoEi0i/yUYmP3iElAfUgtj4pHMV+4uM= +open-cluster-management.io/api v0.14.0/go.mod h1:ltijKJhDifrPH0csvCUmFt5lzaERv+BBfh6X3l83rT0= +open-cluster-management.io/sdk-go v0.14.0 h1:wdnk9/qANruUKorggrMee7lavwvdP5Toks8WA6nVHlo= +open-cluster-management.io/sdk-go v0.14.0/go.mod h1:muWzHWsgK8IsopltwTnsBjf4DN9IcC9rF0G2uEq/Pjw= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.28.0 h1:TgtAeesdhpm2SGwkQasmbeqDo8th5wOBA5h/AjTKA4I= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.28.0/go.mod h1:VHVDI/KrK4fjnV61bE2g3sA7tiETLn8sooImelsCx3Y= sigs.k8s.io/controller-runtime v0.17.3 h1:65QmN7r3FWgTxDMz9fvGnO1kbf2nu+acg9p2R9oYYYk= diff --git a/manifests/cluster-manager/hub/0000_01_addon.open-cluster-management.io_managedclusteraddons.crd.yaml b/manifests/cluster-manager/hub/0000_01_addon.open-cluster-management.io_managedclusteraddons.crd.yaml index cc9a3d052..5276acd65 100644 --- a/manifests/cluster-manager/hub/0000_01_addon.open-cluster-management.io_managedclusteraddons.crd.yaml +++ b/manifests/cluster-manager/hub/0000_01_addon.open-cluster-management.io_managedclusteraddons.crd.yaml @@ -314,6 +314,7 @@ spec: will use to create csr. maxLength: 571 minLength: 5 + pattern: ^([a-z0-9][a-z0-9-]*[a-z0-9]\.)+[a-z]+\/[a-z0-9-\.]+$ type: string subject: description: 'subject is the user subject of the addon agent diff --git a/manifests/cluster-manager/hub/0000_03_addon.open-cluster-management.io_addontemplates.crd.yaml b/manifests/cluster-manager/hub/0000_03_addon.open-cluster-management.io_addontemplates.crd.yaml index 898dadbab..c9aaf69c2 100644 --- a/manifests/cluster-manager/hub/0000_03_addon.open-cluster-management.io_addontemplates.crd.yaml +++ b/manifests/cluster-manager/hub/0000_03_addon.open-cluster-management.io_addontemplates.crd.yaml @@ -330,6 +330,7 @@ spec: agent will use to create csr. maxLength: 571 minLength: 5 + pattern: ^([a-z0-9][a-z0-9-]*[a-z0-9]\.)+[a-z]+\/[a-z0-9-\.]+$ type: string signingCA: description: 'SigningCA represents the reference of the diff --git a/test/integration/registration/addon_registration_test.go b/test/integration/registration/addon_registration_test.go index ca6100a4a..4c0cf5f31 100644 --- a/test/integration/registration/addon_registration_test.go +++ b/test/integration/registration/addon_registration_test.go @@ -211,17 +211,6 @@ var _ = ginkgo.Describe("Addon Registration", func() { return meta.IsStatusConditionTrue(addon.Status.Conditions, clientcert.ClusterCertificateRotatedCondition) }, eventuallyTimeout, eventuallyInterval).Should(gomega.BeTrue()) } - assertClientCertConditionFalse := func(clusterName, addonName string) { - ginkgo.By("Check if clientcert addon status condition is false") - gomega.Eventually(func() bool { - addon, err := addOnClient.AddonV1alpha1().ManagedClusterAddOns(clusterName). - Get(context.TODO(), addonName, metav1.GetOptions{}) - if err != nil { - return false - } - return meta.IsStatusConditionFalse(addon.Status.Conditions, clientcert.ClusterCertificateRotatedCondition) - }, eventuallyTimeout, eventuallyInterval).Should(gomega.BeTrue()) - } assertHasNoAddonLabel := func(clusterName, addonName string) { ginkgo.By("Check if addon status label on managed cluster deleted") @@ -392,20 +381,6 @@ var _ = ginkgo.Describe("Addon Registration", func() { assertSuccessAddOnBootstrap(signerName) }) - ginkgo.It("should register addon failed with invalid custom signer", func() { - assertSuccessClusterBootstrap() - assertSuccessAddOnEnabling() - assertAddOnSignerUpdate("addon-xxx") - assertClientCertConditionFalse(managedClusterName, addOnName) - - signerName := "example.com/signer1" - assertAddOnSignerUpdate(signerName) - assertSuccessCSRApproval() - assertValidClientCertificate(addOnName, getSecretName(addOnName, signerName), signerName, expectedProxyURL) - assertAddonLabel(managedClusterName, addOnName, "unreachable") - assertClientCertCondition(managedClusterName, addOnName) - }) - ginkgo.It("should addon registraton config updated successfully", func() { assertSuccessClusterBootstrap() signerName := certificates.KubeAPIServerClientSignerName diff --git a/vendor/modules.txt b/vendor/modules.txt index 14ba2d322..906b7a5b4 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1500,7 +1500,7 @@ k8s.io/utils/pointer k8s.io/utils/ptr k8s.io/utils/strings/slices k8s.io/utils/trace -# open-cluster-management.io/addon-framework v0.9.1-0.20240617015910-660e21bcfd3b +# open-cluster-management.io/addon-framework v0.10.0 ## explicit; go 1.21 open-cluster-management.io/addon-framework/pkg/addonfactory open-cluster-management.io/addon-framework/pkg/addonmanager @@ -1518,7 +1518,7 @@ open-cluster-management.io/addon-framework/pkg/basecontroller/events open-cluster-management.io/addon-framework/pkg/basecontroller/factory open-cluster-management.io/addon-framework/pkg/index open-cluster-management.io/addon-framework/pkg/utils -# open-cluster-management.io/api v0.13.1-0.20240605083248-f9e7f50520fc +# open-cluster-management.io/api v0.14.0 ## explicit; go 1.21 open-cluster-management.io/api/addon/v1alpha1 open-cluster-management.io/api/client/addon/clientset/versioned @@ -1589,7 +1589,7 @@ open-cluster-management.io/api/utils/work/v1/workapplier open-cluster-management.io/api/utils/work/v1/workvalidator open-cluster-management.io/api/work/v1 open-cluster-management.io/api/work/v1alpha1 -# open-cluster-management.io/sdk-go v0.13.1-0.20240618022514-b2c1dd175afd +# open-cluster-management.io/sdk-go v0.14.0 ## explicit; go 1.21 open-cluster-management.io/sdk-go/pkg/apis/cluster/v1alpha1 open-cluster-management.io/sdk-go/pkg/apis/cluster/v1beta1 diff --git a/vendor/open-cluster-management.io/api/addon/v1alpha1/0000_01_addon.open-cluster-management.io_managedclusteraddons.crd.yaml b/vendor/open-cluster-management.io/api/addon/v1alpha1/0000_01_addon.open-cluster-management.io_managedclusteraddons.crd.yaml index cc9a3d052..5276acd65 100644 --- a/vendor/open-cluster-management.io/api/addon/v1alpha1/0000_01_addon.open-cluster-management.io_managedclusteraddons.crd.yaml +++ b/vendor/open-cluster-management.io/api/addon/v1alpha1/0000_01_addon.open-cluster-management.io_managedclusteraddons.crd.yaml @@ -314,6 +314,7 @@ spec: will use to create csr. maxLength: 571 minLength: 5 + pattern: ^([a-z0-9][a-z0-9-]*[a-z0-9]\.)+[a-z]+\/[a-z0-9-\.]+$ type: string subject: description: 'subject is the user subject of the addon agent diff --git a/vendor/open-cluster-management.io/api/addon/v1alpha1/0000_03_addon.open-cluster-management.io_addontemplates.crd.yaml b/vendor/open-cluster-management.io/api/addon/v1alpha1/0000_03_addon.open-cluster-management.io_addontemplates.crd.yaml index 898dadbab..c9aaf69c2 100644 --- a/vendor/open-cluster-management.io/api/addon/v1alpha1/0000_03_addon.open-cluster-management.io_addontemplates.crd.yaml +++ b/vendor/open-cluster-management.io/api/addon/v1alpha1/0000_03_addon.open-cluster-management.io_addontemplates.crd.yaml @@ -330,6 +330,7 @@ spec: agent will use to create csr. maxLength: 571 minLength: 5 + pattern: ^([a-z0-9][a-z0-9-]*[a-z0-9]\.)+[a-z]+\/[a-z0-9-\.]+$ type: string signingCA: description: 'SigningCA represents the reference of the diff --git a/vendor/open-cluster-management.io/api/addon/v1alpha1/types_addontemplate.go b/vendor/open-cluster-management.io/api/addon/v1alpha1/types_addontemplate.go index a373c6c36..bf9a7ef47 100644 --- a/vendor/open-cluster-management.io/api/addon/v1alpha1/types_addontemplate.go +++ b/vendor/open-cluster-management.io/api/addon/v1alpha1/types_addontemplate.go @@ -157,6 +157,7 @@ type CustomSignerRegistrationConfig struct { // +required // +kubebuilder:validation:MaxLength=571 // +kubebuilder:validation:MinLength=5 + // +kubebuilder:validation:Pattern=^([a-z0-9][a-z0-9-]*[a-z0-9]\.)+[a-z]+\/[a-z0-9-\.]+$ SignerName string `json:"signerName"` // Subject is the user subject of the addon agent to be registered to the hub. diff --git a/vendor/open-cluster-management.io/api/addon/v1alpha1/types_managedclusteraddon.go b/vendor/open-cluster-management.io/api/addon/v1alpha1/types_managedclusteraddon.go index 9d7b11d11..82ad206c5 100644 --- a/vendor/open-cluster-management.io/api/addon/v1alpha1/types_managedclusteraddon.go +++ b/vendor/open-cluster-management.io/api/addon/v1alpha1/types_managedclusteraddon.go @@ -56,6 +56,7 @@ type RegistrationConfig struct { // +required // +kubebuilder:validation:MaxLength=571 // +kubebuilder:validation:MinLength=5 + // +kubebuilder:validation:Pattern=^([a-z0-9][a-z0-9-]*[a-z0-9]\.)+[a-z]+\/[a-z0-9-\.]+$ SignerName string `json:"signerName"` // subject is the user subject of the addon agent to be registered to the hub.