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

Support shutdown controller to shutdown watching like SetupWithManager() to start watching. #2047

Closed
jnan806 opened this issue Nov 9, 2022 · 10 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@jnan806
Copy link

jnan806 commented Nov 9, 2022

What do you want to happen?

Now, we can setup a controller with the Manager to start watching resource, but there is no function to shutdown the controller has be setup by Manager.

If i want to shutdown the controller which has be setupped, i found there is no way.

@jnan806 jnan806 added the kind/feature Categorizes issue or PR as related to a new feature. label Nov 9, 2022
@FillZpp
Copy link
Contributor

FillZpp commented Nov 9, 2022

@jnan806 That can be supported with the watch removal. #1884

@jnan806
Copy link
Author

jnan806 commented Nov 9, 2022

@jnan806 That can be supported with the watch removal. kubernetes-sigs/controller-runtime#1884

the version was commented in that ISSUE looks does not work.

@jnan806
Copy link
Author

jnan806 commented Nov 9, 2022

@jnan806 That can be supported with the watch removal. kubernetes-sigs/controller-runtime#1884

close issue and refer to above

@jnan806 jnan806 closed this as completed Nov 9, 2022
@jnan806
Copy link
Author

jnan806 commented Nov 16, 2022

re-open
I has saw PR of Support registration and removal of event handler is merged in #2046.
And how we can use it by ShutdownWithManager() to removal handler like register Reconciler in SetupWithManager()
ctrl.NewControllerManagedBy(mgr).For(...).Complete(r)

@jnan806 jnan806 reopened this Nov 16, 2022
@camilamacedo86 camilamacedo86 transferred this issue from kubernetes-sigs/kubebuilder Nov 16, 2022
@camilamacedo86
Copy link
Member

I transfered this one for controller-runtime
However, @jnan806 after you check it out if you would like to collab with a doc/guidance to the kubebuilder project with that would be amazing.

@jnan806
Copy link
Author

jnan806 commented Nov 17, 2022

However, @jnan806 after you check it out if you would like to collab with a doc/guidance to the kubebuilder project with that would be amazing.

😂 I am only in the stage of using this product, and my tech has not reached the stage of contributing it.

And i am waiting for how to remove watch by ctrl.NewControllerManagedBy(mgr).For(...).Cancel(r) like ctrl.NewControllerManagedBy(mgr).For(...).Complete(r).

Does controller-runtime will support it ?

@camilamacedo86
Copy link
Member

camilamacedo86 commented Nov 17, 2022

Hi @jnan806,

Does controller-runtime will support it ?

It seems not supported but has an open issue for it: #1884

@FillZpp
Copy link
Contributor

FillZpp commented Nov 17, 2022

It seems not supported but has an open issue for it: #1884

Yeah, I'm working on the issue.

@jnan806
Copy link
Author

jnan806 commented Nov 17, 2022

Yeah, I'm working on the issue.

I'm very looking forward to it ~ 😄

@camilamacedo86
Copy link
Member

Closing as duplicated of : #1884

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

3 participants