From 116e8acacb37405efd749587cbfc59b6f4796d9a Mon Sep 17 00:00:00 2001 From: Matt Toohey Date: Wed, 3 Jul 2024 09:16:17 +1000 Subject: [PATCH] fix: reduce ASM batch size to stay within filter limit of 10 (#1940) fixes #1937 Not able to reproduce the issue in local stack. A tag filter + 20 secret names worked fine there. --- common/configuration/asm_leader.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/configuration/asm_leader.go b/common/configuration/asm_leader.go index 59b78ea258..141b47a8b3 100644 --- a/common/configuration/asm_leader.go +++ b/common/configuration/asm_leader.go @@ -95,7 +95,9 @@ func (l *asmLeader) sync(ctx context.Context, secrets *xsync.MapOf[Ref, cachedSe // get values for new and updated secrets for len(refsToLoad) > 0 { - batchSize := 20 + // ASM returns an error when there are more than 10 filters + // A batch size of 9 + 1 tag filter keeps us within this limit + batchSize := 9 secretIDs := []string{} for ref := range refsToLoad { secretIDs = append(secretIDs, ref.String())