diff --git a/docs/usage/index.rst b/docs/usage/index.rst index 15282af0a..2150cef0d 100644 --- a/docs/usage/index.rst +++ b/docs/usage/index.rst @@ -6,6 +6,7 @@ Usage :hidden: permissionmodel + resourcerequirements triggers metrics/index rclone/index @@ -44,6 +45,13 @@ Namespaces. The permissions that are given to these Pods control what data can be replicated. They also affect the security of the cluster. Please see the :doc:`permission model documentation ` for more details. +Resource requirements +===================== + +The data replication mover Pods can be configured to set specific resource requirements. This can include CPU and memory +resource requirements or resource limits. Please see the +:doc:`resource requirements documentation ` for more details. + Triggers ======== diff --git a/docs/usage/resourcerequirements.rst b/docs/usage/resourcerequirements.rst new file mode 100644 index 000000000..8441d1d3e --- /dev/null +++ b/docs/usage/resourcerequirements.rst @@ -0,0 +1,45 @@ +=========================== +Mover resource requirements +=========================== + +.. toctree:: + :hidden: + +VolSync's data movers do not run with any specific limits or requests by default. +Each mover's spec can be modified to set resource requests to set limits or requests. + +Note that setting these values can have negative affects as mover pods can fail to be +scheduled if requests are set too high or crash due to lack of resources if limits are +set. + +Each mover spec has a spec section where ``moverResources`` can be set. Here is an +example restic ``replicationsource`` that sets resource requests for CPU and memory: + +.. code-block:: yaml + + apiVersion: volsync.backube/v1alpha1 + kind: ReplicationSource + metadata: + name: source + namespace: "test-ns" + spec: + sourcePVC: data-source + trigger: + manual: once + restic: + pruneIntervalDays: 1 + repository: restic-secret + retain: + hourly: 3 + daily: 2 + monthly: 1 + copyMethod: Snapshot + cacheCapacity: 1Gi + # Set specific resource requests for the mover container + moverResources: + requests: + memory: "64Mi" + cpu: "250m" + +For more information about resource requirements and limits in kubernetes, see +`Resource Management for Pods and Containers `_.