forked from Rappsilber-Laboratory/xiview-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.kubernetes.yml
62 lines (61 loc) · 1.38 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
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: xiview-server-logs-volume
persistentVolumeClaim:
claimName: xiview-server-logs-pvc
containers:
- name: $app_name
image: $IMAGE
imagePullPolicy: Always
ports:
- containerPort: $PORT
volumeMounts:
- name: application-db-config
mountPath: /home/appuser/database.ini
subPath: database.ini
readOnly: true
- name: xiview-server-logs-volume
mountPath: /home/appuser/logs/$app_name
---
apiVersion: v1
kind: Service
metadata:
name: $app_name-service
spec:
selector:
app: $app_name
ports:
- protocol: TCP
port: $PORT
targetPort: $PORT
nodePort: $node_port
type: NodePort