File tree Expand file tree Collapse file tree 2 files changed +50
-0
lines changed Expand file tree Collapse file tree 2 files changed +50
-0
lines changed Original file line number Diff line number Diff line change @@ -305,6 +305,10 @@ spec:
305
305
- name : secrets
306
306
mountPath : /secrets
307
307
readOnly : true
308
+ - name : scripts
309
+ mountPath : /usr/local/bin/load_secrets_and_run.sh
310
+ subPath : load_secrets_and_run.sh
311
+ command : ["/usr/local/bin/load_secrets_and_run.sh"]
308
312
args :
309
313
- sh
310
314
- ./export-db.sh
@@ -323,6 +327,27 @@ spec:
323
327
volumes :
324
328
- name : secrets
325
329
emptyDir : {}
330
+ - name : scripts
331
+ configMap :
332
+ name : positron-scripts
333
+ defaultMode : 0755
334
+ ---
335
+ apiVersion : v1
336
+ kind : ConfigMap
337
+ metadata :
338
+ name : positron-scripts
339
+ namespace : default
340
+ data :
341
+ load_secrets_and_run.sh : |
342
+ #!/bin/bash
343
+ CMD="$@"
344
+ if [ ! -z "$SECRETS_FILE" ]
345
+ then
346
+ echo "SECRETS_FILE env var is defined. Sourcing secrets file..."
347
+ source "$SECRETS_FILE"
348
+ fi
349
+ echo "Running command: $CMD"
350
+ $CMD
326
351
---
327
352
apiVersion : v1
328
353
kind : Service
Original file line number Diff line number Diff line change @@ -306,6 +306,10 @@ spec:
306
306
- name : secrets
307
307
mountPath : /secrets
308
308
readOnly : true
309
+ - name : scripts
310
+ mountPath : /usr/local/bin/load_secrets_and_run.sh
311
+ subPath : load_secrets_and_run.sh
312
+ command : ["/usr/local/bin/load_secrets_and_run.sh"]
309
313
args :
310
314
- sh
311
315
- ./import-db.sh
@@ -324,6 +328,27 @@ spec:
324
328
volumes :
325
329
- name : secrets
326
330
emptyDir : {}
331
+ - name : scripts
332
+ configMap :
333
+ name : positron-scripts
334
+ defaultMode : 0755
335
+ ---
336
+ apiVersion : v1
337
+ kind : ConfigMap
338
+ metadata :
339
+ name : positron-scripts
340
+ namespace : default
341
+ data :
342
+ load_secrets_and_run.sh : |
343
+ #!/bin/bash
344
+ CMD="$@"
345
+ if [ ! -z "$SECRETS_FILE" ]
346
+ then
347
+ echo "SECRETS_FILE env var is defined. Sourcing secrets file..."
348
+ source "$SECRETS_FILE"
349
+ fi
350
+ echo "Running command: $CMD"
351
+ $CMD
327
352
---
328
353
apiVersion : v1
329
354
kind : Service
You can’t perform that action at this time.
0 commit comments