Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle lack of CRDs gracefully for every controller #3009

Closed
4 tasks done
czeslavo opened this issue Oct 3, 2022 · 0 comments · Fixed by #3013
Closed
4 tasks done

Handle lack of CRDs gracefully for every controller #3009

czeslavo opened this issue Oct 3, 2022 · 0 comments · Fixed by #3013
Assignees
Labels
area/debt area/maintenance Cleanup, refactoring, and other maintenance improvements that don't change functionality.
Milestone

Comments

@czeslavo
Copy link
Contributor

czeslavo commented Oct 3, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Problem Statement

Currently, KIC verifies the existence of CRDs installation in the cluster only for part of its resources' controllers. It uses crdExistsChecker in AutoHandler field of the ControllerDef 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 use crdExistsChecker, behavior is different and falls back to a default one of runtime-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

  • While any resource controller is missing required CRD installation, it is automatically disabled
  • While a resource controller is disabled due to missing CRD installation, the event is explicitly logged in a uniform way common for every controller
@czeslavo czeslavo added area/debt area/maintenance Cleanup, refactoring, and other maintenance improvements that don't change functionality. labels Oct 3, 2022
@czeslavo czeslavo self-assigned this Oct 3, 2022
@czeslavo czeslavo added this to the KIC v2.8.0 milestone Oct 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/debt area/maintenance Cleanup, refactoring, and other maintenance improvements that don't change functionality.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant