From 894086868dbd51fd627a591bc3c3efbcc0751193 Mon Sep 17 00:00:00 2001 From: haoqing0110 Date: Thu, 10 Oct 2024 02:07:33 +0000 Subject: [PATCH] upgrade framework and enable config check Signed-off-by: haoqing0110 --- go.mod | 12 +++++----- go.sum | 24 +++++++++---------- ...agement.io_managedproxyconfigurations.yaml | 2 +- ...ement.io_managedproxyserviceresolvers.yaml | 2 +- pkg/proxyagent/agent/agent.go | 1 + .../managedproxyconfiguration_controller.go | 2 +- 6 files changed, 22 insertions(+), 21 deletions(-) diff --git a/go.mod b/go.mod index 8b840b7e..85513194 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/onsi/ginkgo/v2 v2.17.1 github.com/onsi/gomega v1.32.0 - github.com/openshift/library-go v0.0.0-20240304201338-a2ff756d8fc2 + github.com/openshift/library-go v0.0.0-20240621150525-4bb4238aef81 github.com/pkg/errors v0.9.1 github.com/stretchr/testify v1.9.0 google.golang.org/grpc v1.62.1 @@ -14,9 +14,9 @@ require ( k8s.io/client-go v0.30.2 k8s.io/klog/v2 v2.120.1 k8s.io/utils v0.0.0-20240310230437-4693a0247e57 - open-cluster-management.io/addon-framework v0.10.0 - open-cluster-management.io/api v0.14.1-0.20240627145512-bd6f2229b53c - open-cluster-management.io/sdk-go v0.13.1-0.20240416062924-20307e6fe090 + open-cluster-management.io/addon-framework v0.10.1-0.20241009100235-11aa520f541f + open-cluster-management.io/api v0.14.1-0.20241008081048-f6c658202790 + open-cluster-management.io/sdk-go v0.14.1-0.20240628095929-9ffb1b19e566 sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.30.2 sigs.k8s.io/controller-runtime v0.18.4 ) @@ -93,8 +93,8 @@ require ( gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect helm.sh/helm/v3 v3.14.2 // indirect - k8s.io/apiextensions-apiserver v0.30.1 // indirect - k8s.io/apiserver v0.30.1 // indirect + k8s.io/apiextensions-apiserver v0.30.2 // indirect + k8s.io/apiserver v0.30.2 // indirect k8s.io/component-base v0.30.2 // indirect k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect diff --git a/go.sum b/go.sum index 85b9fd37..928c78e9 100644 --- a/go.sum +++ b/go.sum @@ -120,8 +120,8 @@ github.com/onsi/ginkgo/v2 v2.17.1 h1:V++EzdbhI4ZV4ev0UTIj0PzhzOcReJFyJaLjtSF55M8 github.com/onsi/ginkgo/v2 v2.17.1/go.mod h1:llBI3WDLL9Z6taip6f33H76YcWtJv+7R3HigUjbIBOs= github.com/onsi/gomega v1.32.0 h1:JRYU78fJ1LPxlckP6Txi/EYqJvjtMrDC04/MM5XRHPk= github.com/onsi/gomega v1.32.0/go.mod h1:a4x4gW6Pz2yK1MAmvluYme5lvYTn61afQ2ETw/8n4Lg= -github.com/openshift/library-go v0.0.0-20240304201338-a2ff756d8fc2 h1:ATvutswrw2TNhwbPJoDl2IJ2RtljMtngzs9W0v5pMCQ= -github.com/openshift/library-go v0.0.0-20240304201338-a2ff756d8fc2/go.mod h1:ePlaOqUiPplRc++6aYdMe+2FmXb2xTNS9Nz5laG2YmI= +github.com/openshift/library-go v0.0.0-20240621150525-4bb4238aef81 h1:cAo++YCkjrClksMEAPqK9SLMCroqlbGxNTluxeKGIGc= +github.com/openshift/library-go v0.0.0-20240621150525-4bb4238aef81/go.mod h1:PdASVamWinll2BPxiUpXajTwZxV8A1pQbWEsCN1od7I= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= @@ -267,12 +267,12 @@ helm.sh/helm/v3 v3.14.2 h1:V71fv+NGZv0icBlr+in1MJXuUIHCiPG1hW9gEBISTIA= helm.sh/helm/v3 v3.14.2/go.mod h1:2itvvDv2WSZXTllknfQo6j7u3VVgMAvm8POCDgYH424= k8s.io/api v0.30.2 h1:+ZhRj+28QT4UOH+BKznu4CBgPWgkXO7XAvMcMl0qKvI= k8s.io/api v0.30.2/go.mod h1:ULg5g9JvOev2dG0u2hig4Z7tQ2hHIuS+m8MNZ+X6EmI= -k8s.io/apiextensions-apiserver v0.30.1 h1:4fAJZ9985BmpJG6PkoxVRpXv9vmPUOVzl614xarePws= -k8s.io/apiextensions-apiserver v0.30.1/go.mod h1:R4GuSrlhgq43oRY9sF2IToFh7PVlF1JjfWdoG3pixk4= +k8s.io/apiextensions-apiserver v0.30.2 h1:l7Eue2t6QiLHErfn2vwK4KgF4NeDgjQkCXtEbOocKIE= +k8s.io/apiextensions-apiserver v0.30.2/go.mod h1:lsJFLYyK40iguuinsb3nt+Sj6CmodSI4ACDLep1rgjw= k8s.io/apimachinery v0.30.2 h1:fEMcnBj6qkzzPGSVsAZtQThU62SmQ4ZymlXRC5yFSCg= k8s.io/apimachinery v0.30.2/go.mod h1:iexa2somDaxdnj7bha06bhb43Zpa6eWH8N8dbqVjTUc= -k8s.io/apiserver v0.30.1 h1:BEWEe8bzS12nMtDKXzCF5Q5ovp6LjjYkSp8qOPk8LZ8= -k8s.io/apiserver v0.30.1/go.mod h1:i87ZnQ+/PGAmSbD/iEKM68bm1D5reX8fO4Ito4B01mo= +k8s.io/apiserver v0.30.2 h1:ACouHiYl1yFI2VFI3YGM+lvxgy6ir4yK2oLOsLI1/tw= +k8s.io/apiserver v0.30.2/go.mod h1:BOTdFBIch9Sv0ypSEcUR6ew/NUFGocRFNl72Ra7wTm8= k8s.io/client-go v0.30.2 h1:sBIVJdojUNPDU/jObC+18tXWcTJVcwyqS9diGdWHk50= k8s.io/client-go v0.30.2/go.mod h1:JglKSWULm9xlJLx4KCkfLLQ7XwtlbflV6uFFSHTMgVs= k8s.io/component-base v0.30.2 h1:pqGBczYoW1sno8q9ObExUqrYSKhtE5rW3y6gX88GZII= @@ -283,12 +283,12 @@ k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7F k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98= 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.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.1-0.20240627145512-bd6f2229b53c h1:gYfgkX/U6fv2d3Ly8D6N1GM9zokORupLSgCxx791zZw= -open-cluster-management.io/api v0.14.1-0.20240627145512-bd6f2229b53c/go.mod h1:9erZEWEn4bEqh0nIX2wA7f/s3KCuFycQdBrPrRzi0QM= -open-cluster-management.io/sdk-go v0.13.1-0.20240416062924-20307e6fe090 h1:zFmHuW+ztdfUUNslqNW+H1WEcfdEUQHoRDbmdajX340= -open-cluster-management.io/sdk-go v0.13.1-0.20240416062924-20307e6fe090/go.mod h1:w2OaxtCyegxeyFLU42UQ3oxUz01QdsBQkcHI17T/l48= +open-cluster-management.io/addon-framework v0.10.1-0.20241009100235-11aa520f541f h1:KRnWPOfj69VAF7t/fz2tG6iQ5qhp/rptrwiYU4g41ns= +open-cluster-management.io/addon-framework v0.10.1-0.20241009100235-11aa520f541f/go.mod h1:HHR3Mtntb5OL8A1szTc73yZZ99mU+C1NC9oxe7NTf3M= +open-cluster-management.io/api v0.14.1-0.20241008081048-f6c658202790 h1:XszHWAR6PhYXBFPN4qgk8D5HVl8W/61j+bNMsXVuW7U= +open-cluster-management.io/api v0.14.1-0.20241008081048-f6c658202790/go.mod h1:9erZEWEn4bEqh0nIX2wA7f/s3KCuFycQdBrPrRzi0QM= +open-cluster-management.io/sdk-go v0.14.1-0.20240628095929-9ffb1b19e566 h1:8dgPiM3byX/rtOrFJIsea2haV4hSFTND65Tlj1EdK18= +open-cluster-management.io/sdk-go v0.14.1-0.20240628095929-9ffb1b19e566/go.mod h1:xFmN3Db5nN68oLGnstmIRv4us8HJCdXFnBNMXVp0jWY= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.30.2 h1:N2wvoG4CkNqORML7GHY9xkGKxswDhpAD46poBd/hHHg= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.30.2/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw= sigs.k8s.io/controller-runtime v0.18.4 h1:87+guW1zhvuPLh1PHybKdYFLU0YJp4FhJRmiHvm5BZw= diff --git a/hack/crd/bases/proxy.open-cluster-management.io_managedproxyconfigurations.yaml b/hack/crd/bases/proxy.open-cluster-management.io_managedproxyconfigurations.yaml index 67e5acff..745f5628 100644 --- a/hack/crd/bases/proxy.open-cluster-management.io_managedproxyconfigurations.yaml +++ b/hack/crd/bases/proxy.open-cluster-management.io_managedproxyconfigurations.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.15.0 name: managedproxyconfigurations.proxy.open-cluster-management.io spec: group: proxy.open-cluster-management.io diff --git a/hack/crd/bases/proxy.open-cluster-management.io_managedproxyserviceresolvers.yaml b/hack/crd/bases/proxy.open-cluster-management.io_managedproxyserviceresolvers.yaml index 0f0cb397..c4299bfa 100644 --- a/hack/crd/bases/proxy.open-cluster-management.io_managedproxyserviceresolvers.yaml +++ b/hack/crd/bases/proxy.open-cluster-management.io_managedproxyserviceresolvers.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.15.0 name: managedproxyserviceresolvers.proxy.open-cluster-management.io spec: group: proxy.open-cluster-management.io diff --git a/pkg/proxyagent/agent/agent.go b/pkg/proxyagent/agent/agent.go index c255640d..93581553 100644 --- a/pkg/proxyagent/agent/agent.go +++ b/pkg/proxyagent/agent/agent.go @@ -147,6 +147,7 @@ func NewAgentAddon( toAgentAddOnChartValues(caCertData), ), ). + WithConfigCheckEnabledOption(). WithAgentInstallNamespace(agentInstallNamespaceFunc(utils.NewAddOnDeploymentConfigGetter(addonClient))) return agentFactory.BuildHelmAgentAddon() diff --git a/pkg/proxyserver/controllers/managedproxyconfiguration_controller.go b/pkg/proxyserver/controllers/managedproxyconfiguration_controller.go index 1d605f57..1a5f177c 100644 --- a/pkg/proxyserver/controllers/managedproxyconfiguration_controller.go +++ b/pkg/proxyserver/controllers/managedproxyconfiguration_controller.go @@ -9,10 +9,10 @@ import ( "strings" "time" - "open-cluster-management.io/addon-framework/pkg/certrotation" proxyv1alpha1 "open-cluster-management.io/cluster-proxy/pkg/apis/proxy/v1alpha1" "open-cluster-management.io/cluster-proxy/pkg/common" "open-cluster-management.io/cluster-proxy/pkg/proxyserver/operator/authentication/selfsigned" + "open-cluster-management.io/sdk-go/pkg/certrotation" "github.com/openshift/library-go/pkg/crypto" "github.com/openshift/library-go/pkg/operator/events"