From 422f50a8a7b1cc3387c38b274a01f36e938c74fc Mon Sep 17 00:00:00 2001 From: xuezhaojun Date: Sun, 8 Oct 2023 16:50:53 +0800 Subject: [PATCH] Update: addon-framework to 0.8.0 Signed-off-by: xuezhaojun --- go.mod | 4 ++-- go.sum | 8 ++++---- pkg/proxyagent/agent/agent.go | 2 +- test/e2e/install/install.go | 8 +++++--- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/go.mod b/go.mod index a8d57b0f..dc95e3df 100644 --- a/go.mod +++ b/go.mod @@ -15,8 +15,8 @@ require ( k8s.io/client-go v0.26.7 k8s.io/klog/v2 v2.80.1 k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 - open-cluster-management.io/addon-framework v0.6.1 - open-cluster-management.io/api v0.11.1-0.20230905055724-cf1ead467a83 + open-cluster-management.io/addon-framework v0.8.0 + open-cluster-management.io/api v0.12.0 sigs.k8s.io/apiserver-network-proxy v0.0.27 sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.37 sigs.k8s.io/controller-runtime v0.14.4 diff --git a/go.sum b/go.sum index 4c91a7ad..b3d92a6e 100644 --- a/go.sum +++ b/go.sum @@ -708,10 +708,10 @@ k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 h1:+70TFaan3hfJzs+7VK2o+O k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4= k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 h1:KTgPnR10d5zhztWptI952TNtt/4u5h3IzDXkdIMuo2Y= k8s.io/utils v0.0.0-20221128185143-99ec85e7a448/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -open-cluster-management.io/addon-framework v0.6.1 h1:gnBZaCRgtiPRjCBJoaRqMivajng/XOKp0NQhJUqLd+U= -open-cluster-management.io/addon-framework v0.6.1/go.mod h1:Uu4XC3Ec0ATS7U73PJtzAP4NCDfbDBVy1k5RUUwQDqY= -open-cluster-management.io/api v0.11.1-0.20230905055724-cf1ead467a83 h1:3zbT3sT/tEAQbpjIk6uRiTQGknQ3kQlfd11ElVuXyyQ= -open-cluster-management.io/api v0.11.1-0.20230905055724-cf1ead467a83/go.mod h1:nsQ/G5JpfjQUg7dHpblyywWC6BRqklNaF6fIswVCHyY= +open-cluster-management.io/addon-framework v0.8.0 h1:i1OReMHuZIoAw2Q04SLjkieU25DnxYilzVZzBNyROwU= +open-cluster-management.io/addon-framework v0.8.0/go.mod h1:20DP06VXhJ9RE1PetAMEQyeFCP7+nhs92pCAkqbWUOg= +open-cluster-management.io/api v0.12.0 h1:sNkj4k2XyWA/GLsTiFg82bLIZ7JDZKkLLLyZjJUlJMs= +open-cluster-management.io/api v0.12.0/go.mod h1:/CZhelEH+30/pX7vXGSZOzLMX0zvjthYOkT/5ZTzVTQ= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/pkg/proxyagent/agent/agent.go b/pkg/proxyagent/agent/agent.go index 0b82f9e5..a37f7769 100644 --- a/pkg/proxyagent/agent/agent.go +++ b/pkg/proxyagent/agent/agent.go @@ -130,7 +130,7 @@ func NewAgentAddon( Version: proxyv1alpha1.GroupVersion.Version, Resource: "managedproxyconfigurations", }, - addonfactory.AddOnDeploymentConfigGVR, + utils.AddOnDeploymentConfigGVR, ). WithGetValuesFuncs( GetClusterProxyValueFunc(runtimeClient, nativeClient, signerNamespace, caCertData, v1CSRSupported, enableKubeApiProxy), diff --git a/test/e2e/install/install.go b/test/e2e/install/install.go index 3dd3f2ce..aac1525a 100644 --- a/test/e2e/install/install.go +++ b/test/e2e/install/install.go @@ -140,10 +140,12 @@ var _ = Describe("Basic install Test", if len(addon.Status.ConfigReferences) == 0 { return fmt.Errorf("no config references in addon status") } - if addon.Status.ConfigReferences[0].Name != deployConfigName { - return fmt.Errorf("unexpected config references %v", addon.Status.ConfigReferences) + for _, cr := range addon.Status.ConfigReferences { + if cr.Name == deployConfigName { + return nil + } } - return nil + return fmt.Errorf("unexpected config references %v", addon.Status.ConfigReferences) }).WithTimeout(time.Minute).ShouldNot(HaveOccurred()) By("Ensure the cluster-proxy is configured")