1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Fix huawei distro detect (#1819)

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Jari Kolehmainen 2020-12-23 08:30:48 +02:00 committed by GitHub
parent e5967c0700
commit f834c7a61b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -40,6 +40,10 @@ export class DistributionDetector extends BaseClusterDetector {
return { value: "mirantis", accuracy: 90}; return { value: "mirantis", accuracy: 90};
} }
if (this.isHuawei()) {
return { value: "huawei", accuracy: 90};
}
if (this.isMinikube()) { if (this.isMinikube()) {
return { value: "minikube", accuracy: 80}; return { value: "minikube", accuracy: 80};
} }
@ -127,6 +131,10 @@ export class DistributionDetector extends BaseClusterDetector {
return this.version.includes("+k3s"); return this.version.includes("+k3s");
} }
protected isHuawei() {
return this.version.includes("-CCE");
}
protected async isOpenshift() { protected async isOpenshift() {
try { try {
const response = await this.k8sRequest(""); const response = await this.k8sRequest("");