Skip to content

Commit

Permalink
[prometheus-kafka-exporter] add support for valueFrom in env variables (
Browse files Browse the repository at this point in the history
#3754)

Signed-off-by: Marc Troelitzsch <[email protected]>
  • Loading branch information
marcfrederick authored Sep 5, 2023
1 parent 5f60969 commit 3352ef8
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion charts/prometheus-kafka-exporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ appVersion: "v1.6.0"
description: A Helm chart to export the metrics from Kafka in Prometheus format using the kafka-exporter from https://github.com/danielqsj/kafka_exporter
name: prometheus-kafka-exporter
home: https://github.com/danielqsj/kafka_exporter
version: 2.3.0
version: 2.4.0
kubeVersion: ">=1.19.0-0"
sources:
- https://gkarthiks.github.io/helm-charts/charts/prometheus-kafka-exporter
Expand Down
5 changes: 2 additions & 3 deletions charts/prometheus-kafka-exporter/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,8 @@ spec:
{{- end }}
{{- end }}
env:
{{- range $env := .Values.env }}
- name: {{ $env.name }}
value: {{ $env.value }}
{{- with .Values.env }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- if .Values.sasl.scram.enabled }}
- name: SCRAM_USERNAME
Expand Down
13 changes: 11 additions & 2 deletions charts/prometheus-kafka-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,18 @@ serviceAccount:
# If not set and create is true, a name is generated using the fullname template
name:

# Specifies environment variables to be added to the kafka-exporter container.
# Environment variables can be defined as a list of either key-value pairs or
# using valueFrom to reference a secret or config map.
env: []
# - name: <ENV_VAR_NAME>
# value: <value>
# - name: <ENV_VAR_NAME>
# value: <value>
# - name: PASSWORD
# valueFrom:
# secretKeyRef:
# name: mysecret
# key: password
# optional: false

# List of additional cli arguments to configure kafka-exporter
# for example: --log.enable-sarama, --log.level=debug, etc.
Expand Down

0 comments on commit 3352ef8

Please sign in to comment.