Преглед изворни кода

Only filter if status is failed.

Matt Bolt пре 4 година
родитељ
комит
f688df9ebb
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      pkg/costmodel/metrics.go

+ 2 - 2
pkg/costmodel/metrics.go

@@ -1381,8 +1381,8 @@ func (cmme *CostModelMetricsEmitter) Start() bool {
 
 			pvs := cmme.KubeClusterCache.GetAllPersistentVolumes()
 			for _, pv := range pvs {
-				// Omit pv_hourly_cost if the volume status is not available or unbound
-				if pv.Status.Phase != v1.VolumeAvailable && pv.Status.Phase != v1.VolumeBound {
+				// Omit pv_hourly_cost if the volume status is failed
+				if pv.Status.Phase == v1.VolumeFailed {
 					continue
 				}