-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdeployment.yaml
More file actions
81 lines (81 loc) · 2.22 KB
/
Copy pathdeployment.yaml
File metadata and controls
81 lines (81 loc) · 2.22 KB
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
81
apiVersion: apps/v1
kind: Deployment
metadata:
name: presto
labels:
app.kubernetes.io/name: presto
spec:
replicas: 2
selector:
matchLabels:
app.kubernetes.io/name: presto
template:
metadata:
labels:
app.kubernetes.io/name: presto
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "8080"
prometheus.io/path: "/metrics"
spec:
securityContext:
runAsNonRoot: true
runAsUser: 65532
runAsGroup: 65532
fsGroup: 65532
seccompProfile:
type: RuntimeDefault
containers:
- name: presto
# Production deployments should pin an immutable tag (semver
# or git SHA) rather than "latest". When using "latest",
# imagePullPolicy must be Always so rolling restarts actually
# pull new images — IfNotPresent will silently keep stale
# cached layers on each node.
image: presto:latest
imagePullPolicy: Always
args: ["serve"]
ports:
- name: http
containerPort: 8080
protocol: TCP
envFrom:
- configMapRef:
name: presto-config
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 500m
memory: 512Mi
livenessProbe:
httpGet:
path: /healthz
port: http
initialDelaySeconds: 3
periodSeconds: 10
timeoutSeconds: 2
failureThreshold: 3
readinessProbe:
httpGet:
path: /readyz
port: http
initialDelaySeconds: 1
periodSeconds: 5
timeoutSeconds: 2
failureThreshold: 3
volumeMounts:
- name: library
mountPath: /var/lib/presto
readOnly: true
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop: ["ALL"]
volumes:
- name: library
persistentVolumeClaim:
claimName: presto-library
readOnly: true