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

Detect rancher desktop (#3711)

This commit is contained in:
Lauri Nevala 2021-09-01 16:32:10 +03:00 committed by GitHub
parent edee99a031
commit c0398effc5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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");
} }