Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get IPAddress if resource already has IP assigned #86

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

tramachandran-equinix
Copy link

Description:
Ipam-api service should have generic logic to return the IP address from the nodeID. Existing ipamclient GetIPAddresses API fetches loadbalancer resources from the nodeID provided. Added ability to check if a resource already has an IP address assigned before allocating a new one from IPAM Service.

This PR includes,

  • Update ipaddress GraphQL schema with ipAddressByNode query API
  • Implement the IPAddressByNode which queries NodeID and fetch the first instance
  • IpamClient API implementation for GetIPAddressByNode
  • Define the supported ipamclient type for newly added API
  • Unit test coverage for IPAddressByNode Graph API
  • Unit test coverage for new ipamclient API
  • Locally verified to fetch the IP Address from the NodeID

Copy link

github-actions bot commented Jun 26, 2024

GraphQL Schema Check

Compared 0 schema changes against null operations

✅ Found no changes

🔗 View full schema check details

Description:
Ipam-api service should have generic logic to return the IP address from the nodeID.
Existing ipamclient GetIPAddresses API fetches loadbalancer resources from the nodeID provided.
Added ability to check if a resource already has an IP address assigned before allocating a new one from IPAM Service.

This PR includes,
- Update ipaddress GraphQL schema with ipAddressByNode query API
- Implement the IPAddressByNode which queries NodeID and fetch the first instance
- IpamClient API implementation for GetIPAddressByNode
- Define the supported ipamclient type for newly added API
- Unit test coverage for IPAddressByNode Graph API
- Unit test coverage for new ipamclient API
- Locally verified to fetch the IP Address from the NodeID

Signed-off-by: Tamilselvan R <[email protected]>
Signed-off-by: Tamilselvan R <[email protected]>
@nicolerenee
Copy link
Member

We already have this logic through the super graph effectively. So I'm not sure why this would be needed. On any object that is ip addressable we add the ipAddresses field to which provides the same functionality without a dedicated call basically.

@tramachandran-equinix
Copy link
Author

tramachandran-equinix commented Jun 26, 2024

We already have this logic through the super graph effectively. So I'm not sure why this would be needed. On any object that is ip addressable we add the ipAddresses field to which provides the same functionality without a dedicated call basically.

There are two points to consider here,

@ssrikanth-equinix fyi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants