1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Detect rancher desktop

Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
This commit is contained in:
Lauri Nevala 2021-09-01 15:50:07 +03:00
parent 6fdb2f0b58
commit 3171095fcb

View File

@ -33,6 +33,10 @@ export class DistributionDetector extends BaseClusterDetector {
return { value: "rke", accuracy: 80}; return { value: "rke", accuracy: 80};
} }
if (this.isRancherDesktop()) {
return { value: "rancher-desktop", accuracy: 80};
}
if (this.isK3s()) { if (this.isK3s()) {
return { value: "k3s", accuracy: 80}; return { value: "k3s", accuracy: 80};
} }
@ -172,6 +176,10 @@ export class DistributionDetector extends BaseClusterDetector {
return this.version.includes("-rancher"); return this.version.includes("-rancher");
} }
protected isRancherDesktop() {
return this.cluster.contextName === "rancher-desktop";
}
protected isK3s() { protected isK3s() {
return this.version.includes("+k3s"); return this.version.includes("+k3s");
} }