undistro / zora

Zora is an open source solution that helps you achieve compliance with Kubernetes best practices recommended by industry-leading frameworks. By scanning your cluster with multiple plugins, Zora identifies potential issues, misconfigurations, and vulnerabilities.
https://getup.io/opensource/zora-oss
Apache License 2.0
280 stars 24 forks source link

Delete dangling <Cronjobs> #165

Closed carlostrr closed 1 year ago

carlostrr commented 1 year ago

Description

In case a \<ClusterScan> is edited to remove one of its plugins, after the plugin's \<Cronjob> has already been created, the reconciler would not remove such instance.

Thus, this commit makes the scan controller delete \<Cronjobs> of plugins not configured up to the given reconciliation time.

How has this been tested?

With go test and local executions on a virtual cluster.

Checklist

cloudflare-pages[bot] commented 1 year ago

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 267d233
Status: ✅  Deploy successful!
Preview URL: https://472347f1.zora.pages.dev
Branch Preview URL: https://cscan-del-cj.zora.pages.dev

View logs