From 0800a0c83dd0c98c49847f0d52d36b0d66f5117c Mon Sep 17 00:00:00 2001 From: Lauri Nevala Date: Wed, 23 Dec 2020 11:56:32 +0200 Subject: [PATCH] Change method orders to avoid conflicts Signed-off-by: Lauri Nevala --- .../cluster-detectors/distribution-detector.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/cluster-detectors/distribution-detector.ts b/src/main/cluster-detectors/distribution-detector.ts index fa6253ca95..8f85d7d00f 100644 --- a/src/main/cluster-detectors/distribution-detector.ts +++ b/src/main/cluster-detectors/distribution-detector.ts @@ -40,14 +40,14 @@ export class DistributionDetector extends BaseClusterDetector { return { value: "mirantis", accuracy: 90}; } - if (this.isTke()) { - return { value: "tencent", accuracy: 90}; - } - if (this.isHuawei()) { return { value: "huawei", accuracy: 90}; } + if (this.isTke()) { + return { value: "tencent", accuracy: 90}; + } + if (this.isMinikube()) { return { value: "minikube", accuracy: 80}; } @@ -123,6 +123,10 @@ export class DistributionDetector extends BaseClusterDetector { return this.cluster.contextName === "docker-desktop"; } + protected isTke() { + return this.version.includes("-tke."); + } + protected isCustom() { return this.version.includes("+"); } @@ -135,10 +139,6 @@ export class DistributionDetector extends BaseClusterDetector { return this.version.includes("+k3s"); } - protected isTke() { - return this.version.includes("-tke."); - } - protected isHuawei() { return this.version.includes("-CCE"); }