Skip to content

Commit 1ab8377

Browse files
committed
Add availableUpgrades for ROSAMachinePool and update doc
Signed-off-by: serngawy <[email protected]>
1 parent 12ee398 commit 1ab8377

File tree

5 files changed

+24
-1
lines changed

5 files changed

+24
-1
lines changed

config/crd/bases/infrastructure.cluster.x-k8s.io_rosamachinepools.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,11 @@ spec:
226226
status:
227227
description: RosaMachinePoolStatus defines the observed state of RosaMachinePool.
228228
properties:
229+
availableUpgrades:
230+
description: Available upgrades for the ROSA MachinePool.
231+
items:
232+
type: string
233+
type: array
229234
conditions:
230235
description: Conditions defines current service state of the managed
231236
machine pool

docs/book/src/topics/rosa/upgrades.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,21 @@
44

55
Upgrading the OpenShift version of the control plane is supported by the provider. To perform an upgrade you need to update the `version` in the spec of the `ROSAControlPlane`. Once the version has changed the provider will handle the upgrade for you.
66

7+
Upgrading y-stream version ex; v4.16.x to v4.17.x required the version gate acknowledgement. By default the versionGate is set to WaitForAcknowledge in the `ROSAControlPlane` CR. When upgrading to y-stream version the versionGate should be set to Acknowledge or AlwaysAcknowledge.
8+
9+
##### Note:
10+
When the versionGate is set to 'Acknowledge', it will revert to 'WaitForAcknowledge' once the upgrade is successfully completed. However, if the versionGate is set to 'AlwaysAcknowledge', it will remain set to 'AlwaysAcknowledge' after the upgrade is successfully completed.
11+
12+
The available upgrades versions for the `ROSAControlPlane` will be listed under `ROSAControlPlane.status.availableUpgrades`
13+
714
The Upgrade state can be checked in the conditions under `ROSAControlPlane.status`.
815

916
## MachinePool Upgrade
1017

1118
Upgrading the OpenShift version of the MachinePools is supported by the provider and can be performed independetly from the Control Plane upgrades. To perform an upgrade you need to update the `version` in the spec of the `ROSAMachinePool`. Once the version has changed the provider will handle the upgrade for you.
1219

20+
The available upgrades versions for the `ROSAMachinePool` will be listed under `ROSAMachinePool.status.availableUpgrades`
21+
1322
The Upgrade state can be checked in the conditions under `ROSAMachinePool.status`.
1423

15-
The version of the MachinePool can't be greater than Control Plane version.
24+
The version of the ROSAMachinePool can't be greater than its ROSAControlPlane version.

exp/api/v1beta2/rosamachinepool_types.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,9 @@ type RosaMachinePoolStatus struct {
215215

216216
// ID is the ID given by ROSA.
217217
ID string `json:"id,omitempty"`
218+
219+
// Available upgrades for the ROSA MachinePool.
220+
AvailableUpgrades []string `json:"availableUpgrades,omitempty"`
218221
}
219222

220223
// +kubebuilder:object:root=true

exp/api/v1beta2/zz_generated.deepcopy.go

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

exp/controllers/rosamachinepool_controller.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,7 @@ func (r *ROSAMachinePoolReconciler) reconcileDelete(
323323
func (r *ROSAMachinePoolReconciler) reconcileMachinePoolVersion(machinePoolScope *scope.RosaMachinePoolScope, ocmClient *ocm.Client, nodePool *cmv1.NodePool) error {
324324
version := machinePoolScope.RosaMachinePool.Spec.Version
325325
if version == "" || version == rosa.RawVersionID(nodePool.Version()) {
326+
machinePoolScope.RosaMachinePool.Status.AvailableUpgrades = nodePool.Version().AvailableUpgrades()
326327
conditions.MarkFalse(machinePoolScope.RosaMachinePool, expinfrav1.RosaMachinePoolUpgradingCondition, "upgraded", clusterv1.ConditionSeverityInfo, "")
327328
return nil
328329
}

0 commit comments

Comments
 (0)