From 6fe9e2e7e61c1b7ffe0be32d563a033523a617f9 Mon Sep 17 00:00:00 2001 From: Andrew Lavery Date: Tue, 21 Jan 2020 12:10:29 -0800 Subject: [PATCH] EKS clusters do not have masters within the node list --- pkg/analyze/distribution.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkg/analyze/distribution.go b/pkg/analyze/distribution.go index e3632575..e85ec8d3 100644 --- a/pkg/analyze/distribution.go +++ b/pkg/analyze/distribution.go @@ -43,12 +43,16 @@ func analyzeDistribution(analyzer *troubleshootv1beta1.Distribution, getCollecte } foundProviders := providers{} + foundMaster := false for _, node := range nodes { for k, v := range node.ObjectMeta.Labels { if k == "microk8s.io/cluster" && v == "true" { foundProviders.microk8s = true } + if k == "node-role.kubernetes.io/master" { + foundMaster = true + } } if node.Status.NodeInfo.OSImage == "Docker Desktop" { @@ -66,6 +70,11 @@ func analyzeDistribution(analyzer *troubleshootv1beta1.Distribution, getCollecte } } + if foundMaster { + // eks does not have masters within the node list + foundProviders.eks = false + } + apiResourcesBytes, err := getCollectedFileContents("cluster-resources/resources.json") // if the file is not found, that is not a fatal error // troubleshoot 0.9.15 and earlier did not collect that file