Skip to content

Commit 43d0696

Browse files
committed
availableupdates: Unify capitalization when comparing architectures
Otherwise, the following condition in cincinnati.go in MultiArch clusters: ``` if desiredArch == string(configv1.ClusterVersionArchitectureMulti) && currentArch != desiredArch { return current, []configv1.Release{current}, nil, nil } ``` gets evaluated to: ``` if "Multi" == string(configv1.ClusterVersionArchitectureMulti) && "multi" != "Multi" { return current, []configv1.Release{current}, nil, nil } ``` This will cause MultiArch clusters with a set non-empty `ClusterVersion.Spec.DesiredUpdate.Architecture` field to indefinitely have available updates set to `[]configv1.Release{current}` because the `"multi" != "Multi"` logic will always match.
1 parent 9609745 commit 43d0696

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pkg/cvo/availableupdates.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func (optr *Operator) syncAvailableUpdates(ctx context.Context, config *configv1
5252
currentArch := runtime.GOARCH
5353

5454
if optr.release.Architecture == configv1.ClusterVersionArchitectureMulti {
55-
currentArch = "multi"
55+
currentArch = string(configv1.ClusterVersionArchitectureMulti)
5656
}
5757

5858
if desiredArch == "" {

0 commit comments

Comments
 (0)