瀏覽代碼

add cluster id to custom provider

AjayTripathy 6 年之前
父節點
當前提交
0aa635d8c9
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      pkg/cloud/customprovider.go

+ 2 - 0
pkg/cloud/customprovider.go

@@ -3,6 +3,7 @@ package cloud
 import (
 	"encoding/json"
 	"io"
+	"os"
 	"strconv"
 	"strings"
 	"sync"
@@ -105,6 +106,7 @@ func (cp *CustomProvider) ClusterInfo() (map[string]string, error) {
 		m["name"] = conf.ClusterName
 	}
 	m["provider"] = "custom"
+	m["id"] = os.Getenv(clusterIDKey)
 	return m, nil
 }