fix(dashboard): gate external-IPs services query on tenant namespace

Address review feedback from gemini-code-assist on ExternalIpsPage.tsx: add
enabled: !!tenantNamespace to the services useK8sList so it does not issue a
cluster-wide /api/v1/services request (403 for non-admin tenants) before the
tenant namespace is known.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
This commit is contained in:
Myasnikov DaniilandClaude Opus 4.8 committed 2026-06-23 12:22:39 +05:00
1 parent d4b0b527ba
commit fbbcc2ee81
1 file changed
+1 -1
@@ -30,7 +30,7 @@ export function ExternalIpsPage() {
plural: "services",
namespace: tenantNamespace ?? undefined,
},
{ fieldSelector: "spec.type=LoadBalancer" },
{ fieldSelector: "spec.type=LoadBalancer", enabled: !!tenantNamespace },
)
const items = data?.items ?? []