apiVersion: apps/v1
kind: Deployment
metadata:
  name: game-server
spec:
  replicas: 1
  selector:
    matchLabels:
      app: game-server
  template:
    metadata:
      labels:
        app: game-server
    spec:
      containers:
        - name: game-server-app
          image: gcr.io/PROJECT_ID/IMAGE:TAG
          imagePullPolicy: Always
          ports:
            - containerPort: 3000
          volumeMounts:
            - name: configmap-volume
              mountPath: /app/config
          readinessProbe:
            tcpSocket:
              port: 3000
            initialDelaySeconds: 5
            periodSeconds: 15
          livenessProbe:
            tcpSocket:
              port: 3000
            initialDelaySeconds: 5
            periodSeconds: 15
      volumes:
        - name: configmap-volume
          configMap:
            name: game-server-config
