Skip to content

Commit

Permalink
clustermesh: write services synced canary into etcd
Browse files Browse the repository at this point in the history
This commit includes the glue logic to write the "synced" canary when
the initial synchronization from k8s completes. The corresponding
capability is not yet turned on in the CiliumClusterConfig, because
"synced" canaries need still to be enabled for the other resource types.

Signed-off-by: Marco Iorio <marco.iorio@isovalent.com>
  • Loading branch information
giorio94 committed May 24, 2023
1 parent ef89ab2 commit 37b4940
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions operator/watchers/k8s_service_sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,14 @@ func StartSynchronizingServices(ctx context.Context, wg *sync.WaitGroup, clients
}()
}

go func() {
<-k8sSvcCacheSynced
cache.WaitForCacheSync(ctx.Done(), endpointController.HasSynced)

log.Info("Initial list of services successfully received from Kubernetes")
kvs.Synced(ctx)
}()

wg.Add(1)
go func() {
defer wg.Done()
Expand Down

0 comments on commit 37b4940

Please sign in to comment.