Skip to content

Commit

Permalink
bugfix for GaugeApplicationDaemonsetUpgradeFailed
Browse files Browse the repository at this point in the history
  • Loading branch information
jacksontong committed Apr 23, 2024
1 parent 37bb849 commit d472c37
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/application/controller/app/app_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,13 +284,15 @@ func (c *Controller) syncItem(key string) error {
metrics.GaugeApplicationUpgradeFailed.WithLabelValues(app.Spec.TargetCluster, app.Name).Set(0)
metrics.GaugeApplicationRollbackFailed.WithLabelValues(app.Spec.TargetCluster, app.Name).Set(0)
metrics.GaugeApplicationSyncFailed.WithLabelValues(app.Spec.TargetCluster, app.Name).Set(0)
metrics.GaugeApplicationDaemonsetUpgradeFailed.WithLabelValues(app.Spec.TargetCluster, app.Name).Set(0)
// If err is not nil, do not update object status when phase is Terminating.
// DeletionTimestamp is not empty and object will be deleted when you request updateStatus
} else if app.Status.Phase == "Isolated" {
metrics.GaugeApplicationInstallFailed.WithLabelValues(app.Spec.TargetCluster, app.Name).Set(0)
metrics.GaugeApplicationUpgradeFailed.WithLabelValues(app.Spec.TargetCluster, app.Name).Set(0)
metrics.GaugeApplicationRollbackFailed.WithLabelValues(app.Spec.TargetCluster, app.Name).Set(0)
metrics.GaugeApplicationSyncFailed.WithLabelValues(app.Spec.TargetCluster, app.Name).Set(0)
metrics.GaugeApplicationDaemonsetUpgradeFailed.WithLabelValues(app.Spec.TargetCluster, app.Name).Set(0)
} else {
cachedApp := c.cache.getOrCreate(key)
err = c.processUpdate(ctx, cachedApp, app, key)
Expand Down

0 comments on commit d472c37

Please sign in to comment.