Skip to content

Commit

Permalink
fix patch rollout batch id
Browse files Browse the repository at this point in the history
  • Loading branch information
zhihao jian committed Dec 26, 2024
1 parent efbd8ba commit a702034
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkg/controller/rollout/rollout_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func (r *RolloutReconciler) calculateRolloutStatus(rollout *v1beta1.Rollout) (re
// newStatus.CanaryStatus.CurrentStepState == "Completed" {
// // do something after rollout
// }
//```
// ```
// But at the first deployment of Rollout/Workload, CanaryStatus isn't set due to no rollout progression,
// and PaaS platform cannot judge whether the deployment is completed base on the code above. So we have
// to update the status just like the rollout was completed.
Expand Down Expand Up @@ -349,7 +349,11 @@ func (r *RolloutReconciler) handleFinalizer(rollout *v1beta1.Rollout) error {

func getRolloutID(workload *util.Workload) string {
if workload != nil {
return workload.Labels[v1beta1.RolloutIDLabel]
rolloutID := workload.Labels[v1beta1.RolloutIDLabel]
if rolloutID == "" {
rolloutID = workload.CanaryRevision
}
return rolloutID
}
return ""
}

0 comments on commit a702034

Please sign in to comment.