github.com/argoproj-labs/argocd-operator@v0.10.0/docs/usage/resource_management.md (about)

     1  # Resource Requirements
     2  
     3  This page covers the steps to create, update and delete resource requests and limits for Argo CD workloads.
     4  
     5  The Argo CD Custom Resource allows you to create the workloads with desired resource requests and limits. This is required when a user/admin wishes to deploy his Argo CD instance in a namespace that is set with [Resource Quota](https://kubernetes.io/docs/concepts/policy/resource-quotas/).
     6  
     7  For example, the below 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. Similarly you can also create the other workloads with resource requirements.
     8  
     9  ```yaml
    10  apiVersion: argoproj.io/v1alpha1
    11  kind: ArgoCD
    12  metadata:
    13    name: example
    14  spec:
    15    server:
    16      resources:
    17        limits:
    18          cpu: 500m
    19          memory: 256Mi
    20        requests:
    21          cpu: 125m
    22          memory: 128Mi
    23      route:
    24        enabled: true
    25    applicationSet:
    26      resources:
    27        limits:
    28          cpu: '2'
    29          memory: 1Gi
    30        requests:
    31          cpu: 250m
    32          memory: 512Mi
    33    repo:
    34      resources:
    35        limits:
    36          cpu: '1'
    37          memory: 512Mi
    38        requests:
    39          cpu: 250m
    40          memory: 256Mi
    41    dex:
    42      resources:
    43        limits:
    44          cpu: 500m
    45          memory: 256Mi
    46        requests:
    47          cpu: 250m
    48          memory: 128Mi
    49    redis:
    50      resources:
    51        limits:
    52          cpu: 500m
    53          memory: 256Mi
    54        requests:
    55          cpu: 250m
    56          memory: 128Mi
    57    controller:
    58      resources:
    59        limits:
    60          cpu: '2'
    61          memory: 2Gi
    62        requests:
    63          cpu: 250m
    64          memory: 1Gi
    65  ```
    66  
    67  Note: The above mentioned resource requirements for the workloads are not the recommended values. Please do not consider them as defaults for your instance.
    68  
    69  ## Patch the Argo CD instance to update the resource requirements
    70  
    71  A User can update the resource requirements for all or any of your workloads post installation.
    72  
    73  For example, A user can update the Application Controller resource requests of `example` Argo CD instance in `argocd` namespace using the below commands.
    74  
    75  ```sh
    76  kubectl -n argocd patch argocd example --type='json' -p='[{"op": "replace", "path": "/spec/controller/resources/requests/cpu", "value":"1"}]'
    77  ```
    78  
    79  ```sh
    80  kubectl -n argocd patch argocd example --type='json' -p='[{"op": "replace", "path": "/spec/controller/resources/requests/memory", "value":"512Mi"}]'
    81  ```
    82  
    83  Similarly, A user can update the Application Controller resource limits of `example` Argo CD instance in `argocd` namespace using the below commands.
    84  
    85  ```sh
    86  kubectl -n argocd patch argocd example --type='json' -p='[{"op": "replace", "path": "/spec/controller/resources/limits/cpu", "value":"4"}]'
    87  ```
    88  
    89  ```sh
    90  kubectl -n argocd patch argocd example --type='json' -p='[{"op": "replace", "path": "/spec/controller/resources/limits/memory", "value":"2048Mi"}]'
    91  ```
    92  
    93  The above commands can be modified to replace controller with any other Argo CD workloads such as ApplicationSet Controller, Dex, Redis, Repo Server, Server and others.
    94  
    95  ## Remove the resource requirements for Argo CD workloads
    96  
    97  A User can also remove resource requirements for all or any of your workloads post installation.
    98  
    99  For example, A user can remove the Application Controller resource requests of `example` ArgoCD instance in `argocd` namespace using the below command.
   100  
   101  ```sh
   102  kubectl -n argocd patch argocd example --type='json' -p='[{"op": "remove", "path": "/spec/controller/resources/requests/cpu"}]'
   103  ```
   104  
   105  ```sh
   106  kubectl -n argocd patch argocd example --type='json' -p='[{"op": "remove", "path": "/spec/controller/resources/requests/memory"}]'
   107  ```
   108  
   109  Similarly, A user can remove the Application Controller resource limits of `example` Argo CD instance in `argocd` namespace using the below command.
   110  
   111  ```sh
   112  kubectl -n argocd patch argocd example --type='json' -p='[{"op": "remove", "path": "/spec/controller/resources/limits/cpu"}]'
   113  ```
   114  
   115  ```sh
   116  kubectl -n argocd patch argocd example --type='json' -p='[{"op": "remove", "path": "/spec/controller/resources/limits/memory"}]'
   117  ```
   118  
   119  The above commands can be modified to replace controller with any other Argo CD workloads such as ApplicationSet Controller, Dex, Redis, Repo Server, Server and others.