KubeArmor
KubeArmor copied to clipboard
Multicontainer support for KubeArmor
Feature Request
Allow KubeArmor to apply policies at container level
Is your feature request related to a problem? Please describe the use case. Currently if we apply any policy to a pod running multiple containers, the policy get applied at pod level and we cannot create separate KubeArmor profile for different containers in the pod
Describe the solution you'd like Include container name field in the security policies and modify KubeArmor to apply policies to different containers based on this container name field.
For example: a pod is running 3 containers (container1/2/3) and we want to apply the policy to container1 and container2 then policy can be modified like:
spec:
Selector:
containerName:
name: container1, container2
cc @nam-jaehyun @nyrahul
spec:
Selector:
containerName:
- container1
- container2
how about this? having a list of containers rather than having a string?
Selector:
matchLabels:
container: ubuntu-container
containerName:
- nginx
Here: matchLabels will match the corresponding pod and containerName will match to the container inside that pod. If no matchLabels are applied then KubeArmor will apply the policy to all the containers with the respective containerName
Selector:
matchLabels:
container: ubuntu-container
kubearmor.io/container.name: nginx