Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[prometheus-rabbitmq-exporter] Allows reading User from secret #4278

Merged
merged 2 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/prometheus-rabbitmq-exporter/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
description: Rabbitmq metrics exporter for prometheus
name: prometheus-rabbitmq-exporter
version: 1.10.0
version: 1.11.0
appVersion: v0.29.0
home: https://github.com/kbudde/rabbitmq_exporter
sources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,13 @@ spec:
- name: RABBIT_PASSWORD
value: {{ .Values.rabbitmq.password }}
{{- end }}

{{- if .Values.rabbitmq.user }}
{{- if .Values.rabbitmq.existingUserSecret }}
- name: RABBIT_USER
valueFrom:
secretKeyRef:
name: "{{ .Values.rabbitmq.existingUserSecret }}"
key: "{{ .Values.rabbitmq.existingUserSecretKey }}"
{{- else if .Values.rabbitmq.user }}
- name: RABBIT_USER
value: {{ .Values.rabbitmq.user }}
{{- end }}
Expand Down
3 changes: 3 additions & 0 deletions charts/prometheus-rabbitmq-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ rabbitmq:
url: http://myrabbit:15672
user: guest
password: guest
# If existingUserSecret is set then user is ignored
existingUserSecret: ~
existingUserSecretKey: username
# If existingPasswordSecret is set then password is ignored
existingPasswordSecret: ~
existingPasswordSecretKey: password
Expand Down
Loading