github.com/kubewharf/katalyst-core@v0.5.3/examples/scheduler-policy-custom.yaml (about)

     1  # Copyright 2022 The Katalyst Authors.
     2  #
     3  # Licensed under the Apache License, Version 2.0 (the "License");
     4  # you may not use this file except in compliance with the License.
     5  # You may obtain a copy of the License at
     6  #
     7  #     http://www.apache.org/licenses/LICENSE-2.0
     8  #
     9  # Unless required by applicable law or agreed to in writing, software
    10  # distributed under the License is distributed on an "AS IS" BASIS,
    11  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  # See the License for the specific language governing permissions and
    13  # limitations under the License.
    14  
    15  apiVersion: v1
    16  kind: ConfigMap
    17  metadata:
    18    name: katalyst-scheduler-config
    19    namespace: katalyst-system
    20  data:
    21    scheduler-config.yaml: |-
    22      apiVersion: kubescheduler.config.k8s.io/v1beta3
    23      kind: KubeSchedulerConfiguration
    24      leaderElection:
    25        leaderElect: true
    26        resourceLock: leases
    27        resourceName: katalyst-scheduler
    28        resourceNamespace: katalyst-system
    29      profiles:
    30        - schedulerName: katalyst-scheduler
    31          plugins:
    32            preFilter:
    33              enabled:
    34                - name: QoSAwareNodeResourcesFit
    35            filter:
    36              enabled:
    37                - name: QoSAwareNodeResourcesFit
    38              disabled:
    39                - name: NodeResourcesFit
    40            score:
    41              enabled:
    42                - name: QoSAwareNodeResourcesFit
    43                  weight: 15
    44                - name: QoSAwareNodeResourcesBalancedAllocation
    45                  weight: 1
    46              disabled:
    47                - name: NodeResourcesFit
    48                - name: NodeResourcesBalancedAllocation
    49            reserve:
    50              enabled:
    51                - name: QoSAwareNodeResourcesFit
    52          pluginConfig:
    53            - name: NodeResourcesFit
    54              args:
    55                ignoredResourceGroups:
    56                  - katalyst.kubewharf.io
    57            - name: QoSAwareNodeResourcesFit
    58              args:
    59                scoringStrategy:
    60                  type: RequestedToCapacityRatio
    61                  requestedToCapacityRatio:
    62                    shape:
    63                      - utilization: 0
    64                        score: 0
    65                      - utilization: 100
    66                        score: 10
    67                  reclaimedRequestedToCapacityRatio:
    68                    shape:
    69                      - utilization: 0
    70                        score: 0
    71                      - utilization: 100
    72                        score: 10
    73                  resources:
    74                    - name: cpu
    75                      weight: 1
    76                    - name: memory
    77                      weight: 1
    78                  reclaimedResources:
    79                    - name: "katalyst.kubewharf.io/reclaimed_millicpu"
    80                      weight: 1
    81                    - name: "katalyst.kubewharf.io/reclaimed_memory"
    82                      weight: 1
    83            - name: QoSAwareNodeResourcesBalancedAllocation
    84              args:
    85                resources:
    86                  - name: cpu
    87                    weight: 1
    88                  - name: memory
    89                    weight: 1
    90                reclaimedResources:
    91                  - name: "katalyst.kubewharf.io/reclaimed_millicpu"
    92                    weight: 1
    93                  - name: "katalyst.kubewharf.io/reclaimed_memory"
    94                    weight: 1