fix comment and so on

This commit is contained in:
tanshanshan
2016-12-05 14:40:00 +08:00
parent b0b6f3c256
commit d1fd1d3516
2 changed files with 12 additions and 13 deletions

View File

@@ -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)