Skip to content

Commit

Permalink
feat: added override of args
Browse files Browse the repository at this point in the history
  • Loading branch information
apwidejulien committed Apr 29, 2024
1 parent bc15cda commit 0aaf26d
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
6 changes: 6 additions & 0 deletions charts/k8s-golive-monitor/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ spec:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.image.args }}
args:
{{- range .Values.image.args }}
- {{ . | quote }}
{{- end }}
{{ end }}
env:
{{- if .Values.golive.auth.existingSecret }}
{{- if .Values.golive.auth.usernameKey }}
Expand Down
17 changes: 17 additions & 0 deletions charts/k8s-golive-monitor/tests/deployment_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,20 @@ tests:
- equal:
path: spec.template.spec.containers[0].env[?(@.name == 'GOLIVE_TOKEN')].valueFrom.secretKeyRef.key
value: token
- it: should support image args
set:
image.args:
- "-v=6"
- "-kubeconfig=/etc/test.yaml"
# image.args: "{-v=6,-kubeconfig=/etc/test.yaml}"
# image.args[0]: "-v=6"
# image.args[1]: "-kubeconfig=/etc/test.yaml"
asserts:
- isKind:
of: Deployment
- equal:
path: spec.template.spec.containers[0].args[0]
value: "-v=6"
- equal:
path: spec.template.spec.containers[0].args[1]
value: "-kubeconfig=/etc/test.yaml"
1 change: 1 addition & 0 deletions charts/k8s-golive-monitor/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ image:
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
# tag: "latest"
args: []

imagePullSecrets:
# - name: docker-secret
Expand Down

0 comments on commit 0aaf26d

Please sign in to comment.