metal-stack/go-ipam

Missing `AcquireSpecificIP` implementation in `IpamServiceClient`

Closed this issue · 4 comments

Hi, first off, awesome project, you all have done a really nice job!!

Quick question, are there plans to implement AcquireSpecificIP in the grpc IpamServiceClient Interface?

Looks like it accepts the /32 specific requested address in a prefix to lease but doesnt use it. apiv1.AcquireIPRequest{...}

Here we pass in a specific /32 but get returned the next ip in the pool.

	res, err := ct.ipam.AcquireIP(ctx, connect.NewRequest(&apiv1.AcquireIPRequest{
		PrefixCidr: ipamPrefix,
		Ip:         &nodeAddress,
	}))

Happy to hack, just wondering if this was a todo or specifically left out of the IpamServiceClient implementation. Thanks again for the neat project! 🥇

If the ip in the AcquireIPRequest is not nil it is considered as specific IP. But you are right, the implementation in ipam-service.go does not take this into consideration.

If you have time i would happily review a PR.

Thanks for reporting

Ran into something similar with CIDRs. Would appreciate a review @majst01 :)
#98

This can be closed right ?