Update plugins/kubernetes-backend/src/service/KubernetesProxy.ts
Co-authored-by: Jamie Klassen <jklassen@vmware.com> Signed-off-by: Carlos Esteban Lopez Jaramillo <luchillo17@gmail.com>
This commit is contained in:
committed by
Fredrik Adelöw
parent
e4af45dc47
commit
d936b2feca
@@ -116,23 +116,11 @@ export class KubernetesProxy {
|
||||
return clusterDetail as ClusterDetails;
|
||||
}
|
||||
|
||||
private getClusterURI(details: ClusterDetails): string {
|
||||
const serverURI = this.getKubeConfig(details)?.getCurrentCluster()?.server;
|
||||
|
||||
if (!serverURI) {
|
||||
this.logger.error(`Cluster ${details.name} details IP error`);
|
||||
|
||||
throw new ConflictError('Cluster detail error');
|
||||
}
|
||||
|
||||
return serverURI;
|
||||
}
|
||||
|
||||
private async makeRequestToCluster(
|
||||
details: ClusterDetails,
|
||||
req: ExpressRequest,
|
||||
): Promise<Response> {
|
||||
const serverURI = this.getClusterURI(details);
|
||||
const serverURI = details.url;
|
||||
|
||||
const path = decodeURIComponent(req.params.path) || '';
|
||||
const uri = `${serverURI}/${path}`;
|
||||
|
||||
Reference in New Issue
Block a user