Skip to content

Commit f8cf5c2

Browse files
committed
fix(olm-subscriptions): Use kustomize create option for conditional startingCSV
Remove hardcoded startingCSV placeholder from base subscription and use kustomize's `options.create: true` feature. This allows startingCSV to be dynamically set only when a specific version is provided via ConfigMap. When openstack-operator-version is empty (or "latest"), kustomize renders startingCSV as null, which OLM interprets as "use channel head". Changes: - Remove startingCSV from base openstack-subscription.yaml - Add create:true option to startingCSV replacement in kustomization.yaml Assisted-By: Cursor (claude-4.5-opus) Signed-off-by: Roberto Alfieri <ralfieri@redhat.com>
1 parent 0ac5623 commit f8cf5c2

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ replacements:
109109
labelSelector: category=openstack-subscription
110110
fieldPaths:
111111
- spec.startingCSV
112+
options:
113+
create: true
112114
- source:
113115
kind: ConfigMap
114116
name: olm-values

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,3 @@ spec:
1212
name: openstack-operator
1313
source: openstack-operator-index
1414
sourceNamespace: openshift-marketplace
15-
startingCSV: openstack-operator.latest

0 commit comments

Comments
 (0)