Skip to content

Commit

Permalink
Merge pull request #2 from nightwhite/main
Browse files Browse the repository at this point in the history
  • Loading branch information
0fatal authored Mar 20, 2024
2 parents e5659b0 + 5f603e7 commit 08ee8b6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions server/src/region/cluster/cluster.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ export class ClusterService {
const conf = user.kubeconfig
const kc = new k8s.KubeConfig()
kc.loadFromString(conf)
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 08ee8b6

Please sign in to comment.