--- apiVersion: v1 kind: Namespace metadata: name: surf # ----------------------------------------------------------------------- # VOLUMES # ----------------------------------------------------------------------- --- kind: PersistentVolumeClaim apiVersion: v1 metadata: name: cssds-data namespace: surf spec: storageClassName: fast accessModes: - ReadWriteOnce resources: requests: storage: 50Gi --- # ----------------------------------------------------------------------- # DEPLOYMENT # ----------------------------------------------------------------------- apiVersion: apps/v1 kind: Deployment metadata: name: megastructure-surf namespace: surf spec: replicas: 1 selector: matchLabels: app: megastructure-surf template: metadata: labels: app: megastructure-surf spec: initContainers: - name: fix-permissions image: busybox command: ['sh', '-c', 'chown -R 1000:1000 /home/steam/cssds'] volumeMounts: - name: cssds mountPath: /home/steam/cssds containers: - name: megastructure-surf image: registry.ntwl.xyz/megastructure-surf imagePullPolicy: Always command: ["sleep", "100000000"] ports: - containerPort: 27015 - containerPort: 27005 envFrom: - secretRef: name: surf volumeMounts: - name: cssds mountPath: /home/steam/cssds volumes: - name: cssds persistentVolumeClaim: claimName: cssds-data --- # ----------------------------------------------------------------------- # SERVICES # ----------------------------------------------------------------------- apiVersion: v1 kind: Service metadata: name: megastructure-surf namespace: surf spec: type: NodePort selector: app: megastructure-surf ports: - name: game-port protocol: UDP port: 27015 targetPort: 27015 nodePort: 32015 - name: client-port protocol: UDP port: 27005 targetPort: 27005 nodePort: 32005 ---