Explorar o código

Merge pull request #451 from kubecost/custom-prov-idfix

add cluster id to custom provider
Ajay Tripathy %!s(int64=6) %!d(string=hai) anos
pai
achega
6675572fd8
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  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
 }