Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,11 @@ spec:
status:
description: RosaMachinePoolStatus defines the observed state of RosaMachinePool.
properties:
availableUpgrades:
description: Available upgrades for the ROSA MachinePool.
items:
type: string
type: array
conditions:
description: Conditions defines current service state of the managed
machine pool
Expand Down
11 changes: 10 additions & 1 deletion docs/book/src/topics/rosa/upgrades.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,21 @@

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.

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.

##### Note:
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.

The available upgrades versions for the `ROSAControlPlane` will be listed under `ROSAControlPlane.status.availableUpgrades`

The Upgrade state can be checked in the conditions under `ROSAControlPlane.status`.

## MachinePool Upgrade

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.

The available upgrades versions for the `ROSAMachinePool` will be listed under `ROSAMachinePool.status.availableUpgrades`

The Upgrade state can be checked in the conditions under `ROSAMachinePool.status`.

The version of the MachinePool can't be greater than Control Plane version.
The version of the ROSAMachinePool can't be greater than its ROSAControlPlane version.
3 changes: 3 additions & 0 deletions exp/api/v1beta2/rosamachinepool_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,9 @@ type RosaMachinePoolStatus struct {

// ID is the ID given by ROSA.
ID string `json:"id,omitempty"`

// Available upgrades for the ROSA MachinePool.
AvailableUpgrades []string `json:"availableUpgrades,omitempty"`
}

// +kubebuilder:object:root=true
Expand Down
5 changes: 5 additions & 0 deletions exp/api/v1beta2/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions exp/controllers/rosamachinepool_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ func (r *ROSAMachinePoolReconciler) reconcileDelete(
func (r *ROSAMachinePoolReconciler) reconcileMachinePoolVersion(machinePoolScope *scope.RosaMachinePoolScope, ocmClient *ocm.Client, nodePool *cmv1.NodePool) error {
version := machinePoolScope.RosaMachinePool.Spec.Version
if version == "" || version == rosa.RawVersionID(nodePool.Version()) {
machinePoolScope.RosaMachinePool.Status.AvailableUpgrades = nodePool.Version().AvailableUpgrades()
conditions.MarkFalse(machinePoolScope.RosaMachinePool, expinfrav1.RosaMachinePoolUpgradingCondition, "upgraded", clusterv1.ConditionSeverityInfo, "")
return nil
}
Expand Down
Loading