-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Swap Support #14950
Comments
This sounds like a good feature to support and an easy thing to add. Happy to review a PR. |
Hi @olemarkus I am a returning newbie in Kops project (2 PRs 3 years ago :)) looking for a refresher task. This one looks promising. Before I submit the PR I just want to make sure my understanding is correct. The following is my idea: I'd modify pkg/api/kops/componentconfig.go and pkg/apis/kops/v1alpha2 by adding the following struct:
And than simply add the option into KubeletConfigSpec struct:
What do you think? Are my thoughts going in the right direction? |
|
You'll also need to add it to v1alpha3. |
The field should be a custom type |
What is the point of implementing this feature than? If kOps always uses cgroups v2, it means that the memory swap feature is not supported. Therefore, implementing the MemorySwapConfiguration would not have any effect on the behavior of kOps clusters and would not provide any additional functionality. So, IMHO it would be redundant and unnecessary to add this feature. Or am I missing something? :) Why setting UnlimitedSwap as default option if memory swap is not supported at all? |
I'm not sure where you're getting this but it's incorrect. Memory swap is supported with cgroups v2 however the only supported options are |
I deduced it from the reference doc :)
vs
|
That section is only for the behavior of |
@ReillyBrogan got it. One more thing, the default value should be "" or "UnlimitedSwap"? |
The default if a user does not set The rough logic should look like this:
I'm not sure if setting |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale We would like this option as well. Makes a lot of sense to have it in kops. |
As mentioned above, we're happy to review a PR. |
/assign Omg, I totally shadowed this! Sorry. PR is on a way. |
Regarding setting Users should explicitly enable the |
@tomesm any update? can we help/test something? |
@jan-kantert > @tomesm any update? can we help/test something? I have opened the PR 2 months ago and have been waiting for any feedback since than. Is there anything more I can do? |
@olemarkus are you still available to review the PR? |
/kind feature
1. Describe IN DETAIL the feature/behavior/change you would like to see.
Kubernetes 1.22 introduced support for enabling swap on nodes. There are many usecases that benefit from this, so it would be great if Kops supported enabling this.
Unfortunately while it appears that the
NodeSwap
feature gate andfailSwapOn: false
work as expected it appears that there is no way to modify theMemorySwapConfiguration
in the kubelet config to change the default setting fromLimitedSwap
toUnlimitedSwap
. This means that it is still not possible to actually use swap for Kubernetes workloads, only that it can be used for non-kubernetes processes running on the host.2. Feel free to provide a design supporting your feature request.
Perhaps
kubelet
andmasterKubelet
could be extended with the following:Reference:
The text was updated successfully, but these errors were encountered: