Skip to content

Commit

Permalink
Add ability to override command for main container (2nd try) (#42)
Browse files Browse the repository at this point in the history
* Add ability to override command for main container

* Add description and sample
  • Loading branch information
tomaszkiewicz committed Jul 1, 2023
1 parent 33dd27c commit 812dfc5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
4 changes: 4 additions & 0 deletions templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ spec:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
{{- with .Values.command }}
command:
{{- toYaml . | nindent 12 }}
{{- end }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
Expand Down
13 changes: 13 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,19 @@ lifecycle:
# exec:
# command: ["/bin/sh", "-c", "apk add mysql-client"]

# here you can override a command for main container
# it may be used to override starting script (e.g. to resolve issues like https://github.com/n8n-io/n8n/issues/6412) or
# run additional preparation steps (e.g. installing additional software)
command: []

# sample configuration that overrides starting script and solves above issue (also it runs n8n as root, so be careful):
#command:
# - tini
# - --
# - /bin/sh
# - -c
# - chmod o+rx /root; chown -R node /root/.n8n || true; chown -R node /root/.n8n; ln -s /root/.n8n /home/node; chown -R node /home/node || true; node /usr/local/bin/n8n

service:
type: ClusterIP
port: 80
Expand Down

0 comments on commit 812dfc5

Please sign in to comment.