1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-06 15:46:57 +01:00

Merge pull request #52770 from DebarghoGhosh/configure-resource-quota-3818

RHDEVDOCS-3818 - Added resource limit
This commit is contained in:
Gabriel McGoldrick
2022-11-23 10:43:02 +00:00
committed by GitHub
5 changed files with 131 additions and 0 deletions

View File

@@ -1725,6 +1725,8 @@ Topics:
File: configuring-sso-for-argo-cd-using-keycloak
- Name: Configuring Argo CD RBAC
File: configuring-argo-cd-rbac
- Name: Configuring Resource Quota
File: configuring-resource-quota
- Name: Running Control Plane Workloads on Infra nodes
File: run-gitops-control-plane-workload-on-infra-nodes
- Name: Sizing requirements for GitOps Operator

View File

@@ -0,0 +1,14 @@
:_content-type: ASSEMBLY
[id="configuring-resource-quota"]
= Configuring resource quota or requests
include::_attributes/common-attributes.adoc[]
:context: configuring-resource-quota
toc::[]
[role="_abstract"]
With the Argo CD Custom Resource, you can create, update, and delete resource requests and limits for Argo CD workloads.
include::modules/configure-workloads.adoc[leveloffset=+1]
include::modules/patch-argocd-instance.adoc[leveloffset=+1]
include::modules/remove-resource-requirements.adoc[leveloffset=+1]

View File

@@ -0,0 +1,72 @@
// Module is included in the following assemblies:
//
// * cicd/gitops/configuring-resource-quota.adoc
:_content-type: PROCEDURE
[id="configuring-workloads_{context}"]
= Configuring workloads with resource requests and limits
[role="_abstract"]
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.
[source,yaml]
----
apiVersion: argoproj.io/v1alpha1
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
----

View File

@@ -0,0 +1,21 @@
// Module is included in the following assemblies:
//
// * cicd/gitops/configuring-resource-quota.adoc
:_content-type: PROCEDURE
[id="patch-argocd-instance_{context}"]
= Patching Argo CD instance to update the resource requirements
[role="_abstract"]
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.
[source,terminal]
----
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"}]'
----

View File

@@ -0,0 +1,22 @@
// Module is included in the following assemblies:
//
// * cicd/gitops/configuring-resource-quota.adoc
:_content-type: PROCEDURE
[id="remove-resource-requirements_{context}"]
= Removing resource requests
[role="_abstract"]
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.
[source,terminal]
----
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"}]'
----