@@ -260,6 +260,10 @@ func (c *Controller) syncItem(key string) error {
260
260
log .String ("name" , name ))
261
261
_ = c .processDeletion (key )
262
262
err = c .appResourcesDeleter .Delete (context .Background (), namespace , name )
263
+ metrics .GaugeApplicationInstallFailed .WithLabelValues (app .Spec .TargetCluster , app .Name ).Set (0 )
264
+ metrics .GaugeApplicationUpgradeFailed .WithLabelValues (app .Spec .TargetCluster , app .Name ).Set (0 )
265
+ metrics .GaugeApplicationRollbackFailed .WithLabelValues (app .Spec .TargetCluster , app .Name ).Set (0 )
266
+ metrics .GaugeApplicationSyncFailed .WithLabelValues (app .Spec .TargetCluster , app .Name ).Set (0 )
263
267
// If err is not nil, do not update object status when phase is Terminating.
264
268
// DeletionTimestamp is not empty and object will be deleted when you request updateStatus
265
269
} else {
@@ -405,6 +409,9 @@ func (c *Controller) syncAppFromRelease(ctx context.Context, cachedApp *cachedAp
405
409
newStatus .Reason = ""
406
410
newStatus .LastTransitionTime = metav1 .Now ()
407
411
metrics .GaugeApplicationSyncFailed .WithLabelValues (app .Spec .TargetCluster , app .Name ).Set (0 )
412
+ metrics .GaugeApplicationInstallFailed .WithLabelValues (app .Spec .TargetCluster , app .Name ).Set (0 )
413
+ metrics .GaugeApplicationUpgradeFailed .WithLabelValues (app .Spec .TargetCluster , app .Name ).Set (0 )
414
+ metrics .GaugeApplicationRollbackFailed .WithLabelValues (app .Spec .TargetCluster , app .Name ).Set (0 )
408
415
409
416
newStatus .ReleaseStatus = string (rel .Info .Status )
410
417
newStatus .Revision = int64 (rel .Version )
0 commit comments