From 1a117220cb7aa511eccf9781f76a0ae2178605ad Mon Sep 17 00:00:00 2001 From: Frank Shotwell Date: Wed, 12 Feb 2020 17:57:38 +0000 Subject: [PATCH] add aks detection --- pkg/analyze/distribution.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkg/analyze/distribution.go b/pkg/analyze/distribution.go index 232142b7..4ab7d640 100644 --- a/pkg/analyze/distribution.go +++ b/pkg/analyze/distribution.go @@ -18,6 +18,7 @@ type providers struct { digitalOcean bool openShift bool kurl bool + aks bool } type Provider int @@ -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) { @@ -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" { @@ -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] { @@ -235,6 +242,8 @@ func mustNormalizeDistributionName(raw string) Provider { return openShift case "kurl": return kurl + case "aks": + return aks } return unknown