Skip to content

Commit 83d6181

Browse files
authored
Merge pull request #99530 from shdeshpa07/node-agent-load-affinity
Node agent load affinity
2 parents 26f18ca + 2fb2810 commit 83d6181

12 files changed

+261
-6
lines changed

backup_and_restore/application_backup_and_restore/installing/installing-oadp-aws.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,12 @@ include::modules/oadp-installing-dpa-1-3.adoc[leveloffset=+1]
5454
include::modules/oadp-configuring-node-agents.adoc[leveloffset=+2]
5555
include::modules/oadp-configuring-aws-md5sum.adoc[leveloffset=+1]
5656
include::modules/oadp-configuring-client-burst-qps.adoc[leveloffset=+1]
57+
include::modules/oadp-configuring-node-agent-load-affinity.adoc[leveloffset=+1]
58+
include::modules/oadp-node-agent-load-affinity-guidelines.adoc[leveloffset=+1]
5759
include::modules/oadp-configuring-node-agent-load-concurrency.adoc[leveloffset=+1]
5860
include::modules/oadp-configuring-node-agent-non-root.adoc[leveloffset=+1]
61+
include::modules/oadp-configuring-repository-maintenance.adoc[leveloffset=+1]
62+
include::modules/oadp-configuring-velero-load-affinity.adoc[leveloffset=+1]
5963
include::modules/oadp-configuring-imagepullpolicy.adoc[leveloffset=+1]
6064
include::modules/oadp-configuring-dpa-multiple-bsl.adoc[leveloffset=+1]
6165
include::modules/oadp-enabling-csi-dpa.adoc[leveloffset=+2]

backup_and_restore/application_backup_and_restore/installing/installing-oadp-azure.adoc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,14 @@ include::modules/oadp-using-ca-certificates-with-velero-command.adoc[leveloffset
3939
// include::modules/oadp-installing-dpa-1-2-and-earlier.adoc[leveloffset=+1]
4040
include::modules/oadp-installing-dpa-1-3.adoc[leveloffset=+1]
4141
include::modules/oadp-configuring-client-burst-qps.adoc[leveloffset=+1]
42+
include::modules/oadp-configuring-node-agents.adoc[leveloffset=+1]
43+
include::modules/oadp-configuring-node-agent-load-affinity.adoc[leveloffset=+1]
44+
include::modules/oadp-node-agent-load-affinity-guidelines.adoc[leveloffset=+1]
4245
include::modules/oadp-configuring-node-agent-load-concurrency.adoc[leveloffset=+1]
4346
include::modules/oadp-configuring-node-agent-non-root.adoc[leveloffset=+1]
47+
include::modules/oadp-configuring-repository-maintenance.adoc[leveloffset=+1]
48+
include::modules/oadp-configuring-velero-load-affinity.adoc[leveloffset=+1]
4449
include::modules/oadp-configuring-imagepullpolicy.adoc[leveloffset=+1]
45-
include::modules/oadp-configuring-node-agents.adoc[leveloffset=+2]
4650
include::modules/oadp-enabling-csi-dpa.adoc[leveloffset=+2]
4751
include::modules/oadp-about-disable-node-agent-dpa.adoc[leveloffset=+2]
4852

backup_and_restore/application_backup_and_restore/installing/installing-oadp-gcp.adoc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,14 @@ include::modules/oadp-using-ca-certificates-with-velero-command.adoc[leveloffset
4242
include::modules/oadp-gcp-wif-cloud-authentication.adoc[leveloffset=+1]
4343
include::modules/oadp-installing-dpa-1-3.adoc[leveloffset=+1]
4444
include::modules/oadp-configuring-client-burst-qps.adoc[leveloffset=+1]
45+
include::modules/oadp-configuring-node-agents.adoc[leveloffset=+1]
46+
include::modules/oadp-configuring-node-agent-load-affinity.adoc[leveloffset=+1]
47+
include::modules/oadp-node-agent-load-affinity-guidelines.adoc[leveloffset=+1]
4548
include::modules/oadp-configuring-node-agent-load-concurrency.adoc[leveloffset=+1]
4649
include::modules/oadp-configuring-node-agent-non-root.adoc[leveloffset=+1]
50+
include::modules/oadp-configuring-repository-maintenance.adoc[leveloffset=+1]
51+
include::modules/oadp-configuring-velero-load-affinity.adoc[leveloffset=+1]
4752
include::modules/oadp-configuring-imagepullpolicy.adoc[leveloffset=+1]
48-
include::modules/oadp-configuring-node-agents.adoc[leveloffset=+2]
4953
include::modules/oadp-enabling-csi-dpa.adoc[leveloffset=+2]
5054
include::modules/oadp-about-disable-node-agent-dpa.adoc[leveloffset=+2]
5155

backup_and_restore/application_backup_and_restore/installing/installing-oadp-ibm-cloud.adoc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,16 @@ include::modules/oadp-setting-resource-limits-and-requests.adoc[leveloffset=+1]
2626
include::modules/oadp-configuring-node-agents.adoc[leveloffset=+1]
2727
// include the module for client burst and qps config
2828
include::modules/oadp-configuring-client-burst-qps.adoc[leveloffset=+1]
29+
// include module for load affinity setting
30+
include::modules/oadp-configuring-node-agent-load-affinity.adoc[leveloffset=+1]
31+
// include module for load affinity guidelines
32+
include::modules/oadp-node-agent-load-affinity-guidelines.adoc[leveloffset=+1]
2933
// include module for loadConcurrency setting
3034
include::modules/oadp-configuring-node-agent-load-concurrency.adoc[leveloffset=+1]
35+
// include module for repo maintenance setting
36+
include::modules/oadp-configuring-repository-maintenance.adoc[leveloffset=+1]
37+
// include module for velero load affinity setting
38+
include::modules/oadp-configuring-velero-load-affinity.adoc[leveloffset=+1]
3139
// include module for image pull policy setting
3240
include::modules/oadp-configuring-imagepullpolicy.adoc[leveloffset=+1]
3341
// include the module for configuring multiple BSL

backup_and_restore/application_backup_and_restore/installing/installing-oadp-kubevirt.adoc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,14 @@ include::modules/oadp-backup-single-vm.adoc[leveloffset=+1]
4949
include::modules/oadp-restore-single-vm.adoc[leveloffset=+1]
5050
include::modules/oadp-restore-single-vm-from-multiple-vm-backup.adoc[leveloffset=+1]
5151
include::modules/oadp-configuring-client-burst-qps.adoc[leveloffset=+1]
52-
include::modules/oadp-configuring-node-agent-load-concurrency.adoc[leveloffset=+1]
5352
include::modules/oadp-configuring-node-agent-non-root.adoc[leveloffset=+1]
53+
include::modules/oadp-configuring-node-agents.adoc[leveloffset=+1]
54+
include::modules/oadp-configuring-node-agent-load-affinity.adoc[leveloffset=+1]
55+
include::modules/oadp-node-agent-load-affinity-guidelines.adoc[leveloffset=+1]
56+
include::modules/oadp-configuring-node-agent-load-concurrency.adoc[leveloffset=+1]
57+
include::modules/oadp-configuring-repository-maintenance.adoc[leveloffset=+1]
58+
include::modules/oadp-configuring-velero-load-affinity.adoc[leveloffset=+1]
5459
include::modules/oadp-configuring-imagepullpolicy.adoc[leveloffset=+1]
55-
include::modules/oadp-configuring-node-agents.adoc[leveloffset=+2]
5660
include::modules/oadp-incremental-backup-support.adoc[leveloffset=+1]
5761

5862
[IMPORTANT]

backup_and_restore/application_backup_and_restore/installing/installing-oadp-mcg.adoc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,14 @@ include::modules/oadp-using-ca-certificates-with-velero-command.adoc[leveloffset
4343
// include::modules/oadp-installing-dpa-1-2-and-earlier.adoc[leveloffset=+1]
4444
include::modules/oadp-installing-dpa-1-3.adoc[leveloffset=+1]
4545
include::modules/oadp-configuring-client-burst-qps.adoc[leveloffset=+1]
46+
include::modules/oadp-configuring-node-agents.adoc[leveloffset=+1]
47+
include::modules/oadp-configuring-node-agent-load-affinity.adoc[leveloffset=+1]
48+
include::modules/oadp-node-agent-load-affinity-guidelines.adoc[leveloffset=+1]
4649
include::modules/oadp-configuring-node-agent-load-concurrency.adoc[leveloffset=+1]
4750
include::modules/oadp-configuring-node-agent-non-root.adoc[leveloffset=+1]
51+
include::modules/oadp-configuring-repository-maintenance.adoc[leveloffset=+1]
52+
include::modules/oadp-configuring-velero-load-affinity.adoc[leveloffset=+1]
4853
include::modules/oadp-configuring-imagepullpolicy.adoc[leveloffset=+1]
49-
include::modules/oadp-configuring-node-agents.adoc[leveloffset=+2]
5054
include::modules/oadp-enabling-csi-dpa.adoc[leveloffset=+2]
5155
include::modules/oadp-about-disable-node-agent-dpa.adoc[leveloffset=+2]
5256

backup_and_restore/application_backup_and_restore/installing/installing-oadp-ocs.adoc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,14 @@ include::modules/oadp-using-ca-certificates-with-velero-command.adoc[leveloffset
4848
// include::modules/oadp-installing-dpa-1-2-and-earlier.adoc[leveloffset=+1]
4949
include::modules/oadp-installing-dpa-1-3.adoc[leveloffset=+1]
5050
include::modules/oadp-configuring-client-burst-qps.adoc[leveloffset=+1]
51+
include::modules/oadp-configuring-node-agents.adoc[leveloffset=+1]
52+
include::modules/oadp-configuring-node-agent-load-affinity.adoc[leveloffset=+1]
53+
include::modules/oadp-node-agent-load-affinity-guidelines.adoc[leveloffset=+1]
5154
include::modules/oadp-configuring-node-agent-load-concurrency.adoc[leveloffset=+1]
5255
include::modules/oadp-configuring-node-agent-non-root.adoc[leveloffset=+1]
56+
include::modules/oadp-configuring-repository-maintenance.adoc[leveloffset=+1]
57+
include::modules/oadp-configuring-velero-load-affinity.adoc[leveloffset=+1]
5358
include::modules/oadp-configuring-imagepullpolicy.adoc[leveloffset=+1]
54-
include::modules/oadp-configuring-node-agents.adoc[leveloffset=+2]
5559
include::modules/oadp-creating-object-bucket-claim.adoc[leveloffset=+2]
5660
include::modules/oadp-enabling-csi-dpa.adoc[leveloffset=+2]
5761
include::modules/oadp-about-disable-node-agent-dpa.adoc[leveloffset=+2]
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * backup_and_restore/application_backup_and_restore/installing/installing-oadp-aws.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="oadp-configuring-node-agent-load-affinity_{context}"]
7+
= Configuring node agent load affinity
8+
9+
[role="_abstract"]
10+
You can schedule the node agent pods on specific nodes by using the `spec.podConfig.nodeSelector` object of the `DataProtectionApplication` (DPA) custom resource (CR).
11+
12+
See the following example in which you can schedule the node agent pods on nodes with the label `label.io/role: cpu-1` and `other-label.io/other-role: cpu-2`.
13+
14+
[source,yaml]
15+
----
16+
...
17+
spec:
18+
configuration:
19+
nodeAgent:
20+
enable: true
21+
uploaderType: kopia
22+
podConfig:
23+
nodeSelector:
24+
label.io/role: cpu-1
25+
other-label.io/other-role: cpu-2
26+
...
27+
----
28+
29+
You can add more restrictions on the node agent pods scheduling by using the `nodeagent.loadAffinity` object in the DPA spec.
30+
31+
.Prerequisites
32+
33+
* You must be logged in as a user with `cluster-admin` privileges.
34+
* You have installed the {oadp-short} Operator.
35+
* You have configured the DPA CR.
36+
37+
.Procedure
38+
39+
* Configure the DPA spec `nodegent.loadAffinity` object as shown in the following example.
40+
+
41+
In the example, you ensure that the node agent pods are scheduled only on nodes with the label `label.io/role: cpu-1` and the label `label.io/hostname` matching with either `node1` or `node2`.
42+
+
43+
[source,yaml]
44+
----
45+
...
46+
spec:
47+
configuration:
48+
nodeAgent:
49+
enable: true
50+
loadAffinity: # <1>
51+
- nodeSelector:
52+
matchLabels:
53+
label.io/role: cpu-1
54+
matchExpressions: # <2>
55+
- key: label.io/hostname
56+
operator: In
57+
values:
58+
- node1
59+
- node2
60+
...
61+
----
62+
<1> Configure the `loadAffinity` object by adding the `matchLabels` and `matchExpressions` objects.
63+
<2> Configure the `matchExpressions` object to add restrictions on the node agent pods scheduling.

modules/oadp-configuring-node-agent-load-concurrency.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ $ oc label node/<node_name> label.io/instance-type='large'
3636
configuration:
3737
nodeAgent:
3838
enable: true
39+
uploaderType: kopia
3940
loadConcurrency:
4041
globalConfig: 1 # <1>
4142
perNodeConfig:
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * backup_and_restore/application_backup_and_restore/installing/installing-oadp-aws.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="oadp-configuring-repository-maintenance_{context}"]
7+
= Configuring repository maintenance
8+
9+
[role="_abstract"]
10+
{oadp-short} repository maintenance is a background job, you can configure it independently of the node agent pods. This means that you can schedule the repository maintenance pod on a node where the node agent is or is not running.
11+
12+
You can use the repository maintenance job affinity configurations in the `DataProtectionApplication` (DPA) custom resource (CR) only if you use Kopia as the backup repository.
13+
14+
You have the option to configure the load affinity at the global level affecting all repositories. Or you can configure the load affinity for each repository. You can also use a combination of global and per-repository configuration.
15+
16+
17+
.Prerequisites
18+
19+
* You must be logged in as a user with `cluster-admin` privileges.
20+
* You have installed the {oadp-short} Operator.
21+
* You have configured the DPA CR.
22+
23+
.Procedure
24+
25+
* Configure the `loadAffinity` object in the DPA spec by using either one or both of the following methods:
26+
** Global configuration: Configure load affinity for all repositories as shown in the following example:
27+
+
28+
[source,yaml]
29+
----
30+
...
31+
spec:
32+
configuration:
33+
repositoryMaintenance: # <1>
34+
global: # <2>
35+
podResources:
36+
cpuRequest: "100m"
37+
cpuLimit: "200m"
38+
memoryRequest: "100Mi"
39+
memoryLimit: "200Mi"
40+
loadAffinity:
41+
- nodeSelector:
42+
matchLabels:
43+
label.io/gpu: 'no'
44+
matchExpressions:
45+
- key: label.io/location
46+
operator: In
47+
values:
48+
- US
49+
- EU
50+
----
51+
<1> Configure the `repositoryMaintenance` object as shown in the example.
52+
<2> Use the `global` object to configure load affinity for all repositories.
53+
54+
** Per-repository configuration: Configure load affinity per repository as shown in the following example:
55+
+
56+
[source,yaml]
57+
----
58+
...
59+
spec:
60+
configuration:
61+
repositoryMaintenance:
62+
myrepositoryname: # <1>
63+
loadAffinity:
64+
- nodeSelector:
65+
matchLabels:
66+
label.io/cpu: 'yes'
67+
----
68+
<1> Configure the `repositoryMaintenance` object for each repository.

0 commit comments

Comments
 (0)