Skip to content

Adds support to deploy cyborg controlplane services - #1102

Merged
openshift-merge-bot[bot] merged 8 commits into
openstack-k8s-operators:mainfrom
amoralej:add-cyborg
Jul 22, 2026
Merged

Adds support to deploy cyborg controlplane services#1102
openshift-merge-bot[bot] merged 8 commits into
openstack-k8s-operators:mainfrom
amoralej:add-cyborg

Conversation

@amoralej

@amoralej amoralej commented Apr 15, 2026

Copy link
Copy Markdown
Contributor

Add support for OpenStack Cyborg (accelerator lifecycle management service) in nova-operator, introducing three new CRDs and their controllers.

  • Define Cyborg, CyborgAPI and CyborgConductor CRDs with full spec/status types, defaulting and validation webhooks, and printer columns for oc get cyborg/cyborgapi/cyborgconductor.
  • Implement the Cyborg top-level controller: manages RBAC, MariaDB database and account, RabbitMQ TransportURL, Keystone service registration, DB sync job, and creates a sub-level secret that aggregates credentials (DB, transport URL, service password) for consumption by the child CRs.
  • Implement the CyborgAPI controller: renders WSGI/httpd configuration, creates a StatefulSet for cyborg-api pods with TLS support, and registers Keystone public/internal endpoints.
  • Implement the CyborgConductor controller: renders conductor configuration and creates a StatefulSet for cyborg-conductor.
  • All controllers are gated behind the ENABLE_CYBORG=true environment variable.
  • Add kuttl end-to-end tests validating CR conditions, sub-level secret content, config-data secrets, DB sync job completion, StatefulSet readiness, Services, and pod volume mounts.

Assisted-By: Claude

Depends-On: #1153
Jira: OSPRH-27674

@openshift-ci
openshift-ci Bot requested review from gibizer and jamepark4 April 15, 2026 14:38
@softwarefactory-project-zuul

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://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/3a20fb346aa44e9d80abc0ba1ff8cdf5

✔️ openstack-meta-content-provider SUCCESS in 2h 58m 29s
✔️ nova-operator-kuttl SUCCESS in 53m 19s
nova-operator-tempest-multinode RETRY_LIMIT in 3m 43s
✔️ nova-operator-tempest-multinode-ceph SUCCESS in 2h 41m 14s

@amoralej

Copy link
Copy Markdown
Contributor Author

check-rdo

Comment thread config/rbac/cyborg_cyborg_admin_role.yaml Outdated
Comment thread internal/controller/cyborg/common.go Outdated
// ensureTopology - when a Topology CR is referenced, remove the
// finalizer from a previous referenced Topology (if any), and retrieve the
// newly referenced topology object
func ensureTopology(

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.

this function seems to be an exact duplicate of

. This might be a question more for the nova-operator maintainers, but is there a way to reuse code between the controllers of different services?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

IIUC the approach is to not share code among the different groups in the operator (nova, placement and cyborg). Let's see what nova-operator maintainers think about it.

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.

IIRC, we have a plan to unify common codes from different groups to a single place. But for now, I think we can go ahead which this duplication, and it should be taken care when we work on unifying common code.

Comment thread templates/cyborg/00-default.conf Outdated
Comment thread test/functional/cyborg/base_test.go Outdated
Comment thread test/kuttl/test-suites/default/cyborg-tests/01-assert.yaml Outdated
@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/45788455066242d0a1b9031b5e3e69b0

✔️ openstack-meta-content-provider SUCCESS in 3h 45m 37s
nova-operator-kuttl FAILURE in 57m 35s
✔️ nova-operator-tempest-multinode SUCCESS in 2h 24m 25s
✔️ nova-operator-tempest-multinode-ceph SUCCESS in 2h 40m 05s

@amoralej

Copy link
Copy Markdown
Contributor Author

check-rdo

@centosinfra-prod-github-app

Copy link
Copy Markdown

This change depends on a change that failed to merge.

Change #1121 is needed.

@amoralej

Copy link
Copy Markdown
Contributor Author

check-rdo

@centosinfra-prod-github-app

Copy link
Copy Markdown

This change depends on a change that failed to merge.

Change #1121 is needed.

@amoralej

Copy link
Copy Markdown
Contributor Author

check-rdo

@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/e2d6654f54f84a62a45f7c5357f14590

✔️ openstack-meta-content-provider SUCCESS in 4h 23m 58s
nova-operator-kuttl FAILURE in 1h 03m 58s
✔️ nova-operator-tempest-multinode SUCCESS in 2h 17m 14s
nova-operator-tempest-multinode-ceph TIMED_OUT in 3h 29m 59s

Comment thread internal/controller/cyborg/cyborgapi_controller.go Outdated
@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/1eb502928feb4a2a9231574553702353

openstack-meta-content-provider FAILURE in 8m 00s
⚠️ nova-operator-kuttl SKIPPED Skipped due to failed job openstack-meta-content-provider
⚠️ nova-operator-tempest-multinode SKIPPED Skipped due to failed job openstack-meta-content-provider
⚠️ nova-operator-tempest-multinode-ceph SKIPPED Skipped due to failed job openstack-meta-content-provider

@amoralej

amoralej commented Jun 1, 2026

Copy link
Copy Markdown
Contributor Author

check-rdo

@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/8dec7886f7074cea944d17755e02151e

✔️ openstack-meta-content-provider SUCCESS in 3h 05m 36s
✔️ nova-operator-kuttl SUCCESS in 54m 18s
nova-operator-tempest-multinode FAILURE in 31m 17s
✔️ nova-operator-tempest-multinode-ceph SUCCESS in 2h 48m 01s

@amoralej

amoralej commented Jun 1, 2026

Copy link
Copy Markdown
Contributor Author

check-rdo

@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/cf08cedc54c44ce6a04cd7d17d48e1c5

✔️ openstack-meta-content-provider SUCCESS in 2h 45m 27s
✔️ nova-operator-kuttl SUCCESS in 54m 25s
✔️ nova-operator-tempest-multinode SUCCESS in 2h 29m 40s
nova-operator-tempest-multinode-ceph FAILURE in 1h 55m 48s

@amoralej

amoralej commented Jun 2, 2026

Copy link
Copy Markdown
Contributor Author

check-rdo

@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/5a45ac088ca445eeb6bc6ccca691b226

✔️ openstack-meta-content-provider SUCCESS in 2h 41m 49s
✔️ nova-operator-kuttl SUCCESS in 53m 36s
nova-operator-tempest-multinode FAILURE in 53m 15s
nova-operator-tempest-multinode-ceph FAILURE in 2h 24m 59s

@amoralej

Copy link
Copy Markdown
Contributor Author

o/ @amoralej We recently landed Unify Common Code #1130, you may want to rebase this PR and use common module to get rid of duplicated code. Thanks!

@amartyasinha Done. May you review current version of the PR when you have a chance? thanks!

@amoralej

Copy link
Copy Markdown
Contributor Author

@melwitt I think I addressed all your comments in my last PR, may you review it when you have a chance?

Comment thread internal/controller/cyborg/cyborgconductor_controller.go Outdated
Comment thread internal/controller/cyborg/cyborgconductor_controller.go Outdated
Comment thread internal/controller/cyborg/cyborg_controller.go Outdated
@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/891e27874a5c47ec868638334923f0d4

✔️ openstack-meta-content-provider SUCCESS in 3h 11m 36s
nova-operator-kuttl FAILURE in 1h 05m 13s
✔️ nova-operator-tempest-multinode SUCCESS in 2h 29m 01s
✔️ nova-operator-tempest-multinode-ceph SUCCESS in 2h 51m 53s

@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/031ac82913e840c7981fab1e820d8560

✔️ openstack-meta-content-provider SUCCESS in 3h 14m 06s
nova-operator-kuttl FAILURE in 1h 07m 01s
✔️ nova-operator-tempest-multinode SUCCESS in 2h 26m 25s
✔️ nova-operator-tempest-multinode-ceph SUCCESS in 2h 53m 47s

amoralej added 8 commits July 21, 2026 08:31
Using operator-sdk command:

operator-sdk create api --group cyborg --version v1beta1 --kind Cyborg --resource --controller
operator-sdk create api --group cyborg --version v1beta1 --kind CyborgAPI --resource --controller
operator-sdk create api --group cyborg --version v1beta1 --kind CyborgConductor --resource --controller

Signed-off-by: Alfredo Moralejo <amoralej@redhat.com>
Signed-off-by: Alfredo Moralejo <amoralej@redhat.com>
Signed-off-by: Alfredo Moralejo <amoralej@redhat.com>
Add full reconcile logic for the CyborgConductor CR:
- Validate input from the config secret created by the Cyborg controller
- Generate conductor config from templates (00-default.conf)
- Create a StatefulSet to run cyborg-conductor pods
- Track readiness (ReadyCount, conditions, hash, topology)
- Expose IsReady and topology helpers on CyborgConductor type
- Update CyborgConductorStatus with structured conditions and hash
- Extend Cyborg controller to propagate conductor and check readiness upwards
- Add functional tests for the conductor reconcile loop

Assisted-By: Claude
Signed-off-by: Alfredo Moralejo <amoralej@redhat.com>
Add full reconcile logic for the CyborgAPI CR:
- Validate input from config secret provided by the Cyborg controller
- Render WSGI/httpd and cyborg-api configuration templates
- Create a StatefulSet for cyborg-api pods with TLS support
- Register Keystone endpoints (public and internal) for the API
- Track readiness (ReadyCount, conditions, hash, topology)
- Expose IsReady and topology helpers on CyborgAPI type
- Extend Cyborg controller to create CyborgAPI and check readiness upwards
- Add functional tests covering the full API reconcile flow

Assisted-By: Claude
Signed-off-by: Alfredo Moralejo <amoralej@redhat.com>
Deployment using httpd is not longer supported in kolla upstream images
since 2026.1 release [1].

Until there are proper S2I container images in the
openstack-k8s-operators namespace, use cyborg images from master branch
created using source to image proof of concept [2] pushed to amoralej
personal quay repo.

Also adjusting the location of the wsgi script for non-kolla images.

[1] https://review.opendev.org/c/openstack/kolla/+/986488
[2] https://github.com/amoralej/s2i-openstack-containers/

Signed-off-by: Alfredo Moralejo <amoralej@redhat.com>
Add an end-to-end kuttl test suite for the Cyborg operator:
- Cleanup step to delete any pre-existing Cyborg CR before the test
- Deploy step creating a full Cyborg CR (cyborg-kuttl)
- Assert step verifying all conditions are True on Cyborg, CyborgAPI,
  CyborgConductor and MariaDBDatabase CRs
- Error step covering missing-dependency failure scenarios
- Register cyborg container images (api, conductor, agent) as default
  RELATED_IMAGE env vars in the manager deployment
- Enable ENABLE_CYBORG=true in the CI webhook deploy script

Assisted-By: Claude
Signed-off-by: Alfredo Moralejo <amoralej@redhat.com>
The Cyborg controller now generates a `{name}-agent-config` secret
containing the rendered configuration for the cyborg-agent service
running on EDPM compute nodes. This secret is consumed by the
edpm-ansible cyborg role to configure the agent on the dataplane.

The shared 00-default.conf template is updated to guard the
[database] section with a conditional, allowing reuse for the
agent config without a separate template.

Assisted-By: claude
Signed-off-by: Alfredo Moralejo <amoralej@redhat.com>
melwitt
melwitt previously approved these changes Jul 21, 2026

@melwitt melwitt 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.

All of my comments have been addressed, this looks good from my perspective.

@openshift-ci openshift-ci Bot added the lgtm label Jul 21, 2026
@melwitt melwitt removed the lgtm label Jul 21, 2026
@melwitt
melwitt self-requested a review July 21, 2026 17:08
@melwitt
melwitt dismissed their stale review July 21, 2026 17:09

Want to check with Amartya if he has re-reviewed yet.

@melwitt

melwitt commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Apologies, I didn't realize if I hit Approve it would start auto-merging. I temporarily dismissed my Approve for now to check with @amartyasinha if he has re-reviewed to check if his comments have been addressed also.

@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/369fdcc7cb454df38762719d4d834ec5

✔️ openstack-meta-content-provider SUCCESS in 5h 12m 36s
nova-operator-kuttl FAILURE in 1h 06m 48s
✔️ nova-operator-tempest-multinode SUCCESS in 2h 24m 29s
✔️ nova-operator-tempest-multinode-ceph SUCCESS in 3h 00m 09s

@amartyasinha

Copy link
Copy Markdown
Contributor

Apologies, I didn't realize if I hit Approve it would start auto-merging. I temporarily dismissed my Approve for now to check with @amartyasinha if he has re-reviewed to check if his comments have been addressed also.

@melwitt I've re-reviewed, and changes looks good. Thanks!

@amoralej

Copy link
Copy Markdown
Contributor Author

check-rdo

@amoralej

Copy link
Copy Markdown
Contributor Author

The fix for the kuttl job #1153 is merged

@melwitt melwitt 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.

Looks like everything is all good now, thanks!

@openshift-ci openshift-ci Bot added the lgtm label Jul 22, 2026
@openshift-ci

openshift-ci Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: amoralej, melwitt

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

The pull request process is described 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

@openshift-merge-bot
openshift-merge-bot Bot merged commit 5ab07f6 into openstack-k8s-operators:main Jul 22, 2026
7 checks passed
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.

5 participants