Skip to content

Commit

Permalink
optimize internal network calls
Browse files Browse the repository at this point in the history
  • Loading branch information
nightwhite committed Mar 19, 2024
1 parent 1074a07 commit 5f603e7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion server/src/region/cluster/cluster.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,13 @@ export class ClusterService {
const conf = user.kubeconfig
const kc = new k8s.KubeConfig()
kc.loadFromString(conf)
kc.clusters[0].server = 'https://kubernetes.default.svc.cluster.local'
if (kc.clusters.length > 0) {
const cluster = {
...kc.clusters[0],
server: 'https://kubernetes.default.svc.cluster.local'
}
kc.clusters = [cluster]
}
return kc
}

Expand Down

0 comments on commit 5f603e7

Please sign in to comment.