|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * backup_and_restore/application_backup_and_restore/pods-crash-or-restart-due-to-lack-of-memory-or-cpu |
| 4 | +:_mod-docs-content-type: PROCEDURE |
| 5 | + |
| 6 | +[id="setting-resource-requests-for-a-nodeagent-pod_{context}"] |
| 7 | += Setting resource requests for a nodeAgent pod |
| 8 | + |
| 9 | +You can use the `configuration.nodeAgent.podConfig.resourceAllocations` specification field to set specific resource requests for a `nodeAgent` pod. |
| 10 | + |
| 11 | +include::snippets/about-restic-deprecation.adoc[leveloffset=+1] |
| 12 | + |
| 13 | + |
| 14 | +.Procedure |
| 15 | + |
| 16 | +. Set the `cpu` and `memory` resource requests in the YAML file: |
| 17 | ++ |
| 18 | +.Example `nodeAgent.yaml` file |
| 19 | +[source,yaml] |
| 20 | +---- |
| 21 | +apiVersion: oadp.openshift.io/v1alpha1 |
| 22 | +kind: DataProtectionApplication |
| 23 | +metadata: |
| 24 | + name: ts-dpa |
| 25 | +spec: |
| 26 | + backupLocations: |
| 27 | + - velero: |
| 28 | + default: true |
| 29 | + objectStorage: |
| 30 | + bucket: oadp.....njph |
| 31 | + prefix: velero |
| 32 | + credential: |
| 33 | + key: cloud |
| 34 | + name: cloud-credentials-gcp |
| 35 | + provider: gcp |
| 36 | + configuration: |
| 37 | + velero: |
| 38 | + defaultPlugins: |
| 39 | + - gcp |
| 40 | + - openshift |
| 41 | + - csi |
| 42 | + nodeAgent: |
| 43 | + enable: true |
| 44 | + uploaderType: kopia |
| 45 | + podConfig: |
| 46 | + resourceAllocations: <1> |
| 47 | + requests: |
| 48 | + cpu: 1000m |
| 49 | + memory: 16Gi <2> |
| 50 | +---- |
| 51 | +<1> The resource allocation examples shown are for average usage. |
| 52 | +<2> You can modify this parameter depending on your infrastructure and usage. |
| 53 | + |
| 54 | +. Create the DPA CR by running the following command: |
| 55 | ++ |
| 56 | +[source,terminal] |
| 57 | +---- |
| 58 | +$ oc create -f nodeAgent.yaml |
| 59 | +---- |
| 60 | + |
| 61 | +.Verification |
| 62 | + |
| 63 | +. Verify that the `nodeAgent` pods are running by using the following command: |
| 64 | ++ |
| 65 | +[source,terminal] |
| 66 | +---- |
| 67 | +$ oc get pods |
| 68 | +---- |
| 69 | ++ |
| 70 | +.Example output |
| 71 | +[source,terminal] |
| 72 | +---- |
| 73 | +NAME READY STATUS RESTARTS AGE |
| 74 | +node-agent-hbj9l 1/1 Running 0 97s |
| 75 | +node-agent-wmwgz 1/1 Running 0 95s |
| 76 | +node-agent-zvc7k 1/1 Running 0 98s |
| 77 | +openshift-adp-controller-manager-7f9db86d96-4lhgq 1/1 Running 0 137m |
| 78 | +velero-7b6c7fb8d7-ppc8m 1/1 Running 0 4m2s |
| 79 | +---- |
| 80 | + |
| 81 | +. Check the resource requests by describing one of the `nodeAgent` pod: |
| 82 | ++ |
| 83 | +[source,terminal] |
| 84 | +---- |
| 85 | +$ oc describe pod node-agent-hbj9l | grep -C 5 Requests |
| 86 | +---- |
| 87 | ++ |
| 88 | +.Example output |
| 89 | +[source,terminal] |
| 90 | +---- |
| 91 | + --log-format=text |
| 92 | + State: Running |
| 93 | + Started: Mon, 09 Jun 2025 16:22:15 +0530 |
| 94 | + Ready: True |
| 95 | + Restart Count: 0 |
| 96 | + Requests: |
| 97 | + cpu: 1 |
| 98 | + memory: 1Gi |
| 99 | + Environment: |
| 100 | + NODE_NAME: (v1:spec.nodeName) |
| 101 | + VELERO_NAMESPACE: openshift-adp (v1:metadata.namespace) |
| 102 | +---- |
0 commit comments