Skip to content

Commit fd16ff5

Browse files
author
willise
committed
docs: reorganize topologyKey constraints
Signed-off-by: willise <[email protected]>
1 parent 650845a commit fd16ff5

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

content/en/docs/concepts/configuration/assign-pod-node.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,10 +226,11 @@ The legal operators for pod affinity and anti-affinity are `In`, `NotIn`, `Exist
226226
In principle, the `topologyKey` can be any legal label-key. However,
227227
for performance and security reasons, there are some constraints on topologyKey:
228228

229-
1. For affinity and for `requiredDuringSchedulingIgnoredDuringExecution` pod anti-affinity,
230-
empty `topologyKey` is not allowed.
231-
2. For `requiredDuringSchedulingIgnoredDuringExecution` pod anti-affinity, the admission controller `LimitPodHardAntiAffinityTopology` was introduced to limit `topologyKey` to `kubernetes.io/hostname`. If you want to make it available for custom topologies, you may modify the admission controller, or simply disable it.
232-
3. For `preferredDuringSchedulingIgnoredDuringExecution` pod anti-affinity, empty `topologyKey` is not allowed.
229+
1. For pod affinity, empty `topologyKey` is not allowed in both `requiredDuringSchedulingIgnoredDuringExecution`
230+
and `preferredDuringSchedulingIgnoredDuringExecution`.
231+
2. For pod anti-affinity, empty `topologyKey` is also not allowed in both `requiredDuringSchedulingIgnoredDuringExecution`
232+
and `preferredDuringSchedulingIgnoredDuringExecution`.
233+
3. For `requiredDuringSchedulingIgnoredDuringExecution` pod anti-affinity, the admission controller `LimitPodHardAntiAffinityTopology` was introduced to limit `topologyKey` to `kubernetes.io/hostname`. If you want to make it available for custom topologies, you may modify the admission controller, or simply disable it.
233234
4. Except for the above cases, the `topologyKey` can be any legal label-key.
234235

235236
In addition to `labelSelector` and `topologyKey`, you can optionally specify a list `namespaces`

0 commit comments

Comments
 (0)