From 5c8bd68e764b22122d6be4cbda04cfdc76223b23 Mon Sep 17 00:00:00 2001 From: "Haider, Nafiz (nh532m)" Date: Thu, 10 Jun 2021 16:07:47 -0500 Subject: [PATCH] rabbitmq: Add TLS support to helm test Add http and https toggling to helm test for TLS Change-Id: Ia01fc793d090a7d1cb97e2fd7dacaaa6edbad8d0 --- rabbitmq/Chart.yaml | 2 +- rabbitmq/templates/pod-test.yaml | 7 ++++++- releasenotes/notes/rabbitmq.yaml | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/rabbitmq/Chart.yaml b/rabbitmq/Chart.yaml index 55e8cc806..a034e40bf 100644 --- a/rabbitmq/Chart.yaml +++ b/rabbitmq/Chart.yaml @@ -15,6 +15,6 @@ apiVersion: v1 appVersion: v3.7.26 description: OpenStack-Helm RabbitMQ name: rabbitmq -version: 0.1.10 +version: 0.1.11 home: https://github.com/rabbitmq/rabbitmq-server ... diff --git a/rabbitmq/templates/pod-test.yaml b/rabbitmq/templates/pod-test.yaml index 0dcdd8e81..2ee00d5d8 100644 --- a/rabbitmq/templates/pod-test.yaml +++ b/rabbitmq/templates/pod-test.yaml @@ -23,6 +23,11 @@ limitations under the License. {{- $serviceAccountName := print .Release.Name "-test" }} {{ tuple $envAll "tests" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} + +{{- $protocol := "http" }} +{{- if $envAll.Values.manifests.certificates }} +{{- $protocol = "https" }} +{{- end }} --- apiVersion: v1 kind: Pod @@ -48,7 +53,7 @@ spec: {{ dict "envAll" $envAll "application" "test" "container" "rabbitmq_test" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 6 }} env: - name: RABBITMQ_ADMIN_CONNECTION - value: {{ tuple "oslo_messaging" "internal" "user" "http" $envAll | include "helm-toolkit.endpoints.authenticated_endpoint_uri_lookup" | quote }} + value: {{ tuple "oslo_messaging" "internal" "user" $protocol $envAll | include "helm-toolkit.endpoints.authenticated_endpoint_uri_lookup" | quote }} - name: RABBIT_REPLICA_COUNT value: {{ $envAll.Values.pod.replicas.server | quote }} command: diff --git a/releasenotes/notes/rabbitmq.yaml b/releasenotes/notes/rabbitmq.yaml index 27c653bf6..ab2fc9e88 100644 --- a/releasenotes/notes/rabbitmq.yaml +++ b/releasenotes/notes/rabbitmq.yaml @@ -10,4 +10,5 @@ rabbitmq: - 0.1.8 Make helm test work with TLS - 0.1.9 Use full image ref for docker official images - 0.1.10 Set separate for HTTPS + - 0.1.11 Add TLS support for helm test ...