apiVersion: apps/v1
kind: Deployment
metadata:
  name: webui
  namespace: default
spec:
  selector:
    matchLabels:
      app: webui
  template:
    metadata:
      labels:
        app: webui
        contrail_manager: webui
    spec:
      containers:
      - image: docker.io/michaelhenkel/contrail-controller-webui-web:5.2.0-dev1
        env:
        - name: WEBUI_SSL_KEY_FILE
          value: /etc/contrail/webui_ssl/cs-key.pem
        - name: WEBUI_SSL_CERT_FILE
          value: /etc/contrail/webui_ssl/cs-cert.pem
        - name: POD_IP
          valueFrom:
            fieldRef:
              fieldPath: status.podIP
        imagePullPolicy: IfNotPresent
        name: webuiweb
        volumeMounts:
        - mountPath: /var/log/contrail
          name: webui-logs
      - image: docker.io/michaelhenkel/contrail-controller-webui-job:5.2.0-dev1
        env:
        - name: WEBUI_SSL_KEY_FILE
          value: /etc/contrail/webui_ssl/cs-key.pem
        - name: WEBUI_SSL_CERT_FILE
          value: /etc/contrail/webui_ssl/cs-cert.pem
        - name: POD_IP
          valueFrom:
            fieldRef:
              fieldPath: status.podIP
        imagePullPolicy: IfNotPresent
        name: webuijob
        volumeMounts:
        - mountPath: /var/log/contrail
          name: webui-logs
      - image: docker.io/michaelhenkel/contrail-external-redis:5.2.0-dev1
        env:
        - name: POD_IP
          valueFrom:
            fieldRef:
              fieldPath: status.podIP
        imagePullPolicy: IfNotPresent
        name: redis
        volumeMounts:
        - mountPath: /var/log/contrail
          name: webui-logs
        - mountPath: /var/lib/redis
          name: webui-data
      dnsPolicy: ClusterFirst
      hostNetwork: true
      nodeSelector:
        node-role.kubernetes.io/master: ""
      restartPolicy: Always
      tolerations:
      - effect: NoSchedule
        operator: Exists
      - effect: NoExecute
        operator: Exists
      volumes:
      - hostPath:
          path: /var/lib/contrail/webui
          type: ""
        name: webui-data
      - hostPath:
          path: /var/log/contrail/webui
          type: ""
        name: webui-logs
      - hostPath:
          path: /usr/local/bin
          type: ""
        name: host-usr-local-bin
      - downwardAPI:
          defaultMode: 420
          items:
          - fieldRef:
              apiVersion: v1
              fieldPath: metadata.labels
            path: pod_labels
          - fieldRef:
              apiVersion: v1
              fieldPath: metadata.labels
            path: pod_labelsx
        name: status