mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Make node shell image configurable (#3249)
Signed-off-by: vshakirova <vshakirova@mirantis.com>
This commit is contained in:
1 parent
26fb2e796e
commit
621f5ba0b3
7 files changed
+153
-1
No files matched your search
@@ -34,6 +34,7 @@ import { VersionDetector } from "./cluster-detectors/version-detector";
|
||||
import { detectorRegistry } from "./cluster-detectors/detector-registry";
|
||||
import plimit from "p-limit";
|
||||
import { toJS } from "../common/utils";
|
||||
import { initialNodeShellImage } from "../common/cluster-store";
|
||||
|
||||
export enum ClusterStatus {
|
||||
AccessGranted = 2,
|
||||
@@ -745,4 +746,12 @@ export class Cluster implements ClusterModel, ClusterState {
|
||||
isMetricHidden(resource: ClusterMetricsResourceType): boolean {
|
||||
return Boolean(this.preferences.hiddenMetrics?.includes(resource));
|
||||
}
|
||||
|
||||
get nodeShellImage(): string {
|
||||
return this.preferences.nodeShellImage || initialNodeShellImage;
|
||||
}
|
||||
|
||||
get imagePullSecret(): string {
|
||||
return this.preferences.imagePullSecret || "";
|
||||
}
|
||||
}
|
||||
@@ -77,13 +77,16 @@ export class NodeShellSession extends ShellSession {
|
||||
}],
|
||||
containers: [{
|
||||
name: "shell",
|
||||
image: "docker.io/alpine:3.13",
|
||||
image: this.cluster.nodeShellImage,
|
||||
securityContext: {
|
||||
privileged: true,
|
||||
},
|
||||
command: ["nsenter"],
|
||||
args: ["-t", "1", "-m", "-u", "-i", "-n", "sleep", "14000"]
|
||||
}],
|
||||
imagePullSecrets: [{
|
||||
name: this.cluster.imagePullSecret,
|
||||
}]
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user