Configuration
Configure the DevZero Scheduler plugins -- target utilization, overprovision limits, cost scoring, and checkpoint restore.
Configuration
The Scheduler is configured via a KubeSchedulerConfiguration stored in a ConfigMap (dz-scheduler-config in kube-system). Each plugin has its own arguments section.
Plugin Weights
Scoring plugins are weighted to control their influence on the final scheduling decision:
| Plugin | Weight | Purpose |
|---|---|---|
| TaintToleration | 6 | Kubernetes built-in |
| NodeAffinity | 5 | Kubernetes built-in |
| PodTopologySpread | 5 | Kubernetes built-in |
| InterPodAffinity | 5 | Kubernetes built-in |
| NodeCost | 4 | Cost optimization |
| TargetAllocated | 3 | Utilization targeting |
| LimitOverProvisionControl | 2 | Overprovision safety |
Higher weights mean the plugin has more influence. Kubernetes built-in plugins keep the highest weights to respect standard scheduling constraints first.
TargetAllocated
Controls the target resource utilization for node bin-packing.
| Field | Type | Range | Default | Description |
|---|---|---|---|---|
cpuAllocatedPercent | int | 1--100 | 80 | Target CPU allocation percentage |
memoryAllocatedPercent | int | 1--100 | 80 | Target memory allocation percentage |
pluginConfig:
- name: TargetAllocated
args:
cpuAllocatedPercent: 80
memoryAllocatedPercent: 80Setting both values to 99 maximizes bin-packing density. This is useful for batch workloads but may leave less headroom for burst traffic.
LimitOverProvisionControl
Prevents scheduling pods on nodes where total pod limits far exceed the node's capacity.
| Field | Type | Range | Default | Description |
|---|---|---|---|---|
cpuOverProvisionPenalizeRatio | int | >100 | 180 | CPU limits-to-capacity ratio above which nodes are penalized |
memoryOverProvisionPenalizeRatio | int | >100 | 180 | Memory limits-to-capacity ratio above which nodes are penalized |
pluginConfig:
- name: LimitOverProvisionControl
args:
cpuOverProvisionPenalizeRatio: 180
memoryOverProvisionPenalizeRatio: 180A ratio of 180 means nodes are penalized when the sum of all pod CPU (or memory) limits exceeds 1.8x the node's total capacity. Lower values are more conservative; higher values allow more overcommit.
NodeCost
Scores nodes based on pricing data from the DevZero control plane.
| Field | Type | Required | Description |
|---|---|---|---|
controlPlaneAddress | string | Yes | URL of the metrics collector (e.g., https://dakr.devzero.dev) |
controlPlaneToken | string | No | Direct bearer token (highest priority) |
tokenFromSecret | object | No | Reference to a Kubernetes Secret containing the token |
tokenFromConfigMap | object | No | Reference to a ConfigMap containing the token |
Token resolution priority: controlPlaneToken > tokenFromSecret > tokenFromConfigMap.
pluginConfig:
- name: NodeCost
args:
controlPlaneAddress: "https://dakr.devzero.dev"
tokenFromSecret:
name: "devzero-zxporter-token"
namespace: "kube-system"
key: "CLUSTER_TOKEN"At least one token source must be configured. The Scheduler validates this at startup and will fail to start if no token is available.
Token from Secret
tokenFromSecret:
name: "devzero-zxporter-token"
namespace: "kube-system"
key: "CLUSTER_TOKEN"Token from ConfigMap
tokenFromConfigMap:
name: "devzero-zxporter-env-config"
namespace: "devzero-zxporter"
key: "CLUSTER_TOKEN"CheckpointRestore
The CheckpointRestore plugin has no configuration. It operates based on annotations and labels:
| Resource | Key | Value | Purpose |
|---|---|---|---|
| Pod annotation | checkpoint-shim.io/try-restore | "true" | Marks a pod for checkpoint restore |
| Node label | dakr.devzero.io/checkpoint-node | "true" | Marks a node as checkpoint-capable |
Full Configuration Example
apiVersion: kubescheduler.config.k8s.io/v1
kind: KubeSchedulerConfiguration
profiles:
- schedulerName: dz-scheduler
plugins:
filter:
enabled:
- name: CheckpointRestore
preScore:
enabled:
- name: TaintToleration
weight: 6
- name: NodeAffinity
weight: 5
- name: PodTopologySpread
weight: 5
- name: InterPodAffinity
weight: 5
- name: NodeCost
weight: 4
- name: TargetAllocated
weight: 3
- name: LimitOverProvisionControl
weight: 2
score:
enabled:
- name: TaintToleration
weight: 6
- name: NodeAffinity
weight: 5
- name: PodTopologySpread
weight: 5
- name: InterPodAffinity
weight: 5
- name: NodeCost
weight: 4
- name: TargetAllocated
weight: 3
- name: LimitOverProvisionControl
weight: 2
disabled:
- name: NodeResourcesFit
- name: NodeResourcesBalancedAllocation
pluginConfig:
- name: TargetAllocated
args:
cpuAllocatedPercent: 80
memoryAllocatedPercent: 80
- name: LimitOverProvisionControl
args:
cpuOverProvisionPenalizeRatio: 180
memoryOverProvisionPenalizeRatio: 180
- name: NodeCost
args:
controlPlaneAddress: "https://dakr.devzero.dev"
tokenFromSecret:
name: "devzero-zxporter-token"
namespace: "kube-system"
key: "CLUSTER_TOKEN"
- name: PodTopologySpread
args:
defaultingType: "List"Deployment Resources
The Scheduler deployment defaults:
| Setting | Value |
|---|---|
| Replicas | 1 |
| CPU request | 200m |
| Node selector | kubernetes.io/os: linux |
| Priority class | system-cluster-critical |
| Health check | HTTPS on port 10259 |
| Tolerations | All taints |