@@ -11,3 +11,136 @@ spec:
11
11
- port : 9000
12
12
targetPort : 9000
13
13
name : fastcgi
14
+ ---
15
+
16
+ apiVersion : apps/v1
17
+ kind : Deployment
18
+ metadata :
19
+ name : {{ .Release.Name }}
20
+ namespace : {{ .Release.Namespace }}
21
+ labels :
22
+ app : {{ .Release.Name }}
23
+ spec :
24
+ replicas : {{ .Values.REPLICAS }}
25
+ strategy :
26
+ rollingUpdate :
27
+ maxSurge : 0
28
+ maxUnavailable : 1
29
+ selector :
30
+ matchLabels :
31
+ app : {{ .Release.Name }}
32
+ template :
33
+ metadata :
34
+ labels :
35
+ app : {{ .Release.Name }}
36
+ redis-client : ' true'
37
+ spec :
38
+ affinity :
39
+ podAffinity :
40
+ requiredDuringSchedulingIgnoredDuringExecution :
41
+ - labelSelector :
42
+ matchExpressions :
43
+ - key : app.kubernetes.io/name
44
+ operator : In
45
+ values :
46
+ - ingress-nginx
47
+ namespaces :
48
+ - ingress-nginx
49
+ topologyKey : kubernetes.io/hostname
50
+ podAntiAffinity :
51
+ requiredDuringSchedulingIgnoredDuringExecution :
52
+ - labelSelector :
53
+ matchExpressions :
54
+ - key : app
55
+ operator : In
56
+ values :
57
+ - {{ .Release.Name }}
58
+ namespaces :
59
+ - {{ .Release.Namespace }}
60
+ topologyKey : kubernetes.io/hostname
61
+ - labelSelector :
62
+ matchExpressions :
63
+ - key : app
64
+ operator : In
65
+ values :
66
+ - cloud-screenshot
67
+ namespaces :
68
+ - dc-screenshot
69
+ topologyKey : kubernetes.io/hostname
70
+ containers :
71
+ - name : {{ .Release.Name }}
72
+ env :
73
+ - name : NODE_NAME
74
+ valueFrom :
75
+ fieldRef :
76
+ fieldPath : spec.nodeName
77
+ - name : INSTALL_PATH
78
+ value : {{ .Values.INSTALL_PATH | squote }}
79
+ - name : VIRTUAL_HOST
80
+ value : {{ .Values.VIRTUAL_HOST | squote }}
81
+ - name : PHP_MEMORY_LIMIT
82
+ value : {{ .Values.PHP_MEMORY_LIMIT | squote }}
83
+ - name : PHP_OPCACHE_FILE_CACHE
84
+ value : " "
85
+ - name : PHP_OPCACHE_VALIDATE_TIMESTAMPS
86
+ value : " 1"
87
+
88
+ image : {{ .Values.ET_IMAGE | squote }}
89
+ livenessProbe :
90
+ exec :
91
+ command :
92
+ - ' bash'
93
+ - ' -c'
94
+ - ' SCRIPT_NAME=/healthz'
95
+ - ' SCRIPT_FILENAME={{ .Values.INSTALL_PATH }}/public/healthz.php'
96
+ - ' REQUEST_METHOD=GET'
97
+ - ' cgi-fcgi'
98
+ - ' -bind'
99
+ - ' -connect'
100
+ - ' 127.0.0.1:9000'
101
+ periodSeconds : 30
102
+ ports :
103
+ - name : fastcgi
104
+ containerPort : 9000
105
+ readinessProbe :
106
+ exec :
107
+ command :
108
+ - ' bash'
109
+ - ' -c'
110
+ - ' SCRIPT_NAME=/healthz'
111
+ - ' SCRIPT_FILENAME={{ .Values.INSTALL_PATH }}/public/healthz.php'
112
+ - ' REQUEST_METHOD=GET'
113
+ - ' cgi-fcgi'
114
+ - ' -bind'
115
+ - ' -connect'
116
+ - ' 127.0.0.1:9000'
117
+ periodSeconds : 10
118
+ resources :
119
+ requests :
120
+ cpu : 100m
121
+ memory : 100Mi
122
+ limits :
123
+ cpu : 5000m
124
+ memory : 3G
125
+ startupProbe :
126
+ exec :
127
+ command :
128
+ - cat
129
+ - {{ .Values.INSTALL_PATH }}/public/healthz.php
130
+ failureThreshold : 30
131
+ periodSeconds : 10
132
+ volumeMounts :
133
+ - name : wordpress
134
+ mountPath : /srv
135
+ tolerations :
136
+ - key : node.kubernetes.io/disk-pressure
137
+ operator : Exists
138
+ - key : node.kubernetes.io/memory-pressure
139
+ operator : Exists
140
+ - key : node.kubernetes.io/pid-pressure
141
+ operator : Exists
142
+ volumes :
143
+ - name : wordpress
144
+ hostPath :
145
+ path : /srv
146
+ type : DirectoryOrCreate
0 commit comments