Argo CD instance
Installing and deploying Argo CD instances
Abstract
Chapter 1. Setting up an Argo CD instance Copy linkLink copied to clipboard!
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 Copy linkLink copied to clipboard!
To manage cluster configurations or deploy applications, you can install and deploy a new Argo CD instance.
Procedure
- Log in to the OpenShift Container Platform web console.
- Click Operators → Installed Operators.
- Create or select the project where you want to install the Argo CD instance from the Project drop-down menu.
- Select OpenShift GitOps Operator from the installed operators list and click the Argo CD tab.
Click Create ArgoCD to configure the parameters:
-
Enter the Name of the instance. By default, the Name is set to
example. - Create an external OS Route to access Argo CD server. Click Server → Route and check Enabled.
-
Enter the Name of the instance. By default, the Name is set to
- To open the Argo CD web UI, click the route by navigating to Networking → Routes → <instance name>-server in the project where the Argo CD instance is installed.
1.2. Enabling replicas for Argo CD server and repo server Copy linkLink copied to clipboard!
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
replicasparameters for therepoandserverspec to the number of replicas you want to run:Example Argo CD custom resource
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
1.3. Deploying resources to a different namespace Copy linkLink copied to clipboard!
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>
$ oc label namespace <namespace> \ argocd.argoproj.io/managed-by=<namespace>1 Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
- The namespace where Argo CD is installed.
1.4. Customizing the Argo CD console link Copy linkLink copied to clipboard!
In a multi-tenant cluster, users might have to deal with multiple instances of Argo CD. For example, after installing an Argo CD instance in your namespace, you might find a different Argo CD instance attached to the Argo CD console link, instead of your own Argo CD instance, in the Console Application Launcher.
You can customize the Argo CD console link by setting the DISABLE_DEFAULT_ARGOCD_CONSOLELINK environment variable:
-
When you set
DISABLE_DEFAULT_ARGOCD_CONSOLELINKtotrue, the Argo CD console link is permanently deleted. -
When you set
DISABLE_DEFAULT_ARGOCD_CONSOLELINKtofalseor use the default value, the Argo CD console link is temporarily deleted and visible again when the Argo CD route is reconciled.
Prerequisites
- You have logged in to the OpenShift Container Platform cluster as an administrator.
- You have installed the Red Hat OpenShift GitOps Operator.
Procedure
- In the Administrator perspective, navigate to Administration → CustomResourceDefinitions.
- Find the Subscription CRD and click to open it.
- Select the Instances tab and click the openshift-gitops-operator subscription.
Select the YAML tab and make your customization:
To enable or disable the Argo CD console link, edit the value of
DISABLE_DEFAULT_ARGOCD_CONSOLELINKas needed:Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Chapter 2. Argo CD custom resource and component properties Copy linkLink copied to clipboard!
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 Copy linkLink copied to clipboard!
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 Copy linkLink copied to clipboard!
The Argo CD Custom Resource consists of the following properties:
| Name | Description | Default | Properties |
|
|
The |
| |
|
|
|
|
|
|
| Add a configuration management plugin. |
| |
|
| Argo CD Application Controller options. |
|
|
|
| Disables the built-in admin user. |
| |
|
| Use a Google Analytics tracking ID. |
| |
|
| Enable hashed usernames sent to google analytics. |
| |
|
| High availablity options. |
|
|
|
| URL for getting chat help (this will typically be your Slack channel for support). | ||
|
| The text that appears in a text box for getting chat help. |
| |
|
|
The container image for all Argo CD components. This overrides the |
| |
|
| Ingress configuration options. |
| |
|
| Initial Git repositories to configure Argo CD to use upon creation of the cluster. |
| |
|
| Notifications controller configuration options. |
|
|
|
| Git repository credential templates to configure Argo CD to use upon creation of the cluster. |
| |
|
| Initial SSH Known Hosts for Argo CD to use upon creation of the cluster. |
| |
|
|
The build options and parameters to use with |
| |
|
| The OIDC configuration as an alternative to Dex. |
| |
|
|
Add the |
| |
|
| Prometheus configuration options. |
|
|
|
| RBAC configuration options. |
|
|
|
| Redis configuration options. |
|
|
|
| Customize resource behavior. |
| |
|
| Completely ignore entire classes of resource group. |
| |
|
| The configuration to configure which resource group/kinds are applied. |
| |
|
| Argo CD Server configuration options. |
|
|
|
| Single Sign-on options. |
|
|
|
| Enable application status badge. |
| |
|
| TLS configuration options. |
|
|
|
| Enable anonymous user access. |
| |
|
| The tag to use with the container image for all Argo CD components. | Latest Argo CD version | |
|
| Add a UI banner message. |
|
|
2.3. Repo server properties Copy linkLink copied to clipboard!
The following properties are available for configuring the Repo server component:
| Name | Default | Description |
|
|
| The container compute resources. |
|
|
|
Whether the |
|
|
|
The name of the |
|
|
| Whether to enforce strict TLS checking on all components when communicating with repo server. |
|
|
| Provider to use for setting up TLS the repo-server’s gRPC TLS certificate (one of: openshift). Currently only available for OpenShift. |
|
|
|
The container image for Argo CD Repo server. This overrides the |
|
|
same as | The tag to use with the Argo CD Repo server. |
|
|
| The log level used by the Argo CD Repo server. Valid options are debug, info, error, and warn. |
|
|
| The log format to be used by the Argo CD Repo server. Valid options are text or json. |
|
|
| Execution timeout in seconds for rendering tools (e.g. Helm, Kustomize). |
|
|
| Environment to set for the repository server workloads. |
|
|
|
The number of replicas for the Argo CD Repo server. Must be greater than or equal to |
2.4. Enabling notifications with Argo CD instance Copy linkLink copied to clipboard!
To enable or disable the Argo CD notifications controller, set a parameter in the Argo CD custom resource. By default, notifications are disabled. To enable notifications, set the enabled parameter to true in the .yaml file:
Procedure
-
Set the
enabledparameter totrue: