mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Detect kind (#1619)
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
parent
87f1a39dca
commit
3c51e746bd
@ -48,6 +48,10 @@ export class DistributionDetector extends BaseClusterDetector {
|
||||
return { value: "microk8s", accuracy: 80};
|
||||
}
|
||||
|
||||
if (this.isKind()) {
|
||||
return { value: "kind", accuracy: 70};
|
||||
}
|
||||
|
||||
if (this.isDockerDesktop()) {
|
||||
return { value: "docker-desktop", accuracy: 80};
|
||||
}
|
||||
@ -99,6 +103,10 @@ export class DistributionDetector extends BaseClusterDetector {
|
||||
return this.cluster.contextName.startsWith("microk8s");
|
||||
}
|
||||
|
||||
protected isKind() {
|
||||
return this.cluster.contextName.startsWith("kubernetes-admin@kind-");
|
||||
}
|
||||
|
||||
protected isDockerDesktop() {
|
||||
return this.cluster.contextName === "docker-desktop";
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user