Skip to content

Commit

Permalink
fix(configuration): clean status reason when reconcile success (#752)
Browse files Browse the repository at this point in the history
Signed-off-by: chlins <chlins.zhang@gmail.com>
  • Loading branch information
chlins committed Aug 20, 2021
1 parent 1474ade commit 69527e6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions controllers/goharbor/configuration/reconciler.go
Expand Up @@ -74,8 +74,11 @@ func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (res ctrl.
defer func() {
if err != nil {
hc.Status.Status = goharborv1.HarborConfigurationStatusFail
hc.Status.Message = err.Error()
} else {
hc.Status.Status = goharborv1.HarborConfigurationStatusReady
hc.Status.Reason = ""
hc.Status.Message = ""
now := metav1.Now()
hc.Status.LastApplyTime = &now
hc.Status.LastConfiguration = &hcCopy.Spec
Expand Down

0 comments on commit 69527e6

Please sign in to comment.