Este conteúdo não está disponível no idioma selecionado.

Argo CD instance


Red Hat OpenShift GitOps 1.10

Installing and deploying Argo CD instances

Red Hat OpenShift Documentation Team

Abstract

This document provides instructions for installing and deploying Argo CD instances to manage cluster configurations or deploy applications.

Chapter 1. Setting up an Argo CD instance

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.

1.1. Installing an Argo CD instance

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 list and click the Argo CD tab.
  5. Click Create ArgoCD to configure the parameters:

    1. Enter the Name of the instance. By default, the Name is set to example.
    2. Create an external OS Route to access Argo CD server. Click ServerRoute and check Enabled.
  6. To open the Argo CD web UI, click the route by navigating to NetworkingRoutes<instance name>-server in the project where the Argo CD instance is installed.

1.2. 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/v1beta1
    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
    Copy to Clipboard Toggle word wrap

1.3. 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=<namespace> 
    1
    Copy to Clipboard Toggle word wrap
    1
    The namespace where Argo CD is installed.

Chapter 2. Argo CD custom resource and component properties

The ArgoCD custom resource is a Kubernetes Custom Resource (CRD) that describes the desired state for a given Argo CD cluster that allows you to configure the components which make up an Argo CD cluster.

2.1. Argo CD CLI tool

The Argo CD CLI tool is a tool used to configure Argo CD through the command line. Red Hat OpenShift GitOps does not support this binary. Use the OpenShift Console to configure the Argo CD.

2.2. Argo CD custom resource properties

The Argo CD Custom Resource consists of the following properties:

Expand
NameDescriptionDefaultProperties

applicationInstanceLabelKey

The metadata.label key name where Argo CD injects the app name as a tracking label.

app.kubernetes.io/instance

 

applicationSet

applicationSet controller configuration options.

<object>

  • <image> - The container image for the applicationSet controller. This overrides the ARGOCD_APPLICATIONSET_IMAGE environment variable.
  • <version> - The tag to use with the applicationSet container image.
  • <resources> - The container compute resources.
  • <logLevel> - The log level used by the Argo CD Application Controller component. Valid options are debug, info, error, and warn.
  • <logFormat> - The log format used by the Argo CD Application Controller component. Valid options are text or json.
  • <parallelismLimit> - The kubectl parallelism limit to set for the controller (--kubectl-parallelism-limit flag).

configManagementPlugins

Add a configuration management plugin.

<empty>

 

controller

Argo CD Application Controller options.

<object>

  • <processors.operation> - The number of operation processors.
  • <processors.status> - The number of status processors.
  • <resources> - The container compute resources.
  • <logLevel> - The log level used by the Argo CD Application Controller component. Valid options are debug, info, error, and warn.
  • <appSync> - AppSync is used to control the sync frequency of Argo CD applications.
  • <sharding.enabled> - Enable sharding on the Argo CD Application Controller component. Use this property to manage a large number of clusters and relieve memory pressure on the controller component.
  • <sharding.replicas> - The number of replicas that are used to support sharding of the Argo CD Application Controller.
  • <sharding.dynamicScalingEnabled> - Enable dynamic scaling of the Argo CD Application Controller component. Use this property to allow the Operator to scale the number of replicas based on the number of clusters the controller component is managing presently. Setting this property to true overrides the configuration of the sharding.enabled and sharding.replicas properties.
  • <sharding.minShards> - The minimum number of Argo CD Application Controller replicas.
  • <sharding.maxShards> - The maximum number of Argo CD Application Controller replicas.
  • <sharding.clusterPerShard> - The number of clusters that need to be managed by each shard. When the replica count reaches the maxShards, the shards manage more than one cluster.
  • <env> - Environment to set for the application controller workloads.

disableAdmin

Disables the built-in admin user.

false

 

gaTrackingID

Use a Google Analytics tracking ID.

<empty>

 

gaAnonymizeUsers

Enable hashed usernames sent to google analytics.

false

 

ha

High availablity options.

<object>

  • <enabled> - Toggle high availability support globally for Argo CD.
  • <redisProxyImage> - The Redis HAProxy container image. This overrides the ARGOCD_REDIS_HA_PROXY_IMAGE environment variable.
  • <redisProxyVersion> - The tag to use for the Redis HAProxy container image.

helpChatURL

URL for getting chat help (this is typically your Slack channel for support).

https://mycorp.slack.com/argo-cd

 

helpChatText

The text that appears in a text box for getting chat help.

Chat now!

 

image

The container image for all Argo CD components. This overrides the ARGOCD_IMAGE environment variable.

argoproj/argocd

 

ingress

Ingress configuration options.

<object>

 

initialRepositories

Initial Git repositories to configure Argo CD to use upon creation of the cluster.

<empty>

 

notifications

Notifications controller configuration options.

<object>

  • <enabled> - The toggle to start the notifications-controller.
  • <image> - The container image for all Argo CD components. This overrides the ARGOCD_IMAGE environment variable.
  • <version> - The tag to use with the Notifications container image.
  • <resources> - The container compute resources.
  • <logLevel> - The log level used by the Argo CD Application Controller component. Valid options are debug, info, error, and warn.

repositoryCredentials

Git repository credential templates to configure Argo CD to use upon creation of the cluster.

<empty>

 

initialSSHKnownHosts

Initial SSH Known Hosts for Argo CD to use upon creation of the cluster.

<default_Argo_CD_Known_Hosts>

 

kustomizeBuildOptions

The build options and parameters to use with kustomize build.

<empty>

 

oidcConfig

The OIDC configuration as an alternative to Dex.

<empty>

 

nodePlacement

Add the nodeSelector and the tolerations.

<empty>

 

prometheus

Prometheus configuration options.

<object>

  • <enabled> - Toggle Prometheus support globally for Argo CD.
  • <host> - The hostname to use for Ingress or Route resources.
  • <ingress> - Toggles Ingress for Prometheus.
  • <route> - Route configuration options.
  • <size> - The replica count for the Prometheus StatefulSet.

rbac

RBAC configuration options.

<object>

  • <defaultPolicy> - The policy.default property in the argocd-rbac-cm config map. The name of the default role which Argo CD falls back to when authorizing API requests.
  • <policy> - The policy.csv property in the argocd-rbac-cm config map. CSV data containing user-defined RBAC policies and role definitions.
  • <scopes> - The scopes property in the argocd-rbac-cm config map. Controls which OIDC scopes to examine during RBAC enforcement, in addition to sub scope.

redis

Redis configuration options.

<object>

  • <autotls> - Use the provider to create the Redis server’s TLS certificate. Only the openshift value is currently available.
  • <disableTLSVerification> - Defines whether the Redis server should be accessed using strict TLS validation.
  • <image> - The container image for Redis. This overrides the ARGOCD_REDIS_IMAGE environment variable.
  • <resources> - The container compute resources.
  • <version> - The tag to use with the Redis container image.

resourceHealthChecks

Customize resource health check behavior.

<empty>

 

resourceIgnoreDifferences

Customize resource ignore difference behavior.

<empty>

 

resourceActions

Customize resource action behavior.

<empty>

 

resourceExclusions

Completely ignore entire classes of resource group.

<empty>

 

resourceInclusions

The configuration to identify which resource group/kinds are applied.

<empty>

 

server

Argo CD Server configuration options.

<object>

  • <autoscale> - Server autoscale configuration options.
  • <extraCommandArgs> - List of arguments added to the existing arguments set by the Operator.
  • <grpc> - gRPC configuration options.
  • <host> - The hostname used for Ingress or Route resources.
  • <ingress> - Ingress configuration for the Argo CD server component.
  • <insecure> - Toggles the insecure flag for Argo CD server.
  • <resources> - The container compute resources.
  • <replicas> - The number of replicas for the Argo CD server. Must be greater than or equal to 0. If autoscale is enabled, replicas is ignored.
  • <route> - Route configuration options.
  • <service.Type> - The serviceType used for the service resource.
  • <logLevel> - The log level to be used by the Argo CD Server component. Valid options are debug, info, error, and warn.
  • <logFormat> - The log format used by the Argo CD Application Controller component. Valid options are text or json.
  • <env> - Environment to set for the server workloads.

sso

Single Sign-on options.

<object>

  • <keycloak> - Configuration options for Keycloak SSO provider.
  • <dex> - Configuration options for Dex SSO provider.
  • <provider> - The name of the provider used to configure Single Sign-on. Currently, the supported options are Dex and Keycloak.

statusBadgeEnabled

Enable application status badge.

true

 

tls

TLS configuration options.

<object>

  • <ca.configMapName> - The name of the ConfigMap which contains the CA certificate.
  • <ca.secretName> - The name of the secret which contains the CA certificate and key.
  • <initialCerts> - Initial set of certificates in the argocd-tls-certs-cm config map for connecting Git repositories through HTTPS.

usersAnonymousEnabled

Enable anonymous user access.

true

 

version

The tag to use with the container image for all Argo CD components.

Latest Argo CD version

 

banner

Add a UI banner message.

<object>

  • <banner.content> - The banner message content (required if a banner is displayed).
  • <banner.url> - The banner message link URL (optional).

2.3. Repo server properties

The following properties are available for configuring the Repo server component:

Expand
NameDefaultDescription

resources

<empty>

The container compute resources.

mountsatoken

false

Defines whether the serviceaccount token should be mounted to the repo-server pod.

serviceaccount

""

The name of the serviceaccount to use with the repo-server pod.

verifytls

false

Defines whether to enforce strict TLS checking on all components when communicating with repo server.

autotls

""

Provider to use for setting up TLS for the repo-server’s gRPC TLS certificate. Currently, only the openshift value is acceptable.

image

argoproj/argocd

The container image for Argo CD Repo server. This overrides the ARGOCD_REPOSERVER_IMAGE environment variable.

version

same as .spec.Version

The tag to use with the Argo CD Repo server.

logLevel

info

The log level used by the Argo CD Repo server. Valid options are debug, info, error, and warn.

logFormat

text

The log format to be used by the Argo CD Repo server. Valid options are text or json.

execTimeout

180

Execution timeout in seconds for rendering tools (for example Helm or Kustomize).

env

<empty>

Environment to set for the repository server workloads.

replicas

<empty>

The number of replicas for the Argo CD Repo server. Must be greater than or equal to 0.

2.4. Enabling notifications with Argo CD instance

Argo CD notifications allow you to send notifications to external services when events occur in your Argo CD instance. For example, you can send notifications to Slack or email when a sync operation fails. By default, notifications are disabled in Argo CD instances.

Prerequisites

  • You have access to an OpenShift Container Platform cluster with cluster-admin privileges and are logged into the web console.
  • You have installed the Red Hat OpenShift GitOps Operator on your cluster.

Procedure

To enable notifications for an Argo CD instance using the OpenShift Container Platform web console, complete the following steps:

  1. Navigate to the OperatorsInstalled Operators page.
  2. From the list of Installed Operators, select the Red Hat OpenShift GitOps Operator, and then click on the ArgoCD tab.
  3. Select the Argo CD instance name you want to enable notifications. For example, openshift-gitops.
  4. Click on the YAML tab, and then edit and set the spec.notifications.enabled parameter to true:

    Example

    apiVersion: argoproj.io/v1beta1
    kind: ArgoCD
    metadata:
      name: openshift-gitops
    spec:
      notifications:
        enabled: true
    #....
    Copy to Clipboard Toggle word wrap

  5. Click Save.
Tip

Alternatively, you can enable notifications by using the oc patch command in the Openshift CLI. For example:

oc patch argocd openshift-gitops -n openshift-gitops --type merge --patch '{"spec": {"notifications": {"enabled": true}}}'
Copy to Clipboard Toggle word wrap

Legal Notice

Copyright © 2024 Red Hat, Inc.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, the Red Hat logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.
Voltar ao topo
Red Hat logoGithubredditYoutubeTwitter

Aprender

Experimente, compre e venda

Comunidades

Sobre a documentação da Red Hat

Ajudamos os usuários da Red Hat a inovar e atingir seus objetivos com nossos produtos e serviços com conteúdo em que podem confiar. Explore nossas atualizações recentes.

Tornando o open source mais inclusivo

A Red Hat está comprometida em substituir a linguagem problemática em nosso código, documentação e propriedades da web. Para mais detalhes veja o Blog da Red Hat.

Sobre a Red Hat

Fornecemos soluções robustas que facilitam o trabalho das empresas em plataformas e ambientes, desde o data center principal até a borda da rede.

Theme

© 2025 Red Hat