Move Plugin Args defaults to versioned packages
Signed-off-by: Aldo Culquicondor <acondor@google.com>
This commit is contained in:
@@ -30,8 +30,6 @@ const (
|
||||
// Name is the name of the plugin used in the plugin registry and configurations.
|
||||
Name = "InterPodAffinity"
|
||||
|
||||
// DefaultHardPodAffinityWeight is the default HardPodAffinityWeight.
|
||||
DefaultHardPodAffinityWeight int32 = 1
|
||||
// MinHardPodAffinityWeight is the minimum HardPodAffinityWeight.
|
||||
MinHardPodAffinityWeight int32 = 0
|
||||
// MaxHardPodAffinityWeight is the maximum HardPodAffinityWeight.
|
||||
@@ -79,11 +77,6 @@ func New(plArgs runtime.Object, h framework.FrameworkHandle) (framework.Plugin,
|
||||
}
|
||||
|
||||
func getArgs(obj runtime.Object) (config.InterPodAffinityArgs, error) {
|
||||
if obj == nil {
|
||||
return config.InterPodAffinityArgs{
|
||||
HardPodAffinityWeight: DefaultHardPodAffinityWeight,
|
||||
}, nil
|
||||
}
|
||||
ptr, ok := obj.(*config.InterPodAffinityArgs)
|
||||
if !ok {
|
||||
return config.InterPodAffinityArgs{}, fmt.Errorf("want args to be of type InterPodAffinityArgs, got %T", obj)
|
||||
|
||||
Reference in New Issue
Block a user