apiVersion: apps/v1
kind: Deployment
metadata:
  name: cequel-space-app
  labels:
    component: cequel-space-app
spec:
  replicas: 1
  selector:
    matchLabels:
      component: cequel-space-app
  strategy:
    type: RollingUpdate
  template:
    metadata:
      labels:
        component: cequel-space-app
    spec:
      containers:
      - name: cequel-space-app
        image: "{{ .Values.images.app }}"
        imagePullPolicy: Always
        livenessProbe:
          exec:
            command:
            - /bin/sh
            - -c
            - "[ -f /tmp/nginx.pid ] && ps -A | grep nginx"
          initialDelaySeconds: 10
          periodSeconds: 10
        #readinessProbe:
        #  httpGet:
        #    scheme: HTTP
        #    path: /index.html
        #    port: 80
        #  initialDelaySeconds: 10
        #  periodSeconds: 10
        ports:
        - containerPort: 80
        env:
        - name: OAuth__Authority
          value: "{{ .Values.authentication.authority }}"
        - name: OAuth__ClientId
          value: "{{ .Values.authentication.clientId }}"
        - name: OAuth__ResponseType
          value: "{{ .Values.authentication.responseType }}"
