apiVersion: apps/v1
kind: Deployment
metadata:
  name: deployment-itmat-api
  namespace: itmat
  labels:
    app: itmat-api
spec:
  replicas: 2
  selector:
    matchLabels:
      app: itmat-api
  template:
    metadata:
      labels:
        app: itmat-api
    spec:
      volumes:
      - name: config
        secret:
          secretName: itmat-api-config
      containers:
      - name: itmat-api
        image: souchon/itmat-api
        volumeMounts:
        - name: config
          mountPath: "/itmat-API/dist/config"
          readOnly: true
        ports:
        - containerPort: 80
        livenessProbe:
          httpGet:
            path: /healthCheck
            port: 80
            httpHeaders:
            - name: X-Custom-Header
              value: Awesome
          initialDelaySeconds: 16
          periodSeconds: 3