Skip to content

Rabbitmq vhost and user support#661

Merged
openshift-merge-bot[bot] merged 3 commits intoopenstack-k8s-operators:mainfrom
lmiccini:rabbitmq_vhosts
Feb 7, 2026
Merged

Rabbitmq vhost and user support#661
openshift-merge-bot[bot] merged 3 commits intoopenstack-k8s-operators:mainfrom
lmiccini:rabbitmq_vhosts

Conversation

@lmiccini
Copy link
Contributor

@lmiccini lmiccini commented Dec 18, 2025

Add support for a dedicated rabbitmq cluster for notifications.

Add new messagingBus and notificationsBus interfaces to hold cluster, user and vhost names for optional usage.
The controller adds these values to the TransportURL create request when present.

Additionally, we migrate RabbitMQ cluster name to RabbitMq config struct using DefaultRabbitMqConfig from infra-operator to automatically populate the new Cluster field from legacy RabbitMqClusterName.

Example usage:

  spec:
    messagingBus:
      cluster: rpc-rabbitmq
      user: rpc-user
      vhost: rpc-vhost
    notificationsBus:
      cluster: notifications-rabbitmq
      user: notifications-user
      vhost: notifications-vhost

Jira: https://issues.redhat.com/browse/OSPRH-23819

Depends-on: openstack-k8s-operators/openstack-operator#1797

Checklist before requesting a review

  • I have performed a self-review of my code and confirmed it passes tests
  • Performed pre-commit run --all
  • Tested operator image in a test/dev environment. It can be CRC via install_yamls or a hotstack instance (optional)
  • Verified that no failures present in logs(optional):
    • ironic-operator-build-deploy-kuttl
    • podified-multinode-ironic-deployment

@openshift-ci openshift-ci bot requested review from stuggi and viroel December 18, 2025 12:41
@lmiccini lmiccini changed the title Add support for a dedicated rabbitmq cluster for notifications. Rabbitmq vhost and user support Dec 18, 2025
@lmiccini lmiccini force-pushed the rabbitmq_vhosts branch 3 times, most recently from ad702cf to 60495bd Compare December 19, 2025 13:45
@softwarefactory-project-zuul
Copy link

Merge Failed.

This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset.
Warning:
Error merging github.com/openstack-k8s-operators/ironic-operator for 661,e758a1e7efe54be3cf16fcbf8cb35e32ab5b5239

@lmiccini lmiccini force-pushed the rabbitmq_vhosts branch 7 times, most recently from 2733681 to a64b80e Compare January 22, 2026 09:19
@softwarefactory-project-zuul
Copy link

This change depends on a change that failed to merge.

Change openstack-k8s-operators/infra-operator#523 is needed.

@softwarefactory-project-zuul
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/4abb83ae60334914a602b1f65b84bf5b

✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 06m 34s
podified-multinode-ironic-deployment FAILURE in 46m 06s

@softwarefactory-project-zuul
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/33f4651ad8ab4dd893b171346d711ae5

openstack-k8s-operators-content-provider FAILURE in 18m 30s
⚠️ podified-multinode-ironic-deployment SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider

@lmiccini
Copy link
Contributor Author

recheck

@@ -0,0 +1,75 @@
/*
Copyright 2025.
Copy link
Contributor

Choose a reason for hiding this comment

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

Uhh, might as well remove line 2, or put a company name or something.

description: Vhost - RabbitMQ vhost name
type: string
required:
- cluster
Copy link
Collaborator

Choose a reason for hiding this comment

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

The schema checker is flagging this:
ERROR: "NoNewRequiredFields": crd/ironicinspectors.ironic.openstack.org version/v1beta1 field/^.spec.messagingBus.cluster is new and may not be required
ERROR: "NoNewRequiredFields": crd/ironicinspectors.ironic.openstack.org version/v1beta1 field/^.spec.notificationsBus.cluster is new and may not be required

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's expected, we are swapping a required field - rabbitMqClusterName - with its replacement, same with NotificationsBusInstance. This will require overriding the schema checker (not just for ironic but all operators).

"k8s.io/apimachinery/pkg/types"
"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
)

Copy link
Collaborator

@steveb steveb Feb 3, 2026

Choose a reason for hiding this comment

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

Can you please describe what the intended create behaviour is when they use a deprecated field? Will the webhook populate the new notificationBus.cluster or will it fail with an error? Whichever it is, it would be ideal to have a test for that here.

Copy link
Collaborator

Choose a reason for hiding this comment

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

It might just need an extra assert below that demonstrates notificationBus.cluster equals "rabbitmq"

Copy link
Contributor Author

@lmiccini lmiccini Feb 3, 2026

Choose a reason for hiding this comment

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

Existing ironic crs will have their rabbitMqClusterName transparently translated into messagingBus.Cluster via openstack-operator (see depends-on pr openstack-k8s-operators/openstack-operator#1779), further updates will raise an error and ask to use the new interface.

@steveb
Copy link
Collaborator

steveb commented Feb 3, 2026

golangci-lint-full is failing with a few nits. I have restored the checklist in the PR description and I suspect that running pre-commit run --all might pick up on some of these so they can be fixed before pushing again

Copy link
Collaborator

@steveb steveb left a comment

Choose a reason for hiding this comment

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

See inline and my other comment

@softwarefactory-project-zuul
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/7fe405b399a44c49aff0c569a620b8c2

openstack-k8s-operators-content-provider FAILURE in 12m 33s
⚠️ podified-multinode-ironic-deployment SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider

@lmiccini
Copy link
Contributor Author

lmiccini commented Feb 3, 2026

golangci-lint-full is failing with a few nits. I have restored the checklist in the PR description and I suspect that running pre-commit run --all might pick up on some of these so they can be fixed before pushing again

Thanks Steve, I should have addressed the lint errors.

@lmiccini
Copy link
Contributor Author

lmiccini commented Feb 3, 2026

recheck

Add support for a dedicated rabbitmq cluster for notifications.

Add new messagingBus and notificationsBus interfaces to hold cluster,
user and vhost names for optional usage.
The controller adds these values to the TransportURL create request when present.

Additionally, we migrate RabbitMQ cluster name to RabbitMq config struct
using DefaultRabbitMqConfig from infra-operator to automatically
populate the new Cluster field from legacy RabbitMqClusterName.

Example usage:

  spec:
    messagingBus:
      cluster: rpc-rabbitmq
      user: rpc-user
      vhost: rpc-vhost
    notificationsBus:
      cluster: notifications-rabbitmq
      user: notifications-user
      vhost: notifications-vhost

Jira: https://issues.redhat.com/browse/OSPRH-23819
@softwarefactory-project-zuul
Copy link

Merge Failed.

This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset.
Warning:
Error merging github.com/openstack-k8s-operators/openstack-operator for 1779,d0bba951fd942312b6e33713b2c686fed2fe5bf6

@lmiccini
Copy link
Contributor Author

lmiccini commented Feb 5, 2026

recheck

@softwarefactory-project-zuul
Copy link

This change depends on a change that failed to merge.

Change openstack-k8s-operators/openstack-operator#1797 is needed.

@lmiccini
Copy link
Contributor Author

lmiccini commented Feb 5, 2026

recheck

@lmiccini
Copy link
Contributor Author

lmiccini commented Feb 5, 2026

/retest

@lmiccini
Copy link
Contributor Author

lmiccini commented Feb 5, 2026

/test ironic-operator-build-deploy-kuttl

@softwarefactory-project-zuul
Copy link

This change depends on a change that failed to merge.

Change openstack-k8s-operators/openstack-operator#1797 is needed.

@lmiccini
Copy link
Contributor Author

lmiccini commented Feb 7, 2026

recheck

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 7, 2026

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by: lmiccini

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

@stuggi
Copy link
Contributor

stuggi commented Feb 7, 2026

/override ci/prow/precommit-check

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 7, 2026

@stuggi: Overrode contexts on behalf of stuggi: ci/prow/precommit-check

Details

In response to this:

/override ci/prow/precommit-check

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@openshift-merge-bot openshift-merge-bot bot merged commit 6dce1a5 into openstack-k8s-operators:main Feb 7, 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.

6 participants