Skip to content

Commit

Permalink
Add Kueue operand by enabling the component in DSC (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
jiridanek authored Feb 29, 2024
1 parent 0e5ea1d commit 9c532fe
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/main/java/io/odh/test/OdhConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/io/odh/test/utils/DscUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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()
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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());
}

Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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());
}
}
5 changes: 5 additions & 0 deletions src/test/java/io/odh/test/e2e/standard/NotebookST.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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()
)
Expand Down
5 changes: 5 additions & 0 deletions src/test/java/io/odh/test/e2e/upgrade/UpgradeAbstract.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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()
)
Expand Down

0 comments on commit 9c532fe

Please sign in to comment.