Skip to content

Commit

Permalink
Merge pull request #932 from stuggi/OSPRH-8066
Browse files Browse the repository at this point in the history
Fix panic if no annotation is provided for rabbitmq LoadBalancer override
  • Loading branch information
openshift-merge-bot[bot] authored Jul 15, 2024
2 parents 65c922a + 3e45ef6 commit 4ffcbc0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ metadata:
capabilities: Basic Install
features.operators.openshift.io/disconnected: "true"
features.operators.openshift.io/fips-compliant: "true"
operatorframework.io/suggested-namespace: openstack-operators
features.operators.openshift.io/proxy-aware: "false"
features.operators.openshift.io/tls-profiles: "false"
features.operators.openshift.io/token-auth-aws: "false"
features.operators.openshift.io/token-auth-azure: "false"
features.operators.openshift.io/token-auth-gcp: "false"
operatorframework.io/suggested-namespace: openstack-operators
operators.operatorframework.io/builder: operator-sdk-v1.26.0
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
name: openstack-operator.v0.0.0
Expand Down
3 changes: 3 additions & 0 deletions pkg/openstack/rabbitmq.go
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,9 @@ func reconcileRabbitMQ(

if rabbitmq.Spec.Override.Service != nil &&
rabbitmq.Spec.Override.Service.Spec.Type == corev1.ServiceTypeLoadBalancer {
if rabbitmq.Spec.Override.Service.EmbeddedLabelsAnnotations == nil {
rabbitmq.Spec.Override.Service.EmbeddedLabelsAnnotations = &rabbitmqv2.EmbeddedLabelsAnnotations{}
}
rabbitmq.Spec.Override.Service.Annotations =
util.MergeStringMaps(rabbitmq.Spec.Override.Service.Annotations,
map[string]string{networkv1.AnnotationHostnameKey: hostname})
Expand Down

0 comments on commit 4ffcbc0

Please sign in to comment.