@@ -11,6 +11,7 @@ import (
11
11
. "github.com/onsi/gomega"
12
12
13
13
corev1 "k8s.io/api/core/v1"
14
+ apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
14
15
"k8s.io/apimachinery/pkg/api/meta"
15
16
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
16
17
"k8s.io/apimachinery/pkg/util/rand"
@@ -92,10 +93,13 @@ var _ = Describe("[sig-olmv1][OCPFeatureGate:NewOLMOwnSingleNamespace][Skipped:D
92
93
_ = k8sClient .Delete (context .Background (), crb , client .PropagationPolicy (metav1 .DeletePropagationForeground ))
93
94
})
94
95
95
- By ("creating ClusterExtension with the watch-namespace annotation " )
96
+ By ("creating ClusterExtension with the watch-namespace configured " )
96
97
ce := helpers .NewClusterExtensionObject ("quay-operator" , "3.14.2" , ceName , saName , namespace )
97
- ce .Annotations = map [string ]string {
98
- "olm.operatorframework.io/watch-namespace" : namespace ,
98
+ ce .Spec .Config = & olmv1.ClusterExtensionConfig {
99
+ ConfigType : "Inline" ,
100
+ Inline : & apiextensionsv1.JSON {
101
+ Raw : []byte (fmt .Sprintf (`{"watchNamespace": "%s"}` , namespace )),
102
+ },
99
103
}
100
104
Expect (k8sClient .Create (ctx , ce )).To (Succeed (), "failed to create ClusterExtension %q" , ceName )
101
105
By ("registering cleanup for ClusterExtension" )
@@ -181,10 +185,13 @@ var _ = Describe("[sig-olmv1][OCPFeatureGate:NewOLMOwnSingleNamespace][Skipped:D
181
185
_ = k8sClient .Delete (context .Background (), crb , client .PropagationPolicy (metav1 .DeletePropagationForeground ))
182
186
})
183
187
184
- By ("creating ClusterExtension with the watch-namespace annotation " )
188
+ By ("creating ClusterExtension with the watch-namespace configured " )
185
189
ce := helpers .NewClusterExtensionObject ("quay-operator" , "3.14.2" , ceName , saName , namespace )
186
- ce .Annotations = map [string ]string {
187
- "olm.operatorframework.io/watch-namespace" : namespace ,
190
+ ce .Spec .Config = & olmv1.ClusterExtensionConfig {
191
+ ConfigType : "Inline" ,
192
+ Inline : & apiextensionsv1.JSON {
193
+ Raw : []byte (fmt .Sprintf (`{"watchNamespace": "%s"}` , namespace )),
194
+ },
188
195
}
189
196
Expect (k8sClient .Create (ctx , ce )).To (Succeed (), "failed to create ClusterExtension %q" , ceName )
190
197
By ("registering cleanup for ClusterExtension" )
@@ -270,10 +277,13 @@ var _ = Describe("[sig-olmv1][OCPFeatureGate:NewOLMOwnSingleNamespace][Skipped:D
270
277
_ = k8sClient .Delete (context .Background (), crb , client .PropagationPolicy (metav1 .DeletePropagationForeground ))
271
278
})
272
279
273
- By ("creating ClusterExtension with the watch-namespace annotation " )
280
+ By ("creating ClusterExtension with the watch-namespace configured " )
274
281
ce := helpers .NewClusterExtensionObject ("openshift-pipelines-operator-rh" , "1.17.1" , ceName , saName , namespace )
275
- ce .Annotations = map [string ]string {
276
- "olm.operatorframework.io/watch-namespace" : namespace ,
282
+ ce .Spec .Config = & olmv1.ClusterExtensionConfig {
283
+ ConfigType : "Inline" ,
284
+ Inline : & apiextensionsv1.JSON {
285
+ Raw : []byte (fmt .Sprintf (`{"watchNamespace": "%s"}` , namespace )),
286
+ },
277
287
}
278
288
Expect (k8sClient .Create (ctx , ce )).To (Succeed (), "failed to create ClusterExtension %q" , ceName )
279
289
By ("registering cleanup for ClusterExtension" )
0 commit comments