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

Detect microk8s distribution (#1616)

Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
This commit is contained in:
Lauri Nevala 2020-12-02 16:07:06 +02:00 committed by GitHub
parent 217361dd65
commit 6d5e18ea7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,6 +36,10 @@ export class DistributionDetector extends BaseClusterDetector {
return { value: "minikube", accuracy: 80};
}
if (this.isMicrok8s()) {
return { value: "microk8s", accuracy: 80};
}
if (this.isCustom()) {
return { value: "custom", accuracy: 10};
}
@ -75,6 +79,10 @@ export class DistributionDetector extends BaseClusterDetector {
return this.cluster.contextName.startsWith("minikube");
}
protected isMicrok8s() {
return this.cluster.contextName.startsWith("microk8s");
}
protected isCustom() {
return this.version.includes("+");
}