apiVersion: apps/v1
kind: Deployment
metadata:
  namespace: openshift-kube-scheduler
  name: scheduler
  labels:
    app: openshift-kube-scheduler
    scheduler: "true"
spec:
  strategy:
    type: RollingUpdate
  selector:
    matchLabels:
      app: openshift-kube-scheduler
      scheduler: "true"
  template:
    metadata:
      name: openshift-kube-scheduler
      labels:
        app: openshift-kube-scheduler
        scheduler: "true"
    spec:
      affinity:
        podAntiAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
          - labelSelector:
              matchLabels:
                app: openshift-kube-scheduler
            namespaces:
            - openshift-kube-scheduler
            topologyKey: kubernetes.io/hostname
      serviceAccountName: openshift-kube-scheduler-sa
      containers:
      - name: scheduler
        image: ${IMAGE}
        imagePullPolicy: IfNotPresent
        command: ["hyperkube", "kube-scheduler"]
        args:
        - "--config=/var/run/configmaps/config/config.yaml"
        ports:
        - containerPort: 8443
        volumeMounts:
        - mountPath: /var/run/configmaps/config
          name: config
        livenessProbe:
          httpGet:
            path: /healthz
            port: 10251
          initialDelaySeconds: 15
          timeoutSeconds: 15
      nodeSelector:
        node-role.kubernetes.io/master: ""
      tolerations:
      - operator: Exists
      volumes:
      - name: config
        configMap:
          name: deployment-scheduler-config
