clusterpedia icon indicating copy to clipboard operation
clusterpedia copied to clipboard

The `apiservice controller` and `crd controller` of the clustersynchro will not stop when the cluster is not healthy

Open Iceber opened this issue 2 years ago • 4 comments

What happened?

The apiservice controller and crd controller of the clustersynchro will not stop when the cluster is not healthy.

What did you expect to happen?

The apiservice controller and crd controller of the synchronizer can be automatically started and stopped according to the health status of the imported cluster

How can we reproduce it (as minimally and precisely as possible)?

The clustersynchro manager log set to -v 3, you can find the informer of crd and apiservices will keep retrying the connection when the cluster is not healthy.

Anything else we need to know?

No response

Clusterpedia Version

# replace the pod name of clusterpedia apiserver
$ kubectl -n clusterpedia-system exec {clusterpedia-apiserver-pod-name} -- apiserver --version=raw
# paste output here

# replace the pod name of clusterpedia clustersynchro-manager
$ kubectl -n clusterpedia-system exec {clustersynchro-manager-pod-name} -- clustersynchro-manager --version=raw
# paste output here
version.Info{GitVersion:"v0.3.0-6-g114b699", GitCommit:"114b6991f917fcbac0632b7d855cc3918a69d5ce", GitTreeState:"clean", BuildDate:"2022-06-06T05:22:46Z", GoVersion:"go1.17.11", Compiler:"gc", Platform:"linux/amd64", KubeVersion:"v1.22.4"}

Host Kubernetes version

$ kubectl version
# paste output here

Iceber avatar Jun 07 '22 06:06 Iceber

@Iceber Hi, is there any development on this issue?

ONE7live avatar Jul 20 '22 08:07 ONE7live

@ONE7live This bug will be fixed in 0.5.

The dynamic discovery manager, which is a combination of crd controller and apiservice controller, will be refactored to be a more generic tool. And ClusterImportPolicy Controller will also use it.

Iceber avatar Jul 20 '22 08:07 Iceber

Ok, thanks for your reply, I see. Is anyone currently refactoring the dynamic discovery manager? Or how is it going? I thought maybe I could try to fix this when I have time. @Iceber

ONE7live avatar Jul 20 '22 09:07 ONE7live

This is a bit complicated, and I haven't thought through how to do it.

We have added a new component controller manager and interface to multi-cloud platform feature in 0.4, there are still a lot of optimizations to be done, if you are interested, you can learn more about it.

There are some optimization items in https://github.com/clusterpedia-io/clusterpedia/issues/185#issuecomment-1180093534, and I will submit some new issues afterwards

Iceber avatar Jul 21 '22 03:07 Iceber