Skip to content

Commit 0904e6d

Browse files
committed
Use IPAMRef api and kind
1 parent 9a80a1f commit 0904e6d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/controller/ironcoremetalmachine_controller.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ func (r *IroncoreMetalMachineReconciler) createMetaData(ctx context.Context, log
335335
return nil, errors.New("ipamRef of an ipamConfig is not set")
336336
}
337337
log.V(3).Info("creating IP address claim", "name", ipAddrKey.String())
338-
apiGroup := capiv1beta1.GroupVersion.Group
338+
apiGroup := networkRef.IPAMRef.APIGroup
339339
ipClaim = &capiv1beta1.IPAddressClaim{
340340
ObjectMeta: metav1.ObjectMeta{
341341
Name: ipAddrKey.Name,
@@ -344,7 +344,7 @@ func (r *IroncoreMetalMachineReconciler) createMetaData(ctx context.Context, log
344344
Spec: capiv1beta1.IPAddressClaimSpec{
345345
PoolRef: corev1.TypedLocalObjectReference{
346346
APIGroup: &apiGroup,
347-
Kind: "GlobalInClusterIPPool",
347+
Kind: networkRef.IPAMRef.Kind,
348348
Name: networkRef.IPAMRef.Name,
349349
},
350350
},

0 commit comments

Comments
 (0)