Skip to content

Commit

Permalink
Fix: Enable TLS MQTT/STOMP WS ports
Browse files Browse the repository at this point in the history
There was a condition that CA bundle secret name must be provided. This
was encapsulated in the function `MutualTLSEnabled()`. After this
commit, the only condition to enable MQTT/STOMP TLS ports is to have a
secret name in the tls attribute of the spec.
  • Loading branch information
Zerpet committed Sep 26, 2024
1 parent d41c06d commit 376cecf
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions internal/resource/statefulset.go
Original file line number Diff line number Diff line change
Expand Up @@ -997,20 +997,18 @@ func (builder *StatefulSetBuilder) updateContainerPorts() []corev1.ContainerPort
})
}

if builder.Instance.MutualTLSEnabled() {
if builder.Instance.AdditionalPluginEnabled("rabbitmq_web_mqtt") {
ports = append(ports, corev1.ContainerPort{
Name: "web-mqtt-tls",
ContainerPort: 15676,
})
}
if builder.Instance.AdditionalPluginEnabled("rabbitmq_web_mqtt") {
ports = append(ports, corev1.ContainerPort{
Name: "web-mqtt-tls",
ContainerPort: 15676,
})
}

if builder.Instance.AdditionalPluginEnabled("rabbitmq_web_stomp") {
ports = append(ports, corev1.ContainerPort{
Name: "web-stomp-tls",
ContainerPort: 15673,
})
}
if builder.Instance.AdditionalPluginEnabled("rabbitmq_web_stomp") {
ports = append(ports, corev1.ContainerPort{
Name: "web-stomp-tls",
ContainerPort: 15673,
})
}
}

Expand Down

0 comments on commit 376cecf

Please sign in to comment.