mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-19 09:52:49 +00:00
Graduate PodSchedulingReadiness to beta
This commit is contained in:
parent
ccaa730805
commit
72863f65d6
@ -1438,37 +1438,23 @@ profiles:
|
||||
Profiles: []kubeschedulerconfig.KubeSchedulerProfile{
|
||||
{
|
||||
SchedulerName: "foo-profile",
|
||||
Plugins: &kubeschedulerconfig.Plugins{
|
||||
QueueSort: defaults.PluginsV1beta2.QueueSort,
|
||||
PreFilter: defaults.PluginsV1beta2.PreFilter,
|
||||
Filter: defaults.PluginsV1beta2.Filter,
|
||||
PostFilter: defaults.PluginsV1beta2.PostFilter,
|
||||
PreScore: defaults.PluginsV1beta2.PreScore,
|
||||
Score: defaults.PluginsV1beta2.Score,
|
||||
Bind: defaults.PluginsV1beta2.Bind,
|
||||
PreBind: defaults.PluginsV1beta2.PreBind,
|
||||
Reserve: kubeschedulerconfig.PluginSet{
|
||||
Enabled: []kubeschedulerconfig.Plugin{
|
||||
Plugins: func() *kubeschedulerconfig.Plugins {
|
||||
plugins := defaults.PluginsV1beta2.DeepCopy()
|
||||
plugins.Reserve.Enabled = []kubeschedulerconfig.Plugin{
|
||||
{Name: "foo"},
|
||||
{Name: names.VolumeBinding},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
return plugins
|
||||
}(),
|
||||
PluginConfig: defaults.PluginConfigsV1beta2,
|
||||
},
|
||||
{
|
||||
SchedulerName: "bar-profile",
|
||||
Plugins: &kubeschedulerconfig.Plugins{
|
||||
PreEnqueue: defaults.PluginsV1beta2.PreEnqueue,
|
||||
QueueSort: defaults.PluginsV1beta2.QueueSort,
|
||||
PreFilter: defaults.PluginsV1beta2.PreFilter,
|
||||
Filter: defaults.PluginsV1beta2.Filter,
|
||||
PostFilter: defaults.PluginsV1beta2.PostFilter,
|
||||
PreScore: defaults.PluginsV1beta2.PreScore,
|
||||
Score: defaults.PluginsV1beta2.Score,
|
||||
Bind: defaults.PluginsV1beta2.Bind,
|
||||
Reserve: defaults.PluginsV1beta2.Reserve,
|
||||
},
|
||||
Plugins: func() *kubeschedulerconfig.Plugins {
|
||||
plugins := defaults.PluginsV1beta2.DeepCopy()
|
||||
plugins.PreBind.Enabled = nil
|
||||
return plugins
|
||||
}(),
|
||||
PluginConfig: []kubeschedulerconfig.PluginConfig{
|
||||
{
|
||||
Name: "foo",
|
||||
|
@ -42,7 +42,6 @@ import (
|
||||
"k8s.io/kubernetes/pkg/scheduler/apis/config"
|
||||
"k8s.io/kubernetes/pkg/scheduler/apis/config/testing/defaults"
|
||||
"k8s.io/kubernetes/pkg/scheduler/framework"
|
||||
"k8s.io/kubernetes/pkg/scheduler/framework/plugins/names"
|
||||
)
|
||||
|
||||
func TestSetup(t *testing.T) {
|
||||
@ -318,21 +317,33 @@ leaderElection:
|
||||
wantLeaderElection *componentbaseconfig.LeaderElectionConfiguration
|
||||
}{
|
||||
{
|
||||
name: "default config with two alpha features enabled",
|
||||
name: "default config with an alpha feature enabled",
|
||||
flags: []string{
|
||||
"--kubeconfig", configKubeconfig,
|
||||
"--feature-gates=VolumeCapacityPriority=true,PodSchedulingReadiness=true",
|
||||
"--feature-gates=VolumeCapacityPriority=true",
|
||||
},
|
||||
wantPlugins: map[string]*config.Plugins{
|
||||
"default-scheduler": defaults.ExpandedPluginsV1,
|
||||
},
|
||||
restoreFeatures: map[featuregate.Feature]bool{
|
||||
features.VolumeCapacityPriority: false,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "default config with a beta feature disabled",
|
||||
flags: []string{
|
||||
"--kubeconfig", configKubeconfig,
|
||||
"--feature-gates=PodSchedulingReadiness=false",
|
||||
},
|
||||
wantPlugins: map[string]*config.Plugins{
|
||||
"default-scheduler": func() *config.Plugins {
|
||||
plugins := defaults.ExpandedPluginsV1.DeepCopy()
|
||||
plugins.PreEnqueue.Enabled = append(plugins.PreEnqueue.Enabled, config.Plugin{Name: names.SchedulingGates})
|
||||
plugins.PreEnqueue = config.PluginSet{}
|
||||
return plugins
|
||||
}(),
|
||||
},
|
||||
restoreFeatures: map[featuregate.Feature]bool{
|
||||
features.VolumeCapacityPriority: false,
|
||||
features.PodSchedulingReadiness: false,
|
||||
features.PodSchedulingReadiness: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -351,37 +362,26 @@ leaderElection:
|
||||
"--kubeconfig", configKubeconfig,
|
||||
},
|
||||
wantPlugins: map[string]*config.Plugins{
|
||||
"default-scheduler": {
|
||||
Bind: config.PluginSet{Enabled: []config.Plugin{{Name: "DefaultBinder"}}},
|
||||
Filter: config.PluginSet{
|
||||
Enabled: []config.Plugin{
|
||||
"default-scheduler": func() *config.Plugins {
|
||||
plugins := defaults.PluginsV1beta2.DeepCopy()
|
||||
plugins.Filter.Enabled = []config.Plugin{
|
||||
{Name: "NodeResourcesFit"},
|
||||
{Name: "NodePorts"},
|
||||
},
|
||||
},
|
||||
PreFilter: config.PluginSet{
|
||||
Enabled: []config.Plugin{
|
||||
}
|
||||
plugins.PreFilter.Enabled = []config.Plugin{
|
||||
{Name: "NodeResourcesFit"},
|
||||
{Name: "NodePorts"},
|
||||
},
|
||||
},
|
||||
PostFilter: config.PluginSet{Enabled: []config.Plugin{{Name: "DefaultPreemption"}}},
|
||||
PreScore: config.PluginSet{
|
||||
Enabled: []config.Plugin{
|
||||
}
|
||||
plugins.PreScore.Enabled = []config.Plugin{
|
||||
{Name: "InterPodAffinity"},
|
||||
{Name: "TaintToleration"},
|
||||
},
|
||||
},
|
||||
QueueSort: config.PluginSet{Enabled: []config.Plugin{{Name: "PrioritySort"}}},
|
||||
Score: config.PluginSet{
|
||||
Enabled: []config.Plugin{
|
||||
}
|
||||
plugins.Score.Enabled = []config.Plugin{
|
||||
{Name: "InterPodAffinity", Weight: 1},
|
||||
{Name: "TaintToleration", Weight: 1},
|
||||
},
|
||||
},
|
||||
Reserve: config.PluginSet{Enabled: []config.Plugin{{Name: "VolumeBinding"}}},
|
||||
PreBind: config.PluginSet{Enabled: []config.Plugin{{Name: "VolumeBinding"}}},
|
||||
},
|
||||
}
|
||||
return plugins
|
||||
}(),
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -391,38 +391,26 @@ leaderElection:
|
||||
"--kubeconfig", configKubeconfig,
|
||||
},
|
||||
wantPlugins: map[string]*config.Plugins{
|
||||
"default-scheduler": {
|
||||
PreEnqueue: config.PluginSet{Enabled: []config.Plugin{{Name: "SchedulingGates"}}},
|
||||
Bind: config.PluginSet{Enabled: []config.Plugin{{Name: "DefaultBinder"}}},
|
||||
Filter: config.PluginSet{
|
||||
Enabled: []config.Plugin{
|
||||
"default-scheduler": func() *config.Plugins {
|
||||
plugins := defaults.ExpandedPluginsV1beta3.DeepCopy()
|
||||
plugins.Filter.Enabled = []config.Plugin{
|
||||
{Name: "NodeResourcesFit"},
|
||||
{Name: "NodePorts"},
|
||||
},
|
||||
},
|
||||
PreFilter: config.PluginSet{
|
||||
Enabled: []config.Plugin{
|
||||
}
|
||||
plugins.PreFilter.Enabled = []config.Plugin{
|
||||
{Name: "NodeResourcesFit"},
|
||||
{Name: "NodePorts"},
|
||||
},
|
||||
},
|
||||
PostFilter: config.PluginSet{Enabled: []config.Plugin{{Name: "DefaultPreemption"}}},
|
||||
PreScore: config.PluginSet{
|
||||
Enabled: []config.Plugin{
|
||||
}
|
||||
plugins.PreScore.Enabled = []config.Plugin{
|
||||
{Name: "InterPodAffinity"},
|
||||
{Name: "TaintToleration"},
|
||||
},
|
||||
},
|
||||
QueueSort: config.PluginSet{Enabled: []config.Plugin{{Name: "PrioritySort"}}},
|
||||
Score: config.PluginSet{
|
||||
Enabled: []config.Plugin{
|
||||
}
|
||||
plugins.Score.Enabled = []config.Plugin{
|
||||
{Name: "InterPodAffinity", Weight: 1},
|
||||
{Name: "TaintToleration", Weight: 1},
|
||||
},
|
||||
},
|
||||
Reserve: config.PluginSet{Enabled: []config.Plugin{{Name: "VolumeBinding"}}},
|
||||
PreBind: config.PluginSet{Enabled: []config.Plugin{{Name: "VolumeBinding"}}},
|
||||
},
|
||||
}
|
||||
return plugins
|
||||
}(),
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -432,38 +420,26 @@ leaderElection:
|
||||
"--kubeconfig", configKubeconfig,
|
||||
},
|
||||
wantPlugins: map[string]*config.Plugins{
|
||||
"default-scheduler": {
|
||||
PreEnqueue: config.PluginSet{Enabled: []config.Plugin{{Name: "SchedulingGates"}}},
|
||||
Bind: config.PluginSet{Enabled: []config.Plugin{{Name: "DefaultBinder"}}},
|
||||
Filter: config.PluginSet{
|
||||
Enabled: []config.Plugin{
|
||||
"default-scheduler": func() *config.Plugins {
|
||||
plugins := defaults.ExpandedPluginsV1.DeepCopy()
|
||||
plugins.Filter.Enabled = []config.Plugin{
|
||||
{Name: "NodeResourcesFit"},
|
||||
{Name: "NodePorts"},
|
||||
},
|
||||
},
|
||||
PreFilter: config.PluginSet{
|
||||
Enabled: []config.Plugin{
|
||||
}
|
||||
plugins.PreFilter.Enabled = []config.Plugin{
|
||||
{Name: "NodeResourcesFit"},
|
||||
{Name: "NodePorts"},
|
||||
},
|
||||
},
|
||||
PostFilter: config.PluginSet{Enabled: []config.Plugin{{Name: "DefaultPreemption"}}},
|
||||
PreScore: config.PluginSet{
|
||||
Enabled: []config.Plugin{
|
||||
}
|
||||
plugins.PreScore.Enabled = []config.Plugin{
|
||||
{Name: "InterPodAffinity"},
|
||||
{Name: "TaintToleration"},
|
||||
},
|
||||
},
|
||||
QueueSort: config.PluginSet{Enabled: []config.Plugin{{Name: "PrioritySort"}}},
|
||||
Score: config.PluginSet{
|
||||
Enabled: []config.Plugin{
|
||||
}
|
||||
plugins.Score.Enabled = []config.Plugin{
|
||||
{Name: "InterPodAffinity", Weight: 1},
|
||||
{Name: "TaintToleration", Weight: 1},
|
||||
},
|
||||
},
|
||||
Reserve: config.PluginSet{Enabled: []config.Plugin{{Name: "VolumeBinding"}}},
|
||||
PreBind: config.PluginSet{Enabled: []config.Plugin{{Name: "VolumeBinding"}}},
|
||||
},
|
||||
}
|
||||
return plugins
|
||||
}(),
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -474,21 +450,12 @@ leaderElection:
|
||||
},
|
||||
registryOptions: []Option{WithPlugin("Foo", newFoo)},
|
||||
wantPlugins: map[string]*config.Plugins{
|
||||
"default-scheduler": {
|
||||
Bind: defaults.PluginsV1beta2.Bind,
|
||||
Filter: config.PluginSet{
|
||||
Enabled: append(defaults.PluginsV1beta2.Filter.Enabled, config.Plugin{Name: "Foo"}),
|
||||
},
|
||||
PreFilter: config.PluginSet{
|
||||
Enabled: append(defaults.PluginsV1beta2.PreFilter.Enabled, config.Plugin{Name: "Foo"}),
|
||||
},
|
||||
PostFilter: defaults.PluginsV1beta2.PostFilter,
|
||||
PreScore: defaults.PluginsV1beta2.PreScore,
|
||||
QueueSort: defaults.PluginsV1beta2.QueueSort,
|
||||
Score: defaults.PluginsV1beta2.Score,
|
||||
Reserve: defaults.PluginsV1beta2.Reserve,
|
||||
PreBind: defaults.PluginsV1beta2.PreBind,
|
||||
},
|
||||
"default-scheduler": func() *config.Plugins {
|
||||
plugins := defaults.PluginsV1beta2.DeepCopy()
|
||||
plugins.PreFilter.Enabled = append(plugins.PreFilter.Enabled, config.Plugin{Name: "Foo"})
|
||||
plugins.Filter.Enabled = append(plugins.Filter.Enabled, config.Plugin{Name: "Foo"})
|
||||
return plugins
|
||||
}(),
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -499,21 +466,12 @@ leaderElection:
|
||||
},
|
||||
registryOptions: []Option{WithPlugin("Foo", newFoo)},
|
||||
wantPlugins: map[string]*config.Plugins{
|
||||
"default-scheduler": {
|
||||
Bind: defaults.ExpandedPluginsV1beta3.Bind,
|
||||
Filter: config.PluginSet{
|
||||
Enabled: append(defaults.ExpandedPluginsV1beta3.Filter.Enabled, config.Plugin{Name: "Foo"}),
|
||||
},
|
||||
PreFilter: config.PluginSet{
|
||||
Enabled: append(defaults.ExpandedPluginsV1beta3.PreFilter.Enabled, config.Plugin{Name: "Foo"}),
|
||||
},
|
||||
PostFilter: defaults.ExpandedPluginsV1beta3.PostFilter,
|
||||
PreScore: defaults.ExpandedPluginsV1beta3.PreScore,
|
||||
QueueSort: defaults.ExpandedPluginsV1beta3.QueueSort,
|
||||
Score: defaults.ExpandedPluginsV1beta3.Score,
|
||||
Reserve: defaults.ExpandedPluginsV1beta3.Reserve,
|
||||
PreBind: defaults.ExpandedPluginsV1beta3.PreBind,
|
||||
},
|
||||
"default-scheduler": func() *config.Plugins {
|
||||
plugins := defaults.ExpandedPluginsV1beta3.DeepCopy()
|
||||
plugins.PreFilter.Enabled = append(plugins.PreFilter.Enabled, config.Plugin{Name: "Foo"})
|
||||
plugins.Filter.Enabled = append(plugins.Filter.Enabled, config.Plugin{Name: "Foo"})
|
||||
return plugins
|
||||
}(),
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -524,22 +482,12 @@ leaderElection:
|
||||
},
|
||||
registryOptions: []Option{WithPlugin("Foo", newFoo)},
|
||||
wantPlugins: map[string]*config.Plugins{
|
||||
"default-scheduler": {
|
||||
PreEnqueue: defaults.ExpandedPluginsV1.PreEnqueue,
|
||||
Bind: defaults.ExpandedPluginsV1.Bind,
|
||||
Filter: config.PluginSet{
|
||||
Enabled: append(defaults.ExpandedPluginsV1.Filter.Enabled, config.Plugin{Name: "Foo"}),
|
||||
},
|
||||
PreFilter: config.PluginSet{
|
||||
Enabled: append(defaults.ExpandedPluginsV1.PreFilter.Enabled, config.Plugin{Name: "Foo"}),
|
||||
},
|
||||
PostFilter: defaults.ExpandedPluginsV1.PostFilter,
|
||||
PreScore: defaults.ExpandedPluginsV1.PreScore,
|
||||
QueueSort: defaults.ExpandedPluginsV1.QueueSort,
|
||||
Score: defaults.ExpandedPluginsV1.Score,
|
||||
Reserve: defaults.ExpandedPluginsV1.Reserve,
|
||||
PreBind: defaults.ExpandedPluginsV1.PreBind,
|
||||
},
|
||||
"default-scheduler": func() *config.Plugins {
|
||||
plugins := defaults.ExpandedPluginsV1.DeepCopy()
|
||||
plugins.PreFilter.Enabled = append(plugins.PreFilter.Enabled, config.Plugin{Name: "Foo"})
|
||||
plugins.Filter.Enabled = append(plugins.Filter.Enabled, config.Plugin{Name: "Foo"})
|
||||
return plugins
|
||||
}(),
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -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
|
||||
|
@ -611,6 +611,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"
|
||||
@ -999,7 +1000,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},
|
||||
|
||||
|
@ -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{
|
||||
|
@ -3386,14 +3386,19 @@ type PodSpec struct {
|
||||
HostUsers *bool `json:"hostUsers,omitempty" protobuf:"bytes,37,opt,name=hostUsers"`
|
||||
|
||||
// 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.
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
// This is an alpha-level feature enabled by PodSchedulingReadiness feature gate.
|
||||
// +optional
|
||||
// +patchMergeKey=name
|
||||
// +patchStrategy=merge
|
||||
// +listType=map
|
||||
// +listMapKey=name
|
||||
// +featureGate=PodSchedulingReadiness
|
||||
// +optional
|
||||
SchedulingGates []PodSchedulingGate `json:"schedulingGates,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,38,opt,name=schedulingGates"`
|
||||
// ResourceClaims defines which ResourceClaims must be allocated
|
||||
// and reserved before the Pod is allowed to start. The resources
|
||||
|
@ -806,7 +806,7 @@ var _ = SIGDescribe("SchedulerPredicates [Serial]", func() {
|
||||
})
|
||||
})
|
||||
|
||||
ginkgo.It("validates Pods with non-empty schedulingGates are blocked on scheduling [Feature:PodSchedulingReadiness] [alpha]", func(ctx context.Context) {
|
||||
ginkgo.It("validates Pods with non-empty schedulingGates are blocked on scheduling", func(ctx context.Context) {
|
||||
podLabel := "e2e-scheduling-gates"
|
||||
replicas := 3
|
||||
ginkgo.By(fmt.Sprintf("Creating a ReplicaSet with replicas=%v, carrying scheduling gates [foo bar]", replicas))
|
||||
|
Loading…
Reference in New Issue
Block a user