apiVersion: apps/v1
kind: Deployment
metadata:
  name: contrail-operator
  namespace: contrail
spec:
  replicas: 1
  selector:
    matchLabels:
      name: contrail-operator
  template:
    metadata:
      labels:
        name: contrail-operator
    spec:
      serviceAccountName: contrail-operator
      hostNetwork: true
      tolerations:
        - key: node.kubernetes.io/not-ready
          operator: "Exists"
          effect: "NoSchedule"
      initContainers:
        - name: init
          # Replace this with the built image name
          image: registry:5000/contrail-operator/engprod-269421/crdsloader:master.latest
          imagePullPolicy: Always
      containers:
        - name: contrail-operator
          # Replace this with the built image name
          image: registry:5000/contrail-operator/engprod-269421/contrail-operator:master.latest
          imagePullPolicy: Always
          env:
            - name: WATCH_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: OPERATOR_NAME
              value: "contrail-operator"
