---
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app.kubernetes.io/name: v1-api-apply
  name: v1-api-apply
  namespace: default
spec:
  selector:
    matchLabels:
      app.kubernetes.io/name: v1-api-apply
  template:
    metadata:
      labels:
        app.kubernetes.io/name: v1-api-apply
    spec:
      automountServiceAccountToken: false
      containers:
      - name: rfgames-apply-api-server
        image: progamesigner/rfgames-apply-api-server:latest
        env:
        - name: APPLY_WEBHOOK_URL
          valueFrom:
            secretKeyRef:
              key: APPLY_DISCORD_WEBHOOK
              name: cluster-configs
        ports:
        - name: http
          containerPort: 8080
        livenessProbe:
          tcpSocket:
            port: http
        resources:
          limits:
            cpu: 100m
            memory: 64Mi
          requests:
            cpu: 10m
            memory: 32Mi
      securityContext:
        runAsNonRoot: true
        runAsUser: 999
      serviceAccountName: rfgames-services
