kubearmor-client/k8s
tesla59 ee40b91f0b feat: (recommend) Implement recommend functionality for Docker Client
cmd: rename k8s client to k8sclient

Signed-off-by: tesla59 <nishant@heim.id>

cmd: wrap k8sClient in interface to use in recommend package

Signed-off-by: tesla59 <nishant@heim.id>

k8s: fix ListDeployment method

Signed-off-by: tesla59 <nishant@heim.id>

recommend: refactor k8s policy generation
use a common interface to support other clients as well
also create common Object{} to support different k8s obejcts such as Deployment, Daemonset etc

Signed-off-by: tesla59 <nishant@heim.id>

recommend: use image name as Object's name while generating policy

Signed-off-by: tesla59 <nishant@heim.id>

recommend: remove DeploymentName Field from Object{}

Signed-off-by: tesla59 <nishant@heim.id>

recommend: use ListOptions to select deployment by labels

Signed-off-by: tesla59 <nishant@heim.id>

k8s: generate recommended policies for CronJob, DaemonSet and Jobs

Signed-off-by: tesla59 <nishant@heim.id>

k8s: generate recommend policy for statefulset and unowned replicaset

Signed-off-by: tesla59 <nishant@heim.id>

k8s: remove K8sClientWrapper abstraction

Signed-off-by: tesla59 <nishant@heim.id>

recommend: initialize dockerClient and generate policies for containers as well

Signed-off-by: tesla59 <nishant@heim.id>

recommend: add new flag k8s to specify which client to use
this removes dependency of recommend command on kubearmor

Signed-off-by: tesla59 <nishant@heim.id>

recommend: fallback to docker client if k8s client is not present

Signed-off-by: tesla59 <nishant@heim.id>

recommend: only log the client if images is not specified

Signed-off-by: tesla59 <nishant@heim.id>

recommend: generate policyDir based on image namespace set to null

Signed-off-by: tesla59 <nishant@heim.id>

recommend: trim \n in final report generation

Signed-off-by: tesla59 <nishant@heim.id>

recommend: handle err when listing objects

Signed-off-by: tesla59 <nishant@heim.id>

docker: Use API version negotiation to avoid version mismatch errors

Signed-off-by: tesla59 <nishant@heim.id>
2025-07-15 21:29:08 +05:30
..
client.go feat: (recommend) Implement recommend functionality for Docker Client 2025-07-15 21:29:08 +05:30
env.go feat: Add support for k0s 2023-09-18 19:59:15 +05:30