Add command value

This commit is contained in:
David Burke 2021-06-03 15:19:36 -04:00
parent 48f41becfc
commit 49cd649fea
4 changed files with 27 additions and 1 deletions

View file

@ -23,7 +23,15 @@ Set the value web.livenessProbe.path and web.readinessProbe.path to change the U
## Run commands
This helm chart will set a "role" environment variable to web, worker, or beat. It's up to your Docker image to read this variable and run the correct command.
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:
```
web:
command:
- run_it
```
# Usage

View file

@ -30,6 +30,12 @@ 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 }}
{{- end }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"

View file

@ -32,6 +32,12 @@ 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 }}
{{- end }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"

View file

@ -30,6 +30,12 @@ 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 }}
{{- end }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"