Skip to content

OpenShift Install

This guide uses OpenShift 4, follow the guide for your platform to install.

Once the OpenShift cluster is up and running, the operator can be deployed to watch one or more namespaces. The preferred method to install the operator is using the OpenShift console. The operator can also be installed manually if desired.

Console Install

The operator is published in the Operator Hub with the OpenShift console. Log into the console using the URL for your cluster and select the Operators link, then select the OperatorHub link to display the list of operators.

Select the operator named Argo CD and click the Install button. You can select the namespace and deploy the operator.

In addition to the console interface, the [Operator Install][olm_install] section of the OLM Install Guide details the same method using manifests.

Manual Install

The following steps can be used to manually install the operator in an OpenShift 4.x environment with minimal overhead. Note that these steps generates the manifests using kustomize.

Several of the steps in this process require the cluster-admin ClusterRole or equivalent.

Authenticate

Once the cluster is up and running, log in as the cluster-admin user.

oc login -u kubeadmin

Info

Make sure you download the source code from release section: https://github.com/argoproj-labs/argocd-operator/releases. Compiling from the source code cloned off main repo may not provide the most stable result.

Namespace

By default, the operator is installed into the argocd-operator-system namespace. To modify this, update the value of the namespace specified in the config/default/kustomization.yaml file.

Deploy Operator

Deploy the operator. This will create all the necessary resources, including the namespace. For running the make command you need to install go-lang package on your system.

make deploy

If you want to use your own custom operator container image, you can specify the image name using the IMG variable.

make deploy IMG=quay.io/my-org/argocd-operator:latest

The operator pod should start and enter a Running state after a few seconds.

oc get pods -n <argocd-operator-system>
NAME                                                  READY   STATUS    RESTARTS   AGE
argocd-operator-controller-manager-6c449c6998-ts95w   2/2     Running   0          33s

Info

If you see Error: container's runAsUser breaks non-root policy, means container wants to have admin privilege. run oc adm policy add-scc-to-user privileged -z default -n argocd-operator-system to enable admin on the namespace and change the following line in deployment resource: runAsNonRoot: false. This is a quick fix to make it running, this is not a suggested approach for production.

Usage

Once the operator is installed and running, new ArgoCD resources can be created. See the usage documentation to learn how to create new ArgoCD resources.

Cleanup

To remove the operator from the cluster, run the following comand. This will remove all resources that were created, including the namespace.

make undeploy