Skip to content

Commit

Permalink
Added support for extra init commands
Browse files Browse the repository at this point in the history
  • Loading branch information
nuwang committed Jul 21, 2020
1 parent 2d18dc1 commit 7f4daed
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 6 additions & 1 deletion rstudio/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ spec:
initContainers:
- name: {{ .Chart.Name }}-init-mounts
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
command: ['sh', '-c', {{ include "rstudio.init-container-commands" . | squote }}]
command: [
'sh', '-c',
'{{- if .Values.extraInitCommands -}}
{{- tpl .Values.extraInitCommands $ | nindent 13 }};
{{- end -}}
{{ include "rstudio.init-container-commands" . }}']
volumeMounts:
{{- range $entry := .Values.mutableConfigs }}
{{ if $entry -}}
Expand Down
4 changes: 4 additions & 0 deletions rstudio/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,7 @@ useSecretConfigs: false
# subPath: ".rstudio/monitored/user-settings/"
# contents: |
# initialWorkingDirectory="/opt/project/shared-data"

extraInitCommands: |
# cp -r /etc/skel /gvl/projects/current/
# /galaxy/server/extra/mapped/script.sh

0 comments on commit 7f4daed

Please sign in to comment.