Skip to content

Commit

Permalink
fix: force rsync status from configuration.status (#6045) (#6048)
Browse files Browse the repository at this point in the history
  • Loading branch information
sophon-zt authored Dec 12, 2023
1 parent 0c6f427 commit f792352
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions controllers/apps/operations/reconfigure.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,14 +188,6 @@ func syncReconfigureForOps(reqCtx intctrlutil.RequestCtx, cli client.Client, res
}

func (r *reconfigureAction) doSyncReconfigureStatus(params reconfigureParams) (appsv1alpha1.OpsPhase, error) {
if isNoChange(params.configurationStatus.Conditions) {
params.reqCtx.Log.
WithValues("clusterName", params.clusterName).
WithValues("componentName", params.configurationItem.Name).
Info("the reconfiguring operation has no change!")
return appsv1alpha1.OpsSucceedPhase, nil
}

configSpec := params.configurationItem
resource, err := r.syncDependResources(params.reqCtx,
params.cli, params.resource, configSpec, params.componentName)
Expand Down Expand Up @@ -323,15 +315,6 @@ func isExpectedPhase(condition metav1.Condition, expectedTypes []string, expecte
return false
}

func isNoChange(conditions []metav1.Condition) bool {
for i := len(conditions); i > 0; i-- {
if isExpectedPhase(conditions[i-1], []string{appsv1alpha1.ReasonReconfigureNoChanged}, metav1.ConditionTrue) {
return true
}
}
return false
}

func initReconfigureStatus(opsRequest *appsv1alpha1.OpsRequest, componentName string) *appsv1alpha1.ReconfiguringStatus {
status := &opsRequest.Status
if componentName == "" || (opsRequest.Spec.Reconfigure != nil && opsRequest.Spec.Reconfigure.ComponentName == componentName) {
Expand Down

0 comments on commit f792352

Please sign in to comment.