apiVersion: apps/v1
kind: Deployment

metadata:
  name: lobby
  namespace: minecraft

  labels:
    app: lobby

spec:
  selector:
    matchLabels:
      app: lobby
  template:
    metadata:
      labels:
        app: lobby
    spec:
      nodeSelector:
        kubernetes.io/os: linux
        kubernetes.io/arch: amd64
      volumes:
        - name: lobby
          hostPath:
            path: /media/raid1x2a/kube-storage/minecraft/lobby
      containers:
        - name: lobby
          image: itzg/minecraft-server
          ports:
            - containerPort: 25565
              protocol: TCP
          volumeMounts:
            - mountPath: /data
              name: lobby
          env:
            - name: EULA
              value: "TRUE"
            - name: TYPE
              value: SPIGOT
            - name: VERSION
              value: "1.16.4"
          resources:
            requests:
              cpu: 250m
              memory: 1Gi
            limits:
              cpu: 800m
              memory: 1536Mi
