×

By default, the Red Hat OpenShift GitOps installs an instance of Argo CD in the openshift-gitops namespace with additional permissions for managing certain cluster-scoped resources. To manage cluster configurations or deploy applications, you can install and deploy a new Argo CD instance. By default, any new instance has permissions to manage resources only in the namespace where it is deployed.

Installing Argo CD

To manage cluster configurations or deploy applications, you can install and deploy a new Argo CD instance.

Procedure
  1. Log in to the OpenShift Container Platform web console.

  2. Click OperatorsInstalled Operators.

  3. Create or select the project where you want to install the Argo CD instance from the Project drop-down menu.

  4. Select Openshift GitOps Operator from the installed operators and select the Argo CD tab.

  5. Click Create to configure the following parameters:

    1. For Name, enter /.

    2. Create an external OS Route to access Argo CD server. Click ServerRoute and, for Enable Route, select true.

  6. To open the Argo CD web UI, click the route that is created in the project where the Argo CD instance is installed.

Enabling replicas for Argo CD server and repo server

Argo CD-server and Argo CD-repo-server workloads are stateless. To better distribute your workloads among pods, you can increase the number of Argo CD-server and Argo CD-repo-server replicas. However, if a horizontal autoscaler is enabled on the Argo CD-server, it overrides the number of replicas you set.

Procedure
  • Set the replicas parameters for the repo and server spec to the number of replicas you want to run:

    Example Argo CD custom resource
    apiVersion: argoproj.io/v1alpha1
    kind: ArgoCD
    metadata:
      name: example-argocd
      labels:
        example: repo
    spec:
      repo:
        replicas: <number_of_replicas>
      server:
        replicas: <number_of_replicas>
        route:
          enabled: true
          path: /
          tls:
            insecureEdgeTerminationPolicy: Redirect
            termination: passthrough
          wildcardPolicy: None

Deploying resources to a different namespace

To allow Argo CD to manage resources in other namespaces apart from where it is installed, configure the target namespace with a argocd.argoproj.io/managed-by label.

Procedure
  • Configure the namespace:

    $ oc label namespace <namespace> && \
    argocd.argoproj.io/managed-by=<instance_name> (1)
    1 The namespace where Argo CD is installed.