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

Use better way to set up controller with Manager #27

Merged
merged 1 commit into from
Jul 15, 2024

Conversation

Jeffwan
Copy link
Collaborator

@Jeffwan Jeffwan commented Jul 13, 2024

In traditional flow, any reconciler initialization logic needs to updated in cmd/main.go which is not that clean. Now, we borrow the similar way adopted in kruise. There're few major changes

  1. Add Add interface and registry the controller together at pkg/controller/controller.go and finish setup with manager
  2. Create newReconciler method in every controller file.

After this change, whenever we need add a new controller or update controller initialization logic, we do not need to make the change here cmd.go and controller.go, most of the logics will be modified inside it's controller file.

@Jeffwan Jeffwan requested a review from varungup90 July 13, 2024 22:45
@Jeffwan Jeffwan force-pushed the jiaxin/unified-controller-manager branch from f34e145 to 7daee1c Compare July 14, 2024 22:09
@Jeffwan Jeffwan force-pushed the jiaxin/unified-controller-manager branch from 7daee1c to 7998f7a Compare July 14, 2024 23:03
@Jeffwan Jeffwan merged commit 8b032fc into main Jul 15, 2024
@Jeffwan Jeffwan deleted the jiaxin/unified-controller-manager branch July 15, 2024 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants