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

@@ -2026,9 +2026,7 @@ type PodAffinityTerm struct {
// the labelSelector in the specified namespaces, where co-located is defined as running on a node
// whose value of the label with key topologyKey matches that of any node on which any of the
// selected pods is running.
// For PreferredDuringScheduling pod anti-affinity, empty topologyKey is interpreted as "all topologies"
// ("all topologies" here means all the topologyKeys indicated by scheduler command-line argument --failure-domains);
// for affinity and for RequiredDuringScheduling pod anti-affinity, empty topologyKey is not allowed.
// Empty topologyKey is not allowed.
// +optional
TopologyKey string
}