Skip to content

Commit

Permalink
fix podopslifecycle set readiness gate order (#298)
Browse files Browse the repository at this point in the history
  • Loading branch information
ColdsteelRail authored Oct 29, 2024
1 parent e4e981f commit d95fb01
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,11 @@ func (r *ReconcilePodOpsLifecycle) Reconcile(ctx context.Context, request reconc
v1alpha1.PodPreparingLabelPrefix: false, // Set readiness gate to false
v1alpha1.PodCompletingLabelPrefix: true, // Set readiness gate to true
}
for phaseLabel, expectedReadinessGateStatus := range expected {
// preparing phase goes before completing phase
orderedKeys := []string{v1alpha1.PodPreparingLabelPrefix, v1alpha1.PodCompletingLabelPrefix}
for _, phaseLabel := range orderedKeys {
keeped := false
expectedReadinessGateStatus := expected[phaseLabel]
for _, labels := range idToLabelsMap {
if _, ok := labels[phaseLabel]; !ok {
continue
Expand Down

0 comments on commit d95fb01

Please sign in to comment.