Skip to content

Commit

Permalink
Dynamically append startingCSV to list of allowed operator versions
Browse files Browse the repository at this point in the history
ref: https://issues.redhat.com/browse/ACM-11024
Signed-off-by: Jason Zhang <jaszhang@redhat.com>
  • Loading branch information
zyjjay authored and openshift-merge-bot[bot] committed Apr 30, 2024
1 parent 5cbb628 commit 546d950
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion controllers/operatorpolicy_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1233,8 +1233,9 @@ func (r *OperatorPolicyReconciler) musthaveInstallPlan(
}

matchingCSV := len(policy.Spec.Versions) == 0 // true if `spec.versions` is not specified
allowedVersions := append(policy.Spec.Versions, policyv1.NonEmptyString(sub.Spec.StartingCSV))

for _, acceptableCSV := range policy.Spec.Versions {
for _, acceptableCSV := range allowedVersions {
if string(acceptableCSV) == ipCSVs[0] {
matchingCSV = true

Expand Down

0 comments on commit 546d950

Please sign in to comment.