apiVersion: v1
kind: ConfigMap
metadata:
  name: network-aware-scheduler-config
  namespace: kube-system
data:
  scheduler-config.yaml: |
      apiVersion: kubescheduler.config.k8s.io/v1beta3
      kind: KubeSchedulerConfiguration
      leaderElection:
        leaderElect: false
      clientConnection:
        kubeconfig: "/etc/kubernetes/scheduler.conf"
      profiles:
        - schedulerName: network-aware-scheduler
          plugins:
            queueSort:
              enabled:
                - name: TopologicalSort
              disabled:
                - name: "*"
            preFilter:
              enabled:
                - name: NetworkOverhead
            filter:
              enabled:
                - name: NetworkOverhead
            score:
              disabled: # Preferably avoid the combination of NodeResourcesFit with NetworkOverhead
                - name: NodeResourcesFit
              enabled: # A higher weight is given to NetworkOverhead to favor allocation schemes with lower latency.
                - name: NetworkOverhead
                  weight: 5
          pluginConfig:
            - name: TopologicalSort
              args:
                namespaces:
                  - "default"
            - name: NetworkOverhead
              args:
                namespaces:
                  - "default"
                weightsName: "UserDefined" # or "NetperfCosts"
                networkTopologyName: "net-topology-test"
