Skip to content

Commit aaab954

Browse files
authored
Merge pull request #52770 from DebarghoGhosh/configure-resource-quota-3818
RHDEVDOCS-3818 - Added resource limit
2 parents 1367059 + 7452036 commit aaab954

File tree

5 files changed

+131
-0
lines changed

5 files changed

+131
-0
lines changed

_topic_maps/_topic_map.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1725,6 +1725,8 @@ Topics:
17251725
File: configuring-sso-for-argo-cd-using-keycloak
17261726
- Name: Configuring Argo CD RBAC
17271727
File: configuring-argo-cd-rbac
1728+
- Name: Configuring Resource Quota
1729+
File: configuring-resource-quota
17281730
- Name: Running Control Plane Workloads on Infra nodes
17291731
File: run-gitops-control-plane-workload-on-infra-nodes
17301732
- Name: Sizing requirements for GitOps Operator
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
:_content-type: ASSEMBLY
2+
[id="configuring-resource-quota"]
3+
= Configuring resource quota or requests
4+
include::_attributes/common-attributes.adoc[]
5+
:context: configuring-resource-quota
6+
7+
toc::[]
8+
9+
[role="_abstract"]
10+
With the Argo CD Custom Resource, you can create, update, and delete resource requests and limits for Argo CD workloads.
11+
12+
include::modules/configure-workloads.adoc[leveloffset=+1]
13+
include::modules/patch-argocd-instance.adoc[leveloffset=+1]
14+
include::modules/remove-resource-requirements.adoc[leveloffset=+1]

modules/configure-workloads.adoc

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
// Module is included in the following assemblies:
2+
//
3+
// * cicd/gitops/configuring-resource-quota.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="configuring-workloads_{context}"]
7+
= Configuring workloads with resource requests and limits
8+
9+
[role="_abstract"]
10+
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.
11+
12+
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.
13+
14+
[source,yaml]
15+
----
16+
apiVersion: argoproj.io/v1alpha1
17+
kind: ArgoCD
18+
metadata:
19+
name: example
20+
spec:
21+
server:
22+
resources:
23+
limits:
24+
cpu: 500m
25+
memory: 256Mi
26+
requests:
27+
cpu: 125m
28+
memory: 128Mi
29+
route:
30+
enabled: true
31+
applicationSet:
32+
resources:
33+
limits:
34+
cpu: '2'
35+
memory: 1Gi
36+
requests:
37+
cpu: 250m
38+
memory: 512Mi
39+
repo:
40+
resources:
41+
limits:
42+
cpu: '1'
43+
memory: 512Mi
44+
requests:
45+
cpu: 250m
46+
memory: 256Mi
47+
dex:
48+
resources:
49+
limits:
50+
cpu: 500m
51+
memory: 256Mi
52+
requests:
53+
cpu: 250m
54+
memory: 128Mi
55+
redis:
56+
resources:
57+
limits:
58+
cpu: 500m
59+
memory: 256Mi
60+
requests:
61+
cpu: 250m
62+
memory: 128Mi
63+
controller:
64+
resources:
65+
limits:
66+
cpu: '2'
67+
memory: 2Gi
68+
requests:
69+
cpu: 250m
70+
memory: 1Gi
71+
----
72+

modules/patch-argocd-instance.adoc

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Module is included in the following assemblies:
2+
//
3+
// * cicd/gitops/configuring-resource-quota.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="patch-argocd-instance_{context}"]
7+
= Patching Argo CD instance to update the resource requirements
8+
9+
[role="_abstract"]
10+
You can update the resource requirements for all or any of the workloads post installation.
11+
12+
.Procedure
13+
Update the `Application Controller` resource requests of an Argo CD instance in the Argo CD namespace.
14+
15+
[source,terminal]
16+
----
17+
oc -n argocd patch argocd example --type='json' -p='[{"op": "replace", "path": "/spec/controller/resources/requests/cpu", "value":"1"}]'
18+
19+
oc -n argocd patch argocd example --type='json' -p='[{"op": "replace", "path": "/spec/controller/resources/requests/memory", "value":"512Mi"}]'
20+
----
21+
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Module is included in the following assemblies:
2+
//
3+
// * cicd/gitops/configuring-resource-quota.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="remove-resource-requirements_{context}"]
7+
= Removing resource requests
8+
9+
[role="_abstract"]
10+
You can also remove resource requirements for all or any of your workloads after installation.
11+
12+
.Procedure
13+
Remove the `Application Controller` resource requests of an Argo CD instance in the Argo CD namespace.
14+
15+
[source,terminal]
16+
----
17+
oc -n argocd patch argocd example --type='json' -p='[{"op": "remove", "path": "/spec/controller/resources/requests/cpu"}]'
18+
19+
oc -n argocd argocd patch argocd example --type='json' -p='[{"op": "remove", "path": "/spec/controller/resources/requests/memory"}]'
20+
21+
----
22+

0 commit comments

Comments
 (0)