From 123a3f4a21d480f32cc43b505d1e7e2f5f8ccae3 Mon Sep 17 00:00:00 2001 From: Marc Sanmiquel Date: Wed, 27 Nov 2024 17:06:58 +0100 Subject: [PATCH] fix(flameql): allow slashes in application name (#3722) * fix(flameql): allow slashes in application name --- pkg/og/flameql/flameql.go | 2 +- pkg/og/flameql/flameql_test.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/og/flameql/flameql.go b/pkg/og/flameql/flameql.go index bca663025e..c0c5b04ff7 100644 --- a/pkg/og/flameql/flameql.go +++ b/pkg/og/flameql/flameql.go @@ -101,7 +101,7 @@ func IsTagKeyRuneAllowed(r rune) bool { } func IsAppNameRuneAllowed(r rune) bool { - return r == '-' || r == '.' || IsTagKeyRuneAllowed(r) + return r == '-' || r == '.' || r == '/' || IsTagKeyRuneAllowed(r) } func IsTagKeyReserved(k string) bool { diff --git a/pkg/og/flameql/flameql_test.go b/pkg/og/flameql/flameql_test.go index f6baea64e1..5caef67ef1 100644 --- a/pkg/og/flameql/flameql_test.go +++ b/pkg/og/flameql/flameql_test.go @@ -70,6 +70,7 @@ var _ = Describe("ValidateAppName", func() { testCases := []testCase{ {"foo.BAR-1.2_baz_qux", nil}, + {"namespace/service", nil}, {"", ErrAppNameIsRequired}, {"#", ErrInvalidAppName},