resources:
  requests:
    cpu: 1
    memory: 500Mi
  limits:
    memory: 7Gi
    cpu: 2500m

minecraftServer:
  eula: "TRUE"
  type: "PAPER"
  version: "1.21.11"
  difficulty: hard
  motd: "A Minecraft Server."
  memory: 7G
  rcon:
    enabled: true
    withGeneratedPassword: false
    port: 25575
    existingSecret: rcon-credentials
    secretKey: rcon-password

nodeSelector:
  kubernetes.io/hostname: kube

persistence:
  dataDir:
    enabled: true
    Size: 4Gi

sidecarContainers:
  - name: backup
    image: itzg/mc-backup
    imagePullPolicy: Always
    env:
      - name: RCON_PASSWORD
        valueFrom:
          secretKeyRef:
            name: rcon-credentials
            key: rcon-password
      - name: BACKUP_METHOD
        value: tar
      - name: BACKUP_INTERVAL
        value: "15m"
      - name: INITIAL_DELAY
        value: "5m"
      - name: PRUNE_BACKUPS_COUNT
        value: "15"
      - name: DEST_DIR
        value: /mnt/backups
      - name: LINK_LATEST
        value: "true"
      - name: TAR_COMPRESS_METHOD
        value: gzip
      - name: BACKUP_NAME
        value: minecraft-main
      - name: TZ
        value: "America/Vancouver"
    volumeMounts:
      - name: datadir
        mountPath: /data
        readOnly: true
      - name: backups
        mountPath: /mnt/backups

extraVolumes:
  - volumeMounts:
      - name: backups
        mountPath: /mnt/backups
    volumes:
      - name: backups
        nfs:
          server: 192.168.27.2
          path: /backup/minecraft
