-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdeployment.yaml
More file actions
59 lines (59 loc) · 1.81 KB
/
Copy pathdeployment.yaml
File metadata and controls
59 lines (59 loc) · 1.81 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
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "papermc-server.name" . }}
namespace: {{ .Values.namespace }}
spec:
selector:
matchLabels:
app: {{ include "papermc-server.name" . }}
template:
metadata:
labels:
app: {{ include "papermc-server.name" . }}
spec:
automountServiceAccountToken: false
securityContext:
runAsGroup: 0
runAsUser: 2
containers:
- name: {{ include "papermc-server.name" . }}
image: {{ include "papermc-server.image" . }}
stdin: true
tty: true
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop: [ 'ALL' ]
{{- with .Values.container.resources }}
resources:
{{- with .requests }}
requests:
ephemeral-storage: {{ .ephemeralStorage }}
cpu: {{ .cpu }}
memory: {{ .memory }}
{{- end }}
{{- with .limits }}
limits:
ephemeral-storage: {{ .ephemeralStorage }}
cpu: {{ .cpu }}
memory: {{ .memory }}
{{- end }}
{{- end }}
ports:
- containerPort: 25565
env:
- name: EULA
value: {{ .Values.eula | squote }}
{{- with .Values.healthcheck }}
livenessProbe:
exec:
command: ["mc-monitor", "status"]
periodSeconds: {{ .checkInterval }}
failureThreshold: {{ div .failureThreshold.liveness .checkInterval }}
startupProbe:
exec:
command: ["mc-monitor", "status"]
periodSeconds: {{ .checkInterval }}
failureThreshold: {{ div .failureThreshold.startup .checkInterval }}
{{- end }}