Skip to content

Commit

Permalink
Merge pull request #944 from stuggi/OSPRH-8490
Browse files Browse the repository at this point in the history
Fix panic if no spec is provided for rabbitmq LoadBalancer override
  • Loading branch information
openshift-merge-bot[bot] authored Jul 16, 2024
2 parents 6380cf1 + 07caea6 commit a910186
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/openstack/rabbitmq.go
Original file line number Diff line number Diff line change
Expand Up @@ -342,10 +342,13 @@ func reconcileRabbitMQ(
}

if rabbitmq.Spec.Override.Service != nil &&
rabbitmq.Spec.Override.Service.Spec != nil &&
rabbitmq.Spec.Override.Service.Spec.Type == corev1.ServiceTypeLoadBalancer {
if rabbitmq.Spec.Override.Service.EmbeddedLabelsAnnotations == nil {
rabbitmq.Spec.Override.Service.EmbeddedLabelsAnnotations = &rabbitmqv2.EmbeddedLabelsAnnotations{}
}

// add annotation to register service name in dnsmasq
rabbitmq.Spec.Override.Service.Annotations =
util.MergeStringMaps(rabbitmq.Spec.Override.Service.Annotations,
map[string]string{networkv1.AnnotationHostnameKey: hostname})
Expand Down

0 comments on commit a910186

Please sign in to comment.