From 4ae2ec9b9901d2ff9e1ccc20b613b45031e67034 Mon Sep 17 00:00:00 2001 From: Bojidar Marinov Date: Tue, 15 Oct 2024 18:25:45 +0300 Subject: [PATCH] fix: limit the proxy only to versioned services --- cmd/tpodproxy/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/tpodproxy/main.go b/cmd/tpodproxy/main.go index 1fa2bc3..2f605e3 100644 --- a/cmd/tpodproxy/main.go +++ b/cmd/tpodproxy/main.go @@ -21,7 +21,7 @@ const SpecialHeaderName = "X-Apocryph-Expected" const VerificationServiceURL = "http://verification-service.kube-system.svc.cluster.local:8080" -var ValidServiceNames = regexp.MustCompile("^[a-z][a-z0-9-]{0,62}$") +var ValidServiceNames = regexp.MustCompile("^tpod-vh-[a-z0-9-]{52}$") //^[a-z][a-z0-9-]{0,62}$ var currentBackingService string // e.g. tpod-XXX var backingServiceSuffix string // e.g. .NS.svc.cluster.local