1
0
mirror of synced 2026-02-13 13:06:56 +00:00

Allow option to skip tenant namespace creation

Add --skip-namespace flag to the 'create tenant' command to skip automatic
namespace creation when the namespace already exists.

Signed-off-by: Anshuman Singh <anshumanchauhan9@gmail.com>
This commit is contained in:
Anshuman Singh
2025-11-21 17:46:12 +05:30
parent 55936e9366
commit 0ba28f3f91
3 changed files with 60 additions and 19 deletions

View File

@@ -54,6 +54,11 @@ func TestCreateTenant(t *testing.T) {
args: "create tenant dev-team --with-namespace=apps --cluster-role=custom-role --export",
assert: assertGoldenFile("./testdata/create_tenant/tenant-with-cluster-role.yaml"),
},
{
name: "tenant with skip namespace",
args: "create tenant dev-team --with-namespace=apps --cluster-role=cluster-admin --skip-namespace --export",
assert: assertGoldenFile("./testdata/create_tenant/tenant-with-skip-namespace.yaml"),
},
}
for _, tt := range tests {