فهرست منبع

Check empty attribute value and assign default cluster name

Bianca Burtoiu 4 سال پیش
والد
کامیت
9b991f2b3d
1فایلهای تغییر یافته به همراه5 افزوده شده و 0 حذف شده
  1. 5 0
      pkg/cloud/gcpprovider.go

+ 5 - 0
pkg/cloud/gcpprovider.go

@@ -319,6 +319,11 @@ func (gcp *GCP) ClusterInfo() (map[string]string, error) {
 		attribute = c.ClusterName
 	}
 
+	// Use a default name if none has been set until this point
+	if attribute == "" {
+		attribute = "GKE Cluster #1"
+	}
+
 	m := make(map[string]string)
 	m["name"] = attribute
 	m["provider"] = "GCP"