-
Notifications
You must be signed in to change notification settings - Fork 4
/
pprofweb-deploy.yaml
60 lines (56 loc) · 1.24 KB
/
pprofweb-deploy.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
apiVersion: apps/v1
kind: Deployment
metadata:
name: pprofweb
labels:
app: pprofweb
spec:
replicas: 1
selector:
matchLabels:
app: pprofweb
template:
metadata:
labels:
app: pprofweb
annotations:
# allow scale down even though this uses an emptyDir for tmp
cluster-autoscaler.kubernetes.io/safe-to-evict: "true"
spec:
containers:
- name: pprofweb
image: us.gcr.io/gosignin-demo/pprofweb:20200120-1
resources:
requests:
memory: 64Mi
#ephemeral-storage: 256Mi
limits:
memory: 128Mi
#ephemeral-storage: 256Mi
volumeMounts:
- mountPath: /tmp
name: tmp
# defense in depth: read-only FS; run as nobody/nogroup
securityContext:
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 65534
runAsGroup: 65534
volumes:
- name: tmp
emptyDir:
# TODO: replace with resource request/limit?
sizeLimit: 256Mi
---
apiVersion: v1
kind: Service
metadata:
name: pprofweb
spec:
selector:
app: pprofweb
ports:
- name: http
protocol: TCP
port: 8080
targetPort: 8080