mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 22:46:12 +00:00
Test if 2 federated informers in rs controller are in sync
This commit is contained in:
parent
6e75fa9745
commit
7d1c85e476
@ -232,9 +232,20 @@ func (frsc *ReplicaSetController) isSynced() bool {
|
||||
glog.V(2).Infof("Cluster list not synced")
|
||||
return false
|
||||
}
|
||||
clusters2, err := frsc.fedPodInformer.GetReadyClusters()
|
||||
if err != nil {
|
||||
glog.Errorf("Failed to get ready clusters: %v", err)
|
||||
return false
|
||||
}
|
||||
|
||||
// This also checks whether podInformer and replicaSetInformer have the
|
||||
// same cluster lists.
|
||||
if !frsc.fedPodInformer.GetTargetStore().ClustersSynced(clusters) {
|
||||
return false
|
||||
}
|
||||
if !frsc.fedPodInformer.GetTargetStore().ClustersSynced(clusters2) {
|
||||
return false
|
||||
}
|
||||
|
||||
if !frsc.replicaSetController.HasSynced() {
|
||||
glog.V(2).Infof("federation replicaset list not synced")
|
||||
|
Loading…
Reference in New Issue
Block a user