Skip to content
Merged
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
4 changes: 3 additions & 1 deletion bootstrap/util/configowner.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,9 @@ func getConfigOwner(ctx context.Context, c client.Client, obj metav1.Object, get
for _, gk := range allowedGKs {
if refGVK.Group == gk.Group && refGVK.Kind == gk.Kind {
return getFn(ctx, c, &corev1.ObjectReference{
APIVersion: ref.APIVersion,
// Intentionally always using the latest apiVersion to get Machine or MachinePool,
// even if the apiVersion in the ownerRef has not been bumped yet.
APIVersion: clusterv1.GroupVersion.String(),
Kind: ref.Kind,
Name: ref.Name,
Namespace: obj.GetNamespace(),
Expand Down