From b19d9b04f9fa23f939842420004786115eade01e Mon Sep 17 00:00:00 2001 From: dgotlieb Date: Wed, 27 Sep 2023 13:56:45 +0300 Subject: [PATCH] [prometheus-rabbitmq-exporter] fix connection parameters not passing to the deployment (#3649) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * enable passing rabbitmq conection parameters Signed-off-by: Daniel Gotlieb * Update chart version Signed-off-by: dgotlieb * Update charts/prometheus-rabbitmq-exporter/Chart.yaml Signed-off-by: André Bauer --------- Signed-off-by: Daniel Gotlieb Signed-off-by: dgotlieb Signed-off-by: André Bauer Co-authored-by: Daniel Gotlieb Co-authored-by: MH Co-authored-by: André Bauer --- .../prometheus-rabbitmq-exporter/Chart.yaml | 2 +- .../templates/deployment.yaml | 28 +++++++++++++------ 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/charts/prometheus-rabbitmq-exporter/Chart.yaml b/charts/prometheus-rabbitmq-exporter/Chart.yaml index 60c0279f5a9d..3c4cbd801721 100644 --- a/charts/prometheus-rabbitmq-exporter/Chart.yaml +++ b/charts/prometheus-rabbitmq-exporter/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 description: Rabbitmq metrics exporter for prometheus name: prometheus-rabbitmq-exporter -version: 1.8.0 +version: 1.8.1 appVersion: v0.29.0 home: https://github.com/kbudde/rabbitmq_exporter sources: diff --git a/charts/prometheus-rabbitmq-exporter/templates/deployment.yaml b/charts/prometheus-rabbitmq-exporter/templates/deployment.yaml index 7c4bfd0b6c8f..83aedf52df00 100644 --- a/charts/prometheus-rabbitmq-exporter/templates/deployment.yaml +++ b/charts/prometheus-rabbitmq-exporter/templates/deployment.yaml @@ -47,15 +47,27 @@ spec: {{- if .Values.rabbitmq.configMapOverrideReference }} - configMapRef: name: {{ .Values.rabbitmq.configMapOverrideReference }} - {{- end }} + {{- end }} env: - {{- if .Values.rabbitmq.existingPasswordSecret }} - - name: RABBIT_PASSWORD - valueFrom: - secretKeyRef: - name: "{{ .Values.rabbitmq.existingPasswordSecret }}" - key: {{ .Values.rabbitmq.existingPasswordSecretKey }} - {{- end }} + {{- if .Values.rabbitmq.existingPasswordSecret }} + - name: RABBIT_PASSWORD + valueFrom: + secretKeyRef: + name: "{{ .Values.rabbitmq.existingPasswordSecret }}" + key: "{{ .Values.rabbitmq.existingPasswordSecretKey }}" + {{- else if .Values.rabbitmq.password }} + - name: RABBIT_PASSWORD + value: {{ .Values.rabbitmq.password }} + {{- end }} + + {{- if .Values.rabbitmq.user }} + - name: RABBIT_USER + value: {{ .Values.rabbitmq.user }} + {{- end }} + {{- if .Values.rabbitmq.url }} + - name: RABBIT_URL + value: {{ .Values.rabbitmq.url }} + {{- end }} ports: - containerPort: {{ .Values.service.internalPort }} name: publish