From abe6c1fd49ced9598a1bfc65611cea98c49bfe7e Mon Sep 17 00:00:00 2001 From: djkhl Date: Tue, 26 Nov 2024 14:06:49 +0100 Subject: [PATCH 1/4] add ability to configure init containers in helm chart --- charts/logprep/templates/deployment.yaml | 4 ++++ tests/unit/charts/test_deployment.py | 12 ++++++++++++ 2 files changed, 16 insertions(+) diff --git a/charts/logprep/templates/deployment.yaml b/charts/logprep/templates/deployment.yaml index f5be0bf5d..18167c658 100644 --- a/charts/logprep/templates/deployment.yaml +++ b/charts/logprep/templates/deployment.yaml @@ -27,6 +27,10 @@ spec: {{- if .Values.secrets.imagePullSecret }} - name: {{ .Values.secrets.imagePullSecret.name }} {{- end }} + {{- if .Values.initContainers }} + initContainers: + {{- toYaml .Values.initContainers | nindent 8 }} + {{- end }} containers: - name: logprep {{- if .Values.containerSecurityContext.enabled }} diff --git a/tests/unit/charts/test_deployment.py b/tests/unit/charts/test_deployment.py index f9a4a9810..2873dad36 100644 --- a/tests/unit/charts/test_deployment.py +++ b/tests/unit/charts/test_deployment.py @@ -98,6 +98,18 @@ def test_add_security_context(self): security_context = self.deployment["spec.template.spec.containers.0.securityContext"] assert security_context["allowPriviledgeEscalation"] == "false" + def test_init_containers(self): + self.manifests = self.render_chart( + "logprep", + { + "initContainers": {"name": "test-init"}, + }, + ) + + assert self.deployment["spec.template.spec.initContainers"] + init_container = self.deployment["spec.template.spec.initContainers"] + assert init_container["name"] == "test-init" + def test_resources(self): assert self.deployment["spec.template.spec.containers.0.resources"] resources = self.deployment["spec.template.spec.containers.0.resources"] From 7a4a1496552df695319b336ca753a138035b82de Mon Sep 17 00:00:00 2001 From: djkhl Date: Tue, 26 Nov 2024 14:21:18 +0100 Subject: [PATCH 2/4] update chart version and changelog --- CHANGELOG.md | 3 +++ charts/logprep/Chart.yaml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5bb89bf48..a33be950e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ * fix `delimiter` typo in `StringSplitterRule` configuration ### Features + +* configuration of `initContainers` in logprep helm chart is noch possible + ### Improvements * fix `requester` documentation diff --git a/charts/logprep/Chart.yaml b/charts/logprep/Chart.yaml index 4a82df2fe..2cd892852 100644 --- a/charts/logprep/Chart.yaml +++ b/charts/logprep/Chart.yaml @@ -6,7 +6,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: "14.0.1" +version: "14.1.1" # 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 From 836f32d2e10b2a8359782a4656974d91446ad7cf Mon Sep 17 00:00:00 2001 From: djkhl Date: Tue, 26 Nov 2024 14:22:44 +0100 Subject: [PATCH 3/4] fix typo in changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a33be950e..d8f9ab6b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ ### Features -* configuration of `initContainers` in logprep helm chart is noch possible +* configuration of `initContainers` in logprep helm chart is now possible ### Improvements From 5af56b9d6ddc35c638769a9162e96d99bc442c5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Zimmermann?= <101292599+ekneg54@users.noreply.github.com> Date: Tue, 26 Nov 2024 16:35:21 +0100 Subject: [PATCH 4/4] Update charts/logprep/Chart.yaml --- charts/logprep/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/logprep/Chart.yaml b/charts/logprep/Chart.yaml index 2cd892852..4a214dd10 100644 --- a/charts/logprep/Chart.yaml +++ b/charts/logprep/Chart.yaml @@ -6,7 +6,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: "14.1.1" +version: "14.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