apiVersion: apps/v1
kind: Deployment
metadata:
  name: nuedigitalmlapi
  labels:
    app: nuedigitalmlapi
  # see https://docs.openshift.com/container-platform/3.11/dev_guide/managing_images.html#image-stream-kubernetes-resources
  annotations:
    image.openshift.io/triggers: |
      [{
        "from":{
          "kind":"ImageStreamTag",
          "name":"nuedigitalmlapi:latest"
          },
        "fieldPath": "spec.template.spec.containers[?(@.name='nuedigitalmlapi')].image"
      }]
spec:
  replicas: 2
  selector:
    matchLabels:
      app: nuedigitalmlapi
  template:
    metadata:
      labels:
        app: nuedigitalmlapi
    spec:
      containers:
      - name: nuedigitalmlapi
        imagePullPolicy: Always 
        image: docker-registry.default.svc:5000/daan-eval/nuedigitalmlapi:latest
        volumeMounts:
        - name: config-volume
          mountPath: /etc/config
        resources:
          limits:
            memory: 400Mi
            cpu: 200m
        ports:
          - containerPort: 8080
            protocol: TCP
            name: nuedigitalmlapi
        livenessProbe:
          httpGet:
            path: /
            port: 8080
          timeoutSeconds: 1
          periodSeconds: 60
        readinessProbe:
          httpGet:
            path: /
            port: 8080
          initialDelaySeconds: 5
          timeoutSeconds: 1
          periodSeconds: 5
      volumes:
      - name: config-volume
        configMap:
          name: neudigitalkiapi-gunicorn
          