-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphp-fpm.yaml
80 lines (80 loc) · 2.08 KB
/
php-fpm.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
68
69
70
71
72
73
74
75
76
77
78
79
80
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: php-fpm
spec:
replicas: 2
selector:
matchLabels:
app.kubernetes.io/instance: php-fpm
app.kubernetes.io/name: php-fpm
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
annotations:
prometheus.io/port: "9253"
prometheus.io/scrape: "true"
labels:
app.kubernetes.io/instance: php-fpm
app.kubernetes.io/name: php-fpm
spec:
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchLabels:
app: php-fpm
topologyKey: kubernetes.io/hostname
weight: 1
volumes:
- name: php-fpm-config
configMap:
name: php-fpm-config
items:
- key: www.conf
path: www.conf
containers:
- args:
- --addr
- 0.0.0.0:9253
- --fastcgi
- tcp://localhost:9000/status
command:
- ./php-fpm-exporter
image: bakins/php-fpm-exporter:v0.6.1
imagePullPolicy: IfNotPresent
name: php-fpm-exporter
ports:
- containerPort: 9253
protocol: TCP
resources:
requests:
cpu: 10m
memory: 20Mi
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
- image: php:7.4-fpm
imagePullPolicy: IfNotPresent
name: php-fpm
ports:
- containerPort: 9000
name: php
protocol: TCP
securityContext:
capabilities:
add:
- SYS_PTRACE
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /usr/local/etc/php-fpm.d/www.conf
name: php-fpm-config
subPath: www.conf
dnsPolicy: ClusterFirst
restartPolicy: Always
terminationGracePeriodSeconds: 30