Skip to content

Commit

Permalink
v1.4.8 add a fix to kubectl path managment
Browse files Browse the repository at this point in the history
  • Loading branch information
lefebsy committed Jun 16, 2022
1 parent a809e6a commit 0a1f7f9
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .sonarcloud.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sonar.projectVersion=1.4.7
sonar.projectVersion=1.4.8
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

All notable changes to the "vskubi-lite" extension will be documented in this file.

## 1.4.8
- Fix kubectl path for latest kubernetes exenstion versions

## 1.4.7
- Fix security

Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vskubi-lite",
"version": "1.4.7",
"version": "1.4.8",
"displayName": "Kubi-lite",
"description": "Kubernetes CA-GIP/Kubi CLI, Lite wrapper version compatible with VSCode and Theia IDE",
"engines": {
Expand Down Expand Up @@ -172,7 +172,7 @@
"eslint": "^7.10.0",
"glob": "^7.1.6",
"js-yaml": "3.14.0",
"minimist": ">=1.2.5",
"minimist": ">=1.2.6",
"mocha": "^8.1.3",
"node-forge": ">=0.10.0",
"ts-loader": "^8.0.4",
Expand Down
11 changes: 6 additions & 5 deletions src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,13 @@ export function refreshStatusBar(kubiStatusChannel: vscode.StatusBarItem, endpoi
* Get Kubectl path from vsKubernetes settings
*/
export function kctl(): string {
const kubectlPath = vscode.workspace.getConfiguration('vs-kubernetes')['vs-kubernetes.kubectl-path'];
const kubectlPathLinux = vscode.workspace.getConfiguration('vs-kubernetes')['vs-kubernetes.kubectl-path.linux'];
const kubectlPathWindows = vscode.workspace.getConfiguration('vs-kubernetes')['vs-kubernetes.kubectl-path.windows'];
return kubectlPath || kubectlPathLinux || kubectlPathWindows;
}
let kubectlPath = vscode.workspace.getConfiguration('vscode-kubernetes')['kubectl-path'];

// old way kubernetes extension storing settings
let legacy_kubectlPath = vscode.workspace.getConfiguration('vs-kubernetes')['vs-kubernetes.kubectl-path'];

return kubectlPath || legacy_kubectlPath || 'kubectl path not found, set it in kubernetes extension please';
}

/**
* Write directly in the KubeConfig file a new default context namespace
Expand Down

0 comments on commit 0a1f7f9

Please sign in to comment.