From 144002d5479f7b15d4f7b49ad0dc0e0f8e45b4ad Mon Sep 17 00:00:00 2001 From: KhizerJaan <73934880+KhizerJaan@users.noreply.github.com> Date: Fri, 4 Oct 2024 01:41:50 +0500 Subject: [PATCH] adds complete status check too --- .../installplan-approver/installplan-approver.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/operators-installer/templates/installplan-approver/installplan-approver.yaml b/operators-installer/templates/installplan-approver/installplan-approver.yaml index 5b2e2e4..b1296d9 100644 --- a/operators-installer/templates/installplan-approver/installplan-approver.yaml +++ b/operators-installer/templates/installplan-approver/installplan-approver.yaml @@ -49,9 +49,9 @@ spec: {{- \$installPlanItem := . -}} {{- range .spec.clusterServiceVersionNames -}} {{- if and (eq . "${SUBSCRIPTION_CSV}") (not \$installPlanName) -}} - {{- range \$installPlanItem.metadata.ownerReferences -}} - {{- if eq .uid "${subscriptionUID}" -}} - {{- if eq $installPlanItem.status.phase "RequiresApproval" -}} + {{- if or (eq \$installPlanItem.status.phase "RequiresApproval") (eq \$installPlanItem.status.phase "Complete") -}} + {{- range \$installPlanItem.metadata.ownerReferences -}} + {{- if eq .uid "${subscriptionUID}" -}} {{- \$installPlanName = \$installPlanItem.metadata.name -}} {{- end -}} {{- end -}}