apiVersion: apps/v1
kind: Deployment
metadata:
  name: gameplay
  namespace: minecraft
spec:
  replicas: 1
  selector:
    matchLabels:
      app: gameplay
  template:
    metadata:
      labels:
        app: gameplay
        minecraft.infumia.net/default: "true"
        minecraft.infumia.net/enabled: "true"
    spec:
      serviceAccountName: minecraft-api
      containers:
        - name: gameplay
          image: portlek/gameplay:1.0.0
          imagePullPolicy: Never
          ports:
            - containerPort: 25565
              name: gameplay
      affinity:
        podAntiAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
            - weight: 1
              podAffinityTerm:
                topologyKey: kubernetes.io/hostname
                labelSelector:
                  matchLabels:
                    app: gameplay
