Skip to content

Commit

Permalink
Added option to override Docker Image command
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianeicher committed Apr 13, 2021
1 parent eb85d18 commit cccc1cd
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/generic-service/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v1
name: generic-service
version: 1.1.4
version: 1.1.5
description: runs a service (with monitoring, ingress, etc.)
home: https://helm.nano-byte.net
1 change: 1 addition & 0 deletions charts/generic-service/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ app:
| `image.repository` | __required__ | The name of the Docker Image image to run (without the Registry) |
| `image.tag` | __required__ | The tag of the Docker Image to run (also used for `app.kubernetes.io/version` label) |
| `image.pullPolicy` | `IfNotPresent` | Set to `Always` to try to pull new versions of the Docker Image |
| `command` | `[]` | Overrides the command to launch in the Docker Image |
| `args` | `[]` | The command-line arguments passed to the service |
| `env` | `{}` | The environment variables passed to the service |
| `config` | `{}` | YAML configuration to be mounted as a file in the container at `$CONFIG_FILE` |
Expand Down
4 changes: 4 additions & 0 deletions charts/generic-service/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ spec:
image: '{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}'
imagePullPolicy: {{ .Values.image.pullPolicy }}

{{- if .Values.command }}
command: {{ toYaml .Values.command | nindent 12 }}
{{- end }}

{{- if .Values.args }}
args: {{ toYaml .Values.args | nindent 12 }}
{{- end }}
Expand Down
5 changes: 5 additions & 0 deletions charts/generic-service/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@
"tag"
]
},
"command": {
"type": "array",
"items": [{"type": "string"}],
"description": "Overrides the command to launch in the Docker Image"
},
"args": {
"type": "array",
"items": [{"type": "string"}],
Expand Down
2 changes: 2 additions & 0 deletions charts/generic-service/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ image:
# tag: latest
pullPolicy: IfNotPresent

command: []

args: []

env: {}
Expand Down

0 comments on commit cccc1cd

Please sign in to comment.