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

Start custom resource controllers when the CRD appears after KIC startup #3029

Closed
3 of 4 tasks
Tracked by #3009
czeslavo opened this issue Oct 5, 2022 · 4 comments · Fixed by Kong/charts#796
Closed
3 of 4 tasks
Tracked by #3009
Labels
area/feature New feature or request
Milestone

Comments

@czeslavo
Copy link
Contributor

czeslavo commented Oct 5, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Problem Statement

When KIC detects that required CRDs are not installed, it disables their controllers on startup. Once CRDs are installed, in order to make KIC reconcile their resources, a pod restart is required.

From the UX perspective, the desired behavior would be to make it possible to spin up the CRD controller once it gets installed dynamically in runtime, with no restart requirement.

Proposed Solution

Watch CustomResourceDefinition installations and run particular controllers dynamically on demand, once a new CRD installation is detected.

Acceptance Criteria

  • When a user doesn't install CRD before running KIC, the CRD controller is disabled at startup
  • When a user installs CRD with KIC running in the cluster, KIC picks this event up and starts reconciling its resources
  • Helm chart is updated with roles required for watching CustomResourceDefinitions
@czeslavo czeslavo added the area/feature New feature or request label Oct 5, 2022
@czeslavo czeslavo self-assigned this Oct 5, 2022
@mflendrich mflendrich changed the title Run CRD controller once it gets installed Start custom resource controllers when the CRD appears after KIC startup Dec 2, 2022
@mflendrich
Copy link
Member

@czeslavo: TBD if this could be implemented upstream in controller-runtime

@czeslavo please comment with the link to the controller-runtime upstream issue requesting this.

@mflendrich mflendrich added this to the KIC v3.0.0 milestone Dec 2, 2022
@czeslavo
Copy link
Contributor Author

czeslavo commented Dec 2, 2022

There was an issue in the controller-runtime that was mentioning a similar feature: kubernetes-sigs/controller-runtime#1994. Watching CRD resources and starting up the controller manually was advised.

@pmalek
Copy link
Member

pmalek commented Apr 4, 2023

Grooming notes: 04/04/2023

  • mostly relevant before Gateway API gets to GA. After that's reached we wouldn't really need it.
  • @czeslavo has most of the work done anyway so we might as well include it in KIC for better UX
  • currently slated for v3.0 but that will not happen if I'm not mistaken anytime soon. So if we want to have it, it's better to add it sooner rather than later because Gateway API getting to GA will make this irrelevant.
  • not relevant for Kong CRDs since those are include both in the helm chart and all on one manifests

@czeslavo
Copy link
Contributor Author

czeslavo commented Apr 4, 2023

POC: 5675231

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants