feat(podman): allow user-provided pod template to override embedded one#567
Conversation
|
Warning Review limit reached
Next review available in: 42 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThe podman runtime's pod YAML rendering is refactored to support an optional custom template file at ChangesCustom pod template loading
Estimated code review effort: 2 (Simple) | ~12 minutes Sequence Diagram(s)sequenceDiagram
participant ComponentA
participant ComponentB
ComponentA->>ComponentB: observable interaction
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
pkg/runtime/podman/create.go (1)
372-372: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueConsider extracting the template path segments into a shared constant.
"config"and"onecli-pod.yaml"are hardcoded here and duplicated again inpodman_test.go(Line 389-394). A shared constant would keep the path in sync across code and tests.Also applies to: 808-809
🤖 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 `@pkg/runtime/podman/create.go` at line 372, The podman template path segments are hardcoded and duplicated in both create and test code, so extract the shared `"config"` and `"onecli-pod.yaml"` parts into a reusable constant or helper near `customPath` in `create.go` and update `podman_test.go` to use the same symbol. Use the existing `customPath` construction and the podman test path setup as the places to centralize the path so both stay in sync.
🤖 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.
Nitpick comments:
In `@pkg/runtime/podman/create.go`:
- Line 372: The podman template path segments are hardcoded and duplicated in
both create and test code, so extract the shared `"config"` and
`"onecli-pod.yaml"` parts into a reusable constant or helper near `customPath`
in `create.go` and update `podman_test.go` to use the same symbol. Use the
existing `customPath` construction and the podman test path setup as the places
to centralize the path so both stay in sync.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 3f154ccd-5032-45b9-9d24-11bbe6142bc3
📒 Files selected for processing (4)
pkg/runtime/podman/create.gopkg/runtime/podman/create_test.gopkg/runtime/podman/podman.gopkg/runtime/podman/podman_test.go
The pod YAML template was compiled into the binary and had no override mechanism. Now, if the user places a custom template at <storageDir>/runtimes/podman/config/onecli-pod.yaml, it is used in place of the embedded default. The embedded template is still used when the file is absent. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Philippe Martin <phmartin@redhat.com>
The pod YAML template was compiled into the binary and had no override mechanism. Now, if the user places a custom template at /runtimes/podman/config/onecli-pod.yaml, it is used in place of the embedded default. The embedded template is still used when the file is absent.