-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[FEAT] Support sysctl configurations from Pod Spec #17464
Conversation
Can you add a test? Start a pod and then inspect the container to make sure the sysctl is set. |
@rhatdan Yes, working on it. |
I have a query regarding the implementation. If i set the sysctl while creating the pod, its not updating. But if i set the same while creating containers, its working fine. I feel like this should be working when the infracontainer is created!! |
@Luap99 PTAL at my above query. |
NVM, figured it out :) It should be with infracontainers. |
a98ecd2
to
3e320b7
Compare
c1adc52
to
bdf4076
Compare
Support sysctl configuration from Pod spec via podman kube play CLI Closes containers#16711 Signed-off-by: T K Chandra Hasan <[email protected]>
bdf4076
to
94d4b52
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM
@umohnani8 PTAL
Thanks for contributing, @hasan4791 ! |
It("podman play kube test with sysctl & host network defined", func() { | ||
SkipIfRootless("Network sysctls are not available for rootless") | ||
err := writeYaml(podWithSysctlHostNetDefined, kubeYaml) | ||
Expect(err).ToNot(HaveOccurred()) | ||
|
||
kube := podmanTest.Podman([]string{"play", "kube", kubeYaml}) | ||
kube.WaitWithDefaultTimeout() | ||
Expect(kube).Should(Exit(125)) | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this test change the somaxconn value on the host, thus effecting all systems where this was run permanently? Tests should not change host behaviour. AFAIK having such a high value can be abused to create a DOS attack against the machine.
I recommend to use a safer sysctl for this test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This testcase is to check the failure. We cannot set sysctl when host network is enabled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh wait, right. sorry
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hasan4791, Luap99 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: T K Chandra Hasan [email protected]
Fixes: #16711
Does this PR introduce a user-facing change?
Yes