mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-26 19:35:10 +00:00
scheduler deprecates non-csi plugins
This commit is contained in:
@@ -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,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user