Skip to content

Commit

Permalink
feat(sorting-hat): add option to change consumer-group-id
Browse files Browse the repository at this point in the history
  • Loading branch information
dirodriguezm committed Mar 14, 2023
1 parent 8363aa3 commit 850c209
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 6 deletions.
4 changes: 2 additions & 2 deletions charts/sorting-hat/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
appVersion: "rc-d0956a7"
appVersion: "1.1.0"
description: A Helm chart for Kubernetes
name: sorting-hat
type: application
version: 0.2.0
version: 0.3.0
2 changes: 2 additions & 0 deletions charts/sorting-hat/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ metadata:
namespace: {{ .Values.namespace }}
data:
consumer-topics: {{ .Values.configmap.consumerTopics.atlas }}
consumer-group-id: {{ .Values.configmap.consumerGroupId.atlas | default (printf "%s-atlas" (include "sorting-hat.fullname" .)) }}
internal-server: {{ .Values.configmap.internalServer }}
producer-topic: {{ .Values.configmap.producerTopic.atlas }}
metrics-topic: {{ .Values.configmap.metricsTopic }}
Expand All @@ -18,6 +19,7 @@ metadata:
namespace: {{ .Values.namespace }}
data:
consumer-topics: {{ .Values.configmap.consumerTopics.ztf }}
consumer-group-id: {{ .Values.configmap.consumerGroupId.ztf | default (printf "%s-atlas" (include "sorting-hat.fullname" .)) }}
internal-server: {{ .Values.configmap.internalServer }}
producer-topic: {{ .Values.configmap.producerTopic.ztf }}
metrics-topic: {{ .Values.configmap.metricsTopic }}
Expand Down
5 changes: 4 additions & 1 deletion charts/sorting-hat/templates/deployment_atlas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ spec:
name: '{{ include "sorting-hat.fullname" . }}-atlas'
key: internal-server
- name: CONSUMER_GROUP_ID
value: '{{ include "sorting-hat.fullname" . }}-atlas'
valueFrom:
configMapKeyRef:
name: '{{ include "sorting-hat.fullname" . }}-atlas'
key: consumer-group-id
- name: PRODUCER_SERVER
valueFrom:
configMapKeyRef:
Expand Down
5 changes: 4 additions & 1 deletion charts/sorting-hat/templates/deployment_ztf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ spec:
name: '{{ include "sorting-hat.fullname" . }}-ztf'
key: internal-server
- name: CONSUMER_GROUP_ID
value: '{{ include "sorting-hat.fullname" . }}-ztf'
valueFrom:
configMapKeyRef:
name: '{{ include "sorting-hat.fullname" . }}-ztf'
key: consumer-group-id
- name: PRODUCER_SERVER
valueFrom:
configMapKeyRef:
Expand Down
4 changes: 2 additions & 2 deletions charts/sorting-hat/templates/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ metadata:
name: kafka-auth
namespace: {{ .Values.namespace }}
stringData:
username: {{ .Values.secrets.kafkaAuth.username }}
password: {{ .Values.secrets.kafkaAuth.password }}
username: "{{ .Values.secrets.kafkaAuth.username }}"
password: "{{ .Values.secrets.kafkaAuth.password }}"
3 changes: 3 additions & 0 deletions charts/sorting-hat/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ configmap:
consumerTopics:
ztf: ""
atlas: ""
consumerGroupId:
ztf: ""
atlas: ""
internalServer: ""
producerTopic:
ztf: ""
Expand Down

0 comments on commit 850c209

Please sign in to comment.