Skip to content

Commit

Permalink
Always pick first served version of CRD while building gvk for machine
Browse files Browse the repository at this point in the history
Signed-off-by: Furkat Gofurov <[email protected]>
  • Loading branch information
furkatgofurov7 committed Aug 10, 2023
1 parent 4421b8d commit 4db8bf6
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions test/e2e/clusterctl_upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -396,9 +396,16 @@ func ClusterctlUpgradeSpec(ctx context.Context, inputGetter func() ClusterctlUpg

// Build GroupVersionKind for Machine resources
machineListGVK := schema.GroupVersionKind{
Group: machineCRD.Spec.Group,
Version: machineCRD.Spec.Versions[0].Name,
Kind: machineCRD.Spec.Names.ListKind,
Group: machineCRD.Spec.Group,
Kind: machineCRD.Spec.Names.ListKind,
}

// Pick the first served version
for _, gvk := range machineCRD.Spec.Versions {
if gvk.Served {
machineListGVK.Version = gvk.Name
break
}
}

By("Waiting for the machines to exist")
Expand Down

0 comments on commit 4db8bf6

Please sign in to comment.