Skip to content

Commit

Permalink
Fixed issue with microK8s config path in linux.
Browse files Browse the repository at this point in the history
  • Loading branch information
hanzlamateen committed May 15, 2023
1 parent be1a781 commit 887698b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion release/app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "etherealengine-control-center",
"version": "0.2.5",
"version": "0.2.6",
"description": "A desktop app for managing Ethereal Engine cluster.",
"license": "MIT",
"author": {
Expand Down
9 changes: 6 additions & 3 deletions src/main/handlers/Workloads/Workloads.class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,15 @@ class Workloads {

kc.setCurrentContext('minikube')
} else if (cluster.type === ClusterType.MicroK8s) {
const homePath = await getHomePath()
let configPath = path.join(homePath, '.kube/config-microk8s')

if (type === 'Windows_NT') {
const homePath = await getHomePath()
const configPath = path.join(Endpoints.Paths.WSL_PREFIX, homePath.replace('/', '\\'), '.kube\\config-microk8s')
kc.loadFromFile(configPath)
configPath = path.join(Endpoints.Paths.WSL_PREFIX, configPath.replaceAll('/', '\\'))
}

kc.loadFromFile(configPath)

const contextExists = kc.getContextObject('etherealengine-microk8s')
if (!contextExists) {
throw 'Unable to find microK8s config'
Expand Down

0 comments on commit 887698b

Please sign in to comment.