Search

Chapter 4. Customizing component deployment resources

download PDF

4.1. Overview of component resource customization

You can customize deployment resources that are related to the Red Hat OpenShift AI Operator, for example, CPU and memory limits and requests. For resource customizations to persist without being overwritten by the Operator, the opendatahub.io/managed: true annotation must not be present in the YAML file for the component deployment. This annotation is absent by default.

The following table shows the deployment names for each component in the redhat-ods-applications namespace:

ComponentDeployment names

CodeFlare

codeflare-operator-manager

KServe

  • kserve-controller-manager
  • odh-model-controller

TrustyAI

trustyai-service-operator-controller-manager

Ray

kuberay-operator

Kueue

kueue-controller-manager

Workbenches

  • notebook-controller-deployment
  • odh-notebook-controller-manager

Dashboard

rhods-dashboard

Model serving

  • modelmesh-controller
  • odh-model-controller

Data science pipelines

data-science-pipelines-operator-controller-manager

Training Operator

kubeflow-training-operator

4.2. Customizing component resources

You can customize component deployment resources by updating the .spec.template.spec.containers.resources section of the YAML file for the component deployment.

Prerequisites

  • You have cluster administrator privileges for your OpenShift cluster.
  • You are part of the administrator group for OpenShift AI in OpenShift.

Procedure

  1. Log in to the OpenShift console as a cluster administrator.
  2. In the Administrator perspective, click Workloads > Deployments.
  3. From the Project drop-down list, select redhat-ods-applications.
  4. In the Name column, click the name of the deployment for the component that you want to customize resources for.

    Note

    For more information about the deployment names for each component, see Overview of component resource customization.

  5. On the Deployment details page that appears, click the YAML tab.
  6. Find the .spec.template.spec.containers.resources section.
  7. Update the value of the resource that you want to customize. For example, to update the memory limit to 500Mi, make the following change:

    containers:
            - resources:
                limits:
                    cpu: '2'
                    memory: 500Mi
                requests:
                    cpu: '1'
                    memory: 1Gi
  8. Click Save.
  9. Click Reload.

Verification

  • Log in to OpenShift AI and verify that your resource changes apply.

4.3. Disabling component resource customization

You can disable customization of component deployment resources, and restore default values, by adding the opendatahub.io/managed: true annotation to the YAML file for the component deployment.

Important

Manually removing or setting the opendatahub.io/managed: true annotation to false after manually adding it to the YAML file for a component deployment might cause unexpected cluster issues.

To remove the annotation from a deployment, use the steps described in Re-enabling component resource customization.

Prerequisites

  • You have cluster administrator privileges for your OpenShift cluster.
  • You are part of the administrator group for OpenShift AI in OpenShift.

Procedure

  1. Log in to the OpenShift console as a cluster administrator.
  2. In the Administrator perspective, click Workloads > Deployments.
  3. From the Project drop-down list, select redhat-ods-applications.
  4. In the Name column, click the name of the deployment for the component to which you want to add the annotation.

    Note

    For more information about the deployment names for each component, see Overview of component resource customization.

  5. On the Deployment details page that appears, click the YAML tab.
  6. Find the metadata.annotations: section.
  7. Add the opendatahub.io/managed: true annotation.

    metadata:
      annotations:
         opendatahub.io/managed: true
  8. Click Save.
  9. Click Reload.

Verification

  • The opendatahub.io/managed: true annotation appears in the YAML file for the component deployment.

4.4. Re-enabling component resource customization

You can re-enable customization of component deployment resources after manually disabling it.

Important

Manually removing or setting the opendatahub.io/managed: annotation to false after adding it to the YAML file for a component deployment might cause unexpected cluster issues.

To remove the annotation from a deployment, use the following steps to delete the deployment. The controller pod for the deployment will automatically redeploy with the default settings.

Prerequisites

  • You have cluster administrator privileges for your OpenShift cluster.
  • You are part of the administrator group for OpenShift AI in OpenShift.

Procedure

  1. Log in to the OpenShift console as a cluster administrator.
  2. In the Administrator perspective, click Workloads > Deployments.
  3. From the Project drop-down list, select redhat-ods-applications.
  4. In the Name column, click the name of the deployment for the component for which you want to remove the annotation.
  5. Click the Options menu Options menu .
  6. Click Delete Deployment.

Verification

  • The controller pod for the deployment automatically redeploys with the default settings.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.