Skip to content

Commit 4540273

Browse files
danpawlikfrenzyfriday
authored andcommitted
Add Ansible variable cifmw_openshift_setup_apply_marketplace_fix
On some images (especially on legacy CRC images e.g. 2.30.0), there is no need to run the openshift-marketplace workaround which is removing all the pods from the namespace. That step might be problematic on old deployments, due the ImagePullPolicy is set to "Always", so after removing the pods when the credentials are vanished, pods would be not recreated. Signed-off-by: Daniel Pawlik <[email protected]>
1 parent e335338 commit 4540273

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

roles/openshift_setup/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,4 @@ effect if `cifmw_openshift_setup_ca_registry_to_add` is set.
2727
- mirror.quay.rdoproject.org
2828
```
2929
* `cifmw_openshift_setup_metal3_watch_all_ns`: (Boolean) Tells Metal3 BMO to watch resources out of its namespace. Defaults to `false`.
30+
* `cifmw_openshift_setup_apply_marketplace_fix`: (Boolean) Apply openshift-marketplace workaround which is recreating all pods in the namespace. NOTE: same step is done in `base` job.

roles/openshift_setup/defaults/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,4 @@ cifmw_openshift_setup_metal3_watch_all_ns: false
2828
cifmw_openshift_setup_operator_override_catalog_name: "redhat-operators-4.17"
2929
cifmw_openshift_setup_operator_override_catalog_namespace: "openshift-marketplace"
3030
cifmw_openshift_setup_operator_override_catalog_image: "registry.redhat.io/redhat/redhat-operator-index:v4.17"
31+
cifmw_openshift_setup_apply_marketplace_fix: false

roles/openshift_setup/tasks/fix_openshift_marketplace.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@
33
# https://github.com/crc-org/crc/issues/4109#issuecomment-2042497411.
44
# It will be removed once https://github.com/crc-org/crc/issues/4109
55
# closed.
6+
# NOTE(dpawlik): similar fix was applied in base job:
7+
# https://review.rdoproject.org/r/plugins/gitiles/config/+/refs/heads/master/roles/prepare-crc-extracted/tasks/recreate_marketplace.yaml
8+
# No need to re-apply same thing here.
69
- name: Fix OpenShift Marketplace
710
when:
811
- not cifmw_openshift_setup_dry_run
12+
- cifmw_openshift_setup_apply_marketplace_fix
913
block:
1014
- name: Delete the pods from openshift-marketplace namespace
1115
kubernetes.core.k8s:

0 commit comments

Comments
 (0)