Skip to content

Commit

Permalink
Fix OADP and Gitops Operator install
Browse files Browse the repository at this point in the history
Signed-off-by: prsurve <[email protected]>
  • Loading branch information
prsurve committed Jun 6, 2024
1 parent e71d8a6 commit a7ae7c4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 25 deletions.
29 changes: 6 additions & 23 deletions ocs_ci/deployment/deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,31 +238,14 @@ def deploy_gitops_operator(self, switch_ctx=None):
config.switch_ctx(switch_ctx) if switch_ctx else config.switch_acm_ctx()

logger.info("Creating GitOps Operator Subscription")
gitops_subscription_yaml_data = templating.load_yaml(
constants.GITOPS_SUBSCRIPTION_YAML
)
package_manifest = PackageManifest(
resource_name=constants.GITOPS_OPERATOR_NAME,
)
gitops_subscription_yaml_data["spec"][
"startingCSV"
] = package_manifest.get_current_csv(
channel="latest", csv_pattern=constants.GITOPS_OPERATOR_NAME
)

gitops_subscription_manifest = tempfile.NamedTemporaryFile(
mode="w+", prefix="gitops_subscription_manifest", delete=False
)
templating.dump_data_to_temp_yaml(
gitops_subscription_yaml_data, gitops_subscription_manifest.name
)
run_cmd(f"oc create -f {gitops_subscription_manifest.name}")
run_cmd(f"oc create -f {constants.GITOPS_SUBSCRIPTION_YAML}")

self.wait_for_subscription(
constants.GITOPS_OPERATOR_NAME, namespace=constants.OPENSHIFT_OPERATORS
)
logger.info("Sleeping for 90 seconds after subscribing to GitOps Operator")
time.sleep(90)
logger.info("Sleeping for 120 seconds after subscribing to GitOps Operator")
time.sleep(120)
subscriptions = ocp.OCP(
kind=constants.SUBSCRIPTION_WITH_ACM,
resource_name=constants.GITOPS_OPERATOR_NAME,
Expand Down Expand Up @@ -468,15 +451,15 @@ def do_deploy_oadp(self):
constants.OADP_OPERATOR_NAME, namespace=constants.OADP_NAMESPACE
)
logger.info(
"Sleeping for 90 seconds after subscribing to OADP Operator"
"Sleeping for 120 seconds after subscribing to OADP Operator"
)
time.sleep(90)
time.sleep(120)
oadp_subscriptions = ocp.OCP(
kind=constants.SUBSCRIPTION_WITH_ACM,
resource_name=constants.OADP_OPERATOR_NAME,
namespace=constants.OADP_NAMESPACE,
).get()
oadp_csv_name = oadp_subscriptions["spec"]["startingCSV"]
oadp_csv_name = oadp_subscriptions["status"]["currentCSV"]
csv = CSV(
resource_name=oadp_csv_name, namespace=constants.OADP_NAMESPACE
)
Expand Down
1 change: 0 additions & 1 deletion ocs_ci/templates/gitops-deployment/subscription.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ spec:
name: openshift-gitops-operator
source: redhat-operators
sourceNamespace: openshift-marketplace
startingCSV: PLACEHOLDER
1 change: 0 additions & 1 deletion ocs_ci/templates/oadp-deployment/subscription.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ spec:
name: redhat-oadp-operator
source: redhat-operators
sourceNamespace: openshift-marketplace
startingCSV: PLACEHOLDER

0 comments on commit a7ae7c4

Please sign in to comment.