-
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
Add support for setting sysctl values in podman play kube
manifests
#16711
Comments
A friendly reminder that this issue had no activity for 30 days. |
This would be great! |
Anyone interested in opening a PR? |
I'll take a look at this one |
Looks like, these configurations should go inside pod spec rather than container spec. https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.19/#podsecuritycontext-v1-core |
Actually it may be configured at both levels: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ |
SecurityContext is configured at both levels, but the sysctl configuration is defined in podsecuritycontext. |
Indeed, only the pod's securityContext can be used to set sysctl settings. |
Support sysctl configuration from Pod spec via podman kube play CLI Closes containers#16711 Signed-off-by: T K Chandra Hasan <[email protected]>
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind feature
Description
Please add support for
securityContext.sysctls.name
/securityContext.sysctls.value
inpodman play kube
.More information on the associated syntax can be found at https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/#setting-sysctls-for-a-pod
Steps to reproduce the issue:
sysctl.yaml
with the following content:Start the pod using that file:
podman play kube sysctl.yaml
and wait for the command's completion.In a new terminal, run
podman exec -i sysctl-alpine sysctl net.ipv4.icmp_echo_ignore_broadcasts
Describe the results you received:
net.ipv4.icmp_echo_ignore_broadcasts = 1
Describe the results you expected:
net.ipv4.icmp_echo_ignore_broadcasts = 0
Additional information you deem important (e.g. issue happens only occasionally):
podman supports overriding (a subset of) sysctl settings when running a container (through
podman run --sysctl name=value
).Running the same test with
podman run
gives the expected result:Output of
podman version
:Output of
podman info
:Package info (e.g. output of
rpm -q podman
orapt list podman
orbrew info podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide?
Yes
Additional environment details (AWS, VirtualBox, physical, etc.):
physical environment
The text was updated successfully, but these errors were encountered: