Sfoglia il codice sorgente

Only filter if status is failed.

Matt Bolt 4 anni fa
parent
commit
f688df9ebb
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  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()
 			pvs := cmme.KubeClusterCache.GetAllPersistentVolumes()
 			for _, pv := range pvs {
 			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
 					continue
 				}
 				}