apiVersion: apps/v1
kind: Deployment
metadata:
  name: "secondary-scheduler"
  namespace: placeholder
  labels:
    app: "secondary-scheduler"
spec:
  replicas: 1
  selector:
    matchLabels:
      app: "secondary-scheduler"
  template:
    metadata:
      annotations:
        target.workload.openshift.io/management: '{"effect": "PreferredDuringScheduling"}'
      labels:
        app: "secondary-scheduler"
    spec:
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
              - matchExpressions:
                  - key: node-role.kubernetes.io/master
                    operator: Exists
      volumes:
        - name: "etckubernetes"
          configMap:
            name: ${CONFIGMAP}
      restartPolicy: "Always"
      containers:
        - name: "secondary-scheduler"
          image: ${IMAGE}
          resources:
            requests:
              cpu: "100m"
              memory: "500Mi"
          command:
            - /bin/kube-scheduler
          args:
            - --config=/etc/kubernetes/config.yaml
          volumeMounts:
            - mountPath: "/etc/kubernetes"
              name: "etckubernetes"
      serviceAccountName: "secondary-scheduler"
      tolerations:
        - effect: NoSchedule
          key: node-role.kubernetes.io/master

