-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.yaml
71 lines (71 loc) · 1.94 KB
/
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
61
62
63
64
65
66
67
68
69
70
71
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: server
namespace: ttt
spec:
serviceName: ttt-server
replicas: 1
selector:
matchLabels:
app: server
template:
metadata:
labels:
app: server
spec:
securityContext:
fsGroup: 10000 # steam
initContainers:
- name: fix-permissions
image: jusito/docker-ttt:gmod_ttt_debian
securityContext:
runAsUser: 0
command: [ 'sh', '-c', 'chown -R steam:steam /home/steam/serverfiles' ]
volumeMounts:
- name: data-volume
mountPath: /home/steam/serverfiles
containers:
- name: ttt-server
image: jusito/docker-ttt:gmod_ttt_debian
securityContext:
runAsUser: 10000
runAsGroup: 10000
ports:
- containerPort: 27015
protocol: TCP
- containerPort: 27015
protocol: UDP
env:
- name: SERVER_PORT
value: "27015"
- name: INSTALL_CSS
value: "true"
- name: WORKSHOP_COLLECTION_ID
value: "2176094350"
- name: SERVER_NAME
value: "My Server"
- name: SERVER_PASSWORD
valueFrom:
secretKeyRef:
name: server-secret
key: server-password
- name: SERVER_DEFAULT_MAP
value: "ttt_waterworld"
- name: SERVER_RCON_PASSWORD
valueFrom:
secretKeyRef:
name: server-secret
key: rcon-password
volumeMounts:
- name: data-volume
mountPath: /home/steam/serverfiles
volumeClaimTemplates:
- metadata:
name: data-volume
spec:
accessModes: [ ReadWriteOnce ]
storageClassName: ttt-storage
resources:
requests:
storage: 10Gi