ipn/store/kubestore: sanitize keys loaded to in-memory store (#15178)

Reads use the sanitized form, so unsanitized keys being stored
in memory resulted lookup failures, for example for serve config.

Updates tailscale/tailscale#15134

Signed-off-by: Irbe Krumina <irbe@tailscale.com>
This commit is contained in:
Irbe Krumina
2025-03-03 08:04:18 -08:00
committed by GitHub
parent 986daca5ee
commit a567f56445
2 changed files with 8 additions and 3 deletions

View File

@@ -169,7 +169,7 @@ func TestUpdateStateSecret(t *testing.T) {
// Verify memory store was updated
for k, v := range tt.updates {
got, err := s.memory.ReadState(ipn.StateKey(k))
got, err := s.memory.ReadState(ipn.StateKey(sanitizeKey(k)))
if err != nil {
t.Errorf("reading from memory store: %v", err)
continue