forked from uc-cdis/gen3-helm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathetl.yaml
89 lines (72 loc) · 2.59 KB
/
etl.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
kind: Pod
apiVersion: v1
metadata:
name: etl
spec:
volumes:
# To create the credentials config run --
# kubectl create configmap gen3-credentials --from-file Secrets
- name: gen3-credentials
configMap:
name: gen3-credentials
- name: sheepdog-dbcreds
secret:
secretName: sheepdog-dbcreds
- name: useryaml
configMap:
name: useryaml
- name: studies-mount
hostPath:
path: /Users/walsbr/aced/data_model/studies
- name: output-mount
hostPath:
path: /Users/walsbr/aced/data_model/output
containers:
- name: container-configmap
image: quay.io/ohsu-comp-bio/aced-etl:feature_grip
imagePullPolicy: Always
volumeMounts:
# Gen3 credentials file
- name: gen3-credentials
mountPath: /creds/credentials.json
subPath: credentials.json
# Sheepdog creds, secrets defined in helm/sheepdog/templates/deployment.yaml
- name: sheepdog-dbcreds
mountPath: /creds/sheepdog-creds
# User yaml, configmap defined in helm/fence/templates/useryaml-job.yaml
- name: useryaml
mountPath: /creds/user.yaml
subPath: useryaml
# studies metadata
- name: studies-mount
mountPath: /studies
# studies files
- name: output-mount
mountPath: /output
command: ["/bin/bash" ]
args:
- "-c"
- |
# Until we fix in helm env, setup well known postgres env variables
# TODO - set GLOBAL_HOSTNAME to value from values.yaml
cat << EOF >> ~/.bashrc
export PGDB=`cat /creds/sheepdog-creds/database`
export PGPASSWORD=`cat /creds/sheepdog-creds/password`
export PGUSER=`cat /creds/sheepdog-creds/username`
export PGHOST=`cat /creds/sheepdog-creds/host`
export DBREADY=`cat /creds/sheepdog-creds/dbcreated`
export PGPORT=`cat /creds/sheepdog-creds/port`
EOF
# link back to mounted volumes
ln -s /studies /data_model/studies
ln -s /output /data_model/output
echo "Done setting up data_model"
# link back to mounted volumes
ln -s /studies /data_model/studies
ln -s /output /data_model/output
echo "Done setting up data_model"
# For development purposes, extends the lifespan of the pod to let us exec into it.
while true; do sleep 30; done;
# TODO - read nodegroup from values.yaml
#nodeSelector:
# eks.amazonaws.com/nodegroup: aced-commons-development-etl-node-group-large