apiVersion: apps/v1
kind: Deployment
metadata:
  name: prd-carrinhodigital-webapi
  labels:
    app: carrinhodigital-webapi
    env: prd
spec:
  selector:
    matchLabels:
      app: carrinhodigital-webapi
      env: prd
  template:
    metadata:
      labels:
        app: carrinhodigital-webapi
        env: prd
    spec:
      containers:
        - name: prd-carrinhodigital-webapi
          image: "%%prd_docker_image%%"
          imagePullPolicy: Always
          resources:
            requests:
              cpu: "200m"
              memory: "500M"
            limits:
              cpu: "300m"
              memory: "1G"
          ports:
            - containerPort: 8080
          envFrom:
            - configMapRef:
                name: prd-carrinhodigital-configmap
            - secretRef:
                name: prd-carrinhodigital-secrets
          volumeMounts:
            - name: gcp-credentials
              mountPath: /etc/config
      imagePullSecrets:
        - name: gcr-docker-image-credentials
      volumes:
        - name: gcp-credentials
          configMap:
            name: prd-gcp-configmap
            items:
              - key: application-credentials
                path: google_application_credentials.json
