Merge pull request #115815 from Huang-Wei/pod-scheduling-readiness-beta
Graduate PodSchedulingReadiness to beta
This commit is contained in:
@@ -3044,9 +3044,14 @@ type PodSpec struct {
|
||||
OS *PodOS
|
||||
|
||||
// SchedulingGates is an opaque list of values that if specified will block scheduling the pod.
|
||||
// More info: https://git.k8s.io/enhancements/keps/sig-scheduling/3521-pod-scheduling-readiness.
|
||||
// If schedulingGates is not empty, the pod will stay in the SchedulingGated state and the
|
||||
// scheduler will not attempt to schedule the pod.
|
||||
//
|
||||
// This is an alpha-level feature enabled by PodSchedulingReadiness feature gate.
|
||||
// SchedulingGates can only be set at pod creation time, and be removed only afterwards.
|
||||
//
|
||||
// This is a beta feature enabled by the PodSchedulingReadiness feature gate.
|
||||
//
|
||||
// +featureGate=PodSchedulingReadiness
|
||||
// +optional
|
||||
SchedulingGates []PodSchedulingGate
|
||||
// ResourceClaims defines which ResourceClaims must be allocated
|
||||
|
@@ -613,6 +613,7 @@ const (
|
||||
// owner: @Huang-Wei
|
||||
// kep: https://kep.k8s.io/3521
|
||||
// alpha: v1.26
|
||||
// beta: v1.27
|
||||
//
|
||||
// Enable users to specify when a Pod is ready for scheduling.
|
||||
PodSchedulingReadiness featuregate.Feature = "PodSchedulingReadiness"
|
||||
@@ -1002,7 +1003,7 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS
|
||||
|
||||
PodHasNetworkCondition: {Default: false, PreRelease: featuregate.Alpha},
|
||||
|
||||
PodSchedulingReadiness: {Default: false, PreRelease: featuregate.Alpha},
|
||||
PodSchedulingReadiness: {Default: true, PreRelease: featuregate.Beta},
|
||||
|
||||
PodSecurity: {Default: true, PreRelease: featuregate.GA, LockToDefault: true},
|
||||
|
||||
|
2
pkg/generated/openapi/zz_generated.openapi.go
generated
2
pkg/generated/openapi/zz_generated.openapi.go
generated
@@ -23562,7 +23562,7 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA
|
||||
},
|
||||
},
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "SchedulingGates is an opaque list of values that if specified will block scheduling the pod. More info: https://git.k8s.io/enhancements/keps/sig-scheduling/3521-pod-scheduling-readiness.\n\nThis is an alpha-level feature enabled by PodSchedulingReadiness feature gate.",
|
||||
Description: "SchedulingGates is an opaque list of values that if specified will block scheduling the pod. If schedulingGates is not empty, the pod will stay in the SchedulingGated state and the scheduler will not attempt to schedule the pod.\n\nSchedulingGates can only be set at pod creation time, and be removed only afterwards.\n\nThis is a beta feature enabled by the PodSchedulingReadiness feature gate.",
|
||||
Type: []string{"array"},
|
||||
Items: &spec.SchemaOrArray{
|
||||
Schema: &spec.Schema{
|
||||
|
@@ -23,6 +23,11 @@ import (
|
||||
|
||||
// PluginsV1beta2 default set of v1beta2 plugins.
|
||||
var PluginsV1beta2 = &config.Plugins{
|
||||
PreEnqueue: config.PluginSet{
|
||||
Enabled: []config.Plugin{
|
||||
{Name: names.SchedulingGates},
|
||||
},
|
||||
},
|
||||
QueueSort: config.PluginSet{
|
||||
Enabled: []config.Plugin{
|
||||
{Name: names.PrioritySort},
|
||||
@@ -176,12 +181,18 @@ var PluginsV1beta3 = &config.Plugins{
|
||||
{Name: names.NodeResourcesBalancedAllocation, Weight: 1},
|
||||
{Name: names.ImageLocality, Weight: 1},
|
||||
{Name: names.DefaultBinder},
|
||||
{Name: names.SchedulingGates},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
// ExpandedPluginsV1beta3 default set of v1beta3 plugins after MultiPoint expansion
|
||||
var ExpandedPluginsV1beta3 = &config.Plugins{
|
||||
PreEnqueue: config.PluginSet{
|
||||
Enabled: []config.Plugin{
|
||||
{Name: names.SchedulingGates},
|
||||
},
|
||||
},
|
||||
QueueSort: config.PluginSet{
|
||||
Enabled: []config.Plugin{
|
||||
{Name: names.PrioritySort},
|
||||
@@ -347,12 +358,18 @@ var PluginsV1 = &config.Plugins{
|
||||
{Name: names.NodeResourcesBalancedAllocation, Weight: 1},
|
||||
{Name: names.ImageLocality, Weight: 1},
|
||||
{Name: names.DefaultBinder},
|
||||
{Name: names.SchedulingGates},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
// ExpandedPluginsV1 default set of v1 plugins after MultiPoint expansion
|
||||
var ExpandedPluginsV1 = &config.Plugins{
|
||||
PreEnqueue: config.PluginSet{
|
||||
Enabled: []config.Plugin{
|
||||
{Name: names.SchedulingGates},
|
||||
},
|
||||
},
|
||||
QueueSort: config.PluginSet{
|
||||
Enabled: []config.Plugin{
|
||||
{Name: names.PrioritySort},
|
||||
|
@@ -38,6 +38,9 @@ func TestApplyFeatureGates(t *testing.T) {
|
||||
}{
|
||||
{
|
||||
name: "Feature gates disabled",
|
||||
features: map[featuregate.Feature]bool{
|
||||
features.PodSchedulingReadiness: false,
|
||||
},
|
||||
wantConfig: &v1.Plugins{
|
||||
MultiPoint: v1.PluginSet{
|
||||
Enabled: []v1.Plugin{
|
||||
@@ -127,6 +130,7 @@ func TestApplyFeatureGates(t *testing.T) {
|
||||
{Name: names.NodeResourcesBalancedAllocation, Weight: pointer.Int32(1)},
|
||||
{Name: names.ImageLocality, Weight: pointer.Int32(1)},
|
||||
{Name: names.DefaultBinder},
|
||||
{Name: names.SchedulingGates},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@@ -348,6 +348,7 @@ func TestSchedulerDefaults(t *testing.T) {
|
||||
{Name: names.NodeResourcesBalancedAllocation, Weight: pointer.Int32(1)},
|
||||
{Name: names.ImageLocality, Weight: pointer.Int32(1)},
|
||||
{Name: names.DefaultBinder},
|
||||
{Name: names.SchedulingGates},
|
||||
},
|
||||
},
|
||||
Bind: configv1.PluginSet{
|
||||
|
@@ -37,6 +37,9 @@ func TestApplyFeatureGates(t *testing.T) {
|
||||
}{
|
||||
{
|
||||
name: "Feature gates disabled",
|
||||
features: map[featuregate.Feature]bool{
|
||||
features.PodSchedulingReadiness: false,
|
||||
},
|
||||
wantConfig: &v1beta2.Plugins{
|
||||
QueueSort: v1beta2.PluginSet{
|
||||
Enabled: []v1beta2.Plugin{
|
||||
|
@@ -326,6 +326,11 @@ func TestSchedulerDefaults(t *testing.T) {
|
||||
{
|
||||
SchedulerName: pointer.String("custom-scheduler"),
|
||||
Plugins: &v1beta2.Plugins{
|
||||
PreEnqueue: v1beta2.PluginSet{
|
||||
Enabled: []v1beta2.Plugin{
|
||||
{Name: "SchedulingGates"},
|
||||
},
|
||||
},
|
||||
QueueSort: v1beta2.PluginSet{
|
||||
Enabled: []v1beta2.Plugin{
|
||||
{Name: names.PrioritySort},
|
||||
|
@@ -37,6 +37,9 @@ func TestApplyFeatureGates(t *testing.T) {
|
||||
}{
|
||||
{
|
||||
name: "Feature gates disabled",
|
||||
features: map[featuregate.Feature]bool{
|
||||
features.PodSchedulingReadiness: false,
|
||||
},
|
||||
wantConfig: &v1beta3.Plugins{
|
||||
MultiPoint: v1beta3.PluginSet{
|
||||
Enabled: []v1beta3.Plugin{
|
||||
|
@@ -348,6 +348,7 @@ func TestSchedulerDefaults(t *testing.T) {
|
||||
{Name: names.NodeResourcesBalancedAllocation, Weight: pointer.Int32(1)},
|
||||
{Name: names.ImageLocality, Weight: pointer.Int32(1)},
|
||||
{Name: names.DefaultBinder},
|
||||
{Name: names.SchedulingGates},
|
||||
},
|
||||
},
|
||||
Bind: v1beta3.PluginSet{
|
||||
|
Reference in New Issue
Block a user