Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for running tests against RHOAI #41

Merged
merged 1 commit into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ build/

## Suite specific files
**/*.kubeconfig
env
27 changes: 6 additions & 21 deletions src/main/java/io/odh/test/Environment.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public class Environment {
private static final String PASSWORD_ENV = "KUBE_PASSWORD";
private static final String TOKEN_ENV = "KUBE_TOKEN";
private static final String URL_ENV = "KUBE_URL";
private static final String PRODUCT_ENV = "PRODUCT";

/**
* Install bundle files
Expand All @@ -37,26 +38,13 @@ public class Environment {
/**
* OLM env variables
*/
private static final String OLM_OPERATOR_NAME_ENV = "OLM_OPERATOR_NAME";
private static final String OLM_OPERATOR_NAMESPACE_ENV = "OLM_OPERATOR_NAMESPACE";
private static final String OLM_OPERATOR_DEPLOYMENT_NAME_ENV = "OLM_OPERATOR_DEPLOYMENT_NAME";
private static final String OLM_SOURCE_NAME_ENV = "OLM_SOURCE_NAME";
private static final String OLM_SOURCE_NAMESPACE_ENV = "OLM_SOURCE_NAMESPACE";
private static final String OLM_APP_BUNDLE_PREFIX_ENV = "OLM_APP_BUNDLE_PREFIX";
private static final String OLM_OPERATOR_VERSION_ENV = "OLM_OPERATOR_VERSION";
private static final String OLM_OPERATOR_CHANNEL_ENV = "OLM_OPERATOR_CHANNEL";
private static final String OPERATOR_INSTALL_TYPE_ENV = "OPERATOR_INSTALL_TYPE";

/**
* Defaults
*/
public static final String OLM_OPERATOR_NAME_DEFAULT = "opendatahub-operator";
public static final String OLM_OPERATOR_NAMESPACE_DEFAULT = "openshift-operators";
public static final String OLM_OPERATOR_DEPLOYMENT_NAME_DEFAULT = "opendatahub-operator-controller-manager";
public static final String OLM_SOURCE_NAME_DEFAULT = "community-operators";
public static final String OLM_APP_BUNDLE_PREFIX_DEFAULT = "opendatahub-operator";
public static final String OLM_OPERATOR_CHANNEL_DEFAULT = "fast";
public static final String OLM_OPERATOR_VERSION_DEFAULT = "2.4.0";
public static final String PRODUCT_DEFAULT = "odh";

/**
* Set values
Expand All @@ -72,16 +60,13 @@ public class Environment {
public static final String INSTALL_FILE_PREVIOUS_PATH = getOrDefault(INSTALL_FILE_RELEASED_ENV, TestConstants.RELEASED_BUNDLE_DEPLOY_FILE);

// OLM env variables
public static final String OLM_OPERATOR_NAME = getOrDefault(OLM_OPERATOR_NAME_ENV, OLM_OPERATOR_NAME_DEFAULT);
public static final String OLM_OPERATOR_NAMESPACE = getOrDefault(OLM_OPERATOR_NAMESPACE_ENV, OLM_OPERATOR_NAMESPACE_DEFAULT);
public static final String OLM_OPERATOR_DEPLOYMENT_NAME = getOrDefault(OLM_OPERATOR_DEPLOYMENT_NAME_ENV, OLM_OPERATOR_DEPLOYMENT_NAME_DEFAULT);
public static final String OLM_SOURCE_NAME = getOrDefault(OLM_SOURCE_NAME_ENV, OLM_SOURCE_NAME_DEFAULT);
public static final String OLM_SOURCE_NAME = getOrDefault(OLM_SOURCE_NAME_ENV, OdhConstants.OLM_SOURCE_NAME);
public static final String OLM_SOURCE_NAMESPACE = getOrDefault(OLM_SOURCE_NAMESPACE_ENV, "openshift-marketplace");
public static final String OLM_APP_BUNDLE_PREFIX = getOrDefault(OLM_APP_BUNDLE_PREFIX_ENV, OLM_APP_BUNDLE_PREFIX_DEFAULT);
public static final String OLM_OPERATOR_CHANNEL = getOrDefault(OLM_OPERATOR_CHANNEL_ENV, OLM_OPERATOR_CHANNEL_DEFAULT);
public static final String OLM_OPERATOR_VERSION = getOrDefault(OLM_OPERATOR_VERSION_ENV, OLM_OPERATOR_VERSION_DEFAULT);
public static final String OLM_OPERATOR_CHANNEL = getOrDefault(OLM_OPERATOR_CHANNEL_ENV, OdhConstants.OLM_OPERATOR_CHANNEL);
public static final String OLM_OPERATOR_VERSION = getOrDefault(OLM_OPERATOR_VERSION_ENV, OdhConstants.OLM_OPERATOR_VERSION);

public static final String OPERATOR_INSTALL_TYPE = getOrDefault(OPERATOR_INSTALL_TYPE_ENV, InstallTypes.BUNDLE.toString());
public static final String PRODUCT = getOrDefault(PRODUCT_ENV, PRODUCT_DEFAULT);

private Environment() { }

Expand Down
48 changes: 47 additions & 1 deletion src/main/java/io/odh/test/OdhConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,62 @@
package io.odh.test;

public class OdhConstants {
// ODH
private static final String ODH_CONTROLLERS_NAMESPACE = "opendatahub";
private static final String ODH_DASHBOARD_ROUTE_NAME = "odh-dashboard";
private static final String ODH_DASHBOARD_CONTROLLER = "odh-dashboard";

// ODH OLM
private static final String ODH_OLM_OPERATOR_NAME = "opendatahub-operator";
private static final String ODH_OLM_OPERATOR_NAMESPACE = "openshift-operators";
private static final String ODH_OLM_OPERATOR_DEPLOYMENT_NAME = "opendatahub-operator-controller-manager";
private static final String ODH_OLM_SOURCE_NAME = "community-operators";
private static final String ODH_OLM_APP_BUNDLE_PREFIX = "opendatahub-operator";
private static final String ODH_OLM_OPERATOR_CHANNEL = "fast";
private static final String ODH_OLM_OPERATOR_VERSION = "v2.4.0";

// RHOAI
private static final String RHOAI_CONTROLLERS_NAMESPACE = "redhat-ods-applications";
private static final String RHOAI_DASHBOARD_ROUTE_NAME = "rhods-dashboard";
private static final String RHOAI_DASHBOARD_CONTROLLER = "rhods-dashboard";
// RHOAI OLM
private static final String RHOAI_OLM_OPERATOR_NAME = "rhods-operator";
private static final String RHOAI_OLM_OPERATOR_NAMESPACE = "redhat-ods-operator";
private static final String RHOAI_OLM_OPERATOR_DEPLOYMENT_NAME = "rhods-operator";
private static final String RHOAI_OLM_SOURCE_NAME = "redhat-operators";
private static final String RHOAI_OLM_APP_BUNDLE_PREFIX = "rhods-operator";
private static final String RHOAI_OLM_OPERATOR_CHANNEL = "stable";
private static final String RHOAI_OLM_OPERATOR_VERSION = "2.5.0";

// Public part
public static final String CODEFLARE_DEPLOYMENT_NAME = "codeflare-operator-manager";
public static final String DS_PIPELINES_OPERATOR = "data-science-pipelines-operator-controller-manager";
public static final String ETCD = "etcd";
public static final String KSERVE_OPERATOR = "kserve-controller-manager";
public static final String KUBERAY_OPERATOR = "kuberay-operator";
public static final String MODELMESH_OPERATOR = "modelmesh-controller";
public static final String NOTEBOOK_OPERATOR = "notebook-controller-deployment";
public static final String ODH_DASHBOARD = "odh-dashboard";
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 TRUSTY_AI_OPERATOR = "trustyai-service-operator-controller-manager";

public static final String CONTROLLERS_NAMESPACE = getOdhOrRhoai(ODH_CONTROLLERS_NAMESPACE, RHOAI_CONTROLLERS_NAMESPACE);
public static final String DASHBOARD_ROUTE_NAME = getOdhOrRhoai(ODH_DASHBOARD_ROUTE_NAME, RHOAI_DASHBOARD_ROUTE_NAME);
public static final String DASHBOARD_CONTROLLER = getOdhOrRhoai(ODH_DASHBOARD_CONTROLLER, RHOAI_DASHBOARD_CONTROLLER);
// OLM env variables
public static final String OLM_OPERATOR_NAME = getOdhOrRhoai(ODH_OLM_OPERATOR_NAME, RHOAI_OLM_OPERATOR_NAME);
public static final String OLM_OPERATOR_NAMESPACE = getOdhOrRhoai(ODH_OLM_OPERATOR_NAMESPACE, RHOAI_OLM_OPERATOR_NAMESPACE);
public static final String OLM_OPERATOR_DEPLOYMENT_NAME = getOdhOrRhoai(ODH_OLM_OPERATOR_DEPLOYMENT_NAME, RHOAI_OLM_OPERATOR_DEPLOYMENT_NAME);
public static final String OLM_APP_BUNDLE_PREFIX = getOdhOrRhoai(ODH_OLM_APP_BUNDLE_PREFIX, RHOAI_OLM_APP_BUNDLE_PREFIX);
public static final String OLM_OPERATOR_VERSION = getOdhOrRhoai(ODH_OLM_OPERATOR_VERSION, RHOAI_OLM_OPERATOR_VERSION);
public static final String OLM_SOURCE_NAME = getOdhOrRhoai(ODH_OLM_SOURCE_NAME, RHOAI_OLM_SOURCE_NAME);
public static final String OLM_OPERATOR_CHANNEL = getOdhOrRhoai(ODH_OLM_OPERATOR_CHANNEL, RHOAI_OLM_OPERATOR_CHANNEL);

private static <T> T getOdhOrRhoai(T odhValue, T rhoaiValue) {
T returnValue = odhValue;
if (Environment.PRODUCT != Environment.PRODUCT_DEFAULT) {
returnValue = rhoaiValue;
}
return returnValue;
}
}
2 changes: 0 additions & 2 deletions src/main/java/io/odh/test/TestConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
import java.time.Duration;

public class TestConstants {
public static final String ODH_NAMESPACE = "opendatahub";
public static final String ODH_DASHBOARD_ROUTE_NAME = "odh-dashboard";
public static final String DEFAULT_NAMESPACE = "default";

public static final String SUBSCRIPTION = "Subscription";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import io.fabric8.kubernetes.client.dsl.MixedOperation;
import io.fabric8.kubernetes.client.dsl.Resource;
import io.fabric8.openshift.client.OpenShiftClient;
import io.odh.test.TestConstants;
import io.odh.test.OdhConstants;
import io.odh.test.TestUtils;
import io.odh.test.framework.manager.ResourceManager;
import io.odh.test.framework.manager.ResourceType;
Expand Down Expand Up @@ -61,7 +61,7 @@ public static Notebook loadDefaultNotebook(String namespace, String name) throws
String notebookString = IOUtils.toString(is, "UTF-8");
notebookString = notebookString.replace("my-project", namespace).replace("my-workbench", name);
// Set new Route url
String routeHost = ResourceManager.getClient().getClient().adapt(OpenShiftClient.class).routes().inNamespace(TestConstants.ODH_NAMESPACE).withName(TestConstants.ODH_DASHBOARD_ROUTE_NAME).get().getSpec().getHost();
String routeHost = ResourceManager.getClient().getClient().adapt(OpenShiftClient.class).routes().inNamespace(OdhConstants.CONTROLLERS_NAMESPACE).withName(OdhConstants.DASHBOARD_ROUTE_NAME).get().getSpec().getHost();
notebookString = notebookString.replace("odh_dashboard_route", "https://" + routeHost);
// Set correct username
String username = ResourceManager.getKubeCmdClient().getUsername().strip();
Expand Down
13 changes: 7 additions & 6 deletions src/main/java/io/odh/test/install/OlmInstall.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import io.fabric8.openshift.api.model.operatorhub.v1alpha1.SubscriptionBuilder;
import io.fabric8.openshift.client.OpenShiftClient;
import io.odh.test.Environment;
import io.odh.test.OdhConstants;
import io.odh.test.framework.manager.ResourceItem;
import io.odh.test.framework.manager.ResourceManager;
import io.odh.test.framework.manager.resources.OperatorGroupResource;
Expand All @@ -22,17 +23,17 @@
public class OlmInstall {
private static final Logger LOGGER = LoggerFactory.getLogger(OlmInstall.class);

private String namespace = Environment.OLM_OPERATOR_NAMESPACE;
private String namespace = OdhConstants.OLM_OPERATOR_NAMESPACE;
private String channel = Environment.OLM_OPERATOR_CHANNEL;
private String name = Environment.OLM_OPERATOR_NAME;
private String operatorName = Environment.OLM_OPERATOR_NAME;
private String name = OdhConstants.OLM_OPERATOR_NAME;
private String operatorName = OdhConstants.OLM_OPERATOR_NAME;
private String sourceName = Environment.OLM_SOURCE_NAME;
private String sourceNamespace = Environment.OLM_SOURCE_NAMESPACE;
private String startingCsv;
private String deploymentName = Environment.OLM_OPERATOR_DEPLOYMENT_NAME;
private String olmAppBundlePrefix = Environment.OLM_OPERATOR_NAME;
private String deploymentName = OdhConstants.OLM_OPERATOR_DEPLOYMENT_NAME;
private String olmAppBundlePrefix = OdhConstants.OLM_OPERATOR_NAME;
private String operatorVersion = Environment.OLM_OPERATOR_VERSION;
private String csvName = operatorName + ".v" + operatorVersion;
private String csvName = operatorName + "." + operatorVersion;

private String approval = "Automatic";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import io.fabric8.kubernetes.api.model.KubernetesResourceList;
import io.fabric8.kubernetes.client.dsl.MixedOperation;
import io.fabric8.kubernetes.client.dsl.Resource;
import io.odh.test.TestConstants;
import io.odh.test.OdhConstants;
import io.odh.test.e2e.Abstract;
import io.odh.test.framework.manager.ResourceManager;
import io.odh.test.framework.manager.resources.DataScienceClusterResource;
Expand Down Expand Up @@ -47,7 +47,7 @@ void init() {

@Test
void checkDataScienceClusterExists() {
DataScienceCluster cluster = dataScienceProjectCli.inNamespace(TestConstants.ODH_NAMESPACE).withName(DS_CLUSTER_NAME).get();
DataScienceCluster cluster = dataScienceProjectCli.inNamespace(OdhConstants.CONTROLLERS_NAMESPACE).withName(DS_CLUSTER_NAME).get();

assertEquals(Kserve.ManagementState.MANAGED, cluster.getSpec().getComponents().getKserve().getManagementState());
assertEquals(Codeflare.ManagementState.MANAGED, cluster.getSpec().getComponents().getCodeflare().getManagementState());
Expand All @@ -61,7 +61,7 @@ void checkDataScienceClusterExists() {

@Test
void checkDataScienceClusterStatus() {
DataScienceCluster cluster = dataScienceProjectCli.inNamespace(TestConstants.ODH_NAMESPACE).withName(DS_CLUSTER_NAME).get();
DataScienceCluster cluster = dataScienceProjectCli.inNamespace(OdhConstants.CONTROLLERS_NAMESPACE).withName(DS_CLUSTER_NAME).get();

assertEquals("Ready", cluster.getStatus().getPhase());
assertNull(cluster.getStatus().getErrorMessage());
Expand All @@ -78,7 +78,7 @@ void checkDataScienceClusterStatus() {

@Test
void checkDataScienceDashboard() {
OdhDashboardConfig dashboard = dashboardConfigCli.inNamespace(TestConstants.ODH_NAMESPACE).withName(DS_DASHBOARD_CONFIG_NAME).get();
OdhDashboardConfig dashboard = dashboardConfigCli.inNamespace(OdhConstants.CONTROLLERS_NAMESPACE).withName(DS_DASHBOARD_CONFIG_NAME).get();

assertTrue(dashboard.getSpec().getNotebookController().getEnabled());

Expand Down
9 changes: 4 additions & 5 deletions src/test/java/io/odh/test/e2e/upgrade/BundleUpgradeST.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import io.fabric8.kubernetes.api.model.LabelSelectorBuilder;
import io.odh.test.Environment;
import io.odh.test.OdhConstants;
import io.odh.test.TestConstants;
import io.odh.test.framework.manager.ResourceManager;
import io.odh.test.install.BundleInstall;
import io.odh.test.utils.DeploymentUtils;
Expand Down Expand Up @@ -44,15 +43,15 @@ void testUpgradeBundle() throws IOException {
baseBundle = new BundleInstall(Environment.INSTALL_FILE_PREVIOUS_PATH);
baseBundle.createWithoutResourceManager();

Map<String, String> operatorSnapshot = DeploymentUtils.depSnapshot(baseBundle.getNamespace(), baseBundle.getDeploymentName());

String dsProjectName = "test-notebooks-upgrade";
String ntbName = "test-odh-notebook";
String ntbNamespace = "test-odh-notebook-upgrade";

deployDsc(dsProjectName);
deployNotebook(ntbNamespace, ntbName);

Map<String, String> operatorSnapshot = DeploymentUtils.depSnapshot(baseBundle.getNamespace(), baseBundle.getDeploymentName());

LabelSelector lblSelector = new LabelSelectorBuilder()
.withMatchLabels(Map.of("app", ntbName))
.build();
Expand All @@ -65,8 +64,8 @@ void testUpgradeBundle() throws IOException {

DeploymentUtils.waitTillDepHasRolled(baseBundle.getNamespace(), baseBundle.getDeploymentName(), operatorSnapshot);

LabelSelector labelSelector = ResourceManager.getClient().getDeployment(TestConstants.ODH_NAMESPACE, OdhConstants.ODH_DASHBOARD).getSpec().getSelector();
PodUtils.verifyThatPodsAreStable(TestConstants.ODH_NAMESPACE, labelSelector);
LabelSelector labelSelector = ResourceManager.getClient().getDeployment(OdhConstants.CONTROLLERS_NAMESPACE, OdhConstants.DASHBOARD_CONTROLLER).getSpec().getSelector();
PodUtils.verifyThatPodsAreStable(OdhConstants.CONTROLLERS_NAMESPACE, labelSelector);

// Verify that NTB pods are stable
PodUtils.waitForPodsReady(ntbNamespace, lblSelector, 1, true, () -> { });
Expand Down
14 changes: 7 additions & 7 deletions src/test/java/io/odh/test/e2e/upgrade/OlmUpgradeST.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import io.fabric8.kubernetes.api.model.LabelSelector;
import io.fabric8.kubernetes.api.model.LabelSelectorBuilder;
import io.fabric8.openshift.api.model.operatorhub.v1alpha1.InstallPlan;
import io.odh.test.Environment;
import io.odh.test.OdhConstants;
import io.odh.test.TestConstants;
import io.odh.test.framework.manager.ResourceManager;
import io.odh.test.install.OlmInstall;
import io.odh.test.platform.KubeUtils;
Expand All @@ -30,7 +30,7 @@ public class OlmUpgradeST extends UpgradeAbstract {
private static final Logger LOGGER = LoggerFactory.getLogger(OlmUpgradeST.class);
private static final String DS_PROJECT_NAME = "upgrade-dsc";

private final String startingVersion = "2.4.0";
private final String startingVersion = Environment.PRODUCT != Environment.PRODUCT_DEFAULT ? "2.4.0" : "v.2.4.0";

@Test
@Disabled("Tested only for upgrades from 2.4+ so we are waiting for 2.5 release")
Expand All @@ -40,12 +40,12 @@ void testUpgradeOlm() throws IOException, InterruptedException {

OlmInstall olmInstall = new OlmInstall();
olmInstall.setApproval("Manual");
olmInstall.setStartingCsv(olmInstall.getOperatorName() + ".v" + startingVersion);
olmInstall.setStartingCsv(olmInstall.getOperatorName() + "." + startingVersion);
olmInstall.createManual();

// Approve install plan created for older version
KubeUtils.waitForInstallPlan(olmInstall.getNamespace(), olmInstall.getOperatorName() + ".v" + startingVersion);
InstallPlan ip = ResourceManager.getClient().getNonApprovedInstallPlan(olmInstall.getNamespace(), olmInstall.getOperatorName() + ".v" + startingVersion);
KubeUtils.waitForInstallPlan(olmInstall.getNamespace(), olmInstall.getOperatorName() + "." + startingVersion);
InstallPlan ip = ResourceManager.getClient().getNonApprovedInstallPlan(olmInstall.getNamespace(), olmInstall.getOperatorName() + "." + startingVersion);
ResourceManager.getClient().approveInstallPlan(olmInstall.getNamespace(), ip.getMetadata().getName());
// Wait for old version readiness
DeploymentUtils.waitForDeploymentReady(olmInstall.getNamespace(), olmInstall.getDeploymentName());
Expand All @@ -72,8 +72,8 @@ void testUpgradeOlm() throws IOException, InterruptedException {
DeploymentUtils.waitTillDepHasRolled(olmInstall.getNamespace(), olmInstall.getDeploymentName(), operatorSnapshot);

// Wait for pod stability for Dashboard
LabelSelector labelSelector = ResourceManager.getClient().getDeployment(TestConstants.ODH_NAMESPACE, OdhConstants.ODH_DASHBOARD).getSpec().getSelector();
PodUtils.verifyThatPodsAreStable(TestConstants.ODH_NAMESPACE, labelSelector);
LabelSelector labelSelector = ResourceManager.getClient().getDeployment(OdhConstants.CONTROLLERS_NAMESPACE, OdhConstants.DASHBOARD_CONTROLLER).getSpec().getSelector();
PodUtils.verifyThatPodsAreStable(OdhConstants.CONTROLLERS_NAMESPACE, labelSelector);

// Verify that NTB pods are stable
PodUtils.waitForPodsReady(ntbNamespace, lblSelector, 1, true, () -> { });
Expand Down
17 changes: 17 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 @@ -9,6 +9,7 @@
import io.fabric8.kubernetes.api.model.PersistentVolumeClaim;
import io.fabric8.kubernetes.api.model.PersistentVolumeClaimBuilder;
import io.fabric8.kubernetes.api.model.Quantity;
import io.odh.test.Environment;
import io.odh.test.OdhAnnotationsLabels;
import io.odh.test.e2e.Abstract;
import io.odh.test.framework.listeners.OdhResourceCleaner;
Expand All @@ -33,6 +34,7 @@
import org.junit.jupiter.api.extension.ExtendWith;
import org.kubeflow.v1.Notebook;
import org.kubeflow.v1.NotebookBuilder;
import org.kubeflow.v1.notebookspec.template.spec.containers.EnvBuilder;

import java.io.IOException;

Expand Down Expand Up @@ -100,6 +102,21 @@ public void deployNotebook(String namespace, String name) throws IOException {
ResourceManager.getInstance().createResourceWithoutWait(pvc);

Notebook notebook = new NotebookBuilder(NotebookResource.loadDefaultNotebook(namespace, name)).build();
if (Environment.PRODUCT != Environment.PRODUCT_DEFAULT) {
notebook = new NotebookBuilder(NotebookResource.loadDefaultNotebook(namespace, name))
.editSpec()
.editNotebookspecTemplate()
.editOrNewSpec()
.editContainer(0)
.withImage("image-registry.openshift-image-registry.svc:5000/redhat-ods-applications/pytorch:2023.2")
.addToEnv(new EnvBuilder().withName("JUPYTER_IMAGE").withValue("image-registry.openshift-image-registry.svc:5000/redhat-ods-applications/pytorch:2023.2").build())
.endSpecContainer()
.endTemplateSpec()
.endNotebookspecTemplate()
.endSpec()
.build();
}

ResourceManager.getInstance().createResourceWithoutWait(notebook);
}
}
Loading