mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 15:37:24 +00:00
Merge pull request #38084 from tanshanshan/fix-little1
Automatic merge from submit-queue Fix comment and optimize code **What this PR does / why we need it**: Fix comment and optimize code. Thanks. **Special notes for your reviewer**: **Release note**: ```release-note ```
This commit is contained in:
@@ -59,7 +59,7 @@ type Topologies struct {
|
||||
}
|
||||
|
||||
// NodesHaveSameTopologyKey checks if nodeA and nodeB have same label value with given topologyKey as label key.
|
||||
// If the topologyKey is nil/empty, check if the two nodes have any of the default topologyKeys, and have same corresponding label value.
|
||||
// If the topologyKey is empty, check if the two nodes have any of the default topologyKeys, and have same corresponding label value.
|
||||
func (tps *Topologies) NodesHaveSameTopologyKey(nodeA, nodeB *v1.Node, topologyKey string) bool {
|
||||
if len(topologyKey) == 0 {
|
||||
// assumes this is allowed only for PreferredDuringScheduling pod anti-affinity (ensured by api/validation)
|
||||
|
||||
Reference in New Issue
Block a user