From f8bbc4a5c799e3c314cdf870f8d18b7c83ca1155 Mon Sep 17 00:00:00 2001 From: pelashchoudhary Date: Fri, 22 Nov 2024 15:48:50 +0530 Subject: [PATCH 01/10] Make the configmap optional --- charts/warpstream-agent/templates/configmap.yaml | 2 ++ charts/warpstream-agent/templates/deployment.yaml | 5 +++++ charts/warpstream-agent/values.yaml | 2 ++ 3 files changed, 9 insertions(+) diff --git a/charts/warpstream-agent/templates/configmap.yaml b/charts/warpstream-agent/templates/configmap.yaml index 681a393..2079d3f 100644 --- a/charts/warpstream-agent/templates/configmap.yaml +++ b/charts/warpstream-agent/templates/configmap.yaml @@ -1,3 +1,4 @@ +{{- if .Values.config.cmEnabled }} apiVersion: v1 kind: ConfigMap metadata: @@ -20,3 +21,4 @@ data: {{- end }} WARPSTREAM_REGION: {{ .Values.config.region | quote }} {{- end }} +{{- end }} \ No newline at end of file diff --git a/charts/warpstream-agent/templates/deployment.yaml b/charts/warpstream-agent/templates/deployment.yaml index 99fbd32..6a497d6 100644 --- a/charts/warpstream-agent/templates/deployment.yaml +++ b/charts/warpstream-agent/templates/deployment.yaml @@ -140,8 +140,13 @@ spec: {{- toYaml .Values.extraEnv | nindent 12 }} {{- end }} envFrom: + {{- if .Values.config.cmEnabled }} - configMapRef: name: {{ include "warpstream-agent.fullname" . }} + {{- else }} + - secretRef: + name: {{ include "warpstream-agent.secretName" . }} + {{- end }} ports: - name: kafka containerPort: 9092 diff --git a/charts/warpstream-agent/values.yaml b/charts/warpstream-agent/values.yaml index 309850c..30443e5 100644 --- a/charts/warpstream-agent/values.yaml +++ b/charts/warpstream-agent/values.yaml @@ -64,6 +64,8 @@ headlessService: enabled: true config: + # If set to false, configmap will not be created and secrets will be referenced in the deployemnt + cmEnabled: true playground: false ## To learn what values to set for the config variables, look at our documentation ## for configuring the WarpStream Agents for production. From c1de7fb2e8082f5bcd0e34f2bf8218dcf6b3b740 Mon Sep 17 00:00:00 2001 From: pelashchoudhary Date: Fri, 22 Nov 2024 15:49:40 +0530 Subject: [PATCH 02/10] affinity for test-connection pods --- charts/warpstream-agent/templates/tests/test-connection.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/charts/warpstream-agent/templates/tests/test-connection.yaml b/charts/warpstream-agent/templates/tests/test-connection.yaml index bb1b17f..a051466 100644 --- a/charts/warpstream-agent/templates/tests/test-connection.yaml +++ b/charts/warpstream-agent/templates/tests/test-connection.yaml @@ -18,3 +18,7 @@ spec: - -type - diagnose-connection restartPolicy: Never + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} From 2e5b8d3e22b19a4eac42454cf48d3394be55fba5 Mon Sep 17 00:00:00 2001 From: pelashchoudhary Date: Fri, 22 Nov 2024 15:52:14 +0530 Subject: [PATCH 03/10] Bump chart version to 0.13.56 --- charts/warpstream-agent/CHANGELOG.md | 7 +++++++ charts/warpstream-agent/Chart.yaml | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/charts/warpstream-agent/CHANGELOG.md b/charts/warpstream-agent/CHANGELOG.md index cfc9b62..bbc6582 100644 --- a/charts/warpstream-agent/CHANGELOG.md +++ b/charts/warpstream-agent/CHANGELOG.md @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.13.56] - 2024-11-22 + +### Added + +- Make the ConfigMap optional. +- Add affinity for diagnose pods. + ## [0.13.55] - 2024-11-21 ### Added diff --git a/charts/warpstream-agent/Chart.yaml b/charts/warpstream-agent/Chart.yaml index 8611781..2ba5ef2 100644 --- a/charts/warpstream-agent/Chart.yaml +++ b/charts/warpstream-agent/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: warpstream-agent description: WarpStream Agent for Kubernetes. type: application -version: 0.13.55 +version: 0.13.56 appVersion: v601 icon: https://avatars.githubusercontent.com/u/132156278 home: https://docs.warpstream.com/warpstream/ From 90e3ffbe73b7a00fe2293c08b34e8dab9135204c Mon Sep 17 00:00:00 2001 From: pelashchoudhary Date: Fri, 22 Nov 2024 16:33:31 +0530 Subject: [PATCH 04/10] Update naming --- charts/warpstream-agent/templates/configmap.yaml | 4 ++-- charts/warpstream-agent/templates/deployment.yaml | 2 +- charts/warpstream-agent/values.yaml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/charts/warpstream-agent/templates/configmap.yaml b/charts/warpstream-agent/templates/configmap.yaml index 2079d3f..5b8343d 100644 --- a/charts/warpstream-agent/templates/configmap.yaml +++ b/charts/warpstream-agent/templates/configmap.yaml @@ -1,4 +1,4 @@ -{{- if .Values.config.cmEnabled }} +{{- if .Values.config.configMapEnabled }} apiVersion: v1 kind: ConfigMap metadata: @@ -21,4 +21,4 @@ data: {{- end }} WARPSTREAM_REGION: {{ .Values.config.region | quote }} {{- end }} -{{- end }} \ No newline at end of file +{{- end }} diff --git a/charts/warpstream-agent/templates/deployment.yaml b/charts/warpstream-agent/templates/deployment.yaml index 6a497d6..a325f77 100644 --- a/charts/warpstream-agent/templates/deployment.yaml +++ b/charts/warpstream-agent/templates/deployment.yaml @@ -140,7 +140,7 @@ spec: {{- toYaml .Values.extraEnv | nindent 12 }} {{- end }} envFrom: - {{- if .Values.config.cmEnabled }} + {{- if .Values.config.configMapEnabled }} - configMapRef: name: {{ include "warpstream-agent.fullname" . }} {{- else }} diff --git a/charts/warpstream-agent/values.yaml b/charts/warpstream-agent/values.yaml index 30443e5..a27879e 100644 --- a/charts/warpstream-agent/values.yaml +++ b/charts/warpstream-agent/values.yaml @@ -65,7 +65,7 @@ headlessService: config: # If set to false, configmap will not be created and secrets will be referenced in the deployemnt - cmEnabled: true + configMapEnabled: true playground: false ## To learn what values to set for the config variables, look at our documentation ## for configuring the WarpStream Agents for production. From 37f3a419f937f22642ca6daf82573f6c8515d106 Mon Sep 17 00:00:00 2001 From: pelashchoudhary Date: Fri, 22 Nov 2024 19:47:01 +0530 Subject: [PATCH 05/10] Update CI values --- charts/warpstream-agent/ci/playground-sts-values.yaml | 1 + charts/warpstream-agent/ci/playground-values.yaml | 1 + 2 files changed, 2 insertions(+) diff --git a/charts/warpstream-agent/ci/playground-sts-values.yaml b/charts/warpstream-agent/ci/playground-sts-values.yaml index 1e74b93..9343303 100644 --- a/charts/warpstream-agent/ci/playground-sts-values.yaml +++ b/charts/warpstream-agent/ci/playground-sts-values.yaml @@ -1,4 +1,5 @@ config: + configMapEnabled: true playground: true # testing with statefulset diff --git a/charts/warpstream-agent/ci/playground-values.yaml b/charts/warpstream-agent/ci/playground-values.yaml index 7eab9ea..81544c6 100644 --- a/charts/warpstream-agent/ci/playground-values.yaml +++ b/charts/warpstream-agent/ci/playground-values.yaml @@ -1,4 +1,5 @@ config: + configMapEnabled: true playground: true deploymentStrategy: From 7c184087533dd97b7f3c96c98c4a1b9942bcb9b4 Mon Sep 17 00:00:00 2001 From: pelashchoudhary Date: Fri, 22 Nov 2024 19:51:19 +0530 Subject: [PATCH 06/10] Set configmap enable default to true --- charts/warpstream-agent/templates/configmap.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/warpstream-agent/templates/configmap.yaml b/charts/warpstream-agent/templates/configmap.yaml index 5b8343d..5e40035 100644 --- a/charts/warpstream-agent/templates/configmap.yaml +++ b/charts/warpstream-agent/templates/configmap.yaml @@ -1,4 +1,4 @@ -{{- if .Values.config.configMapEnabled }} +{{- if .Values.config.configMapEnabled | default true }} apiVersion: v1 kind: ConfigMap metadata: From a8abbb58fb4c78eaa6a6470b76b02686397f0475 Mon Sep 17 00:00:00 2001 From: pelashchoudhary Date: Fri, 22 Nov 2024 19:58:05 +0530 Subject: [PATCH 07/10] Revert "Update CI values" This reverts commit 37f3a419f937f22642ca6daf82573f6c8515d106. --- charts/warpstream-agent/ci/playground-sts-values.yaml | 1 - charts/warpstream-agent/ci/playground-values.yaml | 1 - 2 files changed, 2 deletions(-) diff --git a/charts/warpstream-agent/ci/playground-sts-values.yaml b/charts/warpstream-agent/ci/playground-sts-values.yaml index 9343303..1e74b93 100644 --- a/charts/warpstream-agent/ci/playground-sts-values.yaml +++ b/charts/warpstream-agent/ci/playground-sts-values.yaml @@ -1,5 +1,4 @@ config: - configMapEnabled: true playground: true # testing with statefulset diff --git a/charts/warpstream-agent/ci/playground-values.yaml b/charts/warpstream-agent/ci/playground-values.yaml index 81544c6..7eab9ea 100644 --- a/charts/warpstream-agent/ci/playground-values.yaml +++ b/charts/warpstream-agent/ci/playground-values.yaml @@ -1,5 +1,4 @@ config: - configMapEnabled: true playground: true deploymentStrategy: From 26fada8191489fad8239408e0ae7ce0979457169 Mon Sep 17 00:00:00 2001 From: pelashchoudhary Date: Fri, 22 Nov 2024 20:01:31 +0530 Subject: [PATCH 08/10] Set configmap enable default to true --- charts/warpstream-agent/templates/deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/warpstream-agent/templates/deployment.yaml b/charts/warpstream-agent/templates/deployment.yaml index a325f77..813bc3c 100644 --- a/charts/warpstream-agent/templates/deployment.yaml +++ b/charts/warpstream-agent/templates/deployment.yaml @@ -140,7 +140,7 @@ spec: {{- toYaml .Values.extraEnv | nindent 12 }} {{- end }} envFrom: - {{- if .Values.config.configMapEnabled }} + {{- if .Values.config.configMapEnabled | default true }} - configMapRef: name: {{ include "warpstream-agent.fullname" . }} {{- else }} From 85d0e7f98bb9d4e76c0bd764ababd38d9eb8540b Mon Sep 17 00:00:00 2001 From: epot Date: Fri, 22 Nov 2024 15:47:59 +0100 Subject: [PATCH 09/10] Update configmap.yaml --- charts/warpstream-agent/templates/configmap.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/warpstream-agent/templates/configmap.yaml b/charts/warpstream-agent/templates/configmap.yaml index 5e40035..3d6fed9 100644 --- a/charts/warpstream-agent/templates/configmap.yaml +++ b/charts/warpstream-agent/templates/configmap.yaml @@ -1,4 +1,4 @@ -{{- if .Values.config.configMapEnabled | default true }} +{{- if ne .Values.config.configMapEnabled false }} apiVersion: v1 kind: ConfigMap metadata: From 9caf28108470eb4d2a94880a9b03a10d8e75137a Mon Sep 17 00:00:00 2001 From: epot Date: Fri, 22 Nov 2024 15:48:26 +0100 Subject: [PATCH 10/10] Update deployment.yaml --- charts/warpstream-agent/templates/deployment.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/warpstream-agent/templates/deployment.yaml b/charts/warpstream-agent/templates/deployment.yaml index 813bc3c..06c7ef4 100644 --- a/charts/warpstream-agent/templates/deployment.yaml +++ b/charts/warpstream-agent/templates/deployment.yaml @@ -140,7 +140,7 @@ spec: {{- toYaml .Values.extraEnv | nindent 12 }} {{- end }} envFrom: - {{- if .Values.config.configMapEnabled | default true }} + {{- if ne .Values.config.configMapEnabled false }} - configMapRef: name: {{ include "warpstream-agent.fullname" . }} {{- else }} @@ -188,4 +188,4 @@ spec: {{- with .Values.volumes }} volumes: {{- toYaml . | nindent 8 }} - {{- end }} \ No newline at end of file + {{- end }}