Skip to content

docs: add podConfig documentation for tolerations, nodeSelector, labels, and env#2196

Open
kaovilai wants to merge 1 commit into
openshift:oadp-devfrom
kaovilai:docs-podconfig-tolerations-nodeselector
Open

docs: add podConfig documentation for tolerations, nodeSelector, labels, and env#2196
kaovilai wants to merge 1 commit into
openshift:oadp-devfrom
kaovilai:docs-podconfig-tolerations-nodeselector

Conversation

@kaovilai
Copy link
Copy Markdown
Member

@kaovilai kaovilai commented May 7, 2026

Summary

  • Adds docs/config/pod_config.md covering all podConfig fields: tolerations, nodeSelector, resourceAllocations, labels, and env
  • Adds cross-reference from existing docs/config/resource_req_limits.md
  • Includes common misconfiguration table to prevent users from putting tolerations/nodeSelector directly under nodeAgent or velero instead of under podConfig
  • Clarifies that unsupportedOverrides is for image overrides only
  • Links to Red Hat PodConfig API reference

Motivation

Support case [04410122] / OADP-7829 — customer could not configure tolerations for node-agent DaemonSet because they used incorrect YAML path (spec.configuration.nodeAgent.tolerations instead of spec.configuration.nodeAgent.podConfig.tolerations). Both the customer and the support engineer were unaware that tolerations are already supported. The Red Hat PodConfig API docs list the field but lack examples specific to nodeAgent tolerations. This doc makes the correct paths discoverable with concrete examples.

Test plan

  • Verify YAML examples are valid against the CRD schema
  • Verify oc explain commands shown in the doc work on a cluster with OADP installed
  • Verify links between docs (pod_config.md <-> resource_req_limits.md, pod_config.md -> custom_plugin_images.md) resolve correctly

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Expanded DataProtectionApplication podConfig docs: clarified podConfig is supported for both scheduling components, listed supported subfields (tolerations, nodeSelector, resource allocations, labels, env), and added YAML examples including tainted-node scenarios.
    • Added troubleshooting guidance for common "unknown field" warnings with steps to locate valid fields and inspect CRD schema.
    • Added cross-references to resource allocation docs and updated related config guidance.

Copilot AI review requested due to automatic review settings May 7, 2026 19:12
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 7, 2026

Walkthrough

Adds dedicated documentation for the DataProtectionApplication podConfig field (supported under spec.configuration.velero.podConfig and spec.configuration.nodeAgent.podConfig), enumerates supported subfields (tolerations, nodeSelector, resourceAllocations, labels, env), provides YAML examples and path-correctness guidance, and links/notes added to resource limits and troubleshooting docs.

Changes

podConfig documentation + cross-references

Layer / File(s) Summary
New Feature Documentation
docs/config/pod_config.md
Introduces the podConfig doc page: lists supported subfields (tolerations, nodeSelector, resourceAllocations, labels, env), shows YAML examples (tolerations, tainted-node example, nodeSelector), provides correct vs incorrect placement notes (must be under podConfig), includes oc explain/CRD inspection commands and upstream API link.
Cross-Reference / Concise Note
docs/config/resource_req_limits.md
Adds "Other podConfig Options" noting tolerations, nodeSelector, labels, and env and linking to docs/config/pod_config.md.
Troubleshooting Guidance
docs/TROUBLESHOOTING.md
Adds "Warning: unknown field in DPA CR" section describing mis-nested field warnings, example warning text, oc explain usage, CRD inspection command, and links to podConfig docs and upstream reference.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 12
✅ Passed checks (12 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main documentation changes, accurately reflecting the addition of podConfig documentation for key fields.
Description check ✅ Passed The description is comprehensive, covering motivation, implementation details, and a test plan, though the template sections are not explicitly followed.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed Documentation-only PR with 3 markdown files. No Go code, test files, or Ginkgo tests present. Check not applicable.
Test Structure And Quality ✅ Passed PR contains documentation-only changes. The custom check is for Ginkgo test code quality, which is not applicable here since no test files are modified.
Microshift Test Compatibility ✅ Passed PR contains only documentation changes (markdown files). No Ginkgo e2e tests were added. MicroShift test compatibility check is not applicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed This PR contains only documentation updates to markdown files. No new Ginkgo e2e tests were added. The SNO compatibility check is not applicable to documentation-only changes.
Topology-Aware Scheduling Compatibility ✅ Passed PR modifies only documentation files. No manifests, operator code, or controllers were changed. Check is not applicable to documentation-only changes.
Ote Binary Stdout Contract ✅ Passed PR contains only documentation changes (.md files). OTE Binary Stdout Contract check applies to executable code. No code modifications present.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed This PR is documentation-only and contains no Ginkgo e2e tests. The check for IPv6/disconnected network compatibility only applies when new e2e tests are added, which is not the case here.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented May 7, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kaovilai

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 7, 2026
@kaovilai kaovilai force-pushed the docs-podconfig-tolerations-nodeselector branch from 3200692 to 416e7d8 Compare May 7, 2026 19:13
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with 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.

Inline comments:
In `@docs/config/pod_config.md`:
- Around line 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.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 3f1d4db3-7d93-4316-9ce4-69f6010301d1

📥 Commits

Reviewing files that changed from the base of the PR and between d18cc6c and 3200692.

📒 Files selected for processing (2)
  • docs/config/pod_config.md
  • docs/config/resource_req_limits.md

Comment thread docs/config/pod_config.md
Comment on lines +9 to +18
```
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
```
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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds new end-user documentation for the podConfig section of the DataProtectionApplication (DPA) CR, to make supported scheduling/runtime customization options (notably tolerations/nodeSelector) more discoverable and reduce misconfiguration.

Changes:

  • Added docs/config/pod_config.md documenting podConfig usage and common misconfiguration patterns.
  • Added a cross-reference from docs/config/resource_req_limits.md to the new podConfig documentation.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
docs/config/resource_req_limits.md Adds a short pointer to the broader podConfig documentation.
docs/config/pod_config.md Introduces new podConfig documentation with examples and a misconfiguration table.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/config/pod_config.md
Comment on lines +20 to +24
```

### Available Fields

| Field | Type | Description |
Comment thread docs/config/pod_config.md
effect: "NoSchedule"
velero:
defaultPlugins:
- openshift
@kaovilai kaovilai force-pushed the docs-podconfig-tolerations-nodeselector branch 2 times, most recently from c08818c to 5f2eb3d Compare May 7, 2026 19:18
…ls, and env

Adds comprehensive documentation for all podConfig fields available
under spec.configuration.velero and spec.configuration.nodeAgent in the
DPA CR. This addresses confusion where users attempt to set tolerations
directly under nodeAgent instead of under nodeAgent.podConfig, and
clarifies that unsupportedOverrides is for image overrides only.

Also adds a cross-reference from the existing resource_req_limits.md doc.

Relates: OADP-7829

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
@kaovilai kaovilai force-pushed the docs-podconfig-tolerations-nodeselector branch from 5f2eb3d to 788fdaf Compare May 7, 2026 19:18
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (3)
docs/TROUBLESHOOTING.md (3)

326-328: ⚡ Quick win

Add language specifier to the CRD inspection command.

The code block should specify shell as the language identifier for proper syntax highlighting.

📝 Proposed fix
-```
+```shell
 oc get crd dataprotectionapplications.oadp.openshift.io -o yaml

</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

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/TROUBLESHOOTING.md around lines 326 - 328, Update the fenced code block
that contains the command "oc get crd
dataprotectionapplications.oadp.openshift.io -o yaml" in docs/TROUBLESHOOTING.md
to include the language specifier by changing the opening fence from ``` to

the command text are needed.

318-322: ⚡ Quick win

Add language specifier to the command code block.

The code block showing oc explain commands should specify shell as the language identifier for proper syntax highlighting.

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

</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

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/TROUBLESHOOTING.md around lines 318 - 322, Update the fenced code block
that contains the three oc explain commands (oc explain
dataprotectionapplication.spec.configuration.nodeAgent, oc explain
dataprotectionapplication.spec.configuration.nodeAgent.podConfig, oc explain
dataprotectionapplication.spec.configuration.velero) to include the shell
language specifier (```shell) at the opening fence so the block becomes a
shell-highlighted code block; leave the closing fence unchanged.


</details>

---

`312-314`: _⚡ Quick win_

**Add language specifier to the warning example code block.**

The code block showing the warning message should specify a language identifier for better rendering and markdown compliance.




<details>
<summary>📝 Proposed fix</summary>

```diff
-```
+```text
 Warning: unknown field "spec.configuration.nodeAgent.<fieldName>"
 ```
```

</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

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/TROUBLESHOOTING.md around lines 312 - 314, Update the example code
block that contains the warning message Warning: unknown field
"spec.configuration.nodeAgent." to include a language specifier
(e.g., change the fenced block from totext) so the markdown renders
correctly; locate the fenced block with that exact warning string and add the
language identifier at the opening fence.


</details>

</blockquote></details>

</blockquote></details>

<details>
<summary>🤖 Prompt for all review comments with AI agents</summary>

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

Nitpick comments:
In @docs/TROUBLESHOOTING.md:

  • Around line 326-328: Update the fenced code block that contains the command
    "oc get crd dataprotectionapplications.oadp.openshift.io -o yaml" in
    docs/TROUBLESHOOTING.md to include the language specifier by changing the
    opening fence from toshell so the block becomes a shell-highlighted
    snippet; no other changes to the command text are needed.
  • Around line 318-322: Update the fenced code block that contains the three oc
    explain commands (oc explain
    dataprotectionapplication.spec.configuration.nodeAgent, oc explain
    dataprotectionapplication.spec.configuration.nodeAgent.podConfig, oc explain
    dataprotectionapplication.spec.configuration.velero) to include the shell
    language specifier (```shell) at the opening fence so the block becomes a
    shell-highlighted code block; leave the closing fence unchanged.
  • Around line 312-314: Update the example code block that contains the warning
    message Warning: unknown field "spec.configuration.nodeAgent." to
    include a language specifier (e.g., change the fenced block from totext)
    so the markdown renders correctly; locate the fenced block with that exact
    warning string and add the language identifier at the opening fence.

</details>

---

<details>
<summary>ℹ️ Review info</summary>

<details>
<summary>⚙️ Run configuration</summary>

**Configuration used**: Repository: openshift/coderabbit/.coderabbit.yaml

**Review profile**: CHILL

**Plan**: Enterprise

**Run ID**: `fa9d38a2-a631-4770-aae9-2ac09af68c26`

</details>

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 416e7d8299d9d5ff33ec01327aa9a887e058709c and 788fdaf582f97dadd8ead9239e7f89c7679cd1f9.

</details>

<details>
<summary>📒 Files selected for processing (3)</summary>

* `docs/TROUBLESHOOTING.md`
* `docs/config/pod_config.md`
* `docs/config/resource_req_limits.md`

</details>

<details>
<summary>✅ Files skipped from review due to trivial changes (1)</summary>

* docs/config/resource_req_limits.md

</details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented May 7, 2026

@kaovilai: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Copy link
Copy Markdown
Member

@shubham-pampattiwar shubham-pampattiwar left a comment

Choose a reason for hiding this comment

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

/lgtm

@sseago
Copy link
Copy Markdown
Contributor

sseago commented May 8, 2026

/lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants