Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions docs/TROUBLESHOOTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,3 +304,27 @@ oc delete backuprepository <backupRepositoryName> -n openshift-adp

- This error can occur regardless of the SCC if the application is not aligned with the security standards. Please ensure that the security standards for the application pods are aligned, as provided in the link below, to prevent deployment warnings.
https://access.redhat.com/solutions/7002730

### Warning: unknown field in DPA CR

When applying a DPA CR you may see warnings like:

```
Warning: unknown field "spec.configuration.nodeAgent.<fieldName>"
```

This means the field is placed at the wrong level in the DPA spec. Use `oc explain` to discover available fields at any level:

```
oc explain dataprotectionapplication.spec.configuration.nodeAgent
oc explain dataprotectionapplication.spec.configuration.nodeAgent.podConfig
oc explain dataprotectionapplication.spec.configuration.velero
```

You can also inspect the full CRD schema with:

```
oc get crd dataprotectionapplications.oadp.openshift.io -o yaml
```

See [docs/config/pod_config.md](config/pod_config.md) and the [Red Hat PodConfig API reference](https://docs.redhat.com/en/documentation/openshift_container_platform/4.18/html/backup_and_restore/oadp-application-backup-and-restore#podconfig-type_oadp-api) for full documentation on `podConfig` fields.
151 changes: 151 additions & 0 deletions docs/config/pod_config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
<hr style="height:1px;border:none;color:#333;">
<h1 align="center">Pod Configuration (podConfig)</h1>
<hr style="height:1px;border:none;color:#333;">

The `podConfig` field is available under both `configuration.velero` and `configuration.nodeAgent` in the DataProtectionApplication (DPA) CR. It allows customizing the pod scheduling and runtime configuration for Velero Deployment pods and Node Agent DaemonSet pods respectively.

See also the [Red Hat PodConfig API reference](https://docs.redhat.com/en/documentation/openshift_container_platform/4.18/html/backup_and_restore/oadp-application-backup-and-restore#podconfig-type_oadp-api) for the official supported documentation.

All available `podConfig` fields can be discovered from your cluster using:

```
oc explain dataprotectionapplication.spec.configuration.velero.podConfig
oc explain dataprotectionapplication.spec.configuration.nodeAgent.podConfig
```

The full CRD schema can also be inspected with:

```
oc get crd dataprotectionapplications.oadp.openshift.io -o yaml
```
Comment on lines +11 to +20
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add language specifiers to fenced code blocks.

The code blocks showing oc commands should specify a language identifier for better syntax highlighting and to comply with markdown best practices.

📝 Proposed fix
-```
+```shell
 oc explain dataprotectionapplication.spec.configuration.velero.podConfig
 oc explain dataprotectionapplication.spec.configuration.nodeAgent.podConfig

The full CRD schema can also be inspected with:

- +shell
oc get crd dataprotectionapplications.oadp.openshift.io -o yaml

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
```
oc explain dataprotectionapplication.spec.configuration.velero.podConfig
oc explain dataprotectionapplication.spec.configuration.nodeAgent.podConfig
```
The full CRD schema can also be inspected with:
```
oc get crd dataprotectionapplications.oadp.openshift.io -o yaml
```
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 9-9: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


[warning] 16-16: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/config/pod_config.md` around lines 9 - 18, Update the fenced code blocks
to include a language specifier (e.g. "shell") for syntax highlighting: add
```shell before the block containing "oc explain
dataprotectionapplication.spec.configuration.velero.podConfig" and the "oc
explain dataprotectionapplication.spec.configuration.nodeAgent.podConfig" lines,
and likewise add ```shell before the block containing "oc get crd
dataprotectionapplications.oadp.openshift.io -o yaml", closing each block with
``` as currently present; ensure no other text is added or removed in the
command lines so only the fence headers change.


### Available Fields

| Field | Type | Description |
Comment on lines +20 to +24
|-------|------|-------------|
| `tolerations` | `[]corev1.Toleration` | Tolerations to apply to the pod, allowing scheduling on tainted nodes |
| `nodeSelector` | `map[string]string` | Node labels required for pod scheduling |
| `resourceAllocations` | `corev1.ResourceRequirements` | CPU, memory, and ephemeral-storage resource requests and limits |
| `labels` | `map[string]string` | Additional labels to add to pods |
| `env` | `[]corev1.EnvVar` | Environment variables to add to the pod |

### Tolerations

To schedule Velero or Node Agent pods on nodes with taints, configure tolerations under `podConfig`.

This is commonly needed when:
- Critical workloads run on tainted nodes and Node Agent must be present for PVC backup
- Infrastructure nodes have taints that prevent general workload scheduling

**Example: Node Agent on tainted nodes**

If your cluster has nodes with taint `critical=reserved:NoSchedule` and you need Node Agent pods to run there for PVC data backup:

```yaml
apiVersion: oadp.openshift.io/v1alpha1
kind: DataProtectionApplication
metadata:
name: dpa-sample
namespace: openshift-adp
spec:
configuration:
nodeAgent:
enable: true
uploaderType: kopia
podConfig:
tolerations:
- key: "critical"
operator: "Equal"
value: "reserved"
effect: "NoSchedule"
velero:
defaultPlugins:
- openshift
- csi
backupLocations:
- velero:
provider: aws
default: true
objectStorage:
bucket: my-bucket
prefix: my-prefix
config:
region: us-east-1
credential:
name: cloud-credentials
key: cloud
```

**Example: Velero on tainted nodes**

```yaml
configuration:
velero:
podConfig:
tolerations:
- key: "node-role.kubernetes.io/infra"
operator: "Exists"
effect: "NoSchedule"
```

<b>Note:</b> Tolerations must be placed under `podConfig`, not directly under `nodeAgent` or `velero`. For example, `spec.configuration.nodeAgent.tolerations` is **not valid** and will be rejected by CRD validation. The correct path is `spec.configuration.nodeAgent.podConfig.tolerations`.

### Node Selector

To restrict Velero or Node Agent pods to specific nodes, use `nodeSelector` under `podConfig`.

```yaml
configuration:
velero:
podConfig:
nodeSelector:
node-role.kubernetes.io/infra: ""
nodeAgent:
enable: true
uploaderType: kopia
podConfig:
nodeSelector:
node-role.kubernetes.io/infra: ""
```

<b>Note:</b> Like tolerations, `nodeSelector` must be placed under `podConfig`. The path `spec.configuration.nodeAgent.nodeSelector` is **not valid**.

### Resource Allocations

See [resource_req_limits.md](resource_req_limits.md) for detailed documentation on setting CPU, memory, and ephemeral-storage resource requests and limits.

### Labels

To add custom labels to Velero or Node Agent pods:

```yaml
configuration:
velero:
podConfig:
labels:
app.kubernetes.io/part-of: "backup-system"
nodeAgent:
enable: true
uploaderType: kopia
podConfig:
labels:
app.kubernetes.io/part-of: "backup-system"
```

### Environment Variables

To set environment variables on Velero or Node Agent pods:

```yaml
configuration:
velero:
podConfig:
env:
- name: HTTP_PROXY
value: "http://proxy.example.com:8080"
- name: HTTPS_PROXY
value: "http://proxy.example.com:8080"
- name: NO_PROXY
value: ".cluster.local,.svc,10.0.0.0/8"
```

4 changes: 4 additions & 0 deletions docs/config/resource_req_limits.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,7 @@ pod(s) is:
```

This differs from upstream Velero/Node Agent pod(s) in that the default resources which [has resource limits as well as resource requests](https://velero.io/docs/v1.9/customize-installation/#customize-resource-requests-and-limits).

### Other podConfig Options

The `podConfig` field also supports `tolerations`, `nodeSelector`, `labels`, and `env`. See [pod_config.md](pod_config.md) for full documentation.