Page
Create the Argo CD application
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.
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.yamlfile with the current settings that might be modified.Once you're done, push your changes to your own repository and change the
repoURLto 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.
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- Name of the Argo CD Application as it will appear in the UI.
- Destination, here: the local cluster into the Namespace openshift-storage.
- Source. In this example, I'm using my GitHub repository, but use your Git/Path/Branch.
- Retry in case of a synchronization error (Max. 3).