Skip to content

Commit 7c7510f

Browse files
committed
add container command option with args
1 parent a87ddab commit 7c7510f

3 files changed

Lines changed: 18 additions & 0 deletions

File tree

chart/templates/deployment.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,18 @@ spec:
1818
containers:
1919
- name: {{ .Release.Name }}
2020
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
21+
{{- if .Values.image.command }}
22+
command:
23+
{{- with .Values.image.command }}
24+
{{- toYaml . | nindent 12 }}
25+
{{- end }}
26+
{{- end }}
27+
{{- if .Values.image.args }}
28+
args:
29+
{{- with .Values.image.args }}
30+
{{- toYaml . | nindent 12 }}
31+
{{- end }}
32+
{{- end }}
2133
{{- if .Values.volumes.enabled }}
2234
volumeMounts:
2335
{{- range .Values.volumes.mountPath }}

chart/test_values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ image:
33
imagePolicy: enabled
44
repository: devkrolikowski/swiss-army-knife
55
tag: 0.3.0 # {"$imagepolicy": "flux-system:helper:tag"}
6+
command:
7+
- "cmd.sh"
8+
args:
9+
- "cmdarg"
610
resources:
711
limits:
812
memory: "1024Mi"

chart/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ image:
77
imagePolicy: false
88
repository: ""
99
tag: ""
10+
command: []
11+
args: []
1012
env: {}
1113
resources:
1214
limits:

0 commit comments

Comments
 (0)