-
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
Podman pod YAML with --security-opt seccomp #8130
Comments
@haircommander PTAL |
It is not currently supported, would you have any interest in trying to implement it @nikAizuddin ? We'd need to add a flag to generate kube similar to play kube: |
Wait, I didn't noticed |
I create
Then, create pod and container with:
The
Here YAML file generated from
|
@haircommander I just tried with |
you need to specify the file name in the pod annotations:
|
@nikAizuddin were you able to get this to work? |
The issue is we're trying for kube compatibility, but also use expressiveness. It may be confusing if we silently find a seccomp.json in /etc/containers, and kube fails to find such a file because it only looks in /var/lib/kubelet/seccomp/. Having the flag makes this behaviour explicit |
But if I have the file in /var/lib/kubelet/seccomp/ then it would work? What does podman generate kube do with this information? |
I haven't tried yet. At the moment I manually create a pod and then add windefender container with
I'll try this solution by tomorrow and I'll report back. |
@nikAizuddin What were the results? |
Hi, sorry for delay. I just got time to test it today. Unfortunately, I cannot execute YAML with annotations. I got the following error:
I can execute the YAML file if I remove annotations. |
But if I change from kind: Pod
metadata:
annotations:
- - seccomp.security.alpha.kubernetes.io/pod: localhost/seccomp.json
+ seccomp.security.alpha.kubernetes.io/pod: localhost/seccomp.json
name: multiav-pod
spec:
restartPolicy: OnFailur |
I'm going to replace this existing workaround with |
Alright, I have replaced the workaround with YAML file and tested working. This the rendered version of the YAML file:
I have one more question. Is it possible to apply seccomp profile only for |
I know this is an old thread, but I think others might look for the same answer.
To apply the profile to a single container, use If both annotations are specified, the container-oriented one takes precedence. |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind feature
Description
How do I create a pod
YAML
file that is equivalent to--security-opt seccomp=profile.json
? For example the following situation:I have to use
seccomp
. Otherwise, the./mpclient
command will fail.Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide?
No
Additional environment details (AWS, VirtualBox, physical, etc.):
I'm running Fedora 32 in Vagrant box with libvirt provider.
The text was updated successfully, but these errors were encountered: