fix: drop :80 port suffix from service proxy URL for RBAC compatibility
When the proxy URL includes `:80`, Kubernetes checks the RBAC resourceName as `polaris-dashboard:80` which doesn't match the Role's resourceNames `["polaris-dashboard"]`. Dropping the port suffix uses the service's default port and matches the RBAC correctly. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
+2
-2
@@ -146,7 +146,7 @@ export function setRefreshInterval(seconds: number): void {
|
||||
// --- Polaris dashboard proxy URL ---
|
||||
|
||||
export const POLARIS_DASHBOARD_PROXY =
|
||||
'/api/v1/namespaces/polaris/services/polaris-dashboard:80/proxy/';
|
||||
'/api/v1/namespaces/polaris/services/polaris-dashboard/proxy/';
|
||||
|
||||
// --- Score computation ---
|
||||
|
||||
@@ -158,7 +158,7 @@ export function computeScore(counts: ResultCounts): number {
|
||||
// --- Data fetching hook ---
|
||||
|
||||
const POLARIS_API_PATH =
|
||||
'/api/v1/namespaces/polaris/services/polaris-dashboard:80/proxy/results.json';
|
||||
'/api/v1/namespaces/polaris/services/polaris-dashboard/proxy/results.json';
|
||||
|
||||
interface PolarisDataState {
|
||||
data: AuditData | null;
|
||||
|
||||
Reference in New Issue
Block a user