Skip to content

Commit 9c2f5de

Browse files
committed
Bug 1758008: Manual approval strategy ignored for subsequent releases
For an subscription with manual approval, only the initial installplan respects the approval requires. Subsequent installplans ignore the fact the approval status is still false and install the operator regardless. This issue is due to catalog incorrectly transitions the installplan into install phase without checking for approval condition. Signed-off-by: Vu Dinh <[email protected]>
1 parent 179915a commit 9c2f5de

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

pkg/controller/operators/catalog/operator.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -935,7 +935,13 @@ func (o *Operator) ensureInstallPlan(logger *logrus.Entry, namespace string, sub
935935
}
936936
}
937937

938-
installPlan.Status.Phase = v1alpha1.InstallPlanPhaseInstalling
938+
// Use provided `installPlanApproval` to determine the appropreciate
939+
// phase
940+
if installPlanApproval == v1alpha1.ApprovalAutomatic {
941+
installPlan.Status.Phase = v1alpha1.InstallPlanPhaseInstalling
942+
} else if installPlanApproval == v1alpha1.ApprovalManual {
943+
installPlan.Status.Phase = v1alpha1.InstallPlanPhaseRequiresApproval
944+
}
939945
for _, step := range installPlan.Status.Plan {
940946
step.Status = v1alpha1.StepStatusUnknown
941947
}

0 commit comments

Comments
 (0)