Skip to content

Commit bb5b9d0

Browse files
committed
OSDOCS#14808: HCP updates additions and updates
1 parent f1733e5 commit bb5b9d0

File tree

3 files changed

+159
-35
lines changed

3 files changed

+159
-35
lines changed

hosted_control_planes/hcp-updating.adoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,18 @@ include::modules/hcp-updating-requirements.adoc[leveloffset=+1]
2121
2222
include::modules/hcp-get-ocp-channel.adoc[leveloffset=+1]
2323

24+
[role="_additional-resources"]
25+
.Additional resources
26+
27+
* xref:../../updating/updating_a_cluster/updating-cluster-cli.adoc#update-upgrading-oc-adm-upgrade-status_updating-cluster-cli[Gathering cluster update status using oc adm upgrade status (Technology Preview)]
28+
2429
include::modules/hcp-get-upgrade-versions.adoc[leveloffset=+1]
2530

2631
// Updates for the hosted cluster
2732
include::modules/hcp-updates-hosted-cluster.adoc[leveloffset=+1]
2833

34+
include::modules/hcp-update-service.adoc[leveloffset=+1]
35+
2936
// Updates for node pools
3037
include::modules/hcp-updates-node-pools.adoc[leveloffset=+1]
3138

modules/hcp-get-ocp-channel.adoc

Lines changed: 101 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,46 +2,27 @@
22
//
33
// * hosted_control_planes/hcp-updating.adoc
44

5-
:_mod-docs-content-type: CONCEPT
5+
:_mod-docs-content-type: PROCEDURE
66
[id="hcp-get-ocp-channel_{context}"]
77
= Setting channels in a hosted cluster
88

9-
You can see available updates in the `HostedCluster.Status` field of the `HostedCluster` custom resource (CR).
9+
You can set channel in your `HostedCluster` custom resource (CR) by directly modifying the `HostedCluster` CR or using the `oc patch` command to update the `spec.channel` field.
1010

11-
The available updates are not fetched from the Cluster Version Operator (CVO) of a hosted cluster. The list of the available updates can be different from the available updates from the following fields of the `HostedCluster` custom resource (CR):
11+
The available updates are not fetched from the Cluster Version Operator (CVO) of a hosted cluster. The initial `HostedCluster` CR does not have any information in the `status.version.availableUpdates` and `status.version.conditionalUpdates` fields. After you set the `spec.channel` field to the stable {product-title} release version, the HyperShift Operator reconciles the `HostedCluster` CR and updates the `status.version` field with the available and conditional updates.
1212

13-
* `status.version.availableUpdates`
14-
* `status.version.conditionalUpdates`
15-
16-
The initial `HostedCluster` CR does not have any information in the `status.version.availableUpdates` and `status.version.conditionalUpdates` fields. After you set the `spec.channel` field to the stable {product-title} release version, the HyperShift Operator reconciles the `HostedCluster` CR and updates the `status.version` field with the available and conditional updates.
17-
18-
See the following example of the `HostedCluster` CR that contains the channel configuration:
19-
20-
[source,yaml]
21-
----
22-
spec:
23-
autoscaling: {}
24-
channel: stable-4.y <1>
25-
clusterID: d6d42268-7dff-4d37-92cf-691bd2d42f41
26-
configuration: {}
27-
controllerAvailabilityPolicy: SingleReplica
28-
dns:
29-
baseDomain: dev11.red-chesterfield.com
30-
privateZoneID: Z0180092I0DQRKL55LN0
31-
publicZoneID: Z00206462VG6ZP0H2QLWK
32-
----
33-
<1> Replace `<4.y>` with the {product-title} release version you specified in `spec.release`. For example, if you set the `spec.release` to `ocp-release:4.16.4-multi`, you must set `spec.channel` to `stable-4.16`.
34-
35-
After you configure the channel in the `HostedCluster` CR, to view the output of the `status.version.availableUpdates` and `status.version.conditionalUpdates` fields, run the following command:
13+
.Procedure
3614

15+
. Check recommended updates and provided details on each version to choose a version from recommendations based on your requirements. Run the following command:
16+
+
3717
[source,terminal]
3818
----
39-
$ oc get -n <hosted_cluster_namespace> hostedcluster <hosted_cluster_name> -o yaml
19+
$ oc get -n <hosted_cluster_namespace> hostedcluster <hosted_cluster_name> -o jsonpath='{.status.version.availableUpdates}'
4020
----
41-
21+
+
4222
.Example output
4323
[source,yaml]
4424
----
25+
# ...
4526
version:
4627
availableUpdates:
4728
- channels:
@@ -50,7 +31,7 @@ version:
5031
- eus-4.16
5132
- fast-4.16
5233
- stable-4.16
53-
image: quay.io/openshift-release-dev/ocp-release@sha256:b7517d13514c6308ae16c5fd8108133754eb922cd37403ed27c846c129e67a9a
34+
image: quay.io/openshift-release-dev/ocp-release@sha256:xxxxx
5435
url: https://access.redhat.com/errata/RHBA-2024:6401
5536
version: 4.16.11
5637
- channels:
@@ -59,7 +40,7 @@ version:
5940
- eus-4.16
6041
- fast-4.16
6142
- stable-4.16
62-
image: quay.io/openshift-release-dev/ocp-release@sha256:d08e7c8374142c239a07d7b27d1170eae2b0d9f00ccf074c3f13228a1761c162
43+
image: quay.io/openshift-release-dev/ocp-release@sha256:xxxxx
6344
url: https://access.redhat.com/errata/RHSA-2024:6004
6445
version: 4.16.10
6546
- channels:
@@ -68,7 +49,7 @@ version:
6849
- eus-4.16
6950
- fast-4.16
7051
- stable-4.16
71-
image: quay.io/openshift-release-dev/ocp-release@sha256:6a80ac72a60635a313ae511f0959cc267a21a89c7654f1c15ee16657aafa41a0
52+
image: quay.io/openshift-release-dev/ocp-release@sha256:xxxxx
7253
url: https://access.redhat.com/errata/RHBA-2024:5757
7354
version: 4.16.9
7455
- channels:
@@ -77,7 +58,7 @@ version:
7758
- eus-4.16
7859
- fast-4.16
7960
- stable-4.16
80-
image: quay.io/openshift-release-dev/ocp-release@sha256:ea624ae7d91d3f15094e9e15037244679678bdc89e5a29834b2ddb7e1d9b57e6
61+
image: quay.io/openshift-release-dev/ocp-release@sha256:xxxxx
8162
url: https://access.redhat.com/errata/RHSA-2024:5422
8263
version: 4.16.8
8364
- channels:
@@ -86,7 +67,7 @@ version:
8667
- eus-4.16
8768
- fast-4.16
8869
- stable-4.16
89-
image: quay.io/openshift-release-dev/ocp-release@sha256:e4102eb226130117a0775a83769fe8edb029f0a17b6cbca98a682e3f1225d6b7
70+
image: quay.io/openshift-release-dev/ocp-release@sha256:xxxxx
9071
url: https://access.redhat.com/errata/RHSA-2024:4965
9172
version: 4.16.6
9273
- channels:
@@ -95,7 +76,7 @@ version:
9576
- eus-4.16
9677
- fast-4.16
9778
- stable-4.16
98-
image: quay.io/openshift-release-dev/ocp-release@sha256:f828eda3eaac179e9463ec7b1ed6baeba2cd5bd3f1dd56655796c86260db819b
79+
image: quay.io/openshift-release-dev/ocp-release@sha256:xxxxx
9980
url: https://access.redhat.com/errata/RHBA-2024:4855
10081
version: 4.16.5
10182
conditionalUpdates:
@@ -115,7 +96,7 @@ version:
11596
- eus-4.16
11697
- fast-4.16
11798
- stable-4.16
118-
image: quay.io/openshift-release-dev/ocp-release@sha256:fb321a3f50596b43704dbbed2e51fdefd7a7fd488ee99655d03784d0cd02283f
99+
image: quay.io/openshift-release-dev/ocp-release@sha256:xxxxx
119100
url: https://access.redhat.com/errata/RHSA-2024:5107
120101
version: 4.16.7
121102
risks:
@@ -132,4 +113,89 @@ version:
132113
dated 20240826 or newer before updating OCP.
133114
name: SRIOVFailedToConfigureVF
134115
url: https://issues.redhat.com/browse/NHE-1171
116+
# ...
117+
----
118+
119+
. Update the `spec.release` field of the `HostedCluster` to trigger the control plane rollout by running the following command:
120+
+
121+
[source,terminal]
122+
----
123+
$ oc patch -n <hosted_cluster_namespace> hostedcluster <hosted_cluster_name> --type=merge -p '{"spec":{"release":{"image":"quay.io/openshift-release-dev/ocp-release@sha256:<release_payload>"}}}' <1>
124+
----
125+
<1> Replace `<release_payload>` with the {product-title} release payload that you want to use.
126+
127+
. Set your desired channel in your hosted cluster by using one of the following ways:
128+
129+
.. Modify the `HostedCluster` CR by running the following command:
130+
+
131+
[source,terminal]
132+
----
133+
$ oc edit -n <hosted_cluster_namespace> hostedcluster <hosted_cluster_name> -o yaml
134+
----
135+
+
136+
.Example `HostedCluster` configuration
137+
[source,yaml]
138+
----
139+
# ...
140+
spec:
141+
autoscaling: {}
142+
channel: stable-<4.y> # <1>
143+
clusterID: <cluster_id>
144+
configuration: {}
145+
controllerAvailabilityPolicy: SingleReplica
146+
dns:
147+
baseDomain: <base_domain>
148+
privateZoneID: <private_zone_id>
149+
publicZoneID: <public_zone_id>
150+
# ...
151+
----
152+
<1> Replace `<4.y>` with the {product-title} release version you specified in `spec.release`. For example, if you set the `spec.release` to `ocp-release:4.18.4-multi`, you must set `spec.channel` to `stable-4.18`.
153+
154+
.. Update the `HostedCluster` CR by running the following `oc patch` command:
155+
+
156+
[source,terminal]
157+
----
158+
$ oc patch -n <hosted_cluster_namespace> hostedcluster <hosted_cluster_name> --type=merge -p '{"spec":{"channel":"stable-<4.y>"}}' <1>
159+
----
160+
<1> Replace `<4.y>` with the {product-title} release version you specified in `spec.release`. For example, if you set the `spec.release` to `ocp-release:4.18.4-multi`, you must set `spec.channel` to `stable-4.18`.
161+
162+
. Monitor the progress of your ongoing update:
163+
164+
.. Monitor the status of the update rollout in the `HostedCluster` resource. You can check the progression of the update, timestamps and issues by running the following command:
165+
+
166+
[source,terminal]
167+
----
168+
$ oc get hostedcluster <hosted_cluster_name> -o jsonpath='{.status.version.history}'
169+
----
170+
171+
.. Optional: To retrieve more detailed information about the status of your update, run the following command:
172+
+
173+
[source,terminal]
174+
----
175+
$ oc adm upgrade status
176+
----
177+
+
178+
For more information about how to use the `oc adm upgrade status` command, see "Gathering cluster update status using oc adm upgrade status (Technology Preview)".
179+
180+
.. If the rollout encounters problems, review the following conditions:
181+
182+
* `ClusterVersionSucceeding`: Indicates if the cluster is successfully updating.
183+
* `ClusterVersionProgressing`: Indicates if the update is actively progressing.
184+
* `ClusterVersionAvailable`: Confirms the availability of the updated version.
185+
+
186+
Run the following command to check the status of conditions:
187+
+
188+
[source,terminal]
189+
----
190+
$ oc get hostedcluster <hosted_cluster_name> -o jsonpath='{.status.conditions}'
191+
----
192+
193+
194+
.Verification
195+
196+
* Verify that the` history` field in the `HostedCluster` resource indicates a status as `Completed`. Run the following command:
197+
+
198+
[source,terminal]
199+
----
200+
$ oc get hostedcluster <hosted_cluster_name> -o jsonpath='{.status.version.history}'
135201
----

modules/hcp-update-service.adoc

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * hosted_control_planes/hcp-updating.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="hcp-update-service_{context}"]
7+
= Setting the updateService field in HostedCluster
8+
9+
You can configure the update service by using a specific update service URL in the `updateService` field of the `HostedCluster` custom resource (CR). By default, the hosted cluster uses the OpenShift Update Service (OSUS) based on its region and configuration.
10+
11+
Consider the following environments where you can use the update service:
12+
13+
* Private or disconnected: To update your cluster in an environment without access to the public OSUS.
14+
* Regional: To direct the update service to a specific regional server for compliance or performance optimization.
15+
* Custom: For environments that host their own OSUS and need updates to be sourced internally rather than from the default Red{nbsp}Hat services.
16+
17+
.Procedure
18+
19+
* To set a custom update service, add the update service URL to the `updateService` field in the `HostedCluster` CR. Run the following command:
20+
+
21+
[source,terminal]
22+
----
23+
$ oc patch hostedcluster <hosted_cluster_name> --type=merge -p '{"spec":{"updateService":<update_server_url>"}}' <1>
24+
----
25+
<1> Replace `<update_service_url>` with the URL of the of the desired update service, for example, `https://custom-update-service.example.com/api/upgrades_info/v1/graph`.
26+
27+
28+
[TIP]
29+
====
30+
If you face issues, consider the following troubleshooting factors:
31+
32+
* Connection issues: If the cluster is unable to reach the specified update service, confirm that the service URL is accessible from the cluster network.
33+
* Update service compatibility: Ensure that an update information provided by the specified update service is compatible with the {product-title} versions used by the hosted cluster.
34+
* Fallback behaviour: If the update service is incorrectly configured or unreachable, update recommendations might not be available. Verify the configuration and network connectivity as necessary.
35+
====
36+
37+
38+
.Verification
39+
40+
* Verify that the update service URL is successfully set in the `updateService` field by running the following command:
41+
+
42+
[source,terminal]
43+
----
44+
$ oc get hostedcluster <hosted_cluster_name> -o jsonpath='{.spec.updateService}'
45+
----
46+
+
47+
.Example output
48+
[source,terminal]
49+
----
50+
https://custom-update-service.example.com/api/upgrades_info/v1/graph
51+
----

0 commit comments

Comments
 (0)