From c3c5c225be5ce78300d205b9600290669bbff4d0 Mon Sep 17 00:00:00 2001 From: Luis Perez Date: Thu, 26 Oct 2023 10:51:39 -0700 Subject: [PATCH 1/2] RFC: Add additional custom namespaces to k8s schema I see two potential solutions for allowing folks to use arbitrary namespaces: * we gatekeep them by needing us to add their namespace to this allowlist (which lets us make sure that they've correctly labeled their namespace as well as done everything else that we expect) OR, * we get rid of the allowlist and allow folks to put whatever namespace they'd like and expect that they know what they're doing :) --- paasta_tools/cli/schemas/kubernetes_schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paasta_tools/cli/schemas/kubernetes_schema.json b/paasta_tools/cli/schemas/kubernetes_schema.json index 94f08003b5..034dd33ba8 100644 --- a/paasta_tools/cli/schemas/kubernetes_schema.json +++ b/paasta_tools/cli/schemas/kubernetes_schema.json @@ -864,7 +864,7 @@ }, "namespace": { "type": "string", - "pattern": "^(paasta|paastasvc-.*)$" + "pattern": "^(paasta|jenkins|paastasvc-.*)$" } } } From b12598536ab370e77fcdc3ca7d58acb71564aa0f Mon Sep 17 00:00:00 2001 From: Luis Perez Date: Thu, 26 Oct 2023 11:01:34 -0700 Subject: [PATCH 2/2] regex updates --- paasta_tools/cli/schemas/kubernetes_schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paasta_tools/cli/schemas/kubernetes_schema.json b/paasta_tools/cli/schemas/kubernetes_schema.json index 034dd33ba8..cd8986a245 100644 --- a/paasta_tools/cli/schemas/kubernetes_schema.json +++ b/paasta_tools/cli/schemas/kubernetes_schema.json @@ -864,7 +864,7 @@ }, "namespace": { "type": "string", - "pattern": "^(paasta|jenkins|paastasvc-.*)$" + "pattern": "^(paasta|jenkins(-.+)?|paastasvc-.+)$" } } }