mirror of
https://github.com/replicatedhq/troubleshoot.git
synced 2026-04-15 07:16:34 +00:00
Merge pull request #122 from replicatedhq/laverya/properly-identify-openshift-clusters-on-eks
EKS clusters do not have masters within the node list
This commit is contained in:
@@ -45,6 +45,7 @@ func analyzeDistribution(analyzer *troubleshootv1beta1.Distribution, getCollecte
|
||||
}
|
||||
|
||||
foundProviders := providers{}
|
||||
foundMaster := false
|
||||
|
||||
for _, node := range nodes {
|
||||
for k, v := range node.ObjectMeta.Labels {
|
||||
@@ -53,6 +54,9 @@ func analyzeDistribution(analyzer *troubleshootv1beta1.Distribution, getCollecte
|
||||
} else if k == "kurl.sh/cluster" && v == "true" {
|
||||
foundProviders.kurl = true
|
||||
}
|
||||
if k == "node-role.kubernetes.io/master" {
|
||||
foundMaster = true
|
||||
}
|
||||
}
|
||||
|
||||
if node.Status.NodeInfo.OSImage == "Docker Desktop" {
|
||||
@@ -70,6 +74,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
|
||||
|
||||
Reference in New Issue
Block a user