Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

promote PodNodeSelector to stable; document detailed behavior #7134

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion docs/admin/admission-controllers.md
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ plugins:
```

#### Configuration Annotation Format
PodNodeSelector uses the annotation key `scheduler.alpha.kubernetes.io/node-selector` to assign node selectors to namespaces.
PodNodeSelector uses the annotation key `scheduler.kubernetes.io/node-selector` to assign node selectors to namespaces.

```yaml
apiVersion: v1
Expand All @@ -468,6 +468,18 @@ metadata:
name: namespace3
```

#### Internal Behavior
This admission controller has the following behavior:
1. If the namespace has an annotation with a key `scheduler.kubernetes.io/nodeSelector`, use its value as the
namespace node selector.
2. If the namespace lacks such an annotation, use the `clusterDefaultNodeSelector` defined in the plugin
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the convention is to use 1. for all items in an order list.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency's sake, say "the PodNodeSelector configuration file" instead of "the plugin configuration file" because the latter one is ambiguous.

configuration file as the namespace node selector.
3. Evaluate the pod's node selector against the namespace node selector for conflicts. Conflicts result in rejection.
4. Evaluate the pod's node selector against the namespace-specific whitelist defined the plugin configuration file.
Conflicts result in rejection.

Note: PodTolerationRestriction is more versatile and powerful than PodNodeSelector and can encompass the scenarios supported by PodNodeSelector.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The format for a "note":

**Note:** text you want to put into the note.
{: .note}


### PersistentVolumeClaimResize

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