karmada-io / karmada

Open, Multi-Cloud, Multi-Cluster Kubernetes Orchestration
https://karmada.io
Apache License 2.0
4.47k stars 883 forks source link

operator/pkg/tasks/init/etcd.go: Inconsistency Between Comment and Implementation in `runWaitEtcd` Function? #5633

Open mohamedawnallah opened 1 month ago

mohamedawnallah commented 1 month ago

Description

The comment in the runWaitEtcd function mentions that the function waits for etcd, Karmada API server, and aggregated API server to be ready. However, the current implementation only waits for the etcd pods based on the etcdLabels. Is there anything I'm missing? Or the comment should be updated?

https://github.com/karmada-io/karmada/blob/8cc712f698990251e20507f67604dd9a211a20a7/operator/pkg/tasks/init/etcd.go#L84-L100

zhzhuang-zju commented 3 weeks ago

Waiting for etcd, the Karmada API server, and the aggregated API server to be ready is implemented by the functions runWaitEtcd, runWaitKarmadaAPIServer, and runWaitKarmadaAggregatedAPIServer, respectively. Relevant comments can be updated to split this information across the three functions. Ask for @calvin0327 to confirm