-
Notifications
You must be signed in to change notification settings - Fork 345
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
Support for un-orchestrated containerd containers #1813
base: main
Are you sure you want to change the base?
Conversation
Thanks for the PR @itsCheithanya |
|
8e1f183
to
3a0a729
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.
To be verified before review:
What happens when the same container name exists in 2 namespaces. How will the policy enforcement work.
KubeArmor/core/containerdHandler.go
Outdated
@@ -110,7 +114,27 @@ func NewContainerdHandler() *ContainerdHandler { | |||
ch.docker = namespaces.WithNamespace(context.Background(), "moby") | |||
|
|||
// containerd namespace | |||
ch.containerd = namespaces.WithNamespace(context.Background(), "k8s.io") | |||
client, err := containerd.New(socketPath) |
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.
Can we use the namespaces API client over the existing gRPC connection instead of creating a full-fledged client? We do the same for Containers and Tasks.
Ref - https://pkg.go.dev/github.com/containerd/containerd/[email protected]/services/namespaces/v1
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.
okay sure will do that
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.
Have made the changes @DelusionalOptimist
3a0a729
to
0119c49
Compare
Signed-off-by: Cheithanya <[email protected]>
0119c49
to
76e36b5
Compare
It seems alerts telemetry is not working for containers via |
Purpose of PR?:
When it comes to unorchestrated or non-kubernetes containers, right now KubeArmor works the best only with Docker runtime but not for containerd runtime,this PR fixes the issue related to monitoring and enforcement of containerd containers
Fixes #1426
Does this PR introduce a breaking change?
No
Apply this policy to a contianerd container
It blocks showing enforcement
Checklist:
<type>(<scope>): <subject>