Deployment of Red Hat OpenShift Data Foundation using GitOps

Deploy Red Hat OpenShift Data Foundation (ODF), a unified data storage solution for OpenShift, using GitOps. Manage installation declaratively with Argo CD for enhanced consistency and auditability.

Try Red Hat OpenShift Data Foundation

Lesson 3 finalizes the GitOps process by creating an Argo CD Application Custom Resource that targets the ODF configuration manifests in the specified GitHub repository and synchronizes them to the cluster, thus automating the operator and storage cluster deployment.

In this lesson, you will:

  • Implement a fully automated GitOps pipeline using Argo CD to declaratively deploy and configure the OpenShift Data Foundation (ODF) Operator and Storage Cluster on your OpenShift cluster.

Create the application

The Argo CD Application is used to compare the state of the cluster with the state of GitHub and can, if required, synchronize configuration drifts from GitHub onto the cluster.

You can also create such applications automatically using ApplicationSet. For this learning path, it is easier to review the resulting object. The example below uses a predefined configuration from https://github.com/tjungbauer/odf-gitops  that will only deploy the object storage. It works well on a standard AWS deployment. 

  1. In this lesson, the best way to verify and modify the configuration is to fork and/or clone the GitHub repository. You will find a values.yaml file with the current settings that might be modified.

  2. Once you're done, push your changes to your own repository and change the repoURL to the correct target in the Argo CD Application below. 

Hint

Compare the storage class that is used in the example with the one available on your cluster and modify it accordingly.

  1. Later in this lesson, you will see two different possibilities to set up object storage only or a full-blown OpenShift Data Foundation storage. 

    apiVersion: argoproj.io/v1alpha1
    kind: Application
    metadata:
     name: in-cluster-setup-openshift-data-foundation # <1>
     namespace: openshift-gitops
    spec:
     destination: # <2>
       name: https://kubernetes.default.svc
       namespace: openshift-storage
     project: in-cluster
     source: # <3>
       path: setup-openshift-data-foundation
       repoURL: 'https://github.com/tjungbauer/odf-gitops'
       targetRevision: main
     syncPolicy:
       retry: # <4>
         backoff:
           duration: 5s
           factor: 2
           maxDuration: 3m
         limit: 3
  2. Name of the Argo CD Application as it will appear in the UI.
  3. Destination, here: the local cluster into the Namespace openshift-storage.
  4. Source. In this example, I'm using my GitHub repository, but use your Git/Path/Branch.
  5. Retry in case of a synchronization error (Max. 3).
Previous resource
Create a custom resource for storage
Next resource
Verify the installation