Do not allow empty topology key for pod affinities.

This commit is contained in:
Avesh Agarwal
2017-08-01 15:03:51 -04:00
parent 5ce3b359f1
commit 0dad8dd459
4 changed files with 49 additions and 29 deletions

View File

@@ -75,7 +75,6 @@ type Topologies struct {
}
// NodesHaveSameTopologyKey checks if nodeA and nodeB have same label value with given topologyKey as label key.
// 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 {
return NodesHaveSameTopologyKey(nodeA, nodeB, topologyKey)
}