Просмотр исходного кода

Oracle Provider

Signed-off-by: Anders Swanson <anders.swanson@oracle.com>
Anders Swanson 2 лет назад
Родитель
Сommit
49bedf0fb7
3 измененных файлов с 8 добавлено и 8 удалено
  1. 1 1
      pkg/cloud/oracle/key.go
  2. 5 5
      pkg/cloud/oracle/provider.go
  3. 2 2
      pkg/cloud/provider/provider.go

+ 1 - 1
pkg/cloud/oracle/key.go

@@ -3,7 +3,7 @@ package oracle
 import (
 	"fmt"
 
-	"github.com/opencost/opencost/pkg/util"
+	"github.com/opencost/opencost/core/pkg/util"
 )
 
 type oracleKey struct {

+ 5 - 5
pkg/cloud/oracle/provider.go

@@ -8,14 +8,14 @@ import (
 	"sync"
 	"time"
 
+	"github.com/opencost/opencost/core/pkg/log"
+	"github.com/opencost/opencost/core/pkg/opencost"
+	"github.com/opencost/opencost/core/pkg/util"
+	"github.com/opencost/opencost/core/pkg/util/json"
 	"github.com/opencost/opencost/pkg/cloud/models"
 	"github.com/opencost/opencost/pkg/cloud/utils"
 	"github.com/opencost/opencost/pkg/clustercache"
 	"github.com/opencost/opencost/pkg/env"
-	"github.com/opencost/opencost/pkg/kubecost"
-	"github.com/opencost/opencost/pkg/log"
-	"github.com/opencost/opencost/pkg/util"
-	"github.com/opencost/opencost/pkg/util/json"
 	v1 "k8s.io/api/core/v1"
 )
 
@@ -47,7 +47,7 @@ func (o *Oracle) ClusterInfo() (map[string]string, error) {
 	if clusterName := o.getClusterName(c); clusterName != "" {
 		m["name"] = clusterName
 	}
-	m["provider"] = kubecost.OracleProvider
+	m["provider"] = opencost.OracleProvider
 	m["account"] = o.ClusterAccountID
 	m["region"] = o.ClusterRegion
 	m["remoteReadEnabled"] = strconv.FormatBool(env.IsRemoteEnabled())

+ 2 - 2
pkg/cloud/provider/provider.go

@@ -240,7 +240,7 @@ func NewProvider(cache clustercache.ClusterCache, apiKey string, config *config.
 			ClusterAccountID: cp.accountID,
 			Config:           NewProviderConfig(config, cp.configFileName),
 		}, nil
-	case kubecost.OracleProvider:
+	case opencost.OracleProvider:
 		log.Info("Found ProviderID starting with \"oracle\", using Oracle Provider")
 		return &oracle.Oracle{
 			Clientset:            cache,
@@ -297,7 +297,7 @@ func getClusterProperties(node *v1.Node) clusterProperties {
 		cp.provider = opencost.AlibabaProvider
 		cp.configFileName = "alibaba.json"
 	} else if strings.HasPrefix(providerID, "ocid") {
-		cp.provider = kubecost.OracleProvider
+		cp.provider = opencost.OracleProvider
 		cp.configFileName = "oracle.json"
 	}
 	if env.IsUseCSVProvider() {