-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathk8s-deployment.yaml
89 lines (88 loc) · 2.59 KB
/
k8s-deployment.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
apiVersion: apps/v1
kind: Deployment
metadata:
name: glados-frontend-chembl-main-interface
namespace: <NAMESPACE>
spec:
replicas: <NUM_REPLICAS>
selector:
matchLabels:
app: glados-frontend-chembl-main-interface
template:
metadata:
labels:
app: glados-frontend-chembl-main-interface
spec:
initContainers:
- name: glados-static-files-collector
image: <SERVER_IMAGE_TAG>
imagePullPolicy: Always
command: [ 'sh', '-c', 'id && ls -lah /statics && python manage.py sendstaticstoserver']
volumeMounts:
- name: run-config
mountPath: '/etc/run_config/'
readOnly: true
- name: chembl-static-files-nfs-volume
mountPath: '/statics/'
readOnly: False
securityContext:
runAsUser: <STATICS_UID>
runAsGroup: <STATICS_GID>
containers:
- name: glados-frontend-chembl-main-interface
image: <SERVER_IMAGE_TAG>
imagePullPolicy: Always
resources:
limits:
cpu: <CPU_LIMIT>
requests:
cpu: <CPU_REQUESTED>
volumeMounts:
- name: run-config
mountPath: '/etc/run_config/'
readOnly: true
- name: gunicorn-config
mountPath: '/etc/gunicorn_config/'
readOnly: true
- name: chembl-static-files-nfs-volume
mountPath: '/statics/'
readOnly: False
securityContext:
runAsUser: <STATICS_UID>
runAsGroup: <STATICS_GID>
env:
- name: HTTP_PROXY
value: "<HTTP_PROXY>"
- name: http_proxy
value: "<HTTP_PROXY>"
- name: HTTPS_PROXY
value: "<HTTPS_PROXY>"
- name: https_proxy
value: "<HTTPS_PROXY>"
- name: NO_PROXY
value: "<NO_PROXY>"
- name: no_proxy
value: "<NO_PROXY>"
volumes:
- name: run-config
secret:
secretName: <RUN_CONFIG_SECRET_NAME>
- name: gunicorn-config
secret:
secretName: <GUNICORN_CONFIG_SECRET_NAME>
- name: chembl-static-files-nfs-volume
persistentVolumeClaim:
claimName: chembl-static-files-nfs-claim-2
---
apiVersion: v1
kind: Service
metadata:
name: glados-frontend-chembl-main-interface
namespace: <NAMESPACE>
spec:
type: NodePort
selector:
app: glados-frontend-chembl-main-interface
ports:
- port: 8000
targetPort: 8000