Deploy using GitOps and Argo CD
Deploy OpenShift Dev Spaces declaratively through OpenShift GitOps (Argo CD) so that every configuration change is tracked in Git, auditable, and automatically reconciled on the cluster.
Before you begin
- You have an OpenShift Container Platform 4.22 or later cluster with cluster-admin access.
- You have the OpenShift GitOps operator installed on the cluster. See Installing OpenShift GitOps.
- You have an active
ocsession with administrative permissions to the OpenShift cluster. See Getting started with the OpenShift CLI. - You have a Git repository accessible from the cluster (GitHub, GitLab, Bitbucket, or an internal Git server).
About this task
With this method, you store the Operator subscription and CheCluster configuration in a Git repository. Argo CD monitors the repository and applies changes to the cluster automatically. You manage OpenShift Dev Spaces through Git commits instead of direct cluster commands.
Procedure
Results
- Verify that the Argo CD Application reports
SyncedandHealthy:$ oc get application devspaces -n openshift-gitops \ -o jsonpath='{.status.sync.status}{" "}{.status.health.status}'Expected output:
Synced Healthy - Verify that the
CheClusteris active:$ oc get checluster devspaces -n openshift-devspaces \ -o jsonpath='{.status.chePhase}'Expected output:
Active - Retrieve the OpenShift Dev Spaces dashboard URL and open it in a browser:
$ oc get checluster devspaces -n openshift-devspaces \ -o jsonpath='{.status.cheURL}'
- Sync fails with "CheCluster CRD not found": Verify that the Argo CD Application includes
SkipDryRunOnMissingResource=truein thesyncOptions. - Operator reports "OwnNamespace InstallModeType not supported": The Subscription must target the
openshift-operatorsnamespace (AllNamespaces mode). Do not place the Subscription in theopenshift-devspacesnamespace. - Sync retries but CheCluster is not created: The Operator may still be installing. Wait for the ClusterServiceVersion to reach
Succeeded:$ oc get csv -n openshift-operators | grep devspaces