apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "kube-scheduler.fullname" . }}-config
  labels:
    {{- include "kube-scheduler.labels" . | nindent 4 }}
data:
  kube-scheduler-config.yaml: |
    apiVersion: kubescheduler.config.k8s.io/v1
    kind: KubeSchedulerConfiguration
    profiles:
      - pluginConfig:
          - args:
              apiVersion: kubescheduler.config.k8s.io/v1
              kind: NodeResourcesFitArgs
              scoringStrategy:
                  resources:
                      - name: cpu
                        weight: 1
                      - name: memory
                        weight: 1
                  type: MostAllocated
            name: NodeResourcesFit
        plugins:
          score:
              enabled:
                  - name: NodeResourcesFit
                    weight: 1
              disabled:
                  - name: "*"
          multiPoint:
              enabled:
                  - name: NodeResourcesFit
                    weight: 1
        schedulerName: {{ include "kube-scheduler.fullname" . }}
    leaderElection:
      leaderElect: true
      resourceNamespace: {{ .Release.Namespace }}
      resourceName: {{ include "kube-scheduler.fullname" . }}