From 850c20962fde8d81359974bd9ac05f760f8509ba Mon Sep 17 00:00:00 2001 From: Diego Date: Tue, 14 Mar 2023 17:00:18 -0300 Subject: [PATCH] feat(sorting-hat): add option to change consumer-group-id --- charts/sorting-hat/Chart.yaml | 4 ++-- charts/sorting-hat/templates/configmap.yaml | 2 ++ charts/sorting-hat/templates/deployment_atlas.yaml | 5 ++++- charts/sorting-hat/templates/deployment_ztf.yaml | 5 ++++- charts/sorting-hat/templates/secret.yaml | 4 ++-- charts/sorting-hat/values.yaml | 3 +++ 6 files changed, 17 insertions(+), 6 deletions(-) diff --git a/charts/sorting-hat/Chart.yaml b/charts/sorting-hat/Chart.yaml index 3fee9eb..2305827 100644 --- a/charts/sorting-hat/Chart.yaml +++ b/charts/sorting-hat/Chart.yaml @@ -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 diff --git a/charts/sorting-hat/templates/configmap.yaml b/charts/sorting-hat/templates/configmap.yaml index dba4a05..46b7b99 100644 --- a/charts/sorting-hat/templates/configmap.yaml +++ b/charts/sorting-hat/templates/configmap.yaml @@ -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 }} @@ -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 }} diff --git a/charts/sorting-hat/templates/deployment_atlas.yaml b/charts/sorting-hat/templates/deployment_atlas.yaml index 36048e9..74ae66d 100644 --- a/charts/sorting-hat/templates/deployment_atlas.yaml +++ b/charts/sorting-hat/templates/deployment_atlas.yaml @@ -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: diff --git a/charts/sorting-hat/templates/deployment_ztf.yaml b/charts/sorting-hat/templates/deployment_ztf.yaml index a110489..3a412bd 100644 --- a/charts/sorting-hat/templates/deployment_ztf.yaml +++ b/charts/sorting-hat/templates/deployment_ztf.yaml @@ -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: diff --git a/charts/sorting-hat/templates/secret.yaml b/charts/sorting-hat/templates/secret.yaml index dd6e332..e518ac1 100644 --- a/charts/sorting-hat/templates/secret.yaml +++ b/charts/sorting-hat/templates/secret.yaml @@ -14,5 +14,5 @@ metadata: name: kafka-auth namespace: {{ .Values.namespace }} stringData: - username: {{ .Values.secrets.kafkaAuth.username }} - password: {{ .Values.secrets.kafkaAuth.password }} \ No newline at end of file + username: "{{ .Values.secrets.kafkaAuth.username }}" + password: "{{ .Values.secrets.kafkaAuth.password }}" \ No newline at end of file diff --git a/charts/sorting-hat/values.yaml b/charts/sorting-hat/values.yaml index 9752830..d0e1dd6 100644 --- a/charts/sorting-hat/values.yaml +++ b/charts/sorting-hat/values.yaml @@ -54,6 +54,9 @@ configmap: consumerTopics: ztf: "" atlas: "" + consumerGroupId: + ztf: "" + atlas: "" internalServer: "" producerTopic: ztf: ""