From 380065217c1db99a4436f00c2934fd2b79973b77 Mon Sep 17 00:00:00 2001 From: RainbowMango Date: Mon, 24 Feb 2025 11:37:00 +0800 Subject: [PATCH] Introduce PriorityBasedScheduling feature gate and enable it in develpment enviornment Signed-off-by: RainbowMango --- artifacts/deploy/karmada-controller-manager.yaml | 2 +- artifacts/deploy/karmada-scheduler.yaml | 1 + pkg/features/features.go | 10 ++++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/artifacts/deploy/karmada-controller-manager.yaml b/artifacts/deploy/karmada-controller-manager.yaml index 3bf6bb635..ae56dedae 100644 --- a/artifacts/deploy/karmada-controller-manager.yaml +++ b/artifacts/deploy/karmada-controller-manager.yaml @@ -33,7 +33,7 @@ spec: - --cluster-status-update-frequency=10s - --failover-eviction-timeout=30s - --controllers=*,hpaScaleTargetMarker,deploymentReplicasSyncer - - --feature-gates=Failover=true,PropagationPolicyPreemption=true,MultiClusterService=true,StatefulFailoverInjection=true + - --feature-gates=AllAlpha=true,AllBeta=true - --health-probe-bind-address=0.0.0.0:10357 - --v=4 livenessProbe: diff --git a/artifacts/deploy/karmada-scheduler.yaml b/artifacts/deploy/karmada-scheduler.yaml index 24b076074..4f34263b9 100644 --- a/artifacts/deploy/karmada-scheduler.yaml +++ b/artifacts/deploy/karmada-scheduler.yaml @@ -48,6 +48,7 @@ spec: - --scheduler-estimator-ca-file=/etc/karmada/pki/scheduler-estimator-client/ca.crt - --scheduler-estimator-cert-file=/etc/karmada/pki/scheduler-estimator-client/tls.crt - --scheduler-estimator-key-file=/etc/karmada/pki/scheduler-estimator-client/tls.key + - --feature-gates=AllAlpha=true,AllBeta=true - --v=4 volumeMounts: - name: karmada-config diff --git a/pkg/features/features.go b/pkg/features/features.go index 84e9f513d..17c108039 100644 --- a/pkg/features/features.go +++ b/pkg/features/features.go @@ -63,6 +63,15 @@ const ( // owner: @mszacillo, @XiShanYongYe-Chang // alpha: v1.12 StatefulFailoverInjection featuregate.Feature = "StatefulFailoverInjection" + + // PriorityBasedScheduling controls whether the Priority-Based Scheduling feature is enabled. + // When enabled, the scheduler prioritizes applications with higher priority values, ensuring they + // are scheduled before lower-priority ones. This is useful for cluster environments where critical + // workloads must be processed first to meet SLA requirements. + // + // owner: @LeonZh0u, @seanlaii, @wengyao04, @whitewindmills, @zclyne + // alpha: v1.13 + PriorityBasedScheduling featuregate.Feature = "PriorityBasedScheduling" ) var ( @@ -83,6 +92,7 @@ var ( MultiClusterService: {Default: false, PreRelease: featuregate.Alpha}, ResourceQuotaEstimate: {Default: false, PreRelease: featuregate.Alpha}, StatefulFailoverInjection: {Default: false, PreRelease: featuregate.Alpha}, + PriorityBasedScheduling: {Default: false, PreRelease: featuregate.Alpha}, } )