opensergo / opensergo-control-plane

Universal cloud-native microservice governance control plane (微服务治理控制面)
Apache License 2.0
35 stars 23 forks source link

How to remove watches at runtime | 怎样在运行过程中,移除对 k8s 中 CRD的watcher #23

Open jnan806 opened 1 year ago

jnan806 commented 1 year ago

In current version, the watches for CRD in kubernetes can be added when the OpenSergo SDK start a SubscribeConfig request. But when I try to remove the watches when receive an unSubscribeConfig request, I found there is no function in client-go of kubernetes to deal with it.

So, I try to find a solution in official project. There are some relation issues, maybe we can fix this issue according to the official issue.

The official issue refers to https://github.com/kubernetes-sigs/controller-runtime/issues/1884

jnan806 commented 1 year ago

new progress: feature will be supported in version v0.26.0-alpha.3 of kuberneres.

detail refer to official issue 1884 which this issue has commented above.

jnan806 commented 1 year ago

new progress: version of kuberneres in kuberneres-sigs/controller-runtime has been bumped into v0.26.0-alpha.3. this feature PR of Support registration and removal of event handler is committed by contributor, and waiting for merging by official.

The official PR refers to https://github.com/kubernetes-sigs/controller-runtime/pull/2046

jnan806 commented 1 year ago

new progress: feature will be supported in version v0.26.0-alpha.3 of kuberneres-sigs/controller-runtime, the PR has been merged. And we need waiting for a release version of kubernetes-sigs/controller-runtime or use the master branch of kubernetes-sigs/controller-runtime

relation ISSUE refers to https://github.com/kubernetes-sigs/controller-runtime/issues/2047

camilamacedo86 commented 1 year ago

It seems not supported so far see: https://github.com/kubernetes-sigs/controller-runtime/issues/1884

jnan806 commented 1 year ago

It seems not supported so far see: kubernetes-sigs/controller-runtime#1884

I'm very looking forward to it ~

jnan806 commented 1 year ago

related PR (https://github.com/kubernetes-sigs/controller-runtime/pull/2099) has been posted by official.

we can deal with it after the PR merged ~

jnan806 commented 1 year ago

The old PR is closed in official, and a new one is open https://github.com/kubernetes-sigs/controller-runtime/pull/2159