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

Remove the restriction on empty namespaceSelector in podaffinity #2483

Merged
merged 1 commit into from
Feb 10, 2021
Merged
Changes from all commits
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
25 changes: 2 additions & 23 deletions keps/sig-scheduling/2249-pod-affinity-namespace-selector/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -316,28 +316,6 @@ if the namespace where they are created have a resource quota object with
`CrossNamespaceAffinity` scope and a hard limit equal to the number of pods that are
allowed to.

Moreover, to prevent accidentally selecting a large number of namespaces, we will reject empty
selectors. For example, users can do the following:

```yaml
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- namespaceSelector:
matchExpressions:
- key: workload
operator: In
values:
- HPC
```

but can't do the following:

```yaml
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- namespaceSelector: {}
```

For more protection, admission webhooks like gatekeeper can be used to further
restrict the use of this field.

Expand Down Expand Up @@ -700,7 +678,8 @@ information to express the idea and why it was not acceptable.

## Implementation History
- 2021-01-11: Initial KEP sent for review

- 2021-02-10: Remove the restriction on empty namespace selector

<!--
Major milestones in the lifecycle of a KEP should be tracked in this section.
Major milestones might include:
Expand Down