Explorar el Código

After further testing, I don't think we should be default-enabling this
feature. This functionality seems to vary between providers.

Signed-off-by: thomasvn <thomasnguyen96@gmail.com>

thomasvn hace 2 años
padre
commit
8e9715a734
Se han modificado 2 ficheros con 5 adiciones y 5 borrados
  1. 4 4
      pkg/costmodel/cluster.go
  2. 1 1
      pkg/env/costmodelenv.go

+ 4 - 4
pkg/costmodel/cluster.go

@@ -190,10 +190,10 @@ func ClusterDisks(client prometheus.Client, provider models.Provider, start, end
 	resPVCInfo, _ := resChPVCInfo.Await()
 	resLocalActiveMins, _ := resChLocalActiveMins.Await()
 
-	// Only query metrics about local disk costs if the user has opted in. This
-	// is default disabled because most cloud providers do not charge unless you
-	// attach a storage volume to your instance. That cost is accounted for when
-	// querying the other prom metrics.
+	// Cloud providers do not always charge for a node's local disk costs (i.e.
+	// ephemeral storage). Provide an option to opt out of calculating &
+	// allocating local disk costs. Note, that this does not affect
+	// PersistentVolume costs.
 	//
 	// Ref:
 	// https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/RootDeviceStorage.html

+ 1 - 1
pkg/env/costmodelenv.go

@@ -636,7 +636,7 @@ func GetAllocationNodeLabelsIncludeList() []string {
 }
 
 func GetAssetIncludeLocalDiskCost() bool {
-	return GetBool(AssetIncludeLocalDiskCostEnvVar, false)
+	return env.GetBool(AssetIncludeLocalDiskCostEnvVar, true)
 }
 
 func GetRegionOverrideList() []string {