Skip to content

Commit

Permalink
looking at the krt snapshot, we can see the client hasn't connected t…
Browse files Browse the repository at this point in the history
…o the gateway; with that in mind, added retries to fetching xds snapshots
  • Loading branch information
yuval-k committed Nov 26, 2024
1 parent 2635711 commit 7bd2324
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion projects/gateway2/proxy_syncer/proxy_syncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ func (s *ProxySyncer) Init(ctx context.Context, dbg *krt.DebugHandler) error {
ctx,
s.istioClient,
rlkubev1a1.SchemeGroupVersion.WithResource("ratelimitconfigs"),
krt.WithName("KubeRateLimitConfwithDebug,igs"),
krt.WithName("KubeRateLimitConfigs"), withDebug,
)

upstreams := SetupCollectionDynamic[glookubev1.Upstream](
Expand Down
12 changes: 10 additions & 2 deletions projects/gateway2/setup/ggv2setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,10 +294,18 @@ func testScenario(t *testing.T, ctx context.Context, client istiokube.CLIClient,
}
t.Log("applied yamls", t.Name())
// make sure all yamls reached the control plane
time.Sleep(time.Second)
timer := time.NewTimer(10 * time.Second)
defer timer.Stop()

dump := getXdsDump(t, ctx, xdsPort, testgwname)

for len(dump.Listeners) == 0 {
select {
case <-timer.C:
dump = getXdsDump(t, ctx, xdsPort, testgwname)
case <-timer.C:
t.Fatalf("timed out waiting for listeners")
}
}
if write {
t.Logf("writing out file")
// serialize xdsDump to yaml
Expand Down

0 comments on commit 7bd2324

Please sign in to comment.