Skip to content

Commit d45feba

Browse files
committed
WIP Add extra init container
1 parent 56414e5 commit d45feba

File tree

2 files changed

+45
-4
lines changed

2 files changed

+45
-4
lines changed

charts/redcap/templates/cronjobs/restore-cronjob.yaml

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,53 @@ spec:
130130
volumeMounts:
131131
- name: backup-data
132132
mountPath: /backup-data
133+
134+
- name: init-download-redcap
135+
image: "{{ .Values.restoreJob.redcap.image.repository }}:{{ .Values.restoreJob.redcap.image.tag }}"
136+
imagePullPolicy: {{ .Values.redcap.install.image.pullPolicy }}
137+
securityContext:
138+
allowPrivilegeEscalation: false
139+
readOnlyRootFilesystem: true
140+
runAsUser: 2000
141+
runAsGroup: 2000
142+
143+
env:
144+
- name : REDCAP_INSTALL_PATH
145+
value: "/app/redcap"
146+
- name : REDCAP_VERSION
147+
value: {{ .Values.redcap.install.version }}
148+
- name: REDCAP_COMMUNITY_USERNAME
149+
valueFrom:
150+
secretKeyRef:
151+
name: {{ default (include "redcap.secrets.community.creds.name" .) .Values.redcap.install.communityAuth.existingSecret }}
152+
key: USERNAME
153+
- name: REDCAP_COMMUNITY_PASSWORD
154+
valueFrom:
155+
secretKeyRef:
156+
name: {{ default (include "redcap.secrets.community.creds.name" .) .Values.redcap.install.communityAuth.existingSecret }}
157+
key: PASSWORD
158+
159+
command:
160+
- "sh"
161+
- "-c"
162+
- "/home/curl_user/redcap-install.sh"
163+
164+
volumeMounts:
165+
- name: redcap-archive-cache
166+
mountPath: /tmp/redcap
167+
- name: redcap-app
168+
mountPath: /app/redcap
169+
- name: database-conf
170+
mountPath: /tmp/conf/database.php
171+
subPath: database.php
172+
- name: redcap-install-script
173+
mountPath: /home/curl_user/redcap-install.sh
174+
subPath: redcap-install.sh
133175

134176

135177
containers:
136178
- name: redcap-restore
137-
image: "{{ .Values.restoreJob.redcap.image.repository }}:{{ .Values.restoreJob.redcap.image.tag }}"
179+
image: "{{ .Values.redcap.image.repository }}:{{ .Values.redcap.image.tag }}"
138180
imagePullPolicy: {{ .Values.restoreJob.redcap.image.pullPolicy }}
139181
securityContext:
140182
allowPrivilegeEscalation: false
@@ -169,7 +211,6 @@ spec:
169211
- sh
170212
- -c
171213
- >
172-
/tmp/scripts/redcap-install.sh &&
173214
/tmp/scripts/redcap-setup.sh &&
174215
/tmp/scripts/redcap-config.sh
175216

charts/redcap/values.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -524,10 +524,10 @@ restoreJob:
524524
image:
525525
# -- Image repository for the REDCap application restore container.
526526
# @section -- REDCap Restore Job's settings
527-
repository: "ghcr.io/aphp/redcap-httpd-shibd"
527+
repository: "alpine/curl"
528528
# -- Image tag for the REDCap application restore container.
529529
# @section -- REDCap Restore Job's settings
530-
tag: "1.2.0"
530+
tag: "8.12.1"
531531
# -- Image pullPolicy for the REDCap application restore container.
532532
# @section -- REDCap Restore Job's settings
533533
pullPolicy: "Always"

0 commit comments

Comments
 (0)