Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions apis/bases/core.openstack.org_openstackcontrolplanes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9512,6 +9512,9 @@ spec:
additionalProperties:
type: string
type: object
notificationsBus:
default: rabbitmq
type: string
nova:
properties:
apiOverride:
Expand Down
10 changes: 9 additions & 1 deletion apis/core/v1beta1/openstackcontrolplane_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,14 @@ type OpenStackControlPlaneSpec struct {
// Rabbitmq - Parameters related to the Rabbitmq service
Rabbitmq RabbitmqSection `json:"rabbitmq,omitempty"`

// +kubebuilder:validation:Optional
// +kubebuilder:default=rabbitmq
// NotificationsBus - the name of RabbitMQ Cluster CR to select a Messaging
// Bus Service instance used by all services that produce or consume notifications.
// Avoid colocating it with RabbitMQ services used for PRC.
// That instance will be pushed down for services, unless overriden in templates.
NotificationsBus string `json:"notificationsBus"`

// +kubebuilder:validation:Optional
// +operator-sdk:csv:customresourcedefinitions:type=spec
// Memcached - Parameters related to the Memcached service
Expand Down Expand Up @@ -484,7 +492,7 @@ type RabbitmqSection struct {

// +kubebuilder:validation:Optional
// +operator-sdk:csv:customresourcedefinitions:type=spec
// Templates - Overrides to use when creating the Rabbitmq clusters
// Templates - Overrides to use when creating the Rabbitmq clusters for RPC and (optionally) Notifications.
Templates *map[string]rabbitmqv1.RabbitMqSpecCore `json:"templates"`
}

Expand Down
3 changes: 3 additions & 0 deletions bindata/crds/crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9676,6 +9676,9 @@ spec:
additionalProperties:
type: string
type: object
notificationsBus:
default: rabbitmq
type: string
nova:
properties:
apiOverride:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9512,6 +9512,9 @@ spec:
additionalProperties:
type: string
type: object
notificationsBus:
default: rabbitmq
type: string
nova:
properties:
apiOverride:
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,4 @@ replace github.com/openstack-k8s-operators/openstack-operator/apis => ./apis
replace github.com/openshift/api => github.com/openshift/api v0.0.0-20240830023148-b7d0481c9094 //allow-merging

// custom RabbitmqClusterSpecCore for OpenStackControlplane (v2.9.0_patches_tag)
replace github.com/rabbitmq/cluster-operator/v2 => github.com/openstack-k8s-operators/rabbitmq-cluster-operator/v2 v2.6.1-0.20241017142550-a3524acedd49 //allow-merging
replace github.com/rabbitmq/cluster-operator/v2 => github.com/openstack-k8s-operators/rabbitmq-cluster-operator/v2 v2.6.1-0.20241017142550-a3524acedd49 //allow-merging
67 changes: 46 additions & 21 deletions tests/functional/ctlplane/base_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,38 +57,42 @@ type Names struct {
NeutronName types.NamespacedName
HorizonName types.NamespacedName
HeatName types.NamespacedName
NovaName types.NamespacedName
PlacementName types.NamespacedName
TelemetryName types.NamespacedName
DBName types.NamespacedName
DBCertName types.NamespacedName
DBCell1Name types.NamespacedName
DBCell1CertName types.NamespacedName
RabbitMQName types.NamespacedName
RabbitMQCertName types.NamespacedName
RabbitMQNotificationsCertName types.NamespacedName
RabbitMQCell1Name types.NamespacedName
RabbitMQCell1CertName types.NamespacedName
NoVNCProxyCell1CertPublicRouteName types.NamespacedName
NoVNCProxyCell1CertPublicSvcName types.NamespacedName
NoVNCProxyCell1CertVencryptName types.NamespacedName
ServiceAccountName types.NamespacedName
RoleName types.NamespacedName
RoleBindingName types.NamespacedName
RootCAPublicName types.NamespacedName
RootCAInternalName types.NamespacedName
RootCAOvnName types.NamespacedName
RootCALibvirtName types.NamespacedName
SelfSignedIssuerName types.NamespacedName
CustomIssuerName types.NamespacedName
CustomServiceCertSecretName types.NamespacedName
CABundleName types.NamespacedName
OpenStackClientName types.NamespacedName
OVNNorthdName types.NamespacedName
OVNNorthdCertName types.NamespacedName
OVNControllerName types.NamespacedName
OVNControllerCertName types.NamespacedName
OVNDbServerNBName types.NamespacedName
OVNDbServerSBName types.NamespacedName
NeutronOVNCertName types.NamespacedName
OpenStackTopology []types.NamespacedName
RabbitMQNotificationsName types.NamespacedName
ServiceAccountName types.NamespacedName
RoleName types.NamespacedName
RoleBindingName types.NamespacedName
RootCAPublicName types.NamespacedName
RootCAInternalName types.NamespacedName
RootCAOvnName types.NamespacedName
RootCALibvirtName types.NamespacedName
SelfSignedIssuerName types.NamespacedName
CustomIssuerName types.NamespacedName
CustomServiceCertSecretName types.NamespacedName
CABundleName types.NamespacedName
OpenStackClientName types.NamespacedName
OVNNorthdName types.NamespacedName
OVNNorthdCertName types.NamespacedName
OVNControllerName types.NamespacedName
OVNControllerCertName types.NamespacedName
OVNDbServerNBName types.NamespacedName
OVNDbServerSBName types.NamespacedName
NeutronOVNCertName types.NamespacedName
OpenStackTopology []types.NamespacedName
}

func CreateNames(openstackControlplaneName types.NamespacedName) Names {
Expand Down Expand Up @@ -176,6 +180,14 @@ func CreateNames(openstackControlplaneName types.NamespacedName) Names {
Namespace: openstackControlplaneName.Namespace,
Name: "telemetry",
},
NovaName: types.NamespacedName{
Namespace: openstackControlplaneName.Namespace,
Name: "nova",
},
PlacementName: types.NamespacedName{
Namespace: openstackControlplaneName.Namespace,
Name: "placement",
},
DBName: types.NamespacedName{
Namespace: openstackControlplaneName.Namespace,
Name: "openstack",
Expand All @@ -200,10 +212,18 @@ func CreateNames(openstackControlplaneName types.NamespacedName) Names {
Namespace: openstackControlplaneName.Namespace,
Name: "cert-rabbitmq-svc",
},
RabbitMQNotificationsCertName: types.NamespacedName{
Namespace: openstackControlplaneName.Namespace,
Name: "cert-rabbitmq-notifications-svc",
},
RabbitMQCell1Name: types.NamespacedName{
Namespace: openstackControlplaneName.Namespace,
Name: "rabbitmq-cell1",
},
RabbitMQNotificationsName: types.NamespacedName{
Namespace: openstackControlplaneName.Namespace,
Name: "rabbitmq-notifications",
},
RabbitMQCell1CertName: types.NamespacedName{
Namespace: openstackControlplaneName.Namespace,
Name: "cert-rabbitmq-cell1-svc",
Expand Down Expand Up @@ -504,6 +524,9 @@ func GetDefaultOpenStackControlPlaneSpec() map[string]interface{} {
names.RabbitMQCell1Name.Name: map[string]interface{}{
"replicas": 1,
},
names.RabbitMQNotificationsName.Name: map[string]interface{}{
"replicas": 1,
},
}
galeraTemplate := map[string]interface{}{
names.DBName.Name: map[string]interface{}{
Expand Down Expand Up @@ -614,7 +637,9 @@ func GetDefaultOpenStackControlPlaneSpec() map[string]interface{} {
"barbican": map[string]interface{}{
"enabled": false,
},
"openstackclient": map[string]interface{}{},
// "openstackclient": map[string]interface{}{
// "enabled": true,
// },
"manila": map[string]interface{}{
"enabled": true,
"template": manilaTemplate,
Expand Down
Loading