forked from BigKAA/youtube
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path02-openresty.yaml
67 lines (66 loc) · 1.44 KB
/
02-openresty.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
---
kind: Service
apiVersion: v1
metadata:
name: openresty
spec:
ports:
- port: 80
targetPort: 80
selector:
k8s-app: openresty
---
kind: Deployment
apiVersion: apps/v1
metadata:
name: openresty
labels:
k8s-app: openresty
annotations:
reloader.stakater.com/auto: "true"
configmap.reloader.stakater.com/reload: "openresty"
spec:
replicas: 2
revisionHistoryLimit: 3
selector:
matchLabels:
k8s-app: openresty
template:
metadata:
labels:
k8s-app: openresty
spec:
containers:
- name: openresty
image: openresty/openresty:centos-rpm
imagePullPolicy: IfNotPresent
ports:
- containerPort: 80
name: http
readinessProbe:
httpGet:
path: /index.html
port: http
initialDelaySeconds: 5
periodSeconds: 15
livenessProbe:
httpGet:
path: /index.html
port: http
initialDelaySeconds: 5
periodSeconds: 15
timeoutSeconds: 5
resources:
limits:
cpu: "0.2"
memory: "400Mi"
requests:
cpu: "0.1"
memory: "200Mi"
volumeMounts:
- name: html
mountPath: /usr/local/openresty/nginx/html/
volumes:
- name: html
configMap:
name: openresty