mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-05 13:05:17 +00:00
Fix the repository-maintenance-job-configmap format issue in doc.
Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
This commit is contained in:
@@ -60,47 +60,63 @@ This can be done by adding multiple entries in the `LoadAffinity` array.
|
|||||||
|
|
||||||
The sample of the ```repo-maintenance-job-configmap``` ConfigMap for the above scenario is as below:
|
The sample of the ```repo-maintenance-job-configmap``` ConfigMap for the above scenario is as below:
|
||||||
``` bash
|
``` bash
|
||||||
cat <<EOF > repo-maintenance-job-config.json
|
cat <<EOF > repo-maintenance-job-config.yaml
|
||||||
{
|
apiVersion: v1
|
||||||
"global": {
|
kind: ConfigMap
|
||||||
"podResources": {
|
metadata:
|
||||||
"cpuRequest": "100m",
|
name: repo-maintenance-job-config
|
||||||
"cpuLimit": "200m",
|
namespace: velero
|
||||||
"memoryRequest": "100Mi",
|
data:
|
||||||
"memoryLimit": "200Mi"
|
global: |
|
||||||
|
{
|
||||||
|
"podResources": {
|
||||||
|
"cpuRequest": "100m",
|
||||||
|
"cpuLimit": "200m",
|
||||||
|
"memoryRequest": "100Mi",
|
||||||
|
"memoryLimit": "200Mi"
|
||||||
|
},
|
||||||
|
"keepLatestMaintenanceJobs": 1,
|
||||||
|
"loadAffinity": [
|
||||||
|
{
|
||||||
|
"nodeSelector": {
|
||||||
|
"matchExpressions": [
|
||||||
|
{
|
||||||
|
"key": "cloud.google.com/machine-family",
|
||||||
|
"operator": "In",
|
||||||
|
"values": [
|
||||||
|
"e2"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"loadAffinity": [
|
{
|
||||||
{
|
"nodeSelector": {
|
||||||
"nodeSelector": {
|
"matchExpressions": [
|
||||||
"matchExpressions": [
|
{
|
||||||
{
|
"key": "topology.kubernetes.io/zone",
|
||||||
"key": "cloud.google.com/machine-family",
|
"operator": "In",
|
||||||
"operator": "In",
|
"values": [
|
||||||
"values": [
|
"us-central1-a",
|
||||||
"e2"
|
"us-central1-b",
|
||||||
]
|
"us-central1-c"
|
||||||
}
|
]
|
||||||
]
|
}
|
||||||
}
|
]
|
||||||
},
|
}
|
||||||
{
|
}
|
||||||
"nodeSelector": {
|
]
|
||||||
"matchExpressions": [
|
}
|
||||||
{
|
kibishii-default-kopia: |
|
||||||
"key": "topology.kubernetes.io/zone",
|
{
|
||||||
"operator": "In",
|
"podResources": {
|
||||||
"values": [
|
"cpuRequest": "200m",
|
||||||
"us-central1-a",
|
"cpuLimit": "400m",
|
||||||
"us-central1-b",
|
"memoryRequest": "200Mi",
|
||||||
"us-central1-c"
|
"memoryLimit": "400Mi"
|
||||||
]
|
},
|
||||||
}
|
"keepLatestMaintenanceJobs": 2
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
EOF
|
EOF
|
||||||
```
|
```
|
||||||
This sample showcases two affinity configurations:
|
This sample showcases two affinity configurations:
|
||||||
@@ -110,7 +126,7 @@ The nodes matching one of the two conditions are selected.
|
|||||||
|
|
||||||
To create the configMap, users need to save something like the above sample to a json file and then run below command:
|
To create the configMap, users need to save something like the above sample to a json file and then run below command:
|
||||||
```
|
```
|
||||||
kubectl create cm repo-maintenance-job-config -n velero --from-file=repo-maintenance-job-config.json
|
kubectl apply -f repo-maintenance-job-config.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
### Log
|
### Log
|
||||||
|
|||||||
Reference in New Issue
Block a user