Handle lack of CRDs gracefully for every controller #3009
Labels
area/debt
area/maintenance
Cleanup, refactoring, and other maintenance improvements that don't change functionality.
Milestone
Is there an existing issue for this?
Problem Statement
Currently, KIC verifies the existence of CRDs installation in the cluster only for part of its resources' controllers. It uses
crdExistsChecker
inAutoHandler
field of theControllerDef
struct to do that. Its job is to ensure that a given CRD exists in the cluster, and if not, to disable the controller completely. For the other controllers which don't usecrdExistsChecker
, behavior is different and falls back to a default one ofruntime-controller
upstream: controller awaits for cache to synchronize, but while CRD doesn't exist, it timeouts after default 2 minutes and crashes the whole process (see Kong/gateway-operator#326).Proposed Solution
Make sure that all controllers have a uniform way of handling the lack of required CRDs (log the fact of disabling a controller and don't crash the process).
Further work
Acceptance Criteria
The text was updated successfully, but these errors were encountered: