diff --git a/src/main/java/io/odh/test/OdhConstants.java b/src/main/java/io/odh/test/OdhConstants.java index f352ccce..f34ddc6d 100644 --- a/src/main/java/io/odh/test/OdhConstants.java +++ b/src/main/java/io/odh/test/OdhConstants.java @@ -64,6 +64,7 @@ private OdhConstants() { } public static final String NOTEBOOK_OPERATOR = "notebook-controller-deployment"; public static final String ODH_MODEL_OPERATOR = "odh-model-controller"; public static final String ODH_NOTEBOOK_OPERATOR = "odh-notebook-controller-manager"; + public static final String KUEUE_OPERATOR = "kueue-controller-manager"; public static final String CONTROLLERS_NAMESPACE = getOdhOrRhoai("CONTROLLERS_NAMESPACE", ODH_CONTROLLERS_NAMESPACE, RHOAI_CONTROLLERS_NAMESPACE); public static final String DASHBOARD_ROUTE_NAME = getOdhOrRhoai("DASHBOARD_ROUTE_NAME", ODH_DASHBOARD_ROUTE_NAME, RHOAI_DASHBOARD_ROUTE_NAME); diff --git a/src/main/java/io/odh/test/framework/manager/resources/DataScienceClusterResource.java b/src/main/java/io/odh/test/framework/manager/resources/DataScienceClusterResource.java index f8bac002..b310eeba 100644 --- a/src/main/java/io/odh/test/framework/manager/resources/DataScienceClusterResource.java +++ b/src/main/java/io/odh/test/framework/manager/resources/DataScienceClusterResource.java @@ -84,6 +84,12 @@ public boolean waitForReadiness(DataScienceCluster resource) { // dscReady = dscReady && rayStatus.equals("True"); // } // +// // Wait for Kueue +// if (resource.getSpec().getComponents().getKueue().getManagementState().equals(Kueue.ManagementState.MANAGED)) { +// String kueueStatus = KubeUtils.getDscConditionByType(dsc.getStatus().getConditions(), "kueueReady").getStatus(); +// LOGGER.debug("DataScienceCluster {} Kueue status: {}", resource.getMetadata().getName(), kueueStatus); +// dscReady = dscReady && kueueStatus.equals("True"); +// } // // // Wait for KServe // if (resource.getSpec().getComponents().getKserve().getManagementState().equals(Kserve.ManagementState.MANAGED)) { diff --git a/src/main/java/io/odh/test/utils/DscUtils.java b/src/main/java/io/odh/test/utils/DscUtils.java index dd2c2335..44c57ccc 100644 --- a/src/main/java/io/odh/test/utils/DscUtils.java +++ b/src/main/java/io/odh/test/utils/DscUtils.java @@ -17,6 +17,8 @@ import io.opendatahub.datasciencecluster.v1.datascienceclusterspec.components.DatasciencepipelinesBuilder; import io.opendatahub.datasciencecluster.v1.datascienceclusterspec.components.Kserve; import io.opendatahub.datasciencecluster.v1.datascienceclusterspec.components.KserveBuilder; +import io.opendatahub.datasciencecluster.v1.datascienceclusterspec.components.Kueue; +import io.opendatahub.datasciencecluster.v1.datascienceclusterspec.components.KueueBuilder; import io.opendatahub.datasciencecluster.v1.datascienceclusterspec.components.Modelmeshserving; import io.opendatahub.datasciencecluster.v1.datascienceclusterspec.components.ModelmeshservingBuilder; import io.opendatahub.datasciencecluster.v1.datascienceclusterspec.components.Ray; @@ -75,6 +77,9 @@ public static DataScienceCluster getBasicDSC(String dsProjectName) { .withKserve( new KserveBuilder().withManagementState(Kserve.ManagementState.MANAGED).build() ) + .withKueue( + new KueueBuilder().withManagementState(Kueue.ManagementState.MANAGED).build() + ) .withCodeflare( new CodeflareBuilder().withManagementState(Codeflare.ManagementState.MANAGED).build() ) diff --git a/src/test/java/io/odh/test/e2e/continuous/DataScienceClusterST.java b/src/test/java/io/odh/test/e2e/continuous/DataScienceClusterST.java index a2826bc7..f2bbe35f 100644 --- a/src/test/java/io/odh/test/e2e/continuous/DataScienceClusterST.java +++ b/src/test/java/io/odh/test/e2e/continuous/DataScienceClusterST.java @@ -18,6 +18,7 @@ import io.opendatahub.datasciencecluster.v1.datascienceclusterspec.components.Dashboard; import io.opendatahub.datasciencecluster.v1.datascienceclusterspec.components.Datasciencepipelines; import io.opendatahub.datasciencecluster.v1.datascienceclusterspec.components.Kserve; +import io.opendatahub.datasciencecluster.v1.datascienceclusterspec.components.Kueue; import io.opendatahub.datasciencecluster.v1.datascienceclusterspec.components.Modelmeshserving; import io.opendatahub.datasciencecluster.v1.datascienceclusterspec.components.Ray; import io.opendatahub.datasciencecluster.v1.datascienceclusterspec.components.Workbenches; @@ -55,6 +56,7 @@ void checkDataScienceClusterExists() { assertEquals(Ray.ManagementState.MANAGED, cluster.getSpec().getComponents().getRay().getManagementState()); assertEquals(Modelmeshserving.ManagementState.MANAGED, cluster.getSpec().getComponents().getModelmeshserving().getManagementState()); assertEquals(Datasciencepipelines.ManagementState.MANAGED, cluster.getSpec().getComponents().getDatasciencepipelines().getManagementState()); + assertEquals(Kueue.ManagementState.MANAGED, cluster.getSpec().getComponents().getKueue().getManagementState()); assertEquals(Workbenches.ManagementState.MANAGED, cluster.getSpec().getComponents().getWorkbenches().getManagementState()); } @@ -71,6 +73,7 @@ void checkDataScienceClusterStatus() { assertEquals("True", KubeUtils.getDscConditionByType(cluster.getStatus().getConditions(), "kserveReady").getStatus()); assertEquals("True", KubeUtils.getDscConditionByType(cluster.getStatus().getConditions(), "codeflareReady").getStatus()); assertEquals("True", KubeUtils.getDscConditionByType(cluster.getStatus().getConditions(), "model-meshReady").getStatus()); + assertEquals("True", KubeUtils.getDscConditionByType(cluster.getStatus().getConditions(), "kueueReady").getStatus()); } @Test diff --git a/src/test/java/io/odh/test/e2e/standard/DataScienceClusterST.java b/src/test/java/io/odh/test/e2e/standard/DataScienceClusterST.java index 712edea2..d41620f6 100644 --- a/src/test/java/io/odh/test/e2e/standard/DataScienceClusterST.java +++ b/src/test/java/io/odh/test/e2e/standard/DataScienceClusterST.java @@ -14,6 +14,7 @@ import io.opendatahub.datasciencecluster.v1.datascienceclusterspec.components.Dashboard; import io.opendatahub.datasciencecluster.v1.datascienceclusterspec.components.Datasciencepipelines; import io.opendatahub.datasciencecluster.v1.datascienceclusterspec.components.Kserve; +import io.opendatahub.datasciencecluster.v1.datascienceclusterspec.components.Kueue; import io.opendatahub.datasciencecluster.v1.datascienceclusterspec.components.Modelmeshserving; import io.opendatahub.datasciencecluster.v1.datascienceclusterspec.components.Ray; import io.opendatahub.datasciencecluster.v1.datascienceclusterspec.components.Workbenches; @@ -86,5 +87,6 @@ void createDataScienceCluster() { assertEquals(Workbenches.ManagementState.MANAGED, cluster.getSpec().getComponents().getWorkbenches().getManagementState()); assertEquals(Modelmeshserving.ManagementState.MANAGED, cluster.getSpec().getComponents().getModelmeshserving().getManagementState()); assertEquals(Ray.ManagementState.MANAGED, cluster.getSpec().getComponents().getRay().getManagementState()); + assertEquals(Kueue.ManagementState.MANAGED, cluster.getSpec().getComponents().getKueue().getManagementState()); } } diff --git a/src/test/java/io/odh/test/e2e/standard/NotebookST.java b/src/test/java/io/odh/test/e2e/standard/NotebookST.java index 376bb7ee..88cfc57b 100644 --- a/src/test/java/io/odh/test/e2e/standard/NotebookST.java +++ b/src/test/java/io/odh/test/e2e/standard/NotebookST.java @@ -28,6 +28,8 @@ import io.opendatahub.datasciencecluster.v1.datascienceclusterspec.components.DatasciencepipelinesBuilder; import io.opendatahub.datasciencecluster.v1.datascienceclusterspec.components.Kserve; import io.opendatahub.datasciencecluster.v1.datascienceclusterspec.components.KserveBuilder; +import io.opendatahub.datasciencecluster.v1.datascienceclusterspec.components.Kueue; +import io.opendatahub.datasciencecluster.v1.datascienceclusterspec.components.KueueBuilder; import io.opendatahub.datasciencecluster.v1.datascienceclusterspec.components.Modelmeshserving; import io.opendatahub.datasciencecluster.v1.datascienceclusterspec.components.ModelmeshservingBuilder; import io.opendatahub.datasciencecluster.v1.datascienceclusterspec.components.Ray; @@ -148,6 +150,9 @@ void deployDataScienceCluster() { .withKserve( new KserveBuilder().withManagementState(Kserve.ManagementState.MANAGED).build() ) + .withKueue( + new KueueBuilder().withManagementState(Kueue.ManagementState.MANAGED).build() + ) .withCodeflare( new CodeflareBuilder().withManagementState(Codeflare.ManagementState.MANAGED).build() ) diff --git a/src/test/java/io/odh/test/e2e/upgrade/UpgradeAbstract.java b/src/test/java/io/odh/test/e2e/upgrade/UpgradeAbstract.java index 57e051c0..34e905c8 100644 --- a/src/test/java/io/odh/test/e2e/upgrade/UpgradeAbstract.java +++ b/src/test/java/io/odh/test/e2e/upgrade/UpgradeAbstract.java @@ -29,6 +29,8 @@ import io.opendatahub.datasciencecluster.v1.datascienceclusterspec.components.DatasciencepipelinesBuilder; import io.opendatahub.datasciencecluster.v1.datascienceclusterspec.components.Kserve; import io.opendatahub.datasciencecluster.v1.datascienceclusterspec.components.KserveBuilder; +import io.opendatahub.datasciencecluster.v1.datascienceclusterspec.components.Kueue; +import io.opendatahub.datasciencecluster.v1.datascienceclusterspec.components.KueueBuilder; import io.opendatahub.datasciencecluster.v1.datascienceclusterspec.components.Modelmeshserving; import io.opendatahub.datasciencecluster.v1.datascienceclusterspec.components.ModelmeshservingBuilder; import io.opendatahub.datasciencecluster.v1.datascienceclusterspec.components.Ray; @@ -69,6 +71,9 @@ protected void deployDsc(String name) { .withKserve( new KserveBuilder().withManagementState(Kserve.ManagementState.REMOVED).build() ) + .withKueue( + new KueueBuilder().withManagementState(Kueue.ManagementState.MANAGED).build() + ) .withCodeflare( new CodeflareBuilder().withManagementState(Codeflare.ManagementState.MANAGED).build() )