You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/admin/admission-controllers.md
+11-10
Original file line number
Diff line number
Diff line change
@@ -434,7 +434,7 @@ This admission controller defaults and limits what node selectors may be used wi
434
434
435
435
#### Configuration File Format
436
436
437
-
PodNodeSelector uses a configuration file to set options for the behavior of the backend.
437
+
`PodNodeSelector`uses a configuration file to set options for the behavior of the backend.
438
438
Note that the configuration file format will move to a versioned file in a future release.
439
439
This file may be json or yaml and has the following format:
440
440
@@ -445,7 +445,7 @@ podNodeSelectorPluginConfig:
445
445
namespace2: <node-selectors-labels>
446
446
```
447
447
448
-
Reference the PodNodeSelector configuration file from the file provided to the API server's command line flag `--admission-control-config-file`:
448
+
Reference the `PodNodeSelector` configuration file from the file provided to the API server's command line flag `--admission-control-config-file`:
449
449
450
450
```yaml
451
451
kind: AdmissionConfiguration
@@ -457,7 +457,7 @@ plugins:
457
457
```
458
458
459
459
#### Configuration Annotation Format
460
-
PodNodeSelector uses the annotation key `scheduler.kubernetes.io/node-selector` to assign node selectors to namespaces.
460
+
`PodNodeSelector`uses the annotation key `scheduler.kubernetes.io/node-selector` to assign node selectors to namespaces.
461
461
462
462
```yaml
463
463
apiVersion: v1
@@ -470,15 +470,16 @@ metadata:
470
470
471
471
#### Internal Behavior
472
472
This admission controller has the following behavior:
473
-
1. If the namespace has an annotation with a key `scheduler.kubernetes.io/nodeSelector`, use its value as the
474
-
namespace node selector.
475
-
2. If the namespace lacks such an annotation, use the `clusterDefaultNodeSelector` defined in the plugin
476
-
configuration file as the namespace node selector.
477
-
3. Evaluate the pod's node selector against the namespace node selector for conflicts. Conflicts result in rejection.
478
-
4. Evaluate the pod's node selector against the namespace-specific whitelist defined the plugin configuration file.
473
+
1. If the `Namespace` has an annotation with a key `scheduler.kubernetes.io/nodeSelector`, use its value as the
474
+
node selector.
475
+
1. If the namespace lacks such an annotation, use the `clusterDefaultNodeSelector` defined in the `PodNodeSelector`
476
+
plugin configuration file as the node selector.
477
+
1. Evaluate the pod's node selector against the namespace node selector for conflicts. Conflicts result in rejection.
478
+
1. Evaluate the pod's node selector against the namespace-specific whitelist defined the plugin configuration file.
479
479
Conflicts result in rejection.
480
480
481
-
Note: PodTolerationRestriction is more versatile and powerful than PodNodeSelector and can encompass the scenarios supported by PodNodeSelector.
481
+
**Note:** `PodTolerationRestriction` is more versatile and powerful than `PodNodeSelector` and can encompass the scenarios supported by `PodNodeSelector`.
0 commit comments