apiVersion: apps/v1
kind: Deployment
metadata:
  name: rest-api
  labels:
    app: rest-api
spec:
  revisionHistoryLimit: 3
  minReadySeconds: 10
  replicas: 2
  selector:
    matchLabels:
      app: rest-api
    
  template:
    metadata:
      labels:
        app: rest-api
    spec:
      containers:
        - name: rest-api
          image: europe-docker.pkg.dev/prod-rest/api-rest/textify-api:latest
          ports:
            - name: rest
              containerPort: 8080
          resources:
            requests:
              cpu: 200m
              memory: 250Mi
            limits:
              cpu: 400m
              memory: 300Mi
          envFrom:
            - configMapRef:
                name: pg-config