Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[openshift_setup] Add support for overriding dependent operators CatalogSource #2694

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lewisdenny
Copy link
Collaborator

@lewisdenny lewisdenny commented Jan 30, 2025

This is needed to easily test pre-release versions of OCP. OpenStack
depends on a few operators, these operators don't easily expose
pre-release versions for installation. A hack like this patch allows a
user to create a new CatalogSource for the current GA version of OCP and
patch the dependent operators to install from it.

JIRA: https://issues.redhat.com/browse/OSPRH-13706

Copy link
Contributor

openshift-ci bot commented Jan 30, 2025

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

Copy link

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/ecec170bd3104576a89ea2a78c57819c

✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 26m 33s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 13m 29s
cifmw-crc-podified-edpm-baremetal FAILURE in 47m 40s
✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 7m 56s
✔️ cifmw-pod-pre-commit SUCCESS in 7m 35s
✔️ cifmw-architecture-validate-hci SUCCESS in 5m 05s
✔️ build-push-container-cifmw-client SUCCESS in 21m 42s
✔️ cifmw-molecule-kustomize_deploy SUCCESS in 5m 25s

Copy link

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/eb7e705be4114ebda9f0a21729642e38

✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 24m 56s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 11m 06s
cifmw-crc-podified-edpm-baremetal RETRY_LIMIT in 13m 31s
✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 8m 07s
✔️ cifmw-pod-pre-commit SUCCESS in 7m 21s
✔️ cifmw-architecture-validate-hci SUCCESS in 3m 49s
✔️ build-push-container-cifmw-client SUCCESS in 22m 15s
✔️ cifmw-molecule-kustomize_deploy SUCCESS in 5m 08s

Copy link

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/d66b44e84dfc459d973537c0f6d299b0

✔️ openstack-k8s-operators-content-provider SUCCESS in 3h 09m 34s
podified-multinode-edpm-deployment-crc FAILURE in 17m 07s
cifmw-crc-podified-edpm-baremetal FAILURE in 20m 17s
✔️ adoption-standalone-to-crc-ceph-provider SUCCESS in 2h 55m 36s
✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 8m 05s
cifmw-pod-pre-commit FAILURE in 6m 07s
✔️ cifmw-architecture-validate-hci SUCCESS in 3m 50s
✔️ build-push-container-cifmw-client SUCCESS in 21m 28s
✔️ cifmw-molecule-kustomize_deploy SUCCESS in 5m 17s
✔️ cifmw-molecule-openshift_setup SUCCESS in 16m 10s

@lewisdenny lewisdenny force-pushed the 4.17_operators branch 2 times, most recently from 52409d6 to c281822 Compare February 4, 2025 01:13
@lewisdenny lewisdenny marked this pull request as ready for review February 4, 2025 11:07
@lewisdenny lewisdenny changed the title [DNM] Test OCP 4.18 with some 4.17 operators [openshift_setup] Add support for overriding dependent operators CatalogSource Feb 4, 2025
…logSource

This is needed to easily test pre-release versions of OCP. OpenStack
depends on a few operators, these operators don't easily expose
pre-release versions for installation. A hack like this patch allows a
user to create a new CatalogSource for the current GA version of OCP and
patch the dependent operators to install from it.
Copy link
Collaborator

@frenzyfriday frenzyfriday left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non blocking: It would be good to also add the new variables in the readme for the openshift_setup role

Copy link
Contributor

openshift-ci bot commented Feb 4, 2025

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by:

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@bshewale
Copy link
Contributor

bshewale commented Feb 4, 2025

LGTM

Comment on lines +189 to +196
- name: Create catalog source and switch dependent operators to consume it
when:
- cifmw_openshift_setup_enable_operator_catalog_override |
default(false) | bool
ansible.builtin.import_role:
name: openshift_setup
tasks_from: patch_dependent_operators_source.yml

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need this call here?
If we follow what's done in that role what I'd expect is just another include_tasks at the end with cifmw_openshift_setup_enable_operator_catalog_override as a conditional and the proper default in the role defaults file.
The role runs always and before this one so we should be safe.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't validate currently because downstream CI infra is having an outage but my understanding is when the openshift_setup role runs, the subscriptions do not yet exist.

Yes I could create the CatalogSource when openshift_setup runs but I wanted to keep the logic together.

I could also create the subscriptions rather than patching them and maybe OLM wouldn't complain but this is already a nasty hack that I'm trying to minimise the footprint.

I can verify once downstream CI infra is back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants