Skip to content

Commit

Permalink
Fix k8s api url for eks clusters (#4559)
Browse files Browse the repository at this point in the history
  • Loading branch information
gusevda authored Nov 28, 2023
1 parent 50be081 commit 7fa3531
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/MAPI/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1678,7 +1678,9 @@ export function getClusterK8sAPIUrl(
hostname = getClusterBaseUrl(cluster, providerFlavor).host;
}

return `https://${hostname}${port ? `:${port}` : ''}`;
const url = `${hostname}${port ? `:${port}` : ''}`;

return url.startsWith('https://') ? url : `https://${url}`;
}

export function getK8sAPIUrl(providerFlavor: ProviderFlavors): string {
Expand Down

0 comments on commit 7fa3531

Please sign in to comment.