mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Reinstate canAdmitPodResult in policy_none:
This is to keep consistency with the other policies. This change may be made across all policies in a future PR, but removing it from the scope of this PR for now.
This commit is contained in:
parent
4cc5b9e46c
commit
e43f0a5293
@ -36,6 +36,12 @@ func (p *nonePolicy) Name() string {
|
|||||||
return PolicyNone
|
return PolicyNone
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *nonePolicy) Merge(providersHints []map[string][]TopologyHint) (TopologyHint, lifecycle.PodAdmitResult) {
|
func (p *nonePolicy) canAdmitPodResult(hint *TopologyHint) lifecycle.PodAdmitResult {
|
||||||
return TopologyHint{}, lifecycle.PodAdmitResult{Admit: true}
|
return lifecycle.PodAdmitResult{
|
||||||
|
Admit: true,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p *nonePolicy) Merge(providersHints []map[string][]TopologyHint) (TopologyHint, lifecycle.PodAdmitResult) {
|
||||||
|
return TopologyHint{}, p.canAdmitPodResult(nil)
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,7 @@ func TestPolicyNoneName(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestPolicyNoneMerge(t *testing.T) {
|
func TestPolicyNoneCanAdmitPodResult(t *testing.T) {
|
||||||
tcases := []struct {
|
tcases := []struct {
|
||||||
name string
|
name string
|
||||||
providersHints []map[string][]TopologyHint
|
providersHints []map[string][]TopologyHint
|
||||||
|
Loading…
Reference in New Issue
Block a user