Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions pkg/analyze/distribution.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ type providers struct {
digitalOcean bool
openShift bool
kurl bool
aks bool
}

type Provider int
Expand All @@ -31,6 +32,7 @@ const (
digitalOcean Provider = iota
openShift Provider = iota
kurl Provider = iota
aks Provider = iota
)

func analyzeDistribution(analyzer *troubleshootv1beta1.Distribution, getCollectedFileContents func(string) ([]byte, error)) (*AnalyzeResult, error) {
Expand All @@ -57,6 +59,9 @@ func analyzeDistribution(analyzer *troubleshootv1beta1.Distribution, getCollecte
if k == "node-role.kubernetes.io/master" {
foundMaster = true
}
if k == "kubernetes.azure.com/role" {
foundProviders.aks = true
}
}

if node.Status.NodeInfo.OSImage == "Docker Desktop" {
Expand Down Expand Up @@ -207,6 +212,8 @@ func compareDistributionConditionalToActual(conditional string, actual providers
isMatch = actual.openShift
case kurl:
isMatch = actual.kurl
case aks:
isMatch = actual.aks
}

switch parts[0] {
Expand Down Expand Up @@ -235,6 +242,8 @@ func mustNormalizeDistributionName(raw string) Provider {
return openShift
case "kurl":
return kurl
case "aks":
return aks
}

return unknown
Expand Down