mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-09 20:17:41 +00:00
scheduler deprecates non-csi plugins
This commit is contained in:
parent
e59eceec48
commit
a9f6374ba0
@ -34,10 +34,7 @@ var PluginsV1 = &config.Plugins{
|
||||
{Name: names.NodePorts},
|
||||
{Name: names.NodeResourcesFit, Weight: 1},
|
||||
{Name: names.VolumeRestrictions},
|
||||
{Name: names.EBSLimits},
|
||||
{Name: names.GCEPDLimits},
|
||||
{Name: names.NodeVolumeLimits},
|
||||
{Name: names.AzureDiskLimits},
|
||||
{Name: names.VolumeBinding},
|
||||
{Name: names.VolumeZone},
|
||||
{Name: names.PodTopologySpread, Weight: 2},
|
||||
@ -68,10 +65,7 @@ var ExpandedPluginsV1 = &config.Plugins{
|
||||
{Name: names.NodePorts},
|
||||
{Name: names.NodeResourcesFit},
|
||||
{Name: names.VolumeRestrictions},
|
||||
{Name: names.EBSLimits},
|
||||
{Name: names.GCEPDLimits},
|
||||
{Name: names.NodeVolumeLimits},
|
||||
{Name: names.AzureDiskLimits},
|
||||
{Name: names.VolumeBinding},
|
||||
{Name: names.VolumeZone},
|
||||
{Name: names.PodTopologySpread},
|
||||
@ -87,10 +81,7 @@ var ExpandedPluginsV1 = &config.Plugins{
|
||||
{Name: names.NodePorts},
|
||||
{Name: names.NodeResourcesFit},
|
||||
{Name: names.VolumeRestrictions},
|
||||
{Name: names.EBSLimits},
|
||||
{Name: names.GCEPDLimits},
|
||||
{Name: names.NodeVolumeLimits},
|
||||
{Name: names.AzureDiskLimits},
|
||||
{Name: names.VolumeBinding},
|
||||
{Name: names.VolumeZone},
|
||||
{Name: names.PodTopologySpread},
|
||||
|
@ -40,10 +40,7 @@ func getDefaultPlugins() *v1.Plugins {
|
||||
{Name: names.NodePorts},
|
||||
{Name: names.NodeResourcesFit, Weight: ptr.To[int32](1)},
|
||||
{Name: names.VolumeRestrictions},
|
||||
{Name: names.EBSLimits},
|
||||
{Name: names.GCEPDLimits},
|
||||
{Name: names.NodeVolumeLimits},
|
||||
{Name: names.AzureDiskLimits},
|
||||
{Name: names.VolumeBinding},
|
||||
{Name: names.VolumeZone},
|
||||
{Name: names.PodTopologySpread, Weight: ptr.To[int32](2)},
|
||||
|
@ -53,10 +53,7 @@ func TestApplyFeatureGates(t *testing.T) {
|
||||
{Name: names.NodePorts},
|
||||
{Name: names.NodeResourcesFit, Weight: ptr.To[int32](1)},
|
||||
{Name: names.VolumeRestrictions},
|
||||
{Name: names.EBSLimits},
|
||||
{Name: names.GCEPDLimits},
|
||||
{Name: names.NodeVolumeLimits},
|
||||
{Name: names.AzureDiskLimits},
|
||||
{Name: names.VolumeBinding},
|
||||
{Name: names.VolumeZone},
|
||||
{Name: names.PodTopologySpread, Weight: ptr.To[int32](2)},
|
||||
@ -86,10 +83,7 @@ func TestApplyFeatureGates(t *testing.T) {
|
||||
{Name: names.NodePorts},
|
||||
{Name: names.NodeResourcesFit, Weight: ptr.To[int32](1)},
|
||||
{Name: names.VolumeRestrictions},
|
||||
{Name: names.EBSLimits},
|
||||
{Name: names.GCEPDLimits},
|
||||
{Name: names.NodeVolumeLimits},
|
||||
{Name: names.AzureDiskLimits},
|
||||
{Name: names.VolumeBinding},
|
||||
{Name: names.VolumeZone},
|
||||
{Name: names.PodTopologySpread, Weight: ptr.To[int32](2)},
|
||||
|
@ -340,10 +340,7 @@ func TestSchedulerDefaults(t *testing.T) {
|
||||
{Name: names.NodePorts},
|
||||
{Name: names.NodeResourcesFit, Weight: ptr.To[int32](1)},
|
||||
{Name: names.VolumeRestrictions},
|
||||
{Name: names.EBSLimits},
|
||||
{Name: names.GCEPDLimits},
|
||||
{Name: names.NodeVolumeLimits},
|
||||
{Name: names.AzureDiskLimits},
|
||||
{Name: names.VolumeBinding},
|
||||
{Name: names.VolumeZone},
|
||||
{Name: names.PodTopologySpread, Weight: ptr.To[int32](2)},
|
||||
|
@ -101,7 +101,12 @@ type invalidPlugins struct {
|
||||
var invalidPluginsByVersion = []invalidPlugins{
|
||||
{
|
||||
schemeGroupVersion: v1.SchemeGroupVersion.String(),
|
||||
plugins: []string{},
|
||||
plugins: []string{
|
||||
"AzureDiskLimits",
|
||||
"CinderLimits",
|
||||
"EBSLimits",
|
||||
"GCEPDLimits",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -189,6 +189,12 @@ func TestValidateKubeSchedulerConfigurationV1(t *testing.T) {
|
||||
validPlugins := validConfig.DeepCopy()
|
||||
validPlugins.Profiles[0].Plugins.Score.Enabled = append(validPlugins.Profiles[0].Plugins.Score.Enabled, config.Plugin{Name: "PodTopologySpread", Weight: 2})
|
||||
|
||||
invalidPlugins := validConfig.DeepCopy()
|
||||
invalidPlugins.Profiles[0].Plugins.Score.Enabled = append(invalidPlugins.Profiles[0].Plugins.Score.Enabled, config.Plugin{Name: "AzureDiskLimits"})
|
||||
invalidPlugins.Profiles[0].Plugins.Score.Enabled = append(invalidPlugins.Profiles[0].Plugins.Score.Enabled, config.Plugin{Name: "CinderLimits"})
|
||||
invalidPlugins.Profiles[0].Plugins.Score.Enabled = append(invalidPlugins.Profiles[0].Plugins.Score.Enabled, config.Plugin{Name: "EBSLimits"})
|
||||
invalidPlugins.Profiles[0].Plugins.Score.Enabled = append(invalidPlugins.Profiles[0].Plugins.Score.Enabled, config.Plugin{Name: "GCEPDLimits"})
|
||||
|
||||
scenarios := map[string]struct {
|
||||
config *config.KubeSchedulerConfiguration
|
||||
wantErrs field.ErrorList
|
||||
@ -367,6 +373,27 @@ func TestValidateKubeSchedulerConfigurationV1(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
"invalid-plugins": {
|
||||
config: invalidPlugins,
|
||||
wantErrs: field.ErrorList{
|
||||
&field.Error{
|
||||
Type: field.ErrorTypeInvalid,
|
||||
Field: "profiles[0].plugins.score.enabled[0]",
|
||||
},
|
||||
&field.Error{
|
||||
Type: field.ErrorTypeInvalid,
|
||||
Field: "profiles[0].plugins.score.enabled[1]",
|
||||
},
|
||||
&field.Error{
|
||||
Type: field.ErrorTypeInvalid,
|
||||
Field: "profiles[0].plugins.score.enabled[2]",
|
||||
},
|
||||
&field.Error{
|
||||
Type: field.ErrorTypeInvalid,
|
||||
Field: "profiles[0].plugins.score.enabled[3]",
|
||||
},
|
||||
},
|
||||
},
|
||||
"valid-plugins": {
|
||||
config: validPlugins,
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user