Managing resource use


Red Hat OpenShift GitOps 1.19

Configuring resource requests and limits for Argo CD workloads

Red Hat OpenShift Documentation Team

Abstract

This document provides instructions for configuring workloads with resource requests and limits. It also discusses how to patch Argo CD instance to update the resource requirements for all or any of the workloads after installation.

Chapter 1. Configuring resource quota or requests

With the Argo CD custom resource (CR), you can create, update, and delete resource requests and limits for Argo CD workloads.

You can create Argo CD custom resource workloads with resource requests and limits. This is required when you want to deploy the Argo CD instance in a namespace that is configured with resource quotas.

The following Argo CD instance deploys the Argo CD workloads such as Application Controller, ApplicationSet Controller, Dex, Redis,Repo Server, and Server with resource requests and limits. You can also create the other workloads with resource requirements in the same manner.

apiVersion: argoproj.io/v1beta1
kind: ArgoCD
metadata:
  name: example
spec:
  server:
    resources:
      limits:
        cpu: 500m
        memory: 256Mi
      requests:
        cpu: 125m
        memory: 128Mi
    route:
      enabled: true
  applicationSet:
    resources:
      limits:
        cpu: '2'
        memory: 1Gi
      requests:
        cpu: 250m
        memory: 512Mi
  repo:
    resources:
      limits:
        cpu: '1'
        memory: 512Mi
      requests:
        cpu: 250m
        memory: 256Mi
  dex:
    resources:
      limits:
        cpu: 500m
        memory: 256Mi
      requests:
        cpu: 250m
        memory: 128Mi
  redis:
    resources:
      limits:
        cpu: 500m
        memory: 256Mi
      requests:
        cpu: 250m
        memory: 128Mi
  controller:
    resources:
      limits:
        cpu: '2'
        memory: 2Gi
      requests:
        cpu: 250m
        memory: 1Gi
Copy to Clipboard Toggle word wrap

You can update the resource requirements for all or any of the workloads post installation.

Procedure

Update the Application Controller resource requests of an Argo CD instance in the Argo CD namespace.

oc -n argocd patch argocd example --type='json' -p='[{"op": "replace", "path": "/spec/controller/resources/requests/cpu", "value":"1"}]'

oc -n argocd patch argocd example --type='json' -p='[{"op": "replace", "path": "/spec/controller/resources/requests/memory", "value":"512Mi"}]'
Copy to Clipboard Toggle word wrap

1.3. Removing resource requests

You can also remove resource requirements for all or any of your workloads after installation.

Procedure

Remove the Application Controller resource requests of an Argo CD instance in the Argo CD namespace.

oc -n argocd patch argocd example --type='json' -p='[{"op": "remove", "path": "/spec/controller/resources/requests/cpu"}]'

oc -n argocd argocd patch argocd example --type='json' -p='[{"op": "remove", "path": "/spec/controller/resources/requests/memory"}]'
Copy to Clipboard Toggle word wrap

You can configure CPU and memory resource requests and limits for the GitOps console plugin and its backend cluster components. Resource allocation is controlled through the GitOpsService custom resource (CR) and can be modified during creation or update. The GitOpsService controller reconciles both the backend and plugin resources. You can define separate or identical resource configurations for each component, depending on your requirements. This feature is beneficial for scenarios requiring specific resource requests and limits for components, which can effectively address memory and performance issues.

2.1. Enabling the GitOpsService custom resource

To enable resource configuration for the GitOps plugin components, specify the .spec.consolePlugin.backend.resources field for the backend component and the .spec.consolePlugin.gitopsPlugin.resources field for the GitOps console plugin. The resources section defines the requests (minimum resources) and limits (maximum resources) for each component.

Prerequisites

  • You have logged in to the OpenShift Container Platform cluster as an administrator.
  • You have installed the Red Hat OpenShift GitOps Operator on your OpenShift Container Platform cluster.

Procedure

  1. Get the GitOpsService CR by running the following command.

    $ oc get gitopsService -A
    Copy to Clipboard Toggle word wrap
  2. Edit the GitOpsService CR by running the following command.

    $ oc edit gitopsservice cluster -n openshift-gitops
    Copy to Clipboard Toggle word wrap
  3. In the .spec.consolePlugin section, add the .backend.resources and .gitopsPlugin.resources fields. These sections define requests and limits for CPU and memory.

    Example configuration

    apiVersion: pipelines.openshift.io/v1alpha1
    kind: GitopsService
    metadata:
      name: cluster
    spec:
      consolePlugin:
        backend:
          resources:
            limits:
              cpu: 100m
              memory: 1Gi
            requests:
              cpu: 100m
              memory: 1Gi
        gitopsPlugin:
          resources:
            limits:
              cpu: 200m
              memory: 2Gi
            requests:
              cpu: 100m
              memory: 1Gi
    Copy to Clipboard Toggle word wrap

After you update the GitOpsService CR, the GitOpsService controller applies the specified resource requests and limits to the backend and the GitOps plugin components.

Verification

  1. Ensure that the requests and limits values in the pod specifications match the configuration you have added to the GitOpsService CR.

2.2. Behavior of resource configuration

The following information describes how the GitOpsService controller applies resource values defined in the GitOpsService custom resource (CR).

  • Specified values: When you define resource values in the GitOpsService CR, the GitOpsService controller applies those values only to the components you specify. For example, if you configure resource limits only for the backend, those values apply to the backend deployment and not to the plugin.
  • Default values: If you do not define any resource values in the GitOpsService custom resource, the GitOpsService controller applies default values to all components.
Expand
Table 2.1. Default resource values
ComponentRequest CPURequest MemoryLimit CPULimit Memory

Backend

250m

128Mi

500m

256Mi

GitOps plugin

250m

128Mi

500m

256Mi

Legal Notice

Copyright © Red Hat.
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, 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 Software Collections 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.
Back to top
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2025 Red Hat