Skip to content
Docs

Controller Design#

The controller is a crucial component of our system, responsible for managing the lifecycle of resources and ensuring that the desired state is maintained. This document outlines the design principles, architecture, and implementation details of the controller. It is responsible for both reconciling resources and managing webhooks, which are essential for validating and mutating resources during their creation or update.

Resource Reconciliation and Webhooks actions#

ResourceReconcilerCreate Admission WebhookUpdate Admission WebhookDelete Admission Webhook
Downloader--Ensure new “required” parameters aren’t added that referenced pipelines don’t specifyEnsure no Pipelines reference the Downloade in namespacer, if so prevent deletion
ClusterDownloader--Ensure new “required” parameters aren’t added that referenced pipelines don’t specifyEnsure no Pipelines reference the ClusterDownloader, if so prevent deletion
Uploader--Ensure new “required” parameters aren’t added that referenced profiles dont specifyEnsure no Profiles reference the Uploader in namepsace, if so prevent deletion
ClusterUploader--Ensure new “required” parameters aren’t added that referenced profiles dont specifyEnsure no Profiles reference the ClusterUploader, if so prevent deletion
Profile---Ensure no Pipelines reference the Profile, if so prevent deletion
PipelineCreate and manage scan and upload job along with upload serviceEnsure referenced (Cluster)?Downloader and Profile exist. Ensure no conflicts between Profile scanners and DownloaderSame as Create-
Crawler--Ensure new “required” parameters aren’t added that referenced profiles dont specifyEnsure no Searches or CronSearches reference the Crawler in namespace, if so prevent deletion
ClusterCrawler--Ensure new “required” parameters aren’t added that referenced profiles dont specifyEnsure no Searches or CronSearches reference the ClusterCrawler, if so prevent deletion
SearchCreate and manage search jobEnsure referenced Crawler or ClusterCrawler exist.Same as Create-
CronSearchCreate, manage and schedule Searches on a cron scheduleEnsure referenced Crawler or ClusterCrawler exist.Same as Create-