Skip to content

[cifmw_setup][set_containers] add cifmw.general.set_containers module - #4117

Open
arxcruz wants to merge 1 commit into
openstack-k8s-operators:mainfrom
arxcruz:feature/set-containers-module
Open

[cifmw_setup][set_containers] add cifmw.general.set_containers module#4117
arxcruz wants to merge 1 commit into
openstack-k8s-operators:mainfrom
arxcruz:feature/set-containers-module

Conversation

@arxcruz

@arxcruz arxcruz commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Replace the update_containers role invocation in deploy_architecture with the new cifmw.general.set_containers module. The module generates and optionally applies an OpenStackVersion CR, accepting a dynamic images list where each entry can override registry, org, name_prefix, and tag individually. This removes the rigid Jinja2 template in favor of a Python module that is easier to test, extend, and call from any playbook without role-level variable coupling.

Key design points:

  • _OPENSTACK_SUFFIXES table enables partial overrides (e.g. tag-only) for any standard OpenStack image field without repeating the suffix.
  • Empty name_prefix is supported so images that ship without the "openstack-" prefix (EDPM, IPA) can be built from parts rather than requiring a pre-assembled full_registry URL.
  • backends list handles cinderVolumeImages / manilaShareImages nested dicts.
  • Unit tests cover _build_url, _resolve_image, _resolve_backend, _build_cr, and the full run_module flow including apply, absent, and validation paths.

Replace the update_containers role invocation in deploy_architecture with
the new cifmw.general.set_containers module. The module generates and
optionally applies an OpenStackVersion CR, accepting a dynamic images list
where each entry can override registry, org, name_prefix, and tag
individually. This removes the rigid Jinja2 template in favor of a Python
module that is easier to test, extend, and call from any playbook without
role-level variable coupling.

Key design points:
- _OPENSTACK_SUFFIXES table enables partial overrides (e.g. tag-only) for
  any standard OpenStack image field without repeating the suffix.
- Empty name_prefix is supported so images that ship without the
  "openstack-" prefix (EDPM, IPA) can be built from parts rather than
  requiring a pre-assembled full_registry URL.
- backends list handles cinderVolumeImages / manilaShareImages nested dicts.
- Unit tests cover _build_url, _resolve_image, _resolve_backend, _build_cr,
  and the full run_module flow including apply, absent, and validation paths.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Arx Cruz <arxcruz@redhat.com>
@openshift-ci

openshift-ci Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign tosky for approval. For more information see the Code Review Process.

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

Details 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

@Valkyrie00 Valkyrie00 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

/lgtm

@Valkyrie00

Copy link
Copy Markdown
Contributor

Old ref: #3955

@centosinfra-prod-github-app

Copy link
Copy Markdown

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://gateway-cloud-softwarefactory.apps.ocp.cloud.ci.centos.org/zuul/t/rdoproject.org/buildset/dfb50ead434d43ed8a0c4c40ca26f5e4

✔️ openstack-k8s-operators-content-provider SUCCESS in 3h 45m 05s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 40m 11s
cifmw-crc-podified-edpm-baremetal NODE_FAILURE Node(set) request 099-0000173606 failed in 0s
cifmw-crc-podified-edpm-baremetal-minor-update NODE_FAILURE Node(set) request 099-0000173607 failed in 0s
✔️ cifmw-pod-zuul-files SUCCESS in 7m 18s
✔️ openstack-k8s-operators-content-provider-bootc SUCCESS in 1h 15m 55s
cifmw-crc-podified-edpm-baremetal-bootc NODE_FAILURE Node(set) request 099-0000173654 failed in 0s
✔️ adoption-standalone-to-crc-ceph-provider SUCCESS in 3h 15m 25s
✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 11m 26s
✔️ cifmw-pod-pre-commit SUCCESS in 11m 18s
✔️ cifmw-molecule-cifmw_setup SUCCESS in 2m 32s

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants