Replace kubectl-proxy with lens-k8s-proxy (#4924)

This commit is contained in:
Jari Kolehmainen authored and GitHub committed 2022-02-28 09:37:29 -05:00
1 parent f5a7d64551
commit c04a3b8d33
10 files changed
+191 -31

No files matched your search

@@ -0,0 +1,22 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
import path from "path";
import isDevelopmentInjectable from "../../vars/is-development.injectable";
import contextDirInjectable from "../../vars/context-dir.injectable";
const directoryForBundledBinariesInjectable = getInjectable({
id: "directory-for-bundled-binaries",
instantiate: (di) => {
if (di.inject(isDevelopmentInjectable)) {
return path.join(di.inject(contextDirInjectable), "binaries");
}
return process.resourcesPath;
},
lifecycle: lifecycleEnum.singleton,
});
export default directoryForBundledBinariesInjectable;
+14
View File
@@ -0,0 +1,14 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
import { contextDir } from "../vars";
const contextDirInjectable = getInjectable({
id: "context-dir",
instantiate: () => contextDir,
lifecycle: lifecycleEnum.singleton,
});
export default contextDirInjectable;
@@ -0,0 +1,14 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
import { isDevelopment } from "../vars";
const isDevelopmentInjectable = getInjectable({
id: "is-development",
instantiate: () => isDevelopment,
lifecycle: lifecycleEnum.singleton,
});
export default isDevelopmentInjectable;