Add CNV plugin for OpenShift Virtualization deployment#386
Conversation
Installs the kubevirt-hyperconverged operator (v4.20.14, stable channel) and deploys the HyperConverged CR. Removes kubevirt-hyperconverged from metallb extraMirrorPackages since mirroring is now handled by the plugin. OSAC-930
WalkthroughThis PR integrates a new CNV (KubeVirt) addon plugin by removing outdated mirror configuration, introducing a plugin manifest with operator version pinning, and implementing Ansible deployment tasks to automatically provision and validate the HyperConverged custom resource in the OpenShift CNV namespace. ChangesCNV Plugin Setup
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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)
plugins/cnv/tasks/deploy.yaml (1)
24-25: ⚡ Quick winMake HyperConverged readiness polling tunable.
Using fixed
retries/delayhere makes timeout behavior harder to tune per environment. Reuse configurable vars (same pattern as the deploy task) to improve reliability on slower clusters.Proposed change
- name: Wait for HyperConverged CR (Available=True) kubernetes.core.k8s_info: api_version: hco.kubevirt.io/v1beta1 kind: HyperConverged name: kubevirt-hyperconverged namespace: openshift-cnv register: __r_cnv_hco_status - retries: 60 - delay: 30 + retries: "{{ k8s_retries }}" + delay: "{{ k8s_delay }}" until: - __r_cnv_hco_status.resources | length > 0 - __r_cnv_hco_status.resources[0].status.conditions | default([]) | selectattr('type', 'equalto', 'Available') | selectattr('status', 'equalto', 'True') | list | length > 0🤖 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 `@plugins/cnv/tasks/deploy.yaml` around lines 24 - 25, The hard-coded retries: 60 and delay: 30 make HyperConverged readiness polling non-configurable; replace those constants with templated/configurable variables following the same pattern used by the deploy task (e.g., use variables like hyperconvergedReadinessRetries and hyperconvergedReadinessDelay or reuse the deploy task's retries/delay vars), ensure sensible defaults are provided and used if not set, and update the retries and delay fields to reference those variables so timeout behavior can be tuned per environment.
🤖 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 `@plugins/cnv/tasks/deploy.yaml`:
- Around line 24-25: The hard-coded retries: 60 and delay: 30 make
HyperConverged readiness polling non-configurable; replace those constants with
templated/configurable variables following the same pattern used by the deploy
task (e.g., use variables like hyperconvergedReadinessRetries and
hyperconvergedReadinessDelay or reuse the deploy task's retries/delay vars),
ensure sensible defaults are provided and used if not set, and update the
retries and delay fields to reference those variables so timeout behavior can be
tuned per environment.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: cdd054c6-260b-40a4-8217-586b112af707
📒 Files selected for processing (3)
defaults/operators.yamlplugins/cnv/plugin.yamlplugins/cnv/tasks/deploy.yaml
💤 Files with no reviewable changes (1)
- defaults/operators.yaml
Installs the kubevirt-hyperconverged operator (v4.20.14, stable channel) and deploys the HyperConverged CR.
Removes kubevirt-hyperconverged from metallb extraMirrorPackages since mirroring is now handled by the plugin.
OSAC-930
Summary by CodeRabbit
New Features
Chores