From a1777ec062a3e4e13b1723964bcb6aeaea5514bc Mon Sep 17 00:00:00 2001 From: Ashleigh Brennan Date: Wed, 8 Oct 2025 09:50:15 -0500 Subject: [PATCH] CNV-64217: Add verification steps to CLI subscribing module --- _attributes/common-attributes.adoc | 1 + modules/virt-subscribing-cli.adoc | 88 +++++++++++++++++++++++++++++- 2 files changed, 86 insertions(+), 3 deletions(-) diff --git a/_attributes/common-attributes.adoc b/_attributes/common-attributes.adoc index ceb7be47bd7d..ba063334b1a1 100644 --- a/_attributes/common-attributes.adoc +++ b/_attributes/common-attributes.adoc @@ -115,6 +115,7 @@ endif::[] :VirtVersion: 4.13 :KubeVirtVersion: v0.59.0 :HCOVersion: 4.13.11 +:HCOVersionPrev: 4.12.0 :CNVNamespace: openshift-cnv :CNVOperatorDisplayName: OpenShift Virtualization Operator :CNVSubscriptionSpecSource: redhat-operators diff --git a/modules/virt-subscribing-cli.adoc b/modules/virt-subscribing-cli.adoc index f382bed36439..5762ba9e2d73 100644 --- a/modules/virt-subscribing-cli.adoc +++ b/modules/virt-subscribing-cli.adoc @@ -10,8 +10,16 @@ Before you install {VirtProductName}, you must subscribe to the {VirtProductName To subscribe, configure `Namespace`, `OperatorGroup`, and `Subscription` objects by applying a single manifest to your cluster. +.Prerequisites + +* Install {product-title} {product-version} on your cluster. +* Install the {oc-first}. +* Log in as a user with `cluster-admin` privileges. + .Procedure -ifdef::openshift-enterprise[] + +ifdef::openshift-enterprise,openshift-rosa,openshift-dedicated,openshift-rosa-hcp[] + . Create a YAML file that contains the following manifest: //Note that there are two versions of the following YAML file; the first one is for openshift-enterprise and the second is for openshift-origin (aka OKD). + @@ -45,9 +53,11 @@ spec: ---- <1> Using the `stable` channel ensures that you install the version of {VirtProductName} that is compatible with your {product-title} version. -endif::openshift-enterprise[] + +endif::openshift-enterprise,openshift-rosa,openshift-dedicated,openshift-rosa-hcp[] ifdef::openshift-origin[] + . Create a YAML file that contains the following manifest: + [source,yaml,subs="attributes+"] @@ -78,6 +88,7 @@ spec: ---- <1> Using the `stable` channel ensures that you install the version of {VirtProductName} that is compatible with your {product-title} version. + endif::openshift-origin[] . Create the required `Namespace`, `OperatorGroup`, and `Subscription` objects @@ -85,5 +96,76 @@ for {VirtProductName} by running the following command: + [source,terminal] ---- -$ oc apply -f .yaml +$ oc apply -f .yaml +---- + +.Verification + +You must verify that the subscription creation was successful before you can proceed with installing {VirtProductName}. + +. Check that the `ClusterServiceVersion` (CSV) object was created successfully. Run the following command and verify the output: ++ +[source,terminal,subs="attributes+"] +---- +$ oc get csv -n {CNVNamespace} +---- ++ +If the CSV was created successfully, the output shows an entry that contains a `NAME` value of `kubevirt-hyperconverged-operator-*`, a `DISPLAY` value of `{VirtProductName}`, and a `PHASE` value of `Succeeded`, as shown in the following example output: ++ +*Example output* ++ +[source,terminal,subs="attributes+"] +---- +NAME DISPLAY VERSION REPLACES PHASE +kubevirt-hyperconverged-operator.v{HCOVersion} {VirtProductName} {HCOVersion} kubevirt-hyperconverged-operator.v{HCOVersionPrev} Succeeded +---- + +. Check that the `HyperConverged` custom resource (CR) has the correct version. Run the following command and verify the output: ++ +[source,terminal,subs="attributes+"] +---- +$ oc get hco -n {CNVNamespace} kubevirt-hyperconverged -o json | jq .status.versions +---- ++ +*Example output* ++ +[source,terminal,subs="attributes+"] +---- +{ +"name": "operator", +"version": "{HCOVersion}" +} +---- + +. Verify the `HyperConverged` CR conditions. Run the following command and check the output: ++ +[source,terminal,subs="attributes+"] +---- +$ oc get hco kubevirt-hyperconverged -n {CNVNamespace} -o json | jq -r '.status.conditions[] | {type,status}' +---- ++ +*Example output* ++ +[source,terminal] +---- +{ + "type": "ReconcileComplete", + "status": "True" +} +{ + "type": "Available", + "status": "True" +} +{ + "type": "Progressing", + "status": "False" +} +{ + "type": "Degraded", + "status": "False" +} +{ + "type": "Upgradeable", + "status": "True" +} ----