detect docker desktop

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Jari Kolehmainen committed 2020-12-02 16:24:34 +02:00
1 parent 6d5e18ea7d
commit dbf3c4c3e8
1 file changed
+9 -1
@@ -40,6 +40,10 @@ export class DistributionDetector extends BaseClusterDetector {
return { value: "microk8s", accuracy: 80};
}
if (this.isDockerDesktop()) {
return { value: "docker-desktop", accuracy: 80};
}
if (this.isCustom()) {
return { value: "custom", accuracy: 10};
}
@@ -83,6 +87,10 @@ export class DistributionDetector extends BaseClusterDetector {
return this.cluster.contextName.startsWith("microk8s");
}
protected isDockerDesktop() {
return this.cluster.contextName === "docker-desktop";
}
protected isCustom() {
return this.version.includes("+");
}
@@ -96,4 +104,4 @@ export class DistributionDetector extends BaseClusterDetector {
return false;
}
}
}
}