Merge branch 'master' into new-resource-view-validatingwebhooks-config

This commit is contained in:
Alex Andreev authored and GitHub committed 2023-04-17 15:49:17 +03:00
commit e14eac57db
40 files changed
+915 -409

No files matched your search

+7 -6
View File
@@ -184,9 +184,9 @@
"@material-ui/icons": "^4.11.2",
"@material-ui/lab": "^4.0.0-alpha.60",
"@sentry/types": "^6.19.7",
"@swc/cli": "^0.1.61",
"@swc/cli": "^0.1.62",
"@swc/core": "^1.3.44",
"@swc/jest": "^0.2.24",
"@swc/jest": "^0.2.26",
"@testing-library/dom": "^8.19.0",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^12.1.5",
@@ -272,8 +272,8 @@
"memorystream": "^0.3.1",
"mini-css-extract-plugin": "^2.7.2",
"mock-http": "^1.1.0",
"monaco-editor": "^0.29.1",
"monaco-editor-webpack-plugin": "^5.0.0",
"monaco-editor": "^0.37.1",
"monaco-editor-webpack-plugin": "^7.0.1",
"node-gyp": "^8.3.0",
"node-loader": "^2.0.0",
"nodemon": "^2.0.20",
@@ -298,7 +298,7 @@
"ts-node": "^10.9.1",
"type-fest": "^2.14.0",
"typed-emitter": "^1.4.0",
"typedoc": "^0.24.0",
"typedoc": "^0.24.1",
"typedoc-plugin-markdown": "^3.13.6",
"typescript": "^4.9.5",
"typescript-plugin-css-modules": "^3.4.0",
@@ -313,6 +313,7 @@
"@k8slens/application": "^6.5.0-alpha.0",
"@k8slens/application-for-electron-main": "^6.5.0-alpha.0",
"@k8slens/cluster-settings": "^6.5.0-alpha.1",
"@k8slens/kubectl-versions": "^1.0.0-alpha.0",
"@k8slens/legacy-extensions": "^1.0.0-alpha.0",
"@k8slens/messaging": "^1.0.0-alpha.1",
"@k8slens/messaging-for-main": "^1.0.0-alpha.1",
@@ -340,7 +341,7 @@
"@types/tcp-port-used": "^1.0.1",
"@types/url-parse": "^1.4.8",
"@types/uuid": "^8.3.4",
"monaco-editor": "^0.29.1",
"monaco-editor": "^0.37.1",
"react-select": "^5.7.0",
"typed-emitter": "^1.4.0",
"xterm-addon-fit": "^0.5.0"
@@ -34,7 +34,7 @@ const createKubectlInjectable = getInjectable({
normalizedDownloadPlatform: di.inject(normalizedPlatformInjectable),
kubectlBinaryName: di.inject(kubectlBinaryNameInjectable),
bundledKubectlBinaryPath: di.inject(bundledKubectlBinaryPathInjectable),
baseBundeledBinariesDirectory: di.inject(baseBundledBinariesDirectoryInjectable),
baseBundledBinariesDirectory: di.inject(baseBundledBinariesDirectoryInjectable),
bundledKubectlVersion: di.inject(bundledKubectlVersionInjectable),
kubectlVersionMap: di.inject(kubectlVersionMapInjectable),
logger: di.inject(loggerInjectable),
+2 -2
View File
@@ -29,7 +29,7 @@ export interface KubectlDependencies {
readonly normalizedDownloadArch: "amd64" | "arm64" | "386";
readonly kubectlBinaryName: string;
readonly bundledKubectlBinaryPath: string;
readonly baseBundeledBinariesDirectory: string;
readonly baseBundledBinariesDirectory: string;
readonly state: {
readonly kubectlBinariesPath?: string;
readonly downloadBinariesPath?: string;
@@ -302,7 +302,7 @@ export class Kubectl {
}
protected async writeInitScripts() {
const binariesDir = this.dependencies.baseBundeledBinariesDirectory;
const binariesDir = this.dependencies.baseBundledBinariesDirectory;
const kubectlPath = this.dependencies.state.downloadKubectlBinaries
? this.dirname
: this.dependencies.getDirnameOfPath(this.getPathFromPreferences());
@@ -3,31 +3,19 @@
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import { SemVer } from "semver";
import bundledKubectlVersionInjectable from "../../common/vars/bundled-kubectl-version.injectable";
import { kubectlVersions } from "@k8slens/kubectl-versions";
const kubectlVersionMapInjectable = getInjectable({
id: "kubectl-version-map",
instantiate: (di) => {
const bundledKubectlVersion = di.inject(bundledKubectlVersionInjectable);
const bundledKubectlSemVer = new SemVer(bundledKubectlVersion);
return new Map([
["1.7", "1.8.15"],
["1.8", "1.9.10"],
["1.9", "1.10.13"],
["1.10", "1.11.10"],
["1.11", "1.12.10"],
["1.12", "1.13.12"],
["1.13", "1.13.12"],
["1.14", "1.14.10"],
["1.15", "1.15.11"],
["1.16", "1.16.15"],
["1.17", "1.17.17"],
["1.18", "1.18.20"],
["1.19", "1.19.12"],
["1.20", "1.20.8"],
["1.21", "1.21.9"],
["1.22", "1.22.6"],
["1.23", bundledKubectlVersion],
...kubectlVersions,
[`${bundledKubectlSemVer.major}.${bundledKubectlSemVer.minor}`, bundledKubectlVersion],
]);
},
});