apiVersion: apps/v1
kind: Deployment
metadata:
  name: api
  labels:
    app: api
  namespace: webportal-stg
spec:
  replicas: 1
  selector:
    matchLabels:
      app: api
  template:
    metadata:
      labels:
        app: api
    spec:
      containers:
        - name: api
          image: registry.triple-a-it.be/web-portal/api:v1.16.0
          ports:
            - containerPort: 80
          env:
            - name: ASPNETCORE_ENVIRONMENT
              value: Staging
            - name: GOOGLE_APPLICATION_CREDENTIALS
              value: /creds/key.json
          resources:
            requests:
              memory: 100Mi
              cpu: 100m
            limits:
              memory: 500Mi
              cpu: 200m
          volumeMounts:
            - mountPath: /creds
              name: f-key
              readOnly: true
      imagePullSecrets:
        - name: registry
      volumes:
        - secret:
            secretName: firebase-key
          name: f-key
