mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix use of bundled kubectl (#241)
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
1 parent
758034f61a
commit
d80e956870
5 files changed
+45
-3
No files matched your search
@@ -0,0 +1,9 @@
|
||||
const userStore = {
|
||||
getPreferences: jest.fn(() => {
|
||||
return {
|
||||
downloadMirror: "default"
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export { userStore };
|
||||
+3
-2
@@ -11,6 +11,7 @@ import * as lockFile from "proper-lockfile"
|
||||
import { helmCli } from "./helm-cli"
|
||||
import { userStore } from "../common/user-store"
|
||||
|
||||
const bundledVersion = require("../../package.json").config.bundledKubectlVersion
|
||||
const kubectlMap: Map<string, string> = new Map([
|
||||
["1.7", "1.8.15"],
|
||||
["1.8", "1.9.10"],
|
||||
@@ -22,7 +23,7 @@ const kubectlMap: Map<string, string> = new Map([
|
||||
["1.14", "1.14.10"],
|
||||
["1.15", "1.15.11"],
|
||||
["1.16", "1.16.8"],
|
||||
["1.17", "1.17.4"],
|
||||
["1.17", bundledVersion],
|
||||
["1.18", "1.18.0"]
|
||||
])
|
||||
|
||||
@@ -54,7 +55,7 @@ export class Kubectl {
|
||||
|
||||
public static readonly kubectlDir = path.join((app || remote.app).getPath("userData"), "binaries", "kubectl")
|
||||
public static readonly bundledKubectlPath = bundledPath
|
||||
public static readonly bundledKubectlVersion: string = require("../../package.json").config.bundledKubectlVersion
|
||||
public static readonly bundledKubectlVersion: string = bundledVersion
|
||||
private static bundledInstance: Kubectl;
|
||||
|
||||
// Returns the single bundled Kubectl instance
|
||||
|
||||
Reference in new issue
Block a user