apiVersion: apps/v1
kind: Deployment
metadata:
  name: api
  labels:
    app: api
  namespace: webportal-prod
spec:
  replicas: 1
  selector:
    matchLabels:
      app: api
  template:
    metadata:
      labels:
        app: api
      annotations:
        prometheus.io/scrape: "true"
        prometheus.io/port: "80"
        prometheus.io/path: /metrics
        prometheus.io/interval: 5s
    spec:
      containers:
        - name: api
          image: registry.triple-a-it.be/web-portal/api:v1.16.0
          ports:
            - containerPort: 80
          env:
            - name: ASPNETCORE_ENVIRONMENT
              value: Prod
            - 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
