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

Amend existing IPAM contract to include a summary condition on IPAddressClaim CRs #8424

Closed
srm09 opened this issue Mar 30, 2023 · 14 comments
Closed
Assignees
Labels
area/ipam Issues or PRs related to ipam kind/feature Categorizes issue or PR as related to a new feature. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@srm09
Copy link
Contributor

srm09 commented Mar 30, 2023

What would you like to be added (User Story)?

As a consumer for the IPAddressClaim CRs, the infrastructure providers would want to query the state of the CR and make some programmatic decisions based on the current state. This issue proposes that we establish a contract for the IPAM providers to expose a summary condition on the IPAddressClaim CRs which can then be consumed by the owner infra machines.

Detailed Description

To outline how the infrastructure providers consume the CRs, here is an example:

  1. An infra provider creates a IPAddressClaim objects for each address required by the infra machine object.
  2. The infra provider waits for all the IPAddressClaim objects to be realized by the IPAM provider. Realizing an IPAddressClaim means that a concrete IPAddress has been assigned to the claim.
  3. Once, all the IP address claims have been realized, the infra provider moves ahead with the machine provisioning logic.

There might be some lag between creating the IPAddressClaim objects and them being realized by the IPAM provider. For cases, when the IP pool has been exhausted, the claims would not be realized until an existing IP address (tied to another IPAddressClaim object) is removed or the user changes the pool definition to include a larger set of IP addresses.

These scenarios make it necessary for the IPAM providers to expose the current state of the IPAddressClaim objects. This state would then be used by the infra provider machine to expose a meaningful condition showcasing the current state of affairs for the infra machine object.

Anything else you would like to add?

A request is to be able to backport these contract changes to the v1.4.0 release as well, since the IPAM API types are experimental and the IPAM providers are being actively enhanced for ease of use.

Label(s) to be applied

/kind feature
/area networking

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Mar 30, 2023
@srm09
Copy link
Contributor Author

srm09 commented Mar 30, 2023

/retitle Amend existing IPAM contract to include a summary condition on IPAddressClaim CRs

@k8s-ci-robot k8s-ci-robot changed the title Updating the contract for the IPAM providers Amend existing IPAM contract to include a summary condition on IPAddressClaim CRs Mar 30, 2023
@killianmuldoon
Copy link
Contributor

Question - is there a current definition of the "Contract" for the IPAddressClaim CRs? If not is this more of a new contract idea?

@srm09
Copy link
Contributor Author

srm09 commented Mar 30, 2023

There is no contract definition documented in CAPI for the IPAM CRs. The idea is to create an initial draft based on the merged IPAM proposal and then add on a thing or two about making the summary condition mandatory on these CRs, which is not a huge departure from the original proposal itself.

@fabriziopandini
Copy link
Member

/triage accepted
+1 to document the contract.

WRT to the proposed change, this will not require changes in CAPI, so the only blocker to make it happen is getting an agreement between folks managing the first implementations of this provider
cc @schrej

(please loop in other folks working in this area)

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Mar 31, 2023
@schrej
Copy link
Member

schrej commented Mar 31, 2023

We've discussed that a bit already. My proposal would be to to merely standardise the name of that condition (Ready would be the most idiomatic one) and that it only needs to be set as false during error cases.
Setting the Ready condition to true should be optional imo, since that status is also reflected by the IPAddress resource existing, and the reference in the status being set.

We should also define specific reasons for an invalid status, like PoolExhausted or AllocationFailed.

While we're at it, we could also think about standardised conditions of IP pools to have a similar UX with different providers.

@tylerschultz
Copy link

IPAddressClaim should also consider making Status.AddressRef optional so that Status Conditions can be set when an IPAddress allocation fails.

@sbueringer
Copy link
Member

So we're basically talking about introducing new constants to the IPAM api package + a contract describing how they are used?

I'm in favor of opening a PR to get consensus and then cherry picking. It seems reasonable to me to add new constants to an alpha package and it feels unreasonable to me to block a contact for an alpha feature until we bump our "CAPI global" contract to v1beta2.

@schrej
Copy link
Member

schrej commented May 22, 2023

/area ipam

@k8s-ci-robot k8s-ci-robot added the area/ipam Issues or PRs related to ipam label May 22, 2023
@fabriziopandini
Copy link
Member

/priority important-longterm

@k8s-ci-robot k8s-ci-robot added the priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. label Apr 11, 2024
@fabriziopandini
Copy link
Member

@schrej is this something still useful? what are the next steps?

@fabriziopandini fabriziopandini removed the triage/accepted Indicates an issue or PR is ready to be actively worked on. label May 8, 2024
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

CAPI contributors will take a look as soon as possible, apply one of the triage/* labels and provide further guidance.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label May 8, 2024
@schrej
Copy link
Member

schrej commented May 22, 2024

I think it's still useful. I agree with Stefan that we should just get consensus using a PR, I'll open one.

@fabriziopandini fabriziopandini added the triage/accepted Indicates an issue or PR is ready to be actively worked on. label Jun 5, 2024
@k8s-ci-robot k8s-ci-robot removed the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Jun 5, 2024
@schrej
Copy link
Member

schrej commented Jun 13, 2024

/close
since the last thing we've kept this open for is now merged 🎉

@k8s-ci-robot
Copy link
Contributor

@schrej: Closing this issue.

In response to this:

/close
since the last thing we've kept this open for is now merged 🎉

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ipam Issues or PRs related to ipam kind/feature Categorizes issue or PR as related to a new feature. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

7 participants