Skip to content

Commit 3771e25

Browse files
committed
bump olm
1 parent 84b340e commit 3771e25

File tree

12 files changed

+176
-98
lines changed

12 files changed

+176
-98
lines changed

staging/operator-lifecycle-manager/cmd/olm/main.go

-5
Original file line numberDiff line numberDiff line change
@@ -224,11 +224,6 @@ func main() {
224224
go monitor.Run(op.Done())
225225
}
226226

227-
// Reconcile all olm-managed secrets to add ownership annotations if not existed
228-
if err = op.EnsureSecretOwnershipAnnotations(); err != nil {
229-
logger.WithError(err).Fatal("error injecting ownership annotations to existing olm-managed secrets")
230-
}
231-
232227
// Start the controller manager
233228
if err := mgr.Start(ctx); err != nil {
234229
logger.WithError(err).Fatal("controller manager stopped")

staging/operator-lifecycle-manager/go.mod

+14-13
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ require (
2020
github.com/maxbrunsfeld/counterfeiter/v6 v6.11.2
2121
github.com/mitchellh/hashstructure v1.1.0
2222
github.com/mitchellh/mapstructure v1.5.0
23-
github.com/onsi/ginkgo/v2 v2.23.0
23+
github.com/onsi/ginkgo/v2 v2.23.3
2424
github.com/onsi/gomega v1.36.2
2525
github.com/openshift/api v3.9.0+incompatible
2626
github.com/openshift/client-go v0.0.0-20220525160904-9e1acff93e4a
@@ -37,22 +37,21 @@ require (
3737
github.com/stretchr/testify v1.10.0
3838
golang.org/x/net v0.37.0
3939
golang.org/x/sync v0.12.0
40-
golang.org/x/time v0.10.0
40+
golang.org/x/time v0.11.0
4141
google.golang.org/grpc v1.70.0
4242
gopkg.in/yaml.v2 v2.4.0
43-
k8s.io/api v0.32.2
44-
k8s.io/apiextensions-apiserver v0.32.2
45-
k8s.io/apimachinery v0.32.2
46-
k8s.io/apiserver v0.32.2
47-
k8s.io/client-go v0.32.2
48-
k8s.io/code-generator v0.32.2
49-
k8s.io/component-base v0.32.2
43+
k8s.io/api v0.32.3
44+
k8s.io/apiextensions-apiserver v0.32.3
45+
k8s.io/apimachinery v0.32.3
46+
k8s.io/apiserver v0.32.3
47+
k8s.io/client-go v0.32.3
48+
k8s.io/code-generator v0.32.3
49+
k8s.io/component-base v0.32.3
5050
k8s.io/klog v1.0.0
51-
k8s.io/klog/v2 v2.130.1
52-
k8s.io/kube-aggregator v0.32.2
51+
k8s.io/kube-aggregator v0.32.3
5352
k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f
5453
k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738
55-
sigs.k8s.io/controller-runtime v0.20.3
54+
sigs.k8s.io/controller-runtime v0.20.4
5655
sigs.k8s.io/controller-tools v0.17.2
5756
)
5857

@@ -178,7 +177,8 @@ require (
178177
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
179178
gopkg.in/yaml.v3 v3.0.1 // indirect
180179
k8s.io/gengo/v2 v2.0.0-20240911193312-2b36238f13e9 // indirect
181-
k8s.io/kms v0.32.2 // indirect
180+
k8s.io/klog/v2 v2.130.1 // indirect
181+
k8s.io/kms v0.32.3 // indirect
182182
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.0 // indirect
183183
sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect
184184
sigs.k8s.io/structured-merge-diff/v4 v4.4.2 // indirect
@@ -190,6 +190,7 @@ require (
190190
replace google.golang.org/grpc => google.golang.org/grpc v1.63.2
191191

192192
replace (
193+
github.com/go-jose/go-jose/v4 => github.com/go-jose/go-jose/v4 v4.0.5 // CVE-2025-27144
193194
// controller runtime
194195
github.com/openshift/api => github.com/openshift/api v0.0.0-20221021112143-4226c2167e40 // release-4.12
195196
github.com/openshift/client-go => github.com/openshift/client-go v0.0.0-20221019143426-16aed247da5c // release-4.12

staging/operator-lifecycle-manager/go.sum

+24-24
Original file line numberDiff line numberDiff line change
@@ -1813,8 +1813,8 @@ github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
18131813
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
18141814
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
18151815
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
1816-
github.com/onsi/ginkgo/v2 v2.23.0 h1:FA1xjp8ieYDzlgS5ABTpdUDB7wtngggONc8a7ku2NqQ=
1817-
github.com/onsi/ginkgo/v2 v2.23.0/go.mod h1:zXTP6xIp3U8aVuXN8ENK9IXRaTjFnpVB9mGmaSRvxnM=
1816+
github.com/onsi/ginkgo/v2 v2.23.3 h1:edHxnszytJ4lD9D5Jjc4tiDkPBZ3siDeJJkUZJJVkp0=
1817+
github.com/onsi/ginkgo/v2 v2.23.3/go.mod h1:zXTP6xIp3U8aVuXN8ENK9IXRaTjFnpVB9mGmaSRvxnM=
18181818
github.com/onsi/gomega v1.36.2 h1:koNYke6TVk6ZmnyHrCXba/T/MoLBXFjeC1PtvYgw0A8=
18191819
github.com/onsi/gomega v1.36.2/go.mod h1:DdwyADRjrc825LhMEkD76cHR5+pUnjhUN8GlHlRPHzY=
18201820
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
@@ -2390,8 +2390,8 @@ golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxb
23902390
golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
23912391
golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
23922392
golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
2393-
golang.org/x/time v0.10.0 h1:3usCWA8tQn0L8+hFJQNgzpWbd89begxN66o1Ojdn5L4=
2394-
golang.org/x/time v0.10.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
2393+
golang.org/x/time v0.11.0 h1:/bpjEDfN9tkoN/ryeYHnv5hcMlc8ncjMcM4XBk5NWV0=
2394+
golang.org/x/time v0.11.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg=
23952395
golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
23962396
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
23972397
golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
@@ -2841,30 +2841,30 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt
28412841
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
28422842
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
28432843
honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las=
2844-
k8s.io/api v0.32.2 h1:bZrMLEkgizC24G9eViHGOPbW+aRo9duEISRIJKfdJuw=
2845-
k8s.io/api v0.32.2/go.mod h1:hKlhk4x1sJyYnHENsrdCWw31FEmCijNGPJO5WzHiJ6Y=
2846-
k8s.io/apiextensions-apiserver v0.32.2 h1:2YMk285jWMk2188V2AERy5yDwBYrjgWYggscghPCvV4=
2847-
k8s.io/apiextensions-apiserver v0.32.2/go.mod h1:GPwf8sph7YlJT3H6aKUWtd0E+oyShk/YHWQHf/OOgCA=
2848-
k8s.io/apimachinery v0.32.2 h1:yoQBR9ZGkA6Rgmhbp/yuT9/g+4lxtsGYwW6dR6BDPLQ=
2849-
k8s.io/apimachinery v0.32.2/go.mod h1:GpHVgxoKlTxClKcteaeuF1Ul/lDVb74KpZcxcmLDElE=
2850-
k8s.io/apiserver v0.32.2 h1:WzyxAu4mvLkQxwD9hGa4ZfExo3yZZaYzoYvvVDlM6vw=
2851-
k8s.io/apiserver v0.32.2/go.mod h1:PEwREHiHNU2oFdte7BjzA1ZyjWjuckORLIK/wLV5goM=
2852-
k8s.io/client-go v0.32.2 h1:4dYCD4Nz+9RApM2b/3BtVvBHw54QjMFUl1OLcJG5yOA=
2853-
k8s.io/client-go v0.32.2/go.mod h1:fpZ4oJXclZ3r2nDOv+Ux3XcJutfrwjKTCHz2H3sww94=
2854-
k8s.io/code-generator v0.32.2 h1:CIvyPrLWP7cMgrqval2qYT839YAwCDeSvGfXgWSNpHQ=
2855-
k8s.io/code-generator v0.32.2/go.mod h1:plh7bWk7JztAUkHM4zpbdy0KOMdrhsePcZL2HLWFH7Y=
2856-
k8s.io/component-base v0.32.2 h1:1aUL5Vdmu7qNo4ZsE+569PV5zFatM9hl+lb3dEea2zU=
2857-
k8s.io/component-base v0.32.2/go.mod h1:PXJ61Vx9Lg+P5mS8TLd7bCIr+eMJRQTyXe8KvkrvJq0=
2844+
k8s.io/api v0.32.3 h1:Hw7KqxRusq+6QSplE3NYG4MBxZw1BZnq4aP4cJVINls=
2845+
k8s.io/api v0.32.3/go.mod h1:2wEDTXADtm/HA7CCMD8D8bK4yuBUptzaRhYcYEEYA3k=
2846+
k8s.io/apiextensions-apiserver v0.32.3 h1:4D8vy+9GWerlErCwVIbcQjsWunF9SUGNu7O7hiQTyPY=
2847+
k8s.io/apiextensions-apiserver v0.32.3/go.mod h1:8YwcvVRMVzw0r1Stc7XfGAzB/SIVLunqApySV5V7Dss=
2848+
k8s.io/apimachinery v0.32.3 h1:JmDuDarhDmA/Li7j3aPrwhpNBA94Nvk5zLeOge9HH1U=
2849+
k8s.io/apimachinery v0.32.3/go.mod h1:GpHVgxoKlTxClKcteaeuF1Ul/lDVb74KpZcxcmLDElE=
2850+
k8s.io/apiserver v0.32.3 h1:kOw2KBuHOA+wetX1MkmrxgBr648ksz653j26ESuWNY8=
2851+
k8s.io/apiserver v0.32.3/go.mod h1:q1x9B8E/WzShF49wh3ADOh6muSfpmFL0I2t+TG0Zdgc=
2852+
k8s.io/client-go v0.32.3 h1:RKPVltzopkSgHS7aS98QdscAgtgah/+zmpAogooIqVU=
2853+
k8s.io/client-go v0.32.3/go.mod h1:3v0+3k4IcT9bXTc4V2rt+d2ZPPG700Xy6Oi0Gdl2PaY=
2854+
k8s.io/code-generator v0.32.3 h1:31p2TVzC9+hVdSkAFruAk3JY+iSfzrJ83Qij1yZutyw=
2855+
k8s.io/code-generator v0.32.3/go.mod h1:+mbiYID5NLsBuqxjQTygKM/DAdKpAjvBzrJd64NU1G8=
2856+
k8s.io/component-base v0.32.3 h1:98WJvvMs3QZ2LYHBzvltFSeJjEx7t5+8s71P7M74u8k=
2857+
k8s.io/component-base v0.32.3/go.mod h1:LWi9cR+yPAv7cu2X9rZanTiFKB2kHA+JjmhkKjCZRpI=
28582858
k8s.io/gengo/v2 v2.0.0-20240911193312-2b36238f13e9 h1:si3PfKm8dDYxgfbeA6orqrtLkvvIeH8UqffFJDl0bz4=
28592859
k8s.io/gengo/v2 v2.0.0-20240911193312-2b36238f13e9/go.mod h1:EJykeLsmFC60UQbYJezXkEsG2FLrt0GPNkU5iK5GWxU=
28602860
k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8=
28612861
k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I=
28622862
k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=
28632863
k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
2864-
k8s.io/kms v0.32.2 h1:7Ff23ht7W40gTcDwUC8G5WjX5W/nxD8WxbNhIYYNZCI=
2865-
k8s.io/kms v0.32.2/go.mod h1:Bk2evz/Yvk0oVrvm4MvZbgq8BD34Ksxs2SRHn4/UiOM=
2866-
k8s.io/kube-aggregator v0.32.2 h1:kg9pke+i2qRbJwX1UKwZV4fsCRvmbaCEFk38R4FqHmw=
2867-
k8s.io/kube-aggregator v0.32.2/go.mod h1:rRm+xY1yIFIt3zBc727nG5SBLYywywD87klfIAw+7+c=
2864+
k8s.io/kms v0.32.3 h1:HhHw5+pRCzEJp3oFFJ1q5W2N6gAI7YkUg4ay4Z0dgwM=
2865+
k8s.io/kms v0.32.3/go.mod h1:Bk2evz/Yvk0oVrvm4MvZbgq8BD34Ksxs2SRHn4/UiOM=
2866+
k8s.io/kube-aggregator v0.32.3 h1:j+lUE4V1sMANYv/wCdU2E8SgnSLJksaJ+6bNnoV6Pfs=
2867+
k8s.io/kube-aggregator v0.32.3/go.mod h1:aAl5az9Rlq4sPPSf8/ckpDGSYit75g4g1dp6rKInXZM=
28682868
k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f h1:GA7//TjRY9yWGy1poLzYYJJ4JRdzg3+O6e8I+e+8T5Y=
28692869
k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f/go.mod h1:R/HEjbvWI0qdfb8viZUeVZm0X6IZnxAydC7YU42CMw4=
28702870
k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 h1:M3sRQVHv7vB20Xc2ybTt7ODCeFj6JSWYFzOFnYeS6Ro=
@@ -2935,8 +2935,8 @@ rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
29352935
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
29362936
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.0 h1:CPT0ExVicCzcpeN4baWEV2ko2Z/AsiZgEdwgcfwLgMo=
29372937
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.0/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw=
2938-
sigs.k8s.io/controller-runtime v0.20.3 h1:I6Ln8JfQjHH7JbtCD2HCYHoIzajoRxPNuvhvcDbZgkI=
2939-
sigs.k8s.io/controller-runtime v0.20.3/go.mod h1:xg2XB0K5ShQzAgsoujxuKN4LNXR2LfwwHsPj7Iaw+XY=
2938+
sigs.k8s.io/controller-runtime v0.20.4 h1:X3c+Odnxz+iPTRobG4tp092+CvBU9UK0t/bRf+n0DGU=
2939+
sigs.k8s.io/controller-runtime v0.20.4/go.mod h1:xg2XB0K5ShQzAgsoujxuKN4LNXR2LfwwHsPj7Iaw+XY=
29402940
sigs.k8s.io/controller-tools v0.17.2 h1:jNFOKps8WnaRKZU2R+4vRCHnXyJanVmXBWqkuUPFyFg=
29412941
sigs.k8s.io/controller-tools v0.17.2/go.mod h1:4q5tZG2JniS5M5bkiXY2/potOiXyhoZVw/U48vLkXk0=
29422942
sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 h1:/Rv+M11QRah1itp8VhT6HoVx1Ray9eB4DBr+K+/sCJ8=

staging/operator-lifecycle-manager/pkg/controller/install/certresources.go

+1-10
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,6 @@ const (
4545
// olm managed label
4646
OLMManagedLabelKey = "olm.managed"
4747
OLMManagedLabelValue = "true"
48-
// Use this const for now to avoid openshift/api bump
49-
// TODO: Bump openshift/api and remove this const
50-
OpenShiftComponent = "openshift.io/owning-component"
51-
OLMOwnershipAnnotation = "Operator Framework / operator-lifecycle-manager"
5248
)
5349

5450
type certResource interface {
@@ -361,11 +357,6 @@ func (i *StrategyDeploymentInstaller) installCertRequirementsForDeployment(deplo
361357
}
362358
caHash := certs.PEMSHA256(caPEM)
363359

364-
annotations := map[string]string{
365-
OpenShiftComponent: OLMOwnershipAnnotation,
366-
OLMCAHashAnnotationKey: caHash,
367-
}
368-
369360
secret := &corev1.Secret{
370361
Data: map[string][]byte{
371362
"tls.crt": certPEM,
@@ -376,8 +367,8 @@ func (i *StrategyDeploymentInstaller) installCertRequirementsForDeployment(deplo
376367
}
377368
secret.SetName(SecretName(serviceName))
378369
secret.SetNamespace(i.owner.GetNamespace())
370+
secret.SetAnnotations(map[string]string{OLMCAHashAnnotationKey: caHash})
379371
secret.SetLabels(map[string]string{OLMManagedLabelKey: OLMManagedLabelValue})
380-
secret.SetAnnotations(annotations)
381372

382373
existingSecret, err := i.strategyClient.GetOpLister().CoreV1().SecretLister().Secrets(i.owner.GetNamespace()).Get(secret.GetName())
383374
if err == nil {

staging/operator-lifecycle-manager/pkg/controller/install/certresources_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ func TestInstallCertRequirementsForDeployment(t *testing.T) {
202202
ObjectMeta: metav1.ObjectMeta{
203203
Name: "test-service-cert",
204204
Namespace: namespace,
205-
Annotations: map[string]string{OLMCAHashAnnotationKey: caHash, OpenShiftComponent: OLMOwnershipAnnotation},
205+
Annotations: map[string]string{OLMCAHashAnnotationKey: caHash},
206206
Labels: map[string]string{OLMManagedLabelKey: OLMManagedLabelValue},
207207
},
208208
Data: map[string][]byte{
@@ -473,7 +473,7 @@ func TestInstallCertRequirementsForDeployment(t *testing.T) {
473473
ObjectMeta: metav1.ObjectMeta{
474474
Name: "test-service-cert",
475475
Namespace: namespace,
476-
Annotations: map[string]string{OLMCAHashAnnotationKey: caHash, OpenShiftComponent: OLMOwnershipAnnotation},
476+
Annotations: map[string]string{OLMCAHashAnnotationKey: caHash},
477477
Labels: map[string]string{OLMManagedLabelKey: OLMManagedLabelValue},
478478
},
479479
Data: map[string][]byte{
@@ -739,7 +739,7 @@ func TestInstallCertRequirementsForDeployment(t *testing.T) {
739739
ObjectMeta: metav1.ObjectMeta{
740740
Name: "test-service-cert",
741741
Namespace: namespace,
742-
Annotations: map[string]string{OLMCAHashAnnotationKey: caHash, OpenShiftComponent: OLMOwnershipAnnotation},
742+
Annotations: map[string]string{OLMCAHashAnnotationKey: caHash},
743743
Labels: map[string]string{OLMManagedLabelKey: OLMManagedLabelValue},
744744
OwnerReferences: []metav1.OwnerReference{
745745
ownerutil.NonBlockingOwner(&v1alpha1.ClusterServiceVersion{}),

staging/operator-lifecycle-manager/pkg/controller/operators/catalog/supportedresources.go

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ const (
1010
ConsoleQuickStartKind = "ConsoleQuickStart"
1111
ConsoleCLIDownloadKind = "ConsoleCLIDownload"
1212
ConsoleLinkKind = "ConsoleLink"
13+
ConsolePlugin = "ConsolePlugin"
1314
)
1415

1516
var supportedKinds = map[string]struct{}{
@@ -22,6 +23,7 @@ var supportedKinds = map[string]struct{}{
2223
ConsoleQuickStartKind: {},
2324
ConsoleCLIDownloadKind: {},
2425
ConsoleLinkKind: {},
26+
ConsolePlugin: {},
2527
}
2628

2729
// isSupported returns true if OLM supports this type of CustomResource.

staging/operator-lifecycle-manager/pkg/controller/operators/olm/operator.go

+1-35
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ var (
7070

7171
// this unexported operator plugin slice provides an entrypoint for
7272
// downstream to inject its own plugins to augment the controller behavior
73-
var operatorPlugInFactoryFuncs plugins.OperatorPlugInFactoryMap
73+
var operatorPlugInFactoryFuncs []plugins.OperatorPlugInFactoryFunc
7474

7575
type Operator struct {
7676
queueinformer.Operator
@@ -2867,37 +2867,3 @@ func (a *Operator) ensureLabels(in *v1alpha1.ClusterServiceVersion, labelSets ..
28672867
out, err := a.client.OperatorsV1alpha1().ClusterServiceVersions(out.GetNamespace()).Update(context.TODO(), out, metav1.UpdateOptions{})
28682868
return out, err
28692869
}
2870-
2871-
// syncSecret adds required ownership annotations to olm-managed secrets
2872-
func (a *Operator) EnsureSecretOwnershipAnnotations() error {
2873-
secrets, err := a.lister.CoreV1().SecretLister().List(labels.SelectorFromSet(labels.Set{install.OLMManagedLabelKey: install.OLMManagedLabelValue}))
2874-
if err != nil {
2875-
return err
2876-
}
2877-
2878-
for _, secret := range secrets {
2879-
logger := a.logger.WithFields(logrus.Fields{
2880-
"name": secret.GetName(),
2881-
"namespace": secret.GetNamespace(),
2882-
"self": secret.GetSelfLink(),
2883-
})
2884-
logger.Debug("ensuring ownership annotations existed in the secret")
2885-
2886-
if secret.Annotations != nil {
2887-
if secret.Annotations[install.OpenShiftComponent] == "" {
2888-
secret.Annotations[install.OpenShiftComponent] = install.OLMOwnershipAnnotation
2889-
} else {
2890-
continue
2891-
}
2892-
} else {
2893-
secret.Annotations = map[string]string{}
2894-
secret.Annotations[install.OpenShiftComponent] = install.OLMOwnershipAnnotation
2895-
}
2896-
logger.Debug("injecting ownership annotations to existing secret")
2897-
if _, updateErr := a.opClient.UpdateSecret(secret); updateErr != nil {
2898-
logger.WithError(err).Warn("error adding ownership annotations to existing secret")
2899-
return err
2900-
}
2901-
}
2902-
return nil
2903-
}

staging/operator-lifecycle-manager/pkg/controller/operators/olm/plugins/operator_plugin.go

-3
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ import (
1919
apiregistrationv1informers "k8s.io/kube-aggregator/pkg/client/informers/externalversions/apiregistration/v1"
2020
)
2121

22-
type PluginID string
23-
type OperatorPlugInFactoryMap map[PluginID]OperatorPlugInFactoryFunc
24-
2522
// HostOperator is an extensible and observable operator that hosts the plug-in, i.e. which the plug-in is extending
2623
type HostOperator interface {
2724
queueinformer.ObservableOperator

staging/operator-lifecycle-manager/pkg/controller/registry/resolver/step_resolver_test.go

+24
Original file line numberDiff line numberDiff line change
@@ -732,6 +732,30 @@ func TestResolver(t *testing.T) {
732732
},
733733
},
734734
},
735+
{
736+
// Tests the migration from one package name to another with replaces.
737+
// Useful when renaming a package or combining two packages into one.
738+
name: "InstalledSub/UpdateAvailable/FromDifferentPackage",
739+
clusterState: []runtime.Object{
740+
existingSub(namespace, "a.v1", "b", "alpha", catalog),
741+
existingOperator(namespace, "a.v1", "a", "alpha", "", Provides1, nil, nil, nil),
742+
newOperatorGroup("foo", namespace),
743+
},
744+
bundlesByCatalog: map[resolvercache.SourceKey][]*api.Bundle{
745+
catalog: {
746+
bundle("a.v1", "a", "alpha", "", Provides1, nil, nil, nil),
747+
bundle("b.v2", "b", "alpha", "a.v1", Provides1, nil, nil, nil),
748+
},
749+
},
750+
out: resolverTestOut{
751+
steps: [][]*v1alpha1.Step{
752+
bundleSteps(bundle("b.v2", "b", "alpha", "a.v1", Provides1, nil, nil, nil), namespace, "", catalog),
753+
},
754+
subs: []*v1alpha1.Subscription{
755+
updatedSub(namespace, "b.v2", "a.v1", "b", "alpha", catalog),
756+
},
757+
},
758+
},
735759
{
736760
name: "InstalledSub/UpdateAvailable/FromBundlePath",
737761
clusterState: []runtime.Object{

staging/operator-lifecycle-manager/test/e2e/catalog_exclusion_test.go

+3-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package e2e
33
import (
44
"context"
55
"path/filepath"
6-
"time"
76

87
. "github.com/onsi/ginkgo/v2"
98
. "github.com/onsi/gomega"
@@ -106,11 +105,10 @@ var _ = Describe("Global Catalog Exclusion", Label("CatalogExclusion"), func() {
106105
})
107106

108107
When("the operator group is annotated with olm.operatorframework.io/exclude-global-namespace-resolution=true", func() {
109-
// Note: this test flakes on openshift CI but passes running on a local openshift cluster
110-
// For some reason, the subscription does not transition to a failed state in time
108+
111109
It("the broken subscription should resolve and have state AtLatest", func() {
112110
By("checking that the subscription is not resolving and has a condition with type ResolutionFailed")
113-
EventuallyResource(subscription, 5*time.Minute).Should(ContainSubscriptionConditionOfType(v1alpha1.SubscriptionResolutionFailed))
111+
EventuallyResource(subscription).Should(ContainSubscriptionConditionOfType(v1alpha1.SubscriptionResolutionFailed))
114112

115113
By("annotating the operator group with olm.operatorframework.io/exclude-global-namespace-resolution=true")
116114
Eventually(func() error {
@@ -131,7 +129,7 @@ var _ = Describe("Global Catalog Exclusion", Label("CatalogExclusion"), func() {
131129
}).Should(Succeed())
132130

133131
By("checking that the subscription resolves and has state AtLatest")
134-
EventuallyResource(subscription, 5*time.Minute).Should(HaveSubscriptionState(v1alpha1.SubscriptionStateAtLatest))
132+
EventuallyResource(subscription).Should(HaveSubscriptionState(v1alpha1.SubscriptionStateAtLatest))
135133
})
136134
})
137135
})

staging/operator-lifecycle-manager/test/e2e/e2e_test.go

+4
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,10 @@ var _ = BeforeSuite(func() {
137137
HaveLen(1),
138138
ContainElement(Not(BeZero())),
139139
))
140+
141+
_, err := fetchCatalogSourceOnStatus(ctx.Ctx().OperatorClient(), "operatorhubio-catalog", operatorNamespace, catalogSourceRegistryPodSynced())
142+
Expect(err).NotTo(HaveOccurred())
143+
140144
})
141145

142146
var _ = AfterSuite(func() {

0 commit comments

Comments
 (0)