cloud-native-security-inspector
cloud-native-security-inspector copied to clipboard
CNSI is not capturing Workload of kind cronJob.
Environment Platform: Kubernetes Kubernetes/Platform Version(s):
Describe the bug During the Governor exporter found that CNSI is not capturing the Workload of kind cronJob. Instead, it is listing each job of cronJob as a separate Workload of kind Job. There was no grouping of containers under a single workload of kind CronJob.
To Reproduce Steps to reproduce the behavior:
- Create a cronJob
- check the workloads of the cnsi agent.
Expected behavior and actual behavior: There has to be a grouping of Job containers of cronJob as a single workload of kind CronJob.
Currently, the workload in the scanning reports is a struct like this: https://github.com/vmware-tanzu/cloud-native-security-inspector/blob/6dd414d0f11330808280ae6df6914495491c9f32/src/api/v1alpha1/workload.go#L39
The pods in Cronjob have been captured but not grouped by the CronJob kind, right?
yes
yes
As we discussed, probably we can organize the workload struct as we need in the new kind of inspector which is designed for collecting and sending the telemetry to VAC.