[PATCH] Use nodename as key
This commit is contained in:
@@ -212,8 +212,8 @@ type ExtenderPreemptionArgs struct {
|
||||
// Pod being scheduled
|
||||
Pod *v1.Pod
|
||||
// Victims map generated by scheduler preemption phase
|
||||
// Only set NodeNameToMetaVictims if ExtenderConfig.NodeCacheCapable == true. Otherwise, only set NodeToVictims.
|
||||
NodeToVictims map[*v1.Node]*Victims
|
||||
// Only set NodeNameToMetaVictims if ExtenderConfig.NodeCacheCapable == true. Otherwise, only set NodeNameToVictims.
|
||||
NodeNameToVictims map[string]*Victims
|
||||
NodeNameToMetaVictims map[string]*MetaVictims
|
||||
}
|
||||
|
||||
|
@@ -199,9 +199,9 @@ type ExtenderPreemptionArgs struct {
|
||||
// Pod being scheduled
|
||||
Pod *apiv1.Pod `json:"pod"`
|
||||
// Victims map generated by scheduler preemption phase
|
||||
// Only set NodeNameToMetaVictims if ExtenderConfig.NodeCacheCapable == true. Otherwise, only set NodeToVictims.
|
||||
NodeToVictims map[*apiv1.Node]*Victims `json:"nodeToVictims,omitempty"`
|
||||
NodeNameToMetaVictims map[string]*MetaVictims `json:"nodeNameToMetaVictims,omitempty"`
|
||||
// Only set NodeNameToMetaVictims if ExtenderConfig.NodeCacheCapable == true. Otherwise, only set NodeNameToVictims.
|
||||
NodeNameToVictims map[string]*Victims `json:"nodeToVictims,omitempty"`
|
||||
NodeNameToMetaVictims map[string]*MetaVictims `json:"nodeNameToMetaVictims,omitempty"`
|
||||
}
|
||||
|
||||
// Victims represents:
|
||||
|
15
pkg/scheduler/api/v1/zz_generated.deepcopy.go
generated
15
pkg/scheduler/api/v1/zz_generated.deepcopy.go
generated
@@ -208,11 +208,16 @@ func (in *ExtenderPreemptionArgs) DeepCopyInto(out *ExtenderPreemptionArgs) {
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
}
|
||||
if in.NodeToVictims != nil {
|
||||
in, out := &in.NodeToVictims, &out.NodeToVictims
|
||||
*out = make(map[*core_v1.Node]*Victims, len(*in))
|
||||
for range *in {
|
||||
// FIXME: Copying unassignable keys unsupported *core_v1.Node
|
||||
if in.NodeNameToVictims != nil {
|
||||
in, out := &in.NodeNameToVictims, &out.NodeNameToVictims
|
||||
*out = make(map[string]*Victims, len(*in))
|
||||
for key, val := range *in {
|
||||
if val == nil {
|
||||
(*out)[key] = nil
|
||||
} else {
|
||||
(*out)[key] = new(Victims)
|
||||
val.DeepCopyInto((*out)[key])
|
||||
}
|
||||
}
|
||||
}
|
||||
if in.NodeNameToMetaVictims != nil {
|
||||
|
15
pkg/scheduler/api/zz_generated.deepcopy.go
generated
15
pkg/scheduler/api/zz_generated.deepcopy.go
generated
@@ -208,11 +208,16 @@ func (in *ExtenderPreemptionArgs) DeepCopyInto(out *ExtenderPreemptionArgs) {
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
}
|
||||
if in.NodeToVictims != nil {
|
||||
in, out := &in.NodeToVictims, &out.NodeToVictims
|
||||
*out = make(map[*v1.Node]*Victims, len(*in))
|
||||
for range *in {
|
||||
// FIXME: Copying unassignable keys unsupported *v1.Node
|
||||
if in.NodeNameToVictims != nil {
|
||||
in, out := &in.NodeNameToVictims, &out.NodeNameToVictims
|
||||
*out = make(map[string]*Victims, len(*in))
|
||||
for key, val := range *in {
|
||||
if val == nil {
|
||||
(*out)[key] = nil
|
||||
} else {
|
||||
(*out)[key] = new(Victims)
|
||||
val.DeepCopyInto((*out)[key])
|
||||
}
|
||||
}
|
||||
}
|
||||
if in.NodeNameToMetaVictims != nil {
|
||||
|
Reference in New Issue
Block a user