mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
detect kind
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
parent
6d5e18ea7d
commit
a84ce19d16
@ -40,6 +40,10 @@ export class DistributionDetector extends BaseClusterDetector {
|
|||||||
return { value: "microk8s", accuracy: 80};
|
return { value: "microk8s", accuracy: 80};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.isKind()) {
|
||||||
|
return { value: "kind", accuracy: 70};
|
||||||
|
}
|
||||||
|
|
||||||
if (this.isCustom()) {
|
if (this.isCustom()) {
|
||||||
return { value: "custom", accuracy: 10};
|
return { value: "custom", accuracy: 10};
|
||||||
}
|
}
|
||||||
@ -83,6 +87,10 @@ export class DistributionDetector extends BaseClusterDetector {
|
|||||||
return this.cluster.contextName.startsWith("microk8s");
|
return this.cluster.contextName.startsWith("microk8s");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected isKind() {
|
||||||
|
return this.cluster.contextName.startsWith("kind-");
|
||||||
|
}
|
||||||
|
|
||||||
protected isCustom() {
|
protected isCustom() {
|
||||||
return this.version.includes("+");
|
return this.version.includes("+");
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user