Skip to content

Commit

Permalink
fix: recreate pod without containers ready condition (#8591)
Browse files Browse the repository at this point in the history
  • Loading branch information
free6om authored Dec 5, 2024
1 parent a113ac9 commit 2073ae0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/controller/instanceset/reconciler_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ func (r *updateReconciler) Reconcile(tree *kubebuilderx.ObjectTree) (kubebuilder
if updatedPods >= partition {
break
}
if !isContainersReady(pod) {
// when PodUpdatePolicy is Recreate, no need to check whether containers are ready.
if its.Spec.PodUpdatePolicy != workloads.RecreatePodUpdatePolicyType && !isContainersReady(pod) {
tree.Logger.Info(fmt.Sprintf("InstanceSet %s/%s blocks on update as some the container(s) of pod %s are not ready", its.Namespace, its.Name, pod.Name))
// as no further event triggers the next reconciliation, we need a retry
needRetry = true
Expand Down

0 comments on commit 2073ae0

Please sign in to comment.