diff --git a/ods_ci/tasks/Resources/Files/codeflare_sub_template.yaml b/ods_ci/tasks/Resources/Files/codeflare_sub_template.yaml deleted file mode 100644 index c20238f3f..000000000 --- a/ods_ci/tasks/Resources/Files/codeflare_sub_template.yaml +++ /dev/null @@ -1,15 +0,0 @@ -kind: List -metadata: {} -apiVersion: v1 -items: - - apiVersion: operators.coreos.com/v1alpha1 - kind: Subscription - metadata: - name: rhods-codeflare-operator - namespace: openshift-operators - spec: - channel: - installPlanApproval: Automatic - name: rhods-codeflare-operator - source: - sourceNamespace: openshift-marketplace diff --git a/ods_ci/tasks/Resources/RHODS_OLM/RHODS_OLM.resource b/ods_ci/tasks/Resources/RHODS_OLM/RHODS_OLM.resource index c923c6b1a..20984524a 100644 --- a/ods_ci/tasks/Resources/RHODS_OLM/RHODS_OLM.resource +++ b/ods_ci/tasks/Resources/RHODS_OLM/RHODS_OLM.resource @@ -2,10 +2,8 @@ Resource config/cluster.robot Resource install/oc_install.robot Resource install/install.robot -Resource install/codeflare_install.resource Resource pre-tasks/oc_is_operator_installed.robot Resource uninstall/oc_uninstall.robot Resource uninstall/uninstall.robot -Resource uninstall/codeflare_uninstall.resource Resource upgrade/oc_upgrade.robot Resource upgrade/upgrade.robot diff --git a/ods_ci/tasks/Resources/RHODS_OLM/install/codeflare_install.resource b/ods_ci/tasks/Resources/RHODS_OLM/install/codeflare_install.resource deleted file mode 100644 index 5d09ab460..000000000 --- a/ods_ci/tasks/Resources/RHODS_OLM/install/codeflare_install.resource +++ /dev/null @@ -1,53 +0,0 @@ -*** Settings *** -Documentation RHODS CodeFlare operator installation keywords -Resource ../../../../tests/Resources/Common.robot -Resource ../install/oc_install.robot -Resource ../pre-tasks/oc_is_operator_installed.robot -Library String -Library OperatingSystem -Library OpenShiftLibrary - - -*** Keywords *** -Installing CodeFlare Operator - [Documentation] Installs the RHODS CodeFlare operator if it is not already installed - ${is_operator_installed} = Is CodeFlare Installed - IF not ${is_operator_installed} - Log Installing CodeFlare operator console=yes - Install CodeFlare ${cluster_type} - END - -CodeFlare Operator Should Be Installed - [Documentation] Verifies the RHODS CodeFlare operator installation and stores CodeFlare version - Verify CodeFlare Installation - ${version} = Get CodeFlare Version - Set Global Variable $CODEFLARE_VERSION ${version} - Log CodeFlare has been installed console=yes - -Install CodeFlare - [Documentation] Installs the RHODS CodeFlare operator, expects RHODS operator already installed - [Arguments] ${cluster_type} - ${file_path} = Set Variable tasks/Resources/Files/ - IF "${cluster_type}" == "managed" - ${catalog_source} = Set Variable "addon-managed-odh-catalog" - ELSE - ${catalog_source} = Set Variable "redhat-operators" - END - Copy File source=${file_path}codeflare_sub_template.yaml destination=${file_path}codeflare_sub_apply.yaml - Run sed -i 's//${CODEFLARE_UPDATE_CHANNEL}/' ${file_path}codeflare_sub_apply.yaml - Run sed -i 's//${catalog_source}/' ${file_path}codeflare_sub_apply.yaml - Oc Apply kind=List src=${file_path}codeflare_sub_apply.yaml - Remove File ${file_path}codeflare_sub_apply.yaml - -Verify CodeFlare Installation - [Documentation] Verifies the RHODS CodeFlare operator deployment existence - Log Verifying CodeFlare installation console=yes - Log To Console Waiting for CodeFlare resources to be up and running - Wait For Pods Numbers 1 - ... namespace=openshift-operators - ... label_selector=app.kubernetes.io/name=codeflare-operator - ... timeout=2000 - Wait For Pods Status namespace=openshift-operators - ... label_selector=app.kubernetes.io/name=codeflare-operator - ... timeout=1200 - Log Verified rhods-codeflare-operator console=yes diff --git a/ods_ci/tasks/Resources/RHODS_OLM/install/install.robot b/ods_ci/tasks/Resources/RHODS_OLM/install/install.robot index 8d8d328f9..565f46f27 100644 --- a/ods_ci/tasks/Resources/RHODS_OLM/install/install.robot +++ b/ods_ci/tasks/Resources/RHODS_OLM/install/install.robot @@ -2,7 +2,6 @@ Documentation RHODS operator installation top-level keywords Resource ../pre-tasks/oc_is_operator_installed.robot Resource oc_install.robot -Resource codeflare_install.resource *** Keywords *** @@ -13,9 +12,6 @@ Installing RHODS Operator ${image_url} ... Set Suite Variable ${image_url} AND ... Set Test Variable ${RHODS_OSD_INSTALL_REPO} AND ... Install RHODS ${cluster_type} ${image_url} - ${is_codeflare_managed} = Is CodeFlare Managed - Log Will install CodeFlare operator: ${is_codeflare_managed} console=yes - IF ${is_codeflare_managed} Installing CodeFlare Operator RHODS Operator Should Be installed Verify RHODS Installation diff --git a/ods_ci/tasks/Resources/RHODS_OLM/install/oc_install.robot b/ods_ci/tasks/Resources/RHODS_OLM/install/oc_install.robot index ce0631f89..f33f4f9b4 100644 --- a/ods_ci/tasks/Resources/RHODS_OLM/install/oc_install.robot +++ b/ods_ci/tasks/Resources/RHODS_OLM/install/oc_install.robot @@ -75,10 +75,6 @@ Verify RHODS Installation Log Verified redhat-ods-operator console=yes END - # The CodeFlare operator verification needs to happen after RHODS operator and before DataScienceCluster is created! - ${is_codeflare_managed} = Is CodeFlare Managed - Log Will verify CodeFlare operator: ${is_codeflare_managed} console=yes - IF ${is_codeflare_managed} CodeFlare Operator Should Be Installed IF "${UPDATE_CHANNEL}" == "odh-nightlies" or "${cluster_type}" != "managed" Apply DataScienceCluster CustomResource dsc_name=${DSC_NAME} END diff --git a/ods_ci/tasks/Resources/RHODS_OLM/pre-tasks/oc_is_operator_installed.robot b/ods_ci/tasks/Resources/RHODS_OLM/pre-tasks/oc_is_operator_installed.robot index ecf64327b..73ca5680b 100644 --- a/ods_ci/tasks/Resources/RHODS_OLM/pre-tasks/oc_is_operator_installed.robot +++ b/ods_ci/tasks/Resources/RHODS_OLM/pre-tasks/oc_is_operator_installed.robot @@ -77,15 +77,3 @@ Check A RHODS Family Operator Is Installed END Log Operator with sub ${subscription} is installed result: ${result} console=yes IF not ${result} FAIL The operator with sub ${subscription} is not installed. - -Is CodeFlare Installed - [Documentation] Returns if the RHODS CodeFlare operator is currently installed - ${result} = Run Keyword And Return Status - ... Check A RHODS Family Operator Is Installed namespace=openshift-operators subscription=rhods-codeflare-operator - Log RHODS CodeFlare is installed: ${result} console=yes - RETURN ${result} - -Is CodeFlare Managed - [Documentation] Returns if the RHODS CodeFlare operator should be installed/uninstalled alongside RHODS operator - ${isCodeFlareManaged} = Convert To Boolean ${MANAGE_CODEFLARE_OPERATOR} - RETURN ${isCodeFlareManaged} diff --git a/ods_ci/tasks/Resources/RHODS_OLM/uninstall/codeflare_uninstall.resource b/ods_ci/tasks/Resources/RHODS_OLM/uninstall/codeflare_uninstall.resource deleted file mode 100644 index ae3c17a3e..000000000 --- a/ods_ci/tasks/Resources/RHODS_OLM/uninstall/codeflare_uninstall.resource +++ /dev/null @@ -1,58 +0,0 @@ -*** Settings *** -Documentation RHODS CodeFlare operator uninstallation keywords -Resource ../install/oc_install.robot -Resource ../../../../tests/Resources/Common.robot -Resource ../../../../tests/Resources/Page/Operators/ISVs.resource -Resource oc_uninstall.robot - -Library Process - - -*** Keywords *** -Uninstalling CodeFlare Operator - [Documentation] Uninstalls the RHODS CodeFlare operator if it is installed - ${is_operator_installed} = Is CodeFlare Installed - IF ${is_operator_installed} - Log Uninstalling CodeFlare operator in ${cluster_type} console=yes - Uninstall CodeFlare - END - -Uninstall CodeFlare - [Documentation] Removes the RHODS CodeFlare operator subscription and CSV - # needs to be deleted first to avoid getting stuck on CodeFlare finalizer - ${return_code} ${output} Run And Return Rc And Output - ... oc delete mcads.codeflare.codeflare.dev mcad -n redhat-ods-applications --ignore-not-found - Should Be Equal As Integers ${return_code} 0 msg=Error deleting CodeFlare MCAD CR - Uninstall ISV Operator From OperatorHub Via CLI rhods-codeflare-operator openshift-operators - -CodeFlare Operator Should Be Uninstalled - [Documentation] Verifies and logs that the RHODS CodeFlare operator is uninstalled - Verify CodeFlare Uninstallation - Log CodeFlare has been uninstalled console=yes - -Verify CodeFlare Uninstallation - [Documentation] Verifies that the RHODS CodeFlare operator is uninstalled - Run Keyword And Expect Error *Not Found* - ... Oc Get kind=Subscription namespace=openshift-operators - ... label_selector=app.kubernetes.io/name=codeflare-operator - Verify Pod Does Not Exists app.kubernetes.io/name=codeflare-operator - -Verify Pod Does Not Exists - [Documentation] Verifies that a Pod with a label matching given selector does not exist - [Arguments] ${selector} - Log Checking pod with label selector: ${selector} - ${pod_exists} = Run Keyword and return status - ... Oc Get kind=Pod label_selector=${selector} - IF ${pod_exists} Wait Until Pod Is Deleted ${selector} 3600 - Log Pod with label ${selector} deleted console=yes - -Wait Until Pod Is Deleted - [Documentation] Waits until the pod with a label matching given selector is deleted - [Arguments] ${selector} ${timeout} - FOR ${counter} IN RANGE ${timeout} - ${pod_exists} = Run Keyword and return status - ... Oc Get kind=Pod label_selector=${selector} - Exit For Loop If not ${pod_exists} - END - IF ${pod_exists} - ... Fail Pod matching ${selector} has not been deleted after ${timeout} attempts! diff --git a/ods_ci/tasks/Resources/RHODS_OLM/uninstall/uninstall.robot b/ods_ci/tasks/Resources/RHODS_OLM/uninstall/uninstall.robot index d56da76a0..4108b9d74 100644 --- a/ods_ci/tasks/Resources/RHODS_OLM/uninstall/uninstall.robot +++ b/ods_ci/tasks/Resources/RHODS_OLM/uninstall/uninstall.robot @@ -3,14 +3,11 @@ Resource ../install/oc_install.robot Resource ../pre-tasks/oc_is_operator_installed.robot Resource ../../../../tests/Resources/Common.robot Resource oc_uninstall.robot -Resource codeflare_uninstall.resource Library Process *** Keywords *** Uninstalling RHODS Operator - ${is_codeflare_managed} = Is CodeFlare Managed - IF ${is_codeflare_managed} Uninstalling CodeFlare Operator ${is_operator_installed} = Is RHODS Installed IF ${is_operator_installed} Run Keywords ... Log Uninstalling RHODS operator in ${cluster_type} console=yes AND @@ -45,8 +42,6 @@ Uninstall RHODS In Self Managed Cluster END RHODS Operator Should Be Uninstalled - ${is_codeflare_managed} = Is CodeFlare Managed - IF ${is_codeflare_managed} CodeFlare Operator Should Be Uninstalled Verify RHODS Uninstallation Log RHODS has been uninstalled console=yes diff --git a/ods_ci/tasks/Tasks/rhods_olm.robot b/ods_ci/tasks/Tasks/rhods_olm.robot index 61e711c52..e3eb098a7 100644 --- a/ods_ci/tasks/Tasks/rhods_olm.robot +++ b/ods_ci/tasks/Tasks/rhods_olm.robot @@ -15,11 +15,8 @@ ${RHODS_OSD_INSTALL_REPO} None ${TEST_ENV} AWS ${INSTALL_TYPE} OperatorHub ${UPDATE_CHANNEL} odh-nightlies -${MANAGE_CODEFLARE_OPERATOR} False -${CODEFLARE_UPDATE_CHANNEL} odh-nightlies ${OLM_DIR} rhodsolm ${RHODS_VERSION} None -${CODEFLARE_VERSION} None *** Tasks *** Can Install RHODS Operator diff --git a/ods_ci/tests/Tests/650__distributed_workloads/test-run-dw-tests.robot b/ods_ci/tests/Tests/650__distributed_workloads/test-run-dw-tests.robot index 00d3d2cd5..27c4c27bc 100644 --- a/ods_ci/tests/Tests/650__distributed_workloads/test-run-dw-tests.robot +++ b/ods_ci/tests/Tests/650__distributed_workloads/test-run-dw-tests.robot @@ -1,7 +1,6 @@ *** Settings *** Documentation Distributed workloads tests -Resource ../../../tasks/Resources/RHODS_OLM/install/codeflare_install.resource Resource ../../../tasks/Resources/RHODS_OLM/install/oc_install.robot Resource ../../Resources/Page/DistributedWorkloads/DistributedWorkloads.resource