Detect Docker Desktop (#1623)

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Jari Kolehmainen authored and GitHub committed 2020-12-02 19:13:57 +02:00
1 parent 13914a8bea
commit 87f1a39dca
1 file changed
+8
@@ -48,6 +48,10 @@ export class DistributionDetector extends BaseClusterDetector {
return { value: "microk8s", accuracy: 80}; return { value: "microk8s", accuracy: 80};
} }
if (this.isDockerDesktop()) {
return { value: "docker-desktop", accuracy: 80};
}
if (this.isCustom()) { if (this.isCustom()) {
return { value: "custom", accuracy: 10}; return { value: "custom", accuracy: 10};
} }
@@ -95,6 +99,10 @@ export class DistributionDetector extends BaseClusterDetector {
return this.cluster.contextName.startsWith("microk8s"); return this.cluster.contextName.startsWith("microk8s");
} }
protected isDockerDesktop() {
return this.cluster.contextName === "docker-desktop";
}
protected isCustom() { protected isCustom() {
return this.version.includes("+"); return this.version.includes("+");
} }