Skip to content

Commit 1edd6f3

Browse files
authored
Merge pull request #641 from openshift-bot/synchronize-upstream
OCPBUGS-25673: NO-ISSUE: Synchronize From Upstream Repositories
2 parents 18aa3be + d447001 commit 1edd6f3

21 files changed

+1120
-1129
lines changed

Diff for: staging/operator-lifecycle-manager/pkg/controller/operators/labeller/labels.go

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import (
1818
operatorsv1 "github.com/operator-framework/api/pkg/operators/v1"
1919
operatorsv1alpha1 "github.com/operator-framework/api/pkg/operators/v1alpha1"
2020
operatorsv1alpha2 "github.com/operator-framework/api/pkg/operators/v1alpha2"
21+
operatorsv2 "github.com/operator-framework/api/pkg/operators/v2"
2122

2223
"github.com/operator-framework/operator-lifecycle-manager/pkg/controller/install"
2324
"github.com/operator-framework/operator-lifecycle-manager/pkg/controller/operators/decorators"
@@ -181,6 +182,7 @@ func HasOLMOwnerRef(object metav1.Object) bool {
181182
operatorsv1.GroupVersion,
182183
operatorsv1alpha1.SchemeGroupVersion,
183184
operatorsv1alpha2.GroupVersion,
185+
operatorsv2.GroupVersion,
184186
} {
185187
if ref.APIVersion == gv.String() {
186188
return true

Diff for: staging/operator-lifecycle-manager/test/e2e/bundle_e2e_test.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ var _ = Describe("Installing bundles with new object types", func() {
6262
imageName = "quay.io/olmtest/single-bundle-index:pdb-v1"
6363
)
6464

65-
// create VPA CRD on cluster
65+
By("create VPA CRD on cluster")
6666
Expect(vpaCRDRaw).ToNot(BeEmpty(), "could not read vpa bindata")
6767
data, err := yaml.YAMLToJSON(vpaCRDRaw)
6868
Expect(err).ToNot(HaveOccurred(), "could not convert vpa crd to json")
@@ -80,7 +80,7 @@ var _ = Describe("Installing bundles with new object types", func() {
8080
return nil
8181
}).Should(Succeed())
8282

83-
// ensure vpa crd is established and accepted on the cluster before continuing
83+
By("ensure vpa crd is established and accepted on the cluster before continuing")
8484
Eventually(func() (bool, error) {
8585
crd, err := kubeClient.ApiextensionsInterface().ApiextensionsV1().CustomResourceDefinitions().Get(context.Background(), vpaCRD.GetName(), metav1.GetOptions{})
8686
if err != nil {
@@ -113,20 +113,20 @@ var _ = Describe("Installing bundles with new object types", func() {
113113
return err
114114
}).Should(Succeed())
115115

116-
// Wait for the CatalogSource to be ready
116+
By("Wait for the CatalogSource to be ready")
117117
_, err = fetchCatalogSourceOnStatus(operatorClient, source.GetName(), source.GetNamespace(), catalogSourceRegistryPodSynced())
118118
Expect(err).ToNot(HaveOccurred(), "catalog source did not become ready")
119119

120-
// Create a Subscription for package
120+
By("Create a Subscription for package")
121121
_ = createSubscriptionForCatalog(operatorClient, source.GetNamespace(), subName, source.GetName(), packageName, channelName, "", v1alpha1.ApprovalAutomatic)
122122

123-
// Wait for the Subscription to succeed
123+
By("Wait for the Subscription to succeed")
124124
sub, err := fetchSubscription(operatorClient, generatedNamespace.GetName(), subName, subscriptionStateAtLatestChecker())
125125
Expect(err).ToNot(HaveOccurred(), "could not get subscription at latest status")
126126

127127
installPlanRef := sub.Status.InstallPlanRef
128128

129-
// Wait for the installplan to complete (5 minute timeout)
129+
By("Wait for the installplan to complete (5 minute timeout)")
130130
_, err = fetchInstallPlanWithNamespace(GinkgoT(), operatorClient, installPlanRef.Name, installPlanRef.Namespace, buildInstallPlanPhaseCheckFunc(v1alpha1.InstallPlanPhaseComplete))
131131
Expect(err).ToNot(HaveOccurred(), "could not get installplan at complete phase")
132132

@@ -149,7 +149,7 @@ var _ = Describe("Installing bundles with new object types", func() {
149149
Resource: vpaResource,
150150
}
151151

152-
// confirm extra bundle objects are installed
152+
By("confirm extra bundle objects are installed")
153153
Eventually(func() error {
154154
_, err := kubeClient.KubernetesInterface().SchedulingV1().PriorityClasses().Get(context.Background(), priorityClassName, metav1.GetOptions{})
155155
return err

Diff for: staging/operator-lifecycle-manager/test/e2e/catalog_e2e_test.go

+104-104
Large diffs are not rendered by default.

Diff for: staging/operator-lifecycle-manager/test/e2e/catalog_exclusion_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,12 @@ var _ = Describe("Global Catalog Exclusion", func() {
7070
localCatalog, err = NewMagicCatalogFromFile(determinedE2eClient, generatedNamespace.GetName(), localCatalogName, fbcPath)
7171
Expect(err).To(Succeed())
7272

73-
// deploy catalog blocks until the catalog has reached a ready state or fails
73+
By("deploy catalog blocks until the catalog has reached a ready state or fails")
7474
Expect(localCatalog.DeployCatalog(context.Background())).To(Succeed())
7575

7676
By("checking that the global catalog is broken")
77-
// Adding this check here to speed up the test
78-
// the global catalog can fail while we wait for the local catalog to get to a ready state
77+
By("Adding this check here to speed up the test")
78+
By("the global catalog can fail while we wait for the local catalog to get to a ready state")
7979
EventuallyResource(globalCatalog).Should(HaveGrpcConnectionWithLastConnectionState(connectivity.TransientFailure))
8080
})
8181

Diff for: staging/operator-lifecycle-manager/test/e2e/catsrc_pod_config_e2e_test.go

+11-11
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ var _ = Describe("CatalogSource Grpc Pod Config", func() {
4747
BeforeEach(func() {
4848
client = ctx.Ctx().Client()
4949

50-
// must be a grpc source type with spec.image defined
50+
By("must be a grpc source type with spec.image defined")
5151
catalogSource = &v1alpha1.CatalogSource{
5252
ObjectMeta: metav1.ObjectMeta{
5353
Name: catalogSourceName,
@@ -64,10 +64,10 @@ var _ = Describe("CatalogSource Grpc Pod Config", func() {
6464
})
6565

6666
AfterEach(func() {
67-
// assume the catalog source was created and just delete it
67+
By("assume the catalog source was created and just delete it")
6868
_ = client.Delete(context.TODO(), catalogSource)
6969

70-
// wait for it to go away
70+
By("wait for it to go away")
7171
Expect(waitForDelete(func() error {
7272
return client.Get(context.TODO(), k8scontrollerclient.ObjectKey{
7373
Name: catalogSource.GetName(),
@@ -79,14 +79,14 @@ var _ = Describe("CatalogSource Grpc Pod Config", func() {
7979
It("should override the pod's spec.priorityClassName", func() {
8080
var overridenPriorityClassName = "system-node-critical"
8181

82-
// create catalog source
82+
By("create catalog source")
8383
catalogSource.Spec.GrpcPodConfig = &v1alpha1.GrpcPodConfig{
8484
PriorityClassName: &overridenPriorityClassName,
8585
SecurityContextConfig: v1alpha1.Restricted,
8686
}
8787
mustCreateCatalogSource(client, catalogSource)
8888

89-
// Check overrides are present in the spec
89+
By("Check overrides are present in the spec")
9090
catalogSourcePod := mustGetCatalogSourcePod(client, catalogSource)
9191
Expect(catalogSourcePod).ToNot(BeNil())
9292
Expect(catalogSourcePod.Spec.NodeSelector).To(BeEquivalentTo(defaultNodeSelector))
@@ -97,14 +97,14 @@ var _ = Describe("CatalogSource Grpc Pod Config", func() {
9797
It("should override the pod's spec.priorityClassName when it is empty", func() {
9898
var overridenPriorityClassName = ""
9999

100-
// create catalog source
100+
By("create catalog source")
101101
catalogSource.Spec.GrpcPodConfig = &v1alpha1.GrpcPodConfig{
102102
PriorityClassName: &overridenPriorityClassName,
103103
SecurityContextConfig: v1alpha1.Restricted,
104104
}
105105
mustCreateCatalogSource(client, catalogSource)
106106

107-
// Check overrides are present in the spec
107+
By("Check overrides are present in the spec")
108108
catalogSourcePod := mustGetCatalogSourcePod(client, catalogSource)
109109
Expect(catalogSourcePod).ToNot(BeNil())
110110
Expect(catalogSourcePod.Spec.NodeSelector).To(BeEquivalentTo(defaultNodeSelector))
@@ -118,14 +118,14 @@ var _ = Describe("CatalogSource Grpc Pod Config", func() {
118118
"some": "tag",
119119
}
120120

121-
// create catalog source
121+
By("create catalog source")
122122
catalogSource.Spec.GrpcPodConfig = &v1alpha1.GrpcPodConfig{
123123
NodeSelector: overridenNodeSelector,
124124
SecurityContextConfig: v1alpha1.Restricted,
125125
}
126126
mustCreateCatalogSource(client, catalogSource)
127127

128-
// Check overrides are present in the spec
128+
By("Check overrides are present in the spec")
129129
catalogSourcePod := mustGetCatalogSourcePod(client, catalogSource)
130130
Expect(catalogSourcePod).ToNot(BeNil())
131131
Expect(catalogSourcePod.Spec.NodeSelector).To(BeEquivalentTo(overridenNodeSelector))
@@ -149,14 +149,14 @@ var _ = Describe("CatalogSource Grpc Pod Config", func() {
149149
},
150150
}
151151

152-
// create catalog source
152+
By("create catalog source")
153153
catalogSource.Spec.GrpcPodConfig = &v1alpha1.GrpcPodConfig{
154154
Tolerations: overriddenTolerations,
155155
SecurityContextConfig: v1alpha1.Restricted,
156156
}
157157
mustCreateCatalogSource(client, catalogSource)
158158

159-
// Check overrides are present in the spec
159+
By("Check overrides are present in the spec")
160160
catalogSourcePod := mustGetCatalogSourcePod(client, catalogSource)
161161
Expect(catalogSourcePod).ToNot(BeNil())
162162
Expect(catalogSourcePod.Spec.NodeSelector).To(BeEquivalentTo(defaultNodeSelector))

0 commit comments

Comments
 (0)