Skip to content

Commit b0bdba2

Browse files
authored
Merge pull request #100197 from abrennan89/CNV-64217
CNV-64217: Add verification steps to CLI subscribing module
2 parents cfc69c6 + 7992df7 commit b0bdba2

File tree

2 files changed

+82
-4
lines changed

2 files changed

+82
-4
lines changed

_attributes/common-attributes.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ endif::[]
128128
:VirtProductName: OpenShift Virtualization
129129
:VirtVersion: 4.20
130130
:HCOVersion: 4.20.0
131+
:HCOVersionPrev: 4.19.0
131132
:CNVNamespace: openshift-cnv
132133
:CNVOperatorDisplayName: OpenShift Virtualization Operator
133134
:CNVSubscriptionSpecSource: redhat-operators

modules/virt-subscribing-cli.adoc

Lines changed: 81 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,15 @@ Before you install {VirtProductName}, you must subscribe to the {VirtProductName
1111
To subscribe, configure `Namespace`, `OperatorGroup`, and `Subscription` objects by applying a single manifest to your cluster.
1212

1313
.Prerequisites
14+
1415
* Install {product-title} {product-version} on your cluster.
15-
* Install the OpenShift CLI (`oc`).
16+
* Install the {oc-first}.
1617
* Log in as a user with `cluster-admin` privileges.
1718
1819
.Procedure
19-
ifdef::openshift-enterprise[]
20+
21+
ifdef::openshift-enterprise,openshift-rosa,openshift-dedicated,openshift-rosa-hcp[]
22+
2023
. Create a YAML file that contains the following manifest:
2124
//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).
2225
+
@@ -52,9 +55,11 @@ spec:
5255
----
5356
<1> Using the `stable` channel ensures that you install the version of
5457
{VirtProductName} that is compatible with your {product-title} version.
55-
endif::openshift-enterprise[]
58+
59+
endif::openshift-enterprise,openshift-rosa,openshift-dedicated,openshift-rosa-hcp[]
5660

5761
ifdef::openshift-origin[]
62+
5863
. Create a YAML file that contains the following manifest:
5964
+
6065
[source,yaml,subs="attributes+"]
@@ -85,12 +90,84 @@ spec:
8590
----
8691
<1> Using the `stable` channel ensures that you install the version of
8792
{VirtProductName} that is compatible with your {product-title} version.
93+
8894
endif::openshift-origin[]
8995

9096
. Create the required `Namespace`, `OperatorGroup`, and `Subscription` objects
9197
for {VirtProductName} by running the following command:
9298
+
9399
[source,terminal]
94100
----
95-
$ oc apply -f <file name>.yaml
101+
$ oc apply -f <filename>.yaml
102+
----
103+
104+
.Verification
105+
106+
You must verify that the subscription creation was successful before you can proceed with installing {VirtProductName}.
107+
108+
. Check that the `ClusterServiceVersion` (CSV) object was created successfully. Run the following command and verify the output:
109+
+
110+
[source,terminal,subs="attributes+"]
111+
----
112+
$ oc get csv -n {CNVNamespace}
113+
----
114+
+
115+
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:
116+
+
117+
*Example output*
118+
+
119+
[source,terminal,subs="attributes+"]
120+
----
121+
NAME DISPLAY VERSION REPLACES PHASE
122+
kubevirt-hyperconverged-operator.v{HCOVersion} {VirtProductName} {HCOVersion} kubevirt-hyperconverged-operator.v{HCOVersionPrev} Succeeded
123+
----
124+
125+
. Check that the `HyperConverged` custom resource (CR) has the correct version. Run the following command and verify the output:
126+
+
127+
[source,terminal,subs="attributes+"]
128+
----
129+
$ oc get hco -n {CNVNamespace} kubevirt-hyperconverged -o json | jq .status.versions
130+
----
131+
+
132+
*Example output*
133+
+
134+
[source,terminal,subs="attributes+"]
135+
----
136+
{
137+
"name": "operator",
138+
"version": "{HCOVersion}"
139+
}
140+
----
141+
142+
. Verify the `HyperConverged` CR conditions. Run the following command and check the output:
143+
+
144+
[source,terminal,subs="attributes+"]
145+
----
146+
$ oc get hco kubevirt-hyperconverged -n {CNVNamespace} -o json | jq -r '.status.conditions[] | {type,status}'
147+
----
148+
+
149+
*Example output*
150+
+
151+
[source,terminal]
152+
----
153+
{
154+
"type": "ReconcileComplete",
155+
"status": "True"
156+
}
157+
{
158+
"type": "Available",
159+
"status": "True"
160+
}
161+
{
162+
"type": "Progressing",
163+
"status": "False"
164+
}
165+
{
166+
"type": "Degraded",
167+
"status": "False"
168+
}
169+
{
170+
"type": "Upgradeable",
171+
"status": "True"
172+
}
96173
----

0 commit comments

Comments
 (0)