forked from Rappsilber-Laboratory/xi-mzidentml-converter
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.kubernetes.yml
83 lines (82 loc) · 2.06 KB
/
.kubernetes.yml
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
apiVersion: apps/v1
kind: Deployment
metadata:
name: $app_name
labels:
app: $app_name
spec:
replicas: $k8s_replicas
revisionHistoryLimit: 1
selector:
matchLabels:
app: $app_name
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 25%
template:
metadata:
labels:
app: $app_name
spec:
imagePullSecrets:
- name: $DOCKER_PULL_SECRET
volumes:
- name: application-db-config
configMap:
name: $DATABASE_INI
items:
- key: database.ini
path: database.ini
- name: application-logging-config
configMap:
name: $LOGGING_INI
items:
- key: logging.ini
path: logging.ini
- name: cache-volume
emptyDir:
sizeLimit: 100Gi
- name: xi-converter-logs-volume
persistentVolumeClaim:
claimName: xi-converter-logs-pvc
containers:
- name: $app_name
image: $IMAGE
imagePullPolicy: Always
command: [ "python3" ]
args: [ "main.py" ]
ports:
- containerPort: $PORT
name: http
protocol: TCP
env:
- name: DATABASE_INI_PATH
value: /home/appuser/database.ini
volumeMounts:
- name: application-db-config
mountPath: /home/appuser/database.ini
subPath: database.ini
readOnly: true
- name: application-logging-config
mountPath: /home/appuser/logging.ini
subPath: logging.ini
readOnly: true
- name: cache-volume
mountPath: /home/appuser/mzId_convertor_temp
- name: xi-converter-logs-volume
mountPath: /home/appuser/logs/$app_name
---
apiVersion: v1
kind: Service
metadata:
name: $app_name-service
spec:
selector:
app: $app_name
ports:
- port: $PORT
protocol: TCP
targetPort: http
type: ClusterIP