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:
parent
edee99a031
commit
c0398effc5
@ -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");
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user