apiVersion: apps/v1
kind: Deployment
metadata:
  namespace: openshift-kube-scheduler-operator
  name: openshift-kube-scheduler-operator
  labels:
    app: openshift-kube-scheduler-operator
  annotations:
    include.release.openshift.io/self-managed-high-availability: "true"
    exclude.release.openshift.io/internal-openshift-hosted: "true"
    include.release.openshift.io/single-node-developer: "true"
spec:
  replicas: 1
  selector:
    matchLabels:
      app: openshift-kube-scheduler-operator
  template:
    metadata:
      name: openshift-kube-scheduler-operator
      labels:
        app: openshift-kube-scheduler-operator
    spec:
      serviceAccountName: openshift-kube-scheduler-operator
      containers:
      - name: kube-scheduler-operator-container
        image: docker.io/openshift/origin-cluster-kube-scheduler-operator:v4.0
        imagePullPolicy: IfNotPresent
        command: ["cluster-kube-scheduler-operator", "operator"]
        args:
        - "--config=/var/run/configmaps/config/config.yaml"
        - "-v=2"
        resources:
          requests:
            memory: 50Mi
        volumeMounts:
        - mountPath: /var/run/configmaps/config
          name: config
        - mountPath: /var/run/secrets/serving-cert
          name: serving-cert
        env:
        - name: IMAGE
          value: quay.io/openshift/origin-hyperkube:v4.0
        - name: OPERATOR_IMAGE
          value: docker.io/openshift/origin-cluster-kube-scheduler-operator:v4.0
        - name: OPERATOR_IMAGE_VERSION
          value: "0.0.1-snapshot"
        - name: OPERAND_IMAGE_VERSION
          value: "0.0.1-snapshot-kubernetes"
        - name: POD_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name          
        terminationMessagePolicy: FallbackToLogsOnError
      volumes:
      - name: serving-cert
        secret:
          secretName: kube-scheduler-operator-serving-cert
          optional: true
      - name: config
        configMap:
          name: openshift-kube-scheduler-operator-config
      nodeSelector:
        node-role.kubernetes.io/master: ""
      priorityClassName: system-cluster-critical
      tolerations:
      - key: "node-role.kubernetes.io/master"
        operator: "Exists"
        effect: "NoSchedule"
      - key: "node.kubernetes.io/unreachable"
        operator: "Exists"
        effect: "NoExecute"
        tolerationSeconds: 120
      - key: "node.kubernetes.io/not-ready"
        operator: "Exists"
        effect: "NoExecute"
        tolerationSeconds: 120
  
