Skip to content

Commit 50d31dd

Browse files
colemickenszacharysarah
authored and
zacharysarah
committed
promote PodNodeSelector to stable; document detailed behavior (#7134)
* promote PodNodeSelector to stable; document detailed behavior * respond to feedback
1 parent 64efca4 commit 50d31dd

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

docs/admin/admission-controllers.md

+23
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,13 @@ plugins:
479479
```
480480

481481
#### Configuration Annotation Format
482+
<<<<<<< HEAD
482483
`PodNodeSelector` uses the annotation key `scheduler.alpha.kubernetes.io/node-selector` to assign node selectors to namespaces.
484+
||||||| merged common ancestors
485+
PodNodeSelector uses the annotation key `scheduler.alpha.kubernetes.io/node-selector` to assign node selectors to namespaces.
486+
=======
487+
`PodNodeSelector` uses the annotation key `scheduler.kubernetes.io/node-selector` to assign node selectors to namespaces.
488+
>>>>>>> promote PodNodeSelector to stable; document detailed behavior (#7134)
483489

484490
```yaml
485491
apiVersion: v1
@@ -490,6 +496,7 @@ metadata:
490496
name: namespace3
491497
```
492498

499+
<<<<<<< HEAD
493500
#### Internal Behavior
494501
This admission controller has the following behavior:
495502
1. If the `Namespace` has an annotation with a key `scheduler.alpha.kubernetes.io/node-selector`, use its value as the
@@ -504,6 +511,22 @@ This admission controller has the following behavior:
504511
admission plugin, which allows preventing pods from running on specifically tainted nodes.
505512
{: .note}
506513

514+
||||||| merged common ancestors
515+
=======
516+
#### Internal Behavior
517+
This admission controller has the following behavior:
518+
1. If the `Namespace` has an annotation with a key `scheduler.kubernetes.io/nodeSelector`, use its value as the
519+
node selector.
520+
1. If the namespace lacks such an annotation, use the `clusterDefaultNodeSelector` defined in the `PodNodeSelector`
521+
plugin configuration file as the node selector.
522+
1. Evaluate the pod's node selector against the namespace node selector for conflicts. Conflicts result in rejection.
523+
1. Evaluate the pod's node selector against the namespace-specific whitelist defined the plugin configuration file.
524+
Conflicts result in rejection.
525+
526+
**Note:** `PodTolerationRestriction` is more versatile and powerful than `PodNodeSelector` and can encompass the scenarios supported by `PodNodeSelector`.
527+
{: .note}
528+
529+
>>>>>>> promote PodNodeSelector to stable; document detailed behavior (#7134)
507530
### PersistentVolumeClaimResize
508531

509532
This admission controller implements additional validations for checking incoming `PersistentVolumeClaim` resize requests.

0 commit comments

Comments
 (0)