-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathno-load-with-requests.yaml
66 lines (66 loc) · 1.54 KB
/
no-load-with-requests.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
apiVersion: v1
kind: ConfigMap
metadata:
name: nginx-echo
data:
default.conf: |
server {
listen 8080;
location / {
default_type text/plain;
expires -1;
return 200 'Server address: $server_addr:$server_port\nServer name: $hostname\nDate: $time_local\nURI: $request_uri\nRequest ID: $request_id\nHost header: $Host\n';
}
}
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: no-load-with-requests
name: no-load-with-requests
spec:
replicas: 2
selector:
matchLabels:
app: no-load-with-requests
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 50%
type: RollingUpdate
template:
metadata:
labels:
app: no-load-with-requests
spec:
containers:
- name: no-load-with-requests
image: nginxinc/nginx-unprivileged:stable-alpine
imagePullPolicy: IfNotPresent
resources:
requests:
cpu: 22m
memory: 22Mi
limits:
cpu: 22m
memory: 22Mi
securityContext:
runAsNonRoot: true
allowPrivilegeEscalation: false
seccompProfile:
type: RuntimeDefault
capabilities:
drop: ["ALL"]
volumeMounts:
- mountPath: /etc/nginx/conf.d
name: default-conf
readOnly: true
volumes:
- name: default-conf
configMap:
name: nginx-echo
items:
- key: default.conf
path: default.conf
---