Skip to content

Commit 57b9888

Browse files
serngawyalam0rt
authored andcommitted
Fix upgrade check for version gate Ack
Signed-off-by: melserngawy <[email protected]>
1 parent d316f2a commit 57b9888

File tree

2 files changed

+3
-27
lines changed

2 files changed

+3
-27
lines changed

controlplane/rosa/api/v1beta2/rosacontrolplane_types.go

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const (
3838
Private RosaEndpointAccessType = "Private"
3939
)
4040

41-
// VersionGateAckType specifies the version gate acknowledgment.
41+
// VersionGateAckType specifies the version gate acknowledgement.
4242
type VersionGateAckType string
4343

4444
const (
@@ -52,20 +52,6 @@ const (
5252
AlwaysAcknowledge VersionGateAckType = "AlwaysAcknowledge"
5353
)
5454

55-
// ChannelGroupType specifies the OpenShift version channel group.
56-
type ChannelGroupType string
57-
58-
const (
59-
// Stable channel group is the default channel group for stable releases.
60-
Stable ChannelGroupType = "stable"
61-
62-
// Candidate channel group is for testing candidate builds.
63-
Candidate ChannelGroupType = "candidate"
64-
65-
// Nightly channel group is for testing nigtly builds.
66-
Nightly ChannelGroupType = "nightly"
67-
)
68-
6955
// RosaControlPlaneSpec defines the desired state of ROSAControlPlane.
7056
type RosaControlPlaneSpec struct { //nolint: maligned
7157
// Cluster name must be valid DNS-1035 label, so it must consist of lower case alphanumeric
@@ -105,12 +91,6 @@ type RosaControlPlaneSpec struct { //nolint: maligned
10591
// OpenShift semantic version, for example "4.14.5".
10692
Version string `json:"version"`
10793

108-
// OpenShift version channel group, default is stable.
109-
//
110-
// +kubebuilder:validation:Enum=stable;candidate;nightly
111-
// +kubebuilder:default=stable
112-
ChannelGroup ChannelGroupType `json:"channelGroup"`
113-
11494
// VersionGate requires acknowledgment when upgrading ROSA-HCP y-stream versions (e.g., from 4.15 to 4.16).
11595
// Default is WaitForAcknowledge.
11696
// WaitForAcknowledge: If acknowledgment is required, the upgrade will not proceed until VersionGate is set to Acknowledge or AlwaysAcknowledge.
@@ -749,10 +729,6 @@ type RosaControlPlaneStatus struct {
749729
// OIDCEndpointURL is the endpoint url for the managed OIDC provider.
750730
OIDCEndpointURL string `json:"oidcEndpointURL,omitempty"`
751731

752-
// OpenShift semantic version, for example "4.14.5".
753-
// +optional
754-
Version string `json:"version"`
755-
756732
// Available upgrades for the ROSA hosted control plane.
757733
AvailableUpgrades []string `json:"availableUpgrades,omitempty"`
758734
}

pkg/rosa/versions.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func CheckExistingScheduledUpgrade(client OCMClient, cluster *cmv1.Cluster) (*cm
2727
}
2828

2929
// ScheduleControlPlaneUpgrade schedules a new control plane upgrade to the specified version at the specified time.
30-
func ScheduleControlPlaneUpgrade(client OCMClient, cluster *cmv1.Cluster, version string, nextRun time.Time, ack bool) (*cmv1.ControlPlaneUpgradePolicy, error) {
30+
func ScheduleControlPlaneUpgrade(client *ocm.Client, cluster *cmv1.Cluster, version string, nextRun time.Time, ack bool) (*cmv1.ControlPlaneUpgradePolicy, error) {
3131
// earliestNextRun is set to at least 5 min from now by the OCM API.
3232
// Set our next run request to something slightly longer than 5min to make sure we account for the latency between when we send this
3333
// request and when the server processes it.
@@ -53,7 +53,7 @@ func ScheduleControlPlaneUpgrade(client OCMClient, cluster *cmv1.Cluster, versio
5353
}
5454

5555
if !ack && len(versionGates) > 0 {
56-
errMess := "version gate acknowledgment required"
56+
errMess := "version gate acknowledgement required"
5757
for id := range versionGates {
5858
errMess = fmt.Sprintf(errMess+"\nid:%s\n %s\n %s\n %s\n", versionGates[id].ID(), versionGates[id].Description(), versionGates[id].DocumentationURL(), versionGates[id].WarningMessage())
5959
}

0 commit comments

Comments
 (0)