mirror of
https://github.com/kubernetes-sigs/descheduler.git
synced 2026-01-28 06:29:29 +01:00
add v1alpha2 registry based conversion (#1006)
* add v1alpha2 registry based conversion * test defaults, set our 1st explicit default * fix typos and dates * move pluginregistry to its own dir * remove unused v1alpha2.Namespace type * move migration code folders, remove switch * validate internalPolicy a single time * remove structured logs * simplify return * check for nil methods * properly check before adding default evictor * add TODO comment * bump copyright year
This commit is contained in:
committed by
GitHub
parent
861c6325f3
commit
137f3b20dc
@@ -23,17 +23,18 @@ func addDefaultingFuncs(scheme *runtime.Scheme) error {
|
||||
|
||||
// SetDefaults_RemovePodsViolatingNodeTaintsArgs
|
||||
// TODO: the final default values would be discussed in community
|
||||
func SetDefaults_RemovePodsViolatingNodeTaintsArgs(obj *RemovePodsViolatingNodeTaintsArgs) {
|
||||
if obj.Namespaces == nil {
|
||||
obj.Namespaces = nil
|
||||
func SetDefaults_RemovePodsViolatingNodeTaintsArgs(obj runtime.Object) {
|
||||
args := obj.(*RemovePodsViolatingNodeTaintsArgs)
|
||||
if args.Namespaces == nil {
|
||||
args.Namespaces = nil
|
||||
}
|
||||
if obj.LabelSelector == nil {
|
||||
obj.LabelSelector = nil
|
||||
if args.LabelSelector == nil {
|
||||
args.LabelSelector = nil
|
||||
}
|
||||
if !obj.IncludePreferNoSchedule {
|
||||
obj.IncludePreferNoSchedule = false
|
||||
if !args.IncludePreferNoSchedule {
|
||||
args.IncludePreferNoSchedule = false
|
||||
}
|
||||
if obj.ExcludedTaints == nil {
|
||||
obj.ExcludedTaints = nil
|
||||
if args.ExcludedTaints == nil {
|
||||
args.ExcludedTaints = nil
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user