Skip to content

Commit

Permalink
fix(application): update app spec set status upgrading (#1781)
Browse files Browse the repository at this point in the history
Co-authored-by: xdonggao <xdonggao@tencent.com>
  • Loading branch information
GaoXiaodong and xdonggao authored Mar 1, 2022
1 parent 1cdf116 commit f1e7e70
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions pkg/application/registry/application/storage/rest.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ package storage
import (
"context"
"fmt"
"reflect"

"helm.sh/helm/v3/pkg/release"
"k8s.io/apimachinery/pkg/api/errors"
Expand Down Expand Up @@ -232,11 +233,9 @@ func (rs *REST) Update(ctx context.Context, name string, objInfo rest.UpdatedObj
}
}

// if app.Status.RollbackRevision > 0 {
// app.Status.Phase = applicationapi.AppPhaseRollingBack
// } else {
app.Status.Phase = applicationapi.AppPhaseUpgrading
// }
if !reflect.DeepEqual(oldApp.Spec, app.Spec) {
app.Status.Phase = applicationapi.AppPhaseUpgrading
}

return rs.application.Update(ctx, name, rest.DefaultUpdatedObjectInfo(app), createValidation, updateValidation, forceAllowCreate, options)
}
Expand Down

0 comments on commit f1e7e70

Please sign in to comment.