From 9b959144f03bafee47448f8ab9ddcdba1f2ea7b5 Mon Sep 17 00:00:00 2001 From: Jose Bautista Date: Wed, 20 Jul 2022 16:16:12 +0300 Subject: [PATCH] Add hostPort support in rabbitmq Change-Id: I0f295a80ee05e9df9c41e65e43569ecf531775c5 --- rabbitmq/Chart.yaml | 2 +- rabbitmq/templates/statefulset.yaml | 9 +++++++++ rabbitmq/values.yaml | 1 + releasenotes/notes/rabbitmq.yaml | 1 + 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/rabbitmq/Chart.yaml b/rabbitmq/Chart.yaml index 1af35a358..40c4f766d 100644 --- a/rabbitmq/Chart.yaml +++ b/rabbitmq/Chart.yaml @@ -15,6 +15,6 @@ apiVersion: v1 appVersion: v3.9.0 description: OpenStack-Helm RabbitMQ name: rabbitmq -version: 0.1.24 +version: 0.1.25 home: https://github.com/rabbitmq/rabbitmq-server ... diff --git a/rabbitmq/templates/statefulset.yaml b/rabbitmq/templates/statefulset.yaml index ed366068f..6b2143b46 100644 --- a/rabbitmq/templates/statefulset.yaml +++ b/rabbitmq/templates/statefulset.yaml @@ -190,12 +190,21 @@ spec: - name: {{ printf "%s" $protocol }} protocol: TCP containerPort: {{ tuple "oslo_messaging" "internal" $protocol . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} + {{- if .Values.network.host_namespace }} + hostPort: {{ tuple "oslo_messaging" "internal" $protocol . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} + {{- end }} - name: amqp protocol: TCP containerPort: {{ tuple "oslo_messaging" "internal" "amqp" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} + {{- if .Values.network.host_namespace }} + hostPort: {{ tuple "oslo_messaging" "internal" "amqp" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} + {{- end }} - name: clustering protocol: TCP containerPort: {{ add (tuple "oslo_messaging" "internal" "amqp" . | include "helm-toolkit.endpoints.endpoint_port_lookup") 20000 }} + {{- if .Values.network.host_namespace }} + hostPort: {{ add (tuple "oslo_messaging" "internal" "amqp" . | include "helm-toolkit.endpoints.endpoint_port_lookup") 20000 }} + {{- end }} env: - name: MY_POD_NAME valueFrom: diff --git a/rabbitmq/values.yaml b/rabbitmq/values.yaml index 23b1266f1..085aa804e 100644 --- a/rabbitmq/values.yaml +++ b/rabbitmq/values.yaml @@ -259,6 +259,7 @@ monitoring: scrape: true network: + host_namespace: false management: ingress: public: true diff --git a/releasenotes/notes/rabbitmq.yaml b/releasenotes/notes/rabbitmq.yaml index 4b77eff27..3c5e704a8 100644 --- a/releasenotes/notes/rabbitmq.yaml +++ b/releasenotes/notes/rabbitmq.yaml @@ -24,4 +24,5 @@ rabbitmq: - 0.1.22 Remove guest admin account - 0.1.23 Fixed guest account removal - 0.1.24 Added OCI registry authentication + - 0.1.25 Add hostPort support ...