@@ -18,6 +18,7 @@ type providers struct {
1818 gke bool
1919 digitalOcean bool
2020 openShift bool
21+ tanzu bool
2122 kurl bool
2223 aks bool
2324 ibm bool
@@ -36,6 +37,7 @@ const (
3637 gke Provider = iota
3738 digitalOcean Provider = iota
3839 openShift Provider = iota
40+ tanzu Provider = iota
3941 kurl Provider = iota
4042 aks Provider = iota
4143 ibm Provider = iota
@@ -44,12 +46,16 @@ const (
4446 k3s Provider = iota
4547)
4648
47- func CheckOpenShift (foundProviders * providers , apiResources []* metav1.APIResourceList , provider string ) string {
49+ func CheckApiResourcesForProviders (foundProviders * providers , apiResources []* metav1.APIResourceList , provider string ) string {
4850 for _ , resource := range apiResources {
4951 if strings .HasPrefix (resource .GroupVersion , "apps.openshift.io/" ) {
5052 foundProviders .openShift = true
5153 return "openShift"
5254 }
55+ if strings .HasPrefix (resource .GroupVersion , "run.tanzu.vmware.com/" ) {
56+ foundProviders .tanzu = true
57+ return "tanzu"
58+ }
5359 }
5460
5561 return provider
@@ -157,8 +163,9 @@ func analyzeDistribution(analyzer *troubleshootv1beta2.Distribution, getCollecte
157163 if err := json .Unmarshal (apiResourcesBytes , & apiResources ); err != nil {
158164 return nil , errors .Wrap (err , "failed to unmarshal api resource list" )
159165 }
160- _ = CheckOpenShift (& foundProviders , apiResources , "" )
166+ _ = CheckApiResourcesForProviders (& foundProviders , apiResources , "" )
161167 }
168+
162169 title := analyzer .CheckName
163170 if title == "" {
164171 title = "Kubernetes Distribution"
@@ -322,6 +329,8 @@ func mustNormalizeDistributionName(raw string) Provider {
322329 return digitalOcean
323330 case "openshift" :
324331 return openShift
332+ case "tanzu" :
333+ return tanzu
325334 case "kurl" :
326335 return kurl
327336 case "aks" :
0 commit comments