Skip to content

Commit ec18409

Browse files
Merge pull request #580 from sathlan/catalogsource-namespace
Add namespace replacement for openstack-catalog and subscription Only for the olm-subscription part. In the lib/olm-openstack/subscription.yaml file, used for most deployments, the CatalogSource is using the openstack-operators namespace. In the lib/olm-openstack-subscriptions/base/catalogsource.yaml, the CatalogSource is using the cluster-wide openshift-marketplace namespace. This configuration is used for running update CI tests. Both configurations work, but some CI tools are hardcoded to have the CatalogSource set in the openstack-operators namespace. To accommodate the CI tool, we add a new variable openstack-catalog-namespace that can adjust the CatalogSource namespace for the olm-openstack-subscription. We switch the default to openstack-operators so all jobs are in line. Closes: OSPRH-18002 Reviewed-by: Andrew Bays <[email protected]>
2 parents 66b218c + 028872d commit ec18409

File tree

4 files changed

+61
-0
lines changed

4 files changed

+61
-0
lines changed

examples/common/olm-subscriptions/values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ data:
1515
openstack-operator-catalog-source: "openstack-operator-index"
1616
openstack-operator-subscription-namespace: "openstack-operators"
1717
openstack-operator-version: "latest"
18+
openstack-catalog-namespace: "openstack-operators"

lib/olm-openstack-subscriptions/overlays/default/kustomization.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,16 @@ replacements:
1818
labelSelector: category=openstack-catalog
1919
fieldPaths:
2020
- spec.image
21+
- source:
22+
kind: ConfigMap
23+
name: olm-values
24+
fieldPath: data.openstack-catalog-namespace
25+
targets:
26+
- select:
27+
kind: CatalogSource
28+
labelSelector: category=openstack-catalog
29+
fieldPaths:
30+
- metadata.namespace
2131
- source:
2232
kind: ConfigMap
2333
name: olm-values
@@ -99,3 +109,13 @@ replacements:
99109
labelSelector: category=openstack-subscription
100110
fieldPaths:
101111
- spec.startingCSV
112+
- source:
113+
kind: ConfigMap
114+
name: olm-values
115+
fieldPath: data.openstack-catalog-namespace
116+
targets:
117+
- select:
118+
kind: Subscription
119+
labelSelector: category=openstack-subscription
120+
fieldPaths:
121+
- spec.sourceNamespace

lib/olm-openstack-subscriptions/overlays/v1.0.3/kustomization.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,16 @@ replacements:
3939
labelSelector: category=openstack-catalog
4040
fieldPaths:
4141
- spec.image
42+
- source:
43+
kind: ConfigMap
44+
name: olm-values
45+
fieldPath: data.openstack-catalog-namespace
46+
targets:
47+
- select:
48+
kind: CatalogSource
49+
labelSelector: category=openstack-catalog
50+
fieldPaths:
51+
- metadata.namespace
4252
- source:
4353
kind: ConfigMap
4454
name: olm-values
@@ -110,3 +120,13 @@ replacements:
110120
labelSelector: category=openstack-subscription
111121
fieldPaths:
112122
- spec.source
123+
- source:
124+
kind: ConfigMap
125+
name: olm-values
126+
fieldPath: data.openstack-catalog-namespace
127+
targets:
128+
- select:
129+
kind: Subscription
130+
labelSelector: category=openstack-subscription
131+
fieldPaths:
132+
- spec.sourceNamespace

lib/olm-openstack-subscriptions/overlays/v1.0.6/kustomization.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,16 @@ replacements:
3838
labelSelector: category=openstack-catalog
3939
fieldPaths:
4040
- spec.image
41+
- source:
42+
kind: ConfigMap
43+
name: olm-values
44+
fieldPath: data.openstack-catalog-namespace
45+
targets:
46+
- select:
47+
kind: CatalogSource
48+
labelSelector: category=openstack-catalog
49+
fieldPaths:
50+
- metadata.namespace
4151
- source:
4252
kind: ConfigMap
4353
name: olm-values
@@ -109,3 +119,13 @@ replacements:
109119
labelSelector: category=openstack-subscription
110120
fieldPaths:
111121
- spec.source
122+
- source:
123+
kind: ConfigMap
124+
name: olm-values
125+
fieldPath: data.openstack-catalog-namespace
126+
targets:
127+
- select:
128+
kind: Subscription
129+
labelSelector: category=openstack-subscription
130+
fieldPaths:
131+
- spec.sourceNamespace

0 commit comments

Comments
 (0)