---
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app.kubernetes.io/name: default-backend
  name: default-backend
  namespace: default
spec:
  selector:
    matchLabels:
      app.kubernetes.io/name: default-backend
  template:
    metadata:
      annotations:
        prometheus.io/path: /metrics
        prometheus.io/port: '9402'
        prometheus.io/scrape: 'true'
      labels:
        app.kubernetes.io/name: default-backend
    spec:
      automountServiceAccountToken: false
      containers:
      - name: default-backend
        image: progamesigner/rfgames-default-backend:latest
        ports:
        - name: http
          containerPort: 8080
        - name: prometheus
          containerPort: 9402
        livenessProbe:
          httpGet:
            path: /healthz
            port: prometheus
        resources:
          limits:
            cpu: 100m
            memory: 32Mi
          requests:
            cpu: 10m
            memory: 16Mi
      securityContext:
        runAsNonRoot: true
        runAsUser: 999
      serviceAccountName: rfgames-services
