From 7c7510f6cf40824be9ab3e96e6ac709ad8adcee5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Kr=C3=B3likowski?= Date: Mon, 7 Aug 2023 07:33:30 +0200 Subject: [PATCH 1/2] add container command option with args --- chart/templates/deployment.yaml | 12 ++++++++++++ chart/test_values.yaml | 4 ++++ chart/values.yaml | 2 ++ 3 files changed, 18 insertions(+) diff --git a/chart/templates/deployment.yaml b/chart/templates/deployment.yaml index dddea1a..65c533d 100644 --- a/chart/templates/deployment.yaml +++ b/chart/templates/deployment.yaml @@ -18,6 +18,18 @@ spec: containers: - name: {{ .Release.Name }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + {{- if .Values.image.command }} + command: + {{- with .Values.image.command }} + {{- toYaml . | nindent 12 }} + {{- end }} + {{- end }} + {{- if .Values.image.args }} + args: + {{- with .Values.image.args }} + {{- toYaml . | nindent 12 }} + {{- end }} + {{- end }} {{- if .Values.volumes.enabled }} volumeMounts: {{- range .Values.volumes.mountPath }} diff --git a/chart/test_values.yaml b/chart/test_values.yaml index 899f130..27cab73 100644 --- a/chart/test_values.yaml +++ b/chart/test_values.yaml @@ -3,6 +3,10 @@ image: imagePolicy: enabled repository: devkrolikowski/swiss-army-knife tag: 0.3.0 # {"$imagepolicy": "flux-system:helper:tag"} + command: + - "cmd.sh" + args: + - "cmdarg" resources: limits: memory: "1024Mi" diff --git a/chart/values.yaml b/chart/values.yaml index 699134a..1cd6dac 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -7,6 +7,8 @@ image: imagePolicy: false repository: "" tag: "" + command: [] + args: [] env: {} resources: limits: From b921a41bfc41565e49b17740b293179e49949030 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Kr=C3=B3likowski?= Date: Fri, 11 Aug 2023 07:17:42 +0200 Subject: [PATCH 2/2] update chart version --- CHANGELOG.md | 4 ++++ chart/Chart.yaml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 68e68d5..bfecf7e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## [2.2.0] - 2023-08-11 +### Added +- option to run containers with additional command and args. + ## [2.1.0] - 2023-07-27 ### Added - replaced strict TCP protocol family in ports specification with variable: protocol which allows to decide which protocol is needed diff --git a/chart/Chart.yaml b/chart/Chart.yaml index d1b39f1..92e4a37 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -15,7 +15,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: 2.1.0 +version: 2.2.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 # follow Semantic Versioning. They should reflect the version the application is using.