mirror of https://github.com/k3s-io/k3s
Fix typos
parent
30ed3b41b7
commit
31a139966c
|
@ -950,7 +950,7 @@ func (n *NodeLabelChecker) CheckNodeLabelPresence(pod *v1.Pod, meta PredicateMet
|
||||||
return true, nil, nil
|
return true, nil, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// ServiceAffinity defines a struct used for create service affinity predicates.
|
// ServiceAffinity defines a struct used for creating service affinity predicates.
|
||||||
type ServiceAffinity struct {
|
type ServiceAffinity struct {
|
||||||
podLister algorithm.PodLister
|
podLister algorithm.PodLister
|
||||||
serviceLister algorithm.ServiceLister
|
serviceLister algorithm.ServiceLister
|
||||||
|
@ -1012,7 +1012,7 @@ func NewServiceAffinityPredicate(podLister algorithm.PodLister, serviceLister al
|
||||||
//
|
//
|
||||||
// To do this, we "reverse engineer" a selector by introspecting existing pods running under the same service+namespace.
|
// To do this, we "reverse engineer" a selector by introspecting existing pods running under the same service+namespace.
|
||||||
// These backfilled labels in the selector "L" are defined like so:
|
// These backfilled labels in the selector "L" are defined like so:
|
||||||
// - L is a label that the ServiceAffinity object needs as a matching constraints.
|
// - L is a label that the ServiceAffinity object needs as a matching constraint.
|
||||||
// - L is not defined in the pod itself already.
|
// - L is not defined in the pod itself already.
|
||||||
// - and SOME pod, from a service, in the same namespace, ALREADY scheduled onto a node, has a matching value.
|
// - and SOME pod, from a service, in the same namespace, ALREADY scheduled onto a node, has a matching value.
|
||||||
//
|
//
|
||||||
|
|
|
@ -27,7 +27,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
// CalculateNodeAffinityPriorityMap prioritizes nodes according to node affinity scheduling preferences
|
// CalculateNodeAffinityPriorityMap prioritizes nodes according to node affinity scheduling preferences
|
||||||
// indicated in PreferredDuringSchedulingIgnoredDuringExecution. Each time a node match a preferredSchedulingTerm,
|
// indicated in PreferredDuringSchedulingIgnoredDuringExecution. Each time a node matchs a preferredSchedulingTerm,
|
||||||
// it will a get an add of preferredSchedulingTerm.Weight. Thus, the more preferredSchedulingTerms
|
// it will a get an add of preferredSchedulingTerm.Weight. Thus, the more preferredSchedulingTerms
|
||||||
// the node satisfies and the more the preferredSchedulingTerm that is satisfied weights, the higher
|
// the node satisfies and the more the preferredSchedulingTerm that is satisfied weights, the higher
|
||||||
// score the node gets.
|
// score the node gets.
|
||||||
|
|
|
@ -25,7 +25,7 @@ import (
|
||||||
schedulernodeinfo "k8s.io/kubernetes/pkg/scheduler/nodeinfo"
|
schedulernodeinfo "k8s.io/kubernetes/pkg/scheduler/nodeinfo"
|
||||||
)
|
)
|
||||||
|
|
||||||
// EmptyPriorityMetadataProducer should returns a no-op PriorityMetadataProducer type.
|
// EmptyPriorityMetadataProducer should return a no-op PriorityMetadataProducer type.
|
||||||
func TestEmptyPriorityMetadataProducer(t *testing.T) {
|
func TestEmptyPriorityMetadataProducer(t *testing.T) {
|
||||||
fakePod := new(v1.Pod)
|
fakePod := new(v1.Pod)
|
||||||
fakeLabelSelector := labels.SelectorFromSet(labels.Set{"foo": "bar"})
|
fakeLabelSelector := labels.SelectorFromSet(labels.Set{"foo": "bar"})
|
||||||
|
|
Loading…
Reference in New Issue