-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.kubernetes.yml
78 lines (78 loc) · 1.88 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
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-config
configMap:
name: $CONFIG_INI
items:
- key: config.ini
path: config.ini
containers:
- name: $app_name
image: $IMAGE
imagePullPolicy: Always
ports:
- containerPort: $port
env:
- name: HTTP_PROXY
value: "http://$http_proxy_host:$http_proxy_port"
- name: HTTPS_PROXY
value: "http://$http_proxy_host:$http_proxy_port"
- name: http_proxy
value: "http://$http_proxy_host:$http_proxy_port"
- name: https_proxy
value: "http://$http_proxy_host:$http_proxy_port"
volumeMounts:
- name: application-config
mountPath: /app/config.ini
subPath: config.ini
readOnly: true
livenessProbe:
httpGet:
path: /health
port: $port
initialDelaySeconds: 60
periodSeconds: 10
timeoutSeconds: 120
readinessProbe:
httpGet:
path: /health
port: $port
initialDelaySeconds: 60
periodSeconds: 10
timeoutSeconds: 120
---
apiVersion: v1
kind: Service
metadata:
name: $app_name-service
spec:
selector:
app: $app_name
ports:
- protocol: TCP
port: $port
targetPort: $port
type: NodePort