apiVersion: apps/v1
kind: Deployment
metadata:
  name: kubemanager
  namespace: default
spec:
  selector:
    matchLabels:
      app: kubemanager
  template:
    metadata:
      labels:
        app: kubemanager
        contrail_manager: kubemanager
    spec:
      containers:
      - image: docker.io/michaelhenkel/contrail-kubernetes-kube-manager:5.2.0-dev1
        env:
        - name: POD_IP
          valueFrom:
            fieldRef:
              fieldPath: status.podIP
        imagePullPolicy: IfNotPresent
        name: kubemanager
        volumeMounts:
        - mountPath: /var/log/contrail
          name: kubemanager-logs
      dnsPolicy: ClusterFirst
      hostNetwork: true
      initContainers:
      - command:
        - sh
        - -c
        - until grep ready /tmp/podinfo/pod_labels > /dev/null 2>&1; do sleep 1; done
        image: busybox
        imagePullPolicy: IfNotPresent
        name: init
        volumeMounts:
        - mountPath: /tmp/podinfo
          name: status
      nodeSelector:
        node-role.kubernetes.io/master: ""
      serviceAccount: contrail-service-account-kubemanager
      serviceAccountName: contrail-service-account-kubemanager
      tolerations:
      - effect: NoSchedule
        operator: Exists
      - effect: NoExecute
        operator: Exists
      volumes:
      - hostPath:
          path: /var/log/contrail/kubemanager
          type: ""
        name: kubemanager-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