Skip to content

Commit

Permalink
charts/kafka-exporter: move secrets to Secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
adambabik committed Oct 30, 2020
1 parent 065b85c commit 8b11720
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 7 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 0.1.5 / 2020-10-30

* cmd/kafka_exporter: allow setting secrets using envs
* charts/kafka-exporter: move secrets to Secrets

# 0.1.4 / 2020-10-29

* metrics: add kafka_broker_info
Expand Down
2 changes: 1 addition & 1 deletion charts/kafka-exporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ version: 0.1.0
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: v0.1.3
appVersion: v0.1.5
17 changes: 11 additions & 6 deletions charts/kafka-exporter/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,23 @@ spec:
{{- if .Values.kafkaExporter.address }}
- "--broker={{ .Values.kafkaExporter.broker }}"
{{- end }}
{{- if .Values.kafkaExporter.saslUsername }}
- "--sasl.username={{ .Values.kafkaExporter.saslUsername }}"
{{- end }}
{{- if .Values.kafkaExporter.saslPassword }}
- "--sasl.password={{ .Values.kafkaExporter.saslPassword }}"
{{- end }}
{{- if .Values.kafkaExporter.mechanisms }}
- "--sasl.mechanisms={{ .Values.kafkaExporter.mechanisms }}"
{{- end }}
{{- if .Values.kafkaExporter.tls }}
- "--tls"
{{- end }}
env:
- name: KAFKA_SASL_USERNAME
valueFrom:
secretKeyRef:
name: {{ include "kafka_exporter.fullname" . }}-{{ .Release.Revision }}
key: saslUsername
- name: KAFKA_SASL_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "kafka_exporter.fullname" . }}-{{ .Release.Revision }}
key: saslPassword
ports:
- name: http
containerPort: 8080
Expand Down
10 changes: 10 additions & 0 deletions charts/kafka-exporter/templates/secrets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v1
kind: Secret
metadata:
name: {{ include "kafka_exporter.fullname" . }}-{{ .Release.Revision }}
labels:
{{- include "kafka_exporter.labels" . | nindent 4 }}
type: Opaque
data:
saslUsername: {{ .Values.kafkaExporter.saslUsername | b64enc | quote }}
saslPassword: {{ .Values.kafkaExporter.saslPassword | b64enc | quote }}

0 comments on commit 8b11720

Please sign in to comment.