Make node shell image configurable (#3249)

Signed-off-by: vshakirova <vshakirova@mirantis.com>
This commit is contained in:
Violetta Shakirova authored and GitHub committed 2021-07-12 11:21:46 -04:00
1 parent 26fb2e796e
commit 621f5ba0b3
7 files changed
+153 -1

No files matched your search

+9
View File
@@ -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 || "";
}
}
+4 -1
View File
@@ -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,
}]
}
});
}