Skip to content

Commit 6fe9e2e

Browse files
committed
EKS clusters do not have masters within the node list
1 parent 5d280ae commit 6fe9e2e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pkg/analyze/distribution.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,16 @@ func analyzeDistribution(analyzer *troubleshootv1beta1.Distribution, getCollecte
4343
}
4444

4545
foundProviders := providers{}
46+
foundMaster := false
4647

4748
for _, node := range nodes {
4849
for k, v := range node.ObjectMeta.Labels {
4950
if k == "microk8s.io/cluster" && v == "true" {
5051
foundProviders.microk8s = true
5152
}
53+
if k == "node-role.kubernetes.io/master" {
54+
foundMaster = true
55+
}
5256
}
5357

5458
if node.Status.NodeInfo.OSImage == "Docker Desktop" {
@@ -66,6 +70,11 @@ func analyzeDistribution(analyzer *troubleshootv1beta1.Distribution, getCollecte
6670
}
6771
}
6872

73+
if foundMaster {
74+
// eks does not have masters within the node list
75+
foundProviders.eks = false
76+
}
77+
6978
apiResourcesBytes, err := getCollectedFileContents("cluster-resources/resources.json")
7079
// if the file is not found, that is not a fatal error
7180
// troubleshoot 0.9.15 and earlier did not collect that file

0 commit comments

Comments
 (0)