apiVersion: apps/v1
kind: Deployment
metadata:
  name: yata-pod
spec:
  replicas: 1
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 50%
      maxSurge: 1
  selector:
    matchLabels:
      app: yata-pod
  template:
    metadata:
      labels:
        app: yata-pod
    spec:
      containers:
      - name: yata-app
        image: europe-central2-docker.pkg.dev/yata-329822/yata/yata
        ports:
          - containerPort: 3000
        imagePullPolicy: Always
        resources: {}
        readinessProbe:
          tcpSocket:
            port: 3000
          periodSeconds: 5
        env:
          - name: APP_ENV
            value: production
          - name: APP_HOST
            value: yata42.online
          - name: APP_PORT
            value: "80"
          - name: APP_PROTOCOL
            value: http
          - name: POSTGRES_HOST
            value: yata-db-0.yata-db-svc
          - name: POSTGRES_USER
            valueFrom:
              secretKeyRef:
                name: pguser
                key: value
          - name: POSTGRES_PASSWORD
            valueFrom:
              secretKeyRef:
                name: pguser
                key: value
