[KEP-2400]: Restrict access to swap for containers in high priority Pods#125277
[KEP-2400]: Restrict access to swap for containers in high priority Pods#125277k8s-ci-robot merged 3 commits intokubernetes:masterfrom
Conversation
|
/sig node |
|
@iholder101: GitHub didn't allow me to request PR reviews from the following users: fabiand. Note that only kubernetes members and repo collaborators can review this PR, and authors cannot review their own PRs. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
@haircommander do we need a backing issue for this PR? |
|
Changelog suggestion -Exclude critical pods from having swap access
+Changed Linux swap handling to restrict access to swap for containers in high priority Pods.
+New Pods that have a node- or cluster-critical priority are prohibited from accessing swap on Linux,
+even if your cluster and node configuration could otherwise allow this. |
c92bb66 to
c5fbd74
Compare
Thanks, done! |
|
/retest |
I think we can discuss pros and cons here |
I think the use case is reasonable. Many critical components don't have the memory limit set today. |
|
Is this in line with the KEP https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/2400-node-swap#set-aside-swap-for-system-critical-daemons
|
|
/triage accepted |
|
The Kubernetes project has merge-blocking tests that are currently too flaky to consistently pass. This bot retests PRs for certain kubernetes repos according to the following rules:
You can:
/retest |
5 similar comments
|
The Kubernetes project has merge-blocking tests that are currently too flaky to consistently pass. This bot retests PRs for certain kubernetes repos according to the following rules:
You can:
/retest |
|
The Kubernetes project has merge-blocking tests that are currently too flaky to consistently pass. This bot retests PRs for certain kubernetes repos according to the following rules:
You can:
/retest |
|
The Kubernetes project has merge-blocking tests that are currently too flaky to consistently pass. This bot retests PRs for certain kubernetes repos according to the following rules:
You can:
/retest |
|
The Kubernetes project has merge-blocking tests that are currently too flaky to consistently pass. This bot retests PRs for certain kubernetes repos according to the following rules:
You can:
/retest |
|
The Kubernetes project has merge-blocking tests that are currently too flaky to consistently pass. This bot retests PRs for certain kubernetes repos according to the following rules:
You can:
/retest |
|
/hold |
|
|
||
| if tc.isCriticalPod { | ||
| pod.Spec.Priority = ptr.To(scheduling.SystemCriticalPriority) | ||
| assert.Equal(t, true, types.IsCriticalPod(pod), "pod is expected to be critical") |
There was a problem hiding this comment.
| assert.Equal(t, true, types.IsCriticalPod(pod), "pod is expected to be critical") | |
| assert.True(t, types.IsCriticalPod(pod), "pod is expected to be critical") |
|
/lgtm cancel |
c5fbd74 to
353d71a
Compare
Signed-off-by: Itamar Holder <iholder@redhat.com>
Signed-off-by: Itamar Holder <iholder@redhat.com>
Signed-off-by: Itamar Holder <iholder@redhat.com>
353d71a to
a6df16a
Compare
|
/lgtm |
|
LGTM label has been added. DetailsGit tree hash: 8bd81f644c8d8f2768129031f7e36f1877bf2dc4 |
|
/hold cancel |
that is to align with the upstream k8s swap approach: kubernetes/kubernetes#125277 Signed-off-by: Igor Bezukh <ibezukh@redhat.com>
What type of PR is this?
/kind feature
What this PR does / why we need it:
Exclude critical pods from gaining swap access.
I believe this is valuable for two main reasons:
p.s. currently, it is possible to opt-out of swap for burstable pods by setting
requests.memory == limits.memory. However, this approach forces the workload owner to set limits which is unacceptable for certain workloads. With this, an administrator can choose to classify such burstable pods as critical to opt-out of swap.Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: