Explorar el Código

add cluster id to custom provider

AjayTripathy hace 6 años
padre
commit
0aa635d8c9
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      pkg/cloud/customprovider.go

+ 2 - 0
pkg/cloud/customprovider.go

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