diff --git a/README.md b/README.md index d9935d5..e930a6a 100644 --- a/README.md +++ b/README.md @@ -25,14 +25,16 @@ Set the value web.livenessProbe.path and web.readinessProbe.path to change the U This helm chart will set a "role" environment variable to web, worker, or beat. Your Docker image could read this variable and run the correct command. -Alternatively, set the service.command. For example: +Alternatively, set the service.args. For example: ``` web: - command: + args: - run_it ``` +Remember that Kubernetes "args" are Docker's CMD (or command). Pretty confusing! + # Usage 1. Add our Helm chart repo `helm repo add django https://burke-software.gitlab.io/django-helm-chart/` diff --git a/templates/beat/deployment.yaml b/templates/beat/deployment.yaml index 60e1071..583cf19 100644 --- a/templates/beat/deployment.yaml +++ b/templates/beat/deployment.yaml @@ -31,11 +31,8 @@ spec: {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: - name: {{ .Chart.Name }} - {{- if .Values.beat.command }} - command: {{ .Values.beat.command }} - {{- end }} {{- if .Values.beat.args }} - args: {{ .Values.beat.args }} + args: {{- toYaml .Values.beat.args | nindent 10}} {{- end }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} diff --git a/templates/web/deployment.yaml b/templates/web/deployment.yaml index 0bf7875..2cfec45 100644 --- a/templates/web/deployment.yaml +++ b/templates/web/deployment.yaml @@ -32,11 +32,8 @@ spec: {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: - name: {{ .Chart.Name }} - {{- if .Values.web.command }} - command: {{ .Values.web.command }} - {{- end }} {{- if .Values.web.args }} - args: {{ .Values.web.args }} + args: {{- toYaml .Values.web.args | nindent 10}} {{- end }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} diff --git a/templates/worker/deployment.yaml b/templates/worker/deployment.yaml index 78c83d5..5d62f20 100644 --- a/templates/worker/deployment.yaml +++ b/templates/worker/deployment.yaml @@ -30,11 +30,8 @@ spec: {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: - name: {{ .Chart.Name }} - {{- if .Values.worker.command }} - command: {{ .Values.worker.command }} - {{- end }} {{- if .Values.worker.args }} - args: {{ .Values.worker.args }} + args: {{- toYaml .Values.worker.args | nindent 10}} {{- end }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }}