---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: ui
  labels:
    app: ui
spec:
  selector:
    matchLabels:
      app: ui
  template:
    metadata:
      name: ui
      labels:
        app: ui
    spec:
      containers:
        - name: ui
          image: quay.io/lstocchi/react-web-app:v1
          env:
            - name: GHE_URL
              valueFrom:
                configMapKeyRef:
                  name: ui
                  key: GHE_URL
            - name: API_URL
              valueFrom:
                configMapKeyRef:
                  name: ui
                  key: API_URL
            - name: GH_CLIENT_ID
              valueFrom:
                configMapKeyRef:
                  name: ui
                  key: GH_CLIENT_ID
            - name: API_VERSION
              valueFrom:
                configMapKeyRef:
                  name: ui
                  key: API_VERSION
          ports:
            - containerPort: 8080
              protocol: TCP
          readinessProbe:
            failureThreshold: 3
            httpGet:
              path: /
              port: 8080
              scheme: HTTP
            periodSeconds: 5
            successThreshold: 1
            timeoutSeconds: 1
          livenessProbe:
            failureThreshold: 3
            httpGet:
              path: /
              port: 8080
              scheme: HTTP
            periodSeconds: 5
            successThreshold: 1
            timeoutSeconds: 1
