apiVersion: apps/v1
kind: Deployment
metadata:
  name: api-gateway{{ENV}}-deployment
  labels:
    app: api-gateway
spec:
  replicas: 1
  selector:
    matchLabels:
      app: api-gateway
  template:
    metadata:
      labels:
        app: api-gateway
    spec:
      containers:
        - name: api-gateway{{ENV}}
          image: gcr.io/obedt-dev/api-gateway:{{IMAGE_TAG}}
          envFrom:
            - configMapRef:
                name: api-gateway{{ENV}}-env
          readinessProbe:
            httpGet:
              path: /api/health
              port: 3000
            initialDelaySeconds: 5
            timeoutSeconds: 5
            periodSeconds: 6
            successThreshold: 2
            failureThreshold: 3
          resources:
            requests:
              cpu: 150m
              memory: 200Mi
            limits:
              cpu: 200m
              memory: 220Mi
          ports:
            - containerPort: 3000
