Skip to content

Commit

Permalink
Merge pull request #53 from alercebroker/prv_candidates/kafka-authent…
Browse files Browse the repository at this point in the history
…ication

feat: add option to use kafka authentication on prv_candidates
  • Loading branch information
dirodriguezm authored Mar 10, 2023
2 parents a39994a + 50e8401 commit b79c9f3
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/prv_candidates/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ appVersion: "rc-2db2507"
description: A Helm chart for Kubernetes
name: prv-candidates
type: application
version: 0.2.0
version: 0.3.0
12 changes: 12 additions & 0 deletions charts/prv_candidates/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,18 @@ spec:
configMapKeyRef:
name: {{ include "prv-candidates.fullname" . }}
key: metrics-topic
{{- if .Values.secrets.kafkaAuth.enabled }}
- name: KAFKA_USERNAME
valueFrom:
secretKeyRef:
name: kafka-auth
key: username
- name: KAFKA_PASSWORD
valueFrom:
secretKeyRef:
name: kafka-auth
key: password
{{- end}}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
Expand Down
12 changes: 11 additions & 1 deletion charts/prv_candidates/templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
---
apiVersion: v1
kind: Secret
metadata:
name: image-pull-access
namespace: {{ .Values.namespace }}
type: kubernetes.io/dockerconfigjson
data:
.dockerconfigjson: {{ template "imagePullSecret" . }}
.dockerconfigjson: {{ template "imagePullSecret" . }}
---
apiVersion: v1
kind: Secret
metadata:
name: kafka-auth
namespace: {{ .Values.namespace }}
stringData:
username: {{ .Values.secrets.kafkaAuth.username }}
password: {{ .Values.secrets.kafkaAuth.password }}
6 changes: 6 additions & 0 deletions charts/prv_candidates/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,9 @@ imageCredentials:
username: ""
password: ""
email: ""

secrets:
kafkaAuth:
enabled: false
username: ""
password: ""

0 comments on commit b79c9f3

Please sign in to comment.