Skip to content

Commit

Permalink
add replacement check in csv pending phase
Browse files Browse the repository at this point in the history
Signed-off-by: Per Goncalves da Silva <[email protected]>
  • Loading branch information
Per Goncalves da Silva committed Sep 4, 2024
1 parent 578ad82 commit 4b46183
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/controller/operators/olm/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -2110,6 +2110,12 @@ func (a *Operator) transitionCSVState(in v1alpha1.ClusterServiceVersion) (out *v
logger.Info("scheduling ClusterServiceVersion for requirement verification")
out.SetPhaseWithEvent(v1alpha1.CSVPhasePending, v1alpha1.CSVReasonRequirementsUnknown, "requirements not yet checked", now, a.recorder)
case v1alpha1.CSVPhasePending:
// Check if the current CSV is being replaced, return with replacing status if so
if err := a.checkReplacementsAndUpdateStatus(out); err != nil {
logger.WithError(err).Info("replacement check")
return
}

// Check previous version's Upgradeable condition
replacedCSV := a.isReplacing(out)
if replacedCSV != nil {
Expand Down

0 comments on commit 4b46183

Please sign in to comment.