apiVersion: v1
kind: ConfigMap
metadata:
  name: topo-aware-scheduler-config
  namespace: kube-system
data:
  scheduler-config.yaml: |
      apiVersion: kubescheduler.config.k8s.io/v1beta1
      kind: KubeSchedulerConfiguration
      leaderElection:
        leaderElect: false
      clientConnection:
        kubeconfig: "/etc/kubernetes/scheduler.conf"
      profiles:
        - schedulerName: topo-aware-scheduler
          plugins:
            filter:
              enabled:
                - name: NodeResourceTopologyMatch
            score:
              enabled:
                - name: NodeResourceTopologyMatch
          # optional plugin configs
          pluginConfig:
          - name: NodeResourceTopologyMatch
            args:
              kubeconfigpath: "/etc/kubernetes/scheduler.conf"
              namespaces:
              - "default"
              scoringStrategy:
                type: "LeastAllocated"
