apiVersion: v1
kind: ReplicationController
metadata:
  name: deis-workflow
  namespace: deis
  labels:
    heritage: deis
spec:
  replicas: 1
  selector:
    name: deis-workflow
  template:
    metadata:
      labels:
        name: deis-workflow
    spec:
      containers:
        - name: deis-workflow
          image: quay.io/deisci/workflow:v2-beta
          readinessProbe:
            httpGet:
              path: /health-check
              port: 8000
            initialDelaySeconds: 30
            timeoutSeconds: 1
          livenessProbe:
            httpGet:
              path: /health-check
              port: 8000
            initialDelaySeconds: 30
            timeoutSeconds: 1
          imagePullPolicy: Always
          env:
            - name: DEBUG
              value: "true"
            - name: DEIS_DATABASE_USER
              value: deis
            - name: DEIS_DATABASE_PASSWORD
              value: changeme123
          ports:
            - containerPort: 8000
              name: http
          volumeMounts:
            - mountPath: /var/run/docker.sock
              name: docker-socket
            - name: minio-user
              mountPath: /var/run/secrets/deis/minio/user
              readOnly: true
            - name: builder-key-auth
              mountPath: /var/run/secrets/api/builder/auth
              readOnly: true
            - name: django-secret-key
              mountPath: /var/run/secrets/api/django
              readOnly: true
      volumes:
        - name: docker-socket
          hostPath:
            path: /var/run/docker.sock
        - name: minio-user
          secret:
            secretName: minio-user
        - name: django-secret-key
          secret:
            secretName: django-secret-key
        - name: builder-key-auth
          secret:
            secretName: builder-key-auth

