enable metrics by default

Signed-off-by: LiHui <andrewli@yunify.com>
This commit is contained in:
LiHui
2021-01-04 12:11:38 +08:00
parent 611f1c6991
commit 1ecec78379
8 changed files with 10 additions and 53 deletions

View File

@@ -98,7 +98,7 @@ func (r *Reconciler) Reconcile(req ctrl.Request) (ctrl.Result, error) {
if err := r.Update(rootCtx, workspace); err != nil {
return ctrl.Result{}, err
}
workspaceOperation.WithLabelValues("create", instance.Name).Inc()
workspaceOperation.WithLabelValues("create", workspace.Name).Inc()
}
} else {
// The object is being deleted
@@ -112,7 +112,7 @@ func (r *Reconciler) Reconcile(req ctrl.Request) (ctrl.Result, error) {
logger.Error(err, "update workspace failed")
return ctrl.Result{}, err
}
workspaceOperation.WithLabelValues("delete", instance.Name).Inc()
workspaceOperation.WithLabelValues("delete", workspace.Name).Inc()
}
// Our finalizer has finished, so the reconciler can do nothing.
return ctrl.Result{}, nil