Skip to content

Add CNV plugin for OpenShift Virtualization deployment#386

Open
eurijon wants to merge 1 commit into
mainfrom
cnv-plugin
Open

Add CNV plugin for OpenShift Virtualization deployment#386
eurijon wants to merge 1 commit into
mainfrom
cnv-plugin

Conversation

@eurijon
Copy link
Copy Markdown
Contributor

@eurijon eurijon commented May 21, 2026

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

    • Added a new CNV (Container-native Virtualization) addon plugin for deploying and managing the KubeVirt HyperConverged operator.
    • Automated custom resource deployment with built-in readiness verification to ensure the operator is fully operational.
  • Chores

    • Cleaned up configuration by removing redundant mirror package entries.

Review Change Stack

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
@github-actions github-actions Bot added deployment Deployment-related changes plugins labels May 21, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 21, 2026

Walkthrough

This 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.

Changes

CNV Plugin Setup

Layer / File(s) Summary
Plugin configuration and defaults update
defaults/operators.yaml, plugins/cnv/plugin.yaml
Removes legacy extraMirrorPackages entry for kubevirt-hyperconverged and adds the new cnv plugin definition pinned to version 4.20.14 on the stable channel with openshift-cnv namespace and order: 104 metadata.
HyperConverged deployment workflow
plugins/cnv/tasks/deploy.yaml
Ansible tasks deploy the HyperConverged custom resource and poll until the Available condition is True, with retry/delay parameters and debug confirmation message.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding a CNV plugin for OpenShift Virtualization deployment. It is specific, clear, and directly reflects the changeset's primary objective.
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.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cnv-plugin

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.

❤️ Share

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

Copy link
Copy Markdown

@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 (1)
plugins/cnv/tasks/deploy.yaml (1)

24-25: ⚡ Quick win

Make HyperConverged readiness polling tunable.

Using fixed retries/delay here 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

📥 Commits

Reviewing files that changed from the base of the PR and between ac242f5 and e473977.

📒 Files selected for processing (3)
  • defaults/operators.yaml
  • plugins/cnv/plugin.yaml
  • plugins/cnv/tasks/deploy.yaml
💤 Files with no reviewable changes (1)
  • defaults/operators.yaml

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

Labels

deployment Deployment-related changes plugins

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant