-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.kubernetes.yml
105 lines (105 loc) · 2.8 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
apiVersion: apps/v1
kind: Deployment
metadata:
name: px-web-app
labels:
app: px-web-app
spec:
revisionHistoryLimit: 1
replicas: 2
selector:
matchLabels:
app: px-web-app
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 25%
template:
metadata:
labels:
app: px-web-app
spec:
imagePullSecrets:
- name: $DOCKER_PULL_SECRET
volumes:
- name: application-config
configMap:
name: $PX_WEB_CONFIG_MAP
items:
- key: application.yml
path: application.yml
- name: filebeat-config
configMap:
name: $FILEBEAT_CONFIG_MAP
items:
- key: filebeat.yml
path: filebeat.yml
- name: logvolume
emptyDir: {}
containers:
- name: px-web-app
image: $IMAGE
env:
- name: JAVA_OPTS
value: "-Dhttp.proxyHost=$http_proxy_host -Dhttp.proxyPort=$http_proxy_port"
- name: HTTP_PROXY
value: "$http_proxy_host:$http_proxy_port"
- name: HTTPS_PROXY
value: "$http_proxy_host:$http_proxy_port"
- name: http_proxy
value: "$http_proxy_host:$http_proxy_port"
- name: https_proxy
value: "$http_proxy_host:$http_proxy_port"
ports:
- containerPort: $port
volumeMounts:
- name: application-config
mountPath: "/px-web-app/config/"
readOnly: true
- name: logvolume
mountPath: $logpath
livenessProbe:
httpGet:
path: /health
port: $port
initialDelaySeconds: 60
periodSeconds: 10
readinessProbe:
httpGet:
path: /health
port: $port
initialDelaySeconds: 60
periodSeconds: 10
# - name: filebeat-sidecar
# image: docker.elastic.co/beats/filebeat:7.4.2
# env:
# - name: POD_NAMESPACE
# valueFrom:
# fieldRef:
# apiVersion: v1
# fieldPath: metadata.namespace
# - name: NODE_NAME
# valueFrom:
# fieldRef:
# apiVersion: v1
# fieldPath: spec.nodeName
# volumeMounts:
# - name: logvolume
# mountPath: $logpath
# - name: filebeat-config
# mountPath: /usr/share/filebeat/filebeat.yml
# subPath: filebeat.yml
---
apiVersion: v1
kind: Service
metadata:
name: px-web-app-service
spec:
selector:
app: px-web-app
ports:
- protocol: TCP
port: $port
targetPort: $port
type: NodePort