Skip to content

Commit 6494e62

Browse files
committed
Add Notfications message bus instance for Nova CRD
Extend CRDs to support a RabbitMqCluster reference as AMQP instance for notifications. Also support overriding it in cellTemplates. Signed-off-by: Bohdan Dobrelia <bdobreli@redhat.com>
1 parent 41e39c1 commit 6494e62

4 files changed

Lines changed: 56 additions & 2 deletions

File tree

‎api/bases/nova.openstack.org_nova.yaml‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1136,6 +1136,15 @@ spec:
11361136
description: NodeSelector to target subset of worker nodes running
11371137
cell.
11381138
type: object
1139+
notificationsBusInstance:
1140+
default: notifications
1141+
description: |-
1142+
NotificationsBusInstance is the name of the RabbitMqCluster CR to select
1143+
the Message Bus Service instance used by the nova cell services to publish notifications.
1144+
Avoid colocating it with APIMessageBugInstance or CellMessageBugInstance used for PRC.
1145+
Overriding a top scope NotificationsBusInstance for cells implies that consumers of
1146+
notifications can maintain simultanous AMQP connections via multiple transport_url endpoints.
1147+
type: string
11391148
novaComputeTemplates:
11401149
additionalProperties:
11411150
description: |-
@@ -1624,6 +1633,15 @@ spec:
16241633
NodeSelector here acts as a default value and can be overridden by service
16251634
specific NodeSelector Settings.
16261635
type: object
1636+
notificationsBusInstance:
1637+
default: notifications
1638+
description: |-
1639+
NotificationsBusInstance is the name of the RabbitMqCluster CR to select
1640+
the Message Bus Service instance used by the Nova top level services and all cells to publish notifications.
1641+
Avoid colocating it with APIMessageBugInstance or CellMessageBugInstance used for PRC.
1642+
Overriding it with NotificationsBusInstance for cells implies that consumers of notifications
1643+
can maintain simultanous AMQP connections via multiple transport_url endpoints.
1644+
type: string
16271645
novncproxyContainerImageURL:
16281646
description: NoVNCContainerImageURL
16291647
type: string

‎api/v1beta1/nova_types.go‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ limitations under the License.
1717
package v1beta1
1818

1919
import (
20+
topologyv1 "github.com/openstack-k8s-operators/infra-operator/apis/topology/v1beta1"
2021
condition "github.com/openstack-k8s-operators/lib-common/modules/common/condition"
2122
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
22-
topologyv1 "github.com/openstack-k8s-operators/infra-operator/apis/topology/v1beta1"
2323
)
2424

2525
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
@@ -49,6 +49,15 @@ type NovaSpecCore struct {
4949
// communicate.
5050
APIMessageBusInstance string `json:"apiMessageBusInstance"`
5151

52+
// +kubebuilder:validation:Optional
53+
// +kubebuilder:default=notifications
54+
// NotificationsBusInstance is the name of the RabbitMqCluster CR to select
55+
// the Message Bus Service instance used by the Nova top level services and all cells to publish notifications.
56+
// Avoid colocating it with APIMessageBugInstance or CellMessageBugInstance used for PRC.
57+
// Overriding it with NotificationsBusInstance for cells implies that consumers of notifications
58+
// can maintain simultanous AMQP connections via multiple transport_url endpoints.
59+
NotificationsBusInstance string `json:"notificationsBusInstance"`
60+
5261
// +kubebuilder:validation:Optional
5362
// +kubebuilder:default={cell0: {cellDatabaseAccount: nova-cell0, hasAPIAccess: true}, cell1: {cellDatabaseAccount: nova-cell1, cellDatabaseInstance: openstack-cell1, cellMessageBusInstance: rabbitmq-cell1, hasAPIAccess: true}}
5463
// Cells is a mapping of cell names to NovaCellTemplate objects defining

‎api/v1beta1/novacell_types.go‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ limitations under the License.
1717
package v1beta1
1818

1919
import (
20+
topologyv1 "github.com/openstack-k8s-operators/infra-operator/apis/topology/v1beta1"
2021
condition "github.com/openstack-k8s-operators/lib-common/modules/common/condition"
2122
"github.com/openstack-k8s-operators/lib-common/modules/common/tls"
2223
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
23-
topologyv1 "github.com/openstack-k8s-operators/infra-operator/apis/topology/v1beta1"
2424
)
2525

2626
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
@@ -51,6 +51,15 @@ type NovaCellTemplate struct {
5151
// communicate in this cell. For cell0 it is unused.
5252
CellMessageBusInstance string `json:"cellMessageBusInstance"`
5353

54+
// +kubebuilder:validation:Optional
55+
// +kubebuilder:default=notifications
56+
// NotificationsBusInstance is the name of the RabbitMqCluster CR to select
57+
// the Message Bus Service instance used by the nova cell services to publish notifications.
58+
// Avoid colocating it with APIMessageBugInstance or CellMessageBugInstance used for PRC.
59+
// Overriding a top scope NotificationsBusInstance for cells implies that consumers of
60+
// notifications can maintain simultanous AMQP connections via multiple transport_url endpoints.
61+
NotificationsBusInstance string `json:"notificationsBusInstance"`
62+
5463
// +kubebuilder:validation:Required
5564
// HasAPIAccess defines if this Cell is configured to have access to the
5665
// API DB and message bus.

‎config/crd/bases/nova.openstack.org_nova.yaml‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1136,6 +1136,15 @@ spec:
11361136
description: NodeSelector to target subset of worker nodes running
11371137
cell.
11381138
type: object
1139+
notificationsBusInstance:
1140+
default: notifications
1141+
description: |-
1142+
NotificationsBusInstance is the name of the RabbitMqCluster CR to select
1143+
the Message Bus Service instance used by the nova cell services to publish notifications.
1144+
Avoid colocating it with APIMessageBugInstance or CellMessageBugInstance used for PRC.
1145+
Overriding a top scope NotificationsBusInstance for cells implies that consumers of
1146+
notifications can maintain simultanous AMQP connections via multiple transport_url endpoints.
1147+
type: string
11391148
novaComputeTemplates:
11401149
additionalProperties:
11411150
description: |-
@@ -1624,6 +1633,15 @@ spec:
16241633
NodeSelector here acts as a default value and can be overridden by service
16251634
specific NodeSelector Settings.
16261635
type: object
1636+
notificationsBusInstance:
1637+
default: notifications
1638+
description: |-
1639+
NotificationsBusInstance is the name of the RabbitMqCluster CR to select
1640+
the Message Bus Service instance used by the Nova top level services and all cells to publish notifications.
1641+
Avoid colocating it with APIMessageBugInstance or CellMessageBugInstance used for PRC.
1642+
Overriding it with NotificationsBusInstance for cells implies that consumers of notifications
1643+
can maintain simultanous AMQP connections via multiple transport_url endpoints.
1644+
type: string
16271645
novncproxyContainerImageURL:
16281646
description: NoVNCContainerImageURL
16291647
type: string

0 commit comments

Comments
 (0)