Skip to content

Commit 09d28fa

Browse files
weshayutinWes HayutinCopilot
authored
Add warning if ibmcloud detected (#1801)
* DNM, testing add warning if ibmcloud detected * Update must-gather/pkg/templates/summary.go Co-authored-by: Copilot <[email protected]> * Update must-gather/pkg/templates/summary.go Co-authored-by: Copilot <[email protected]> * update constants, vars etc. --------- Co-authored-by: Wes Hayutin <[email protected]> Co-authored-by: Copilot <[email protected]>
1 parent 0efbaf2 commit 09d28fa

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

must-gather/pkg/templates/summary.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ import (
3636
const (
3737
FilePermission = 0644
3838
FolderPermission = 0777
39+
IBMCloudConstant = "IBMCloud"
3940
)
4041

4142
var (
@@ -249,14 +250,19 @@ func ReplaceClusterInformationSection(
249250

250251
summaryTemplateReplaces["OCP_VERSION"] = clusterVersion.Status.Desired.Version
251252
summaryTemplateReplaces["CLUSTER_VERSION"] = createYAML(outputPath, "cluster-scoped-resources/config.openshift.io/clusterversions.yaml", clusterVersion)
253+
cloudProvider := ""
254+
252255

253256
if infrastructureList != nil && len(infrastructureList.Items) != 0 {
254-
cloudProvider := string(infrastructureList.Items[0].Spec.PlatformSpec.Type)
257+
cloudProvider = string(infrastructureList.Items[0].Spec.PlatformSpec.Type)
255258
summaryTemplateReplaces["CLOUD"] = cloudProvider
256259
} else {
257260
summaryTemplateReplaces["CLOUD"] = "❌ no Infrastructure found in cluster"
258261
summaryTemplateReplaces["ERRORS"] += "⚠️ No Infrastructure found in cluster\n\n"
259262
}
263+
if strings.EqualFold(cloudProvider, IBMCloudConstant) {
264+
summaryTemplateReplaces["CLOUD"] += " [WARNING:](https://access.redhat.com/articles/5456281#known-issues-with-cloud-providers-and-hyperscalers-18)"
265+
}
260266

261267
if nodeList != nil && len(nodeList.Items) != 0 {
262268
architectureText := ""

0 commit comments

Comments
 (0)