Red Hat OpenShift AI provides a platform for data science and AI workloads, but managing its external dependencies can become complex, slowing down setup and maintenance.
To streamline this workflow, we created the odh-gitops repository. This repository provides a declarative, version-controlled, GitOps-ready template for deploying OpenShift AI dependencies on OpenShift. It includes predefined configurations to help you manage the entire dependency lifecycle.
The core idea is simple: every operator dependency is expressed as Kustomize manifests. A single oc apply -k . command or an Argo CD Application installs everything.
Why Kustomize?
Kustomize is an open source configuration management tool that lets you customize YAML manifests for different environments. It is now included in both the kubectl and oc command line interfaces (CLIs).
The odh-gitops repository uses Kustomize to manage the OpenShift AI dependencies. This GitOps approach lets you customize configurations and helps prevent conflicts by skipping resources already in your cluster.
A note on Helm: A Helm chart alternative is also being developed in the same repository (under the chart/ directory) for teams that prefer a values-driven approach. We expect to release that option in the coming months. The Kustomize-based workflow described in this post is the primary and recommended method today.
Getting started
You can deploy this GitOps configuration using two primary methods: the OpenShift CLI (oc) or Argo CD for automated synchronization.
Prerequisites:
- A Red Hat OpenShift cluster (version 4.19 or later)
- oc or kubectl CLI installed
- Cluster admin permissions
Install using the CLI
The CLI method offers manual control over the installation process.
- Clone the repository: Start by cloning the odh-gitops repository to your local machine.
- Review and customize: By default, almost all the necessary dependencies for the OpenShift AI components are enabled. Before applying, you can review the configurations and make any changes. More information in the Customize the installation section.
Install the dependencies: Use the
oc apply -kcommand with the path to your Kustomize directory. This processes the Kustomize files and applies the resulting manifests, installing all required dependencies.oc apply -k dependenciesOnce the operators are Ready, install the custom resources to configure the dependencies:
oc apply -k configurations
And that's it! All OpenShift AI dependencies are now installed and configured in the cluster.
Important note on default dependencies
Not all dependencies are installed by default, as some require manual configuration. Always refer to the README for full instructions. Before applying the configuration to your cluster, you can validate the resources that will be installed by running the following command: oc kustomize build <path-to-kustomize-dir>
Install a specific dependency
You can also choose to install only one operator and its specific dependencies. For example, if you only require the Kueue component, which also requires the cert-manager dependency. You can install both using:
oc apply -k dependencies/operators/kueue-operatorOnce the Red Hat build of Kueue operator is Ready, you can install its configuration:
oc apply -k configurations/kueue-operatorVideo demo
Install using Argo CD
The Argo CD method provides a GitOps approach with automated synchronization and consistency monitoring.
Prerequisites:
- Argo CD must be installed and configured to deploy resources on your cluster.
- Your Argo CD instance needs to be configured with permissions to handle all actions on kueues.kueue.openshift.io and kuadrants.kuadrant.io groups.
- Fork the
odh-gitopsrepository and apply your customizations.
Once the prerequisites are met, you can install all the dependencies by creating an Argo CD application. Since operators install Custom Resource Definitions (CRDs) asynchronously via Operator Lifecycle Manager (OLM), you must enable the SkipDryRunOnMissingResource sync policy.
A sample Application manifest is provided below. Important: Before using this manifest, you must modify the repoURL and targetRevision fields to match your own repository fork and the desired version.
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: rhoai-dependencies
namespace: openshift-gitops
spec:
project: default
source:
repoURL: https://github.com/opendatahub-io/odh-gitops.git # Match your fork
targetRevision: main # Match your target revision
path: .
destination:
server: https://kubernetes.default.svc
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- SkipDryRunOnMissingResource=trueTo install only selected operators, you can modify dependencies/operators/kustomization.yaml file in your fork to comment out unwanted dependencies. See the Customize the installation section for more information.
Video demo
Customize the installation
The main customization point is the dependencies/operators/kustomization.yaml file. It lists every operator as a Kustomize component reference:
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
components:
- ../../components/operators/cert-manager
- ../../components/operators/kueue-operator
- ../../components/operators/cluster-observability-operator
- ../../components/operators/opentelemetry-product
- ../../components/operators/leader-worker-set
- ../../components/operators/job-set-operator
- ../../components/operators/tempo-product
- ../../components/operators/openshift-custom-metrics-autoscaler
- ../../components/operators/rhcl-operator
# Uncomment to enable optional operators:
# - ../../components/operators/nfd
# - ../../components/operators/nvidia-gpu-operator
# - ../../components/operators/maria-dbComment out a line to skip an operator. Uncomment to add an optional one. The same applies to configurations/kustomization.yaml for post-install Custom Resources.
For deeper customizations (changing a subscription channel, pinning a CSV version, adjusting a CR), you can either edit the manifests directly in your fork or use standard Kustomize patches in an overlay.
Conclusion
Using the odh-gitops repository and Kustomize simplifies how you manage Red Hat OpenShift AI dependencies. This method provides flexibility for customization and straightforward processes for both initial deployment and ongoing updates, whether you choose the manual control of the CLI or the automation of Argo CD.
To continue simplifying this process, we are actively working on a Helm chart to provide an alternative installation path for Red Hat OpenShift AI users who prefer a native Helm experience.
- Follow the OpenShift AI latest release notes for updates.
- To learn more about the project, check the odh-gitops repository.
- To learn more about Kustomize, see the documentation.