Merge pull request #2389 from lensapp/release/v4.1.5

Release v4.1.5
This commit is contained in:
Jari Kolehmainen authored and GitHub committed 2021-03-26 12:44:50 +02:00
commit 06d54eea9e
8 files changed
+51 -5

No files matched your search

+1 -1
View File
@@ -2,7 +2,7 @@
"name": "kontena-lens",
"productName": "Lens",
"description": "Lens - The Kubernetes IDE",
"version": "4.1.4",
"version": "4.1.5",
"main": "static/build/main.js",
"copyright": "© 2020, Mirantis, Inc.",
"license": "MIT",
+3 -1
View File
@@ -192,6 +192,7 @@ export class ExtensionLoader {
registries.appPreferenceRegistry.add(extension.appPreferences),
registries.clusterFeatureRegistry.add(extension.clusterFeatures),
registries.statusBarRegistry.add(extension.statusBarItems),
registries.commandRegistry.add(extension.commands),
];
this.events.on("remove", (removedExtension: LensRendererExtension) => {
@@ -220,7 +221,8 @@ export class ExtensionLoader {
registries.clusterPageMenuRegistry.add(extension.clusterPageMenus, extension),
registries.kubeObjectMenuRegistry.add(extension.kubeObjectMenuItems),
registries.kubeObjectDetailRegistry.add(extension.kubeObjectDetailItems),
registries.kubeObjectStatusRegistry.add(extension.kubeObjectStatusTexts)
registries.kubeObjectStatusRegistry.add(extension.kubeObjectStatusTexts),
registries.commandRegistry.add(extension.commands),
];
this.events.on("remove", (removedExtension: LensRendererExtension) => {
+1
View File
@@ -9,3 +9,4 @@ export * from "./kube-object-detail-registry";
export * from "./kube-object-menu-registry";
export * from "./cluster-feature-registry";
export * from "./kube-object-status-registry";
export * from "./command-registry";
+19
View File
@@ -0,0 +1,19 @@
/**
* @jest-environment jsdom
*/
import { clearKubeconfigEnvVars } from "../utils/clear-kube-env-vars";
describe("clearKubeconfigEnvVars tests", () => {
it("should not touch non kubeconfig keys", () => {
expect(clearKubeconfigEnvVars({ a: 1 })).toStrictEqual({ a: 1 });
});
it("should remove a single kubeconfig key", () => {
expect(clearKubeconfigEnvVars({ a: 1, kubeconfig: "1" })).toStrictEqual({ a: 1 });
});
it("should remove a two kubeconfig key", () => {
expect(clearKubeconfigEnvVars({ a: 1, kubeconfig: "1", kUbeconfig: "1" })).toStrictEqual({ a: 1 });
});
});
+1 -1
View File
@@ -28,7 +28,7 @@ export class LensProxy {
}
listen(port = this.port): this {
this.proxyServer = this.buildCustomProxy().listen(port);
this.proxyServer = this.buildCustomProxy().listen(port, "127.0.0.1");
logger.info(`[LENS-PROXY]: Proxy server has started at ${this.origin}`);
return this;
+2 -1
View File
@@ -11,6 +11,7 @@ import { helmCli } from "./helm/helm-cli";
import { isWindows } from "../common/vars";
import { appEventBus } from "../common/event-bus";
import { userStore } from "../common/user-store";
import { clearKubeconfigEnvVars } from "./utils/clear-kube-env-vars";
export class ShellSession extends EventEmitter {
static shellEnvs: Map<string, any> = new Map();
@@ -103,7 +104,7 @@ export class ShellSession extends EventEmitter {
}
protected async getShellEnv() {
const env = JSON.parse(JSON.stringify(await shellEnv()));
const env = clearKubeconfigEnvVars(JSON.parse(JSON.stringify(await shellEnv())));
const pathStr = [this.kubectlBinDir, this.helmBinDir, process.env.PATH].join(path.delimiter);
if(isWindows) {
+16
View File
@@ -0,0 +1,16 @@
const anyKubeconfig = /^kubeconfig$/i;
/**
* This function deletes all keys of the form /^kubeconfig$/i, returning a new
* object.
*
* This is needed because `kubectl` checks for other version of kubeconfig
* before KUBECONFIG and we only set KUBECONFIG.
* @param env The current copy of env
*/
export function clearKubeconfigEnvVars(env: Record<string, any>): Record<string, any> {
return Object.fromEntries(
Object.entries(env)
.filter(([key]) => anyKubeconfig.exec(key) === null)
);
}
+8 -1
View File
@@ -2,7 +2,14 @@
Here you can find description of changes we've built into each release. While we try our best to make each upgrade automatic and as smooth as possible, there may be some cases where you might need to do something to ensure the application works smoothly. So please read through the release highlights!
## 4.1.4 (current version)
## 4.1.5 (current version)
- Fix internal proxy listening on all network interfaces
- Fix extension command palette loading
- Fix Lens not clearing other KUBECONFIG env vars
## 4.1.4
- Ignore clusters with invalid kubeconfig
- Render only secret name on pod details without access to secrets