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

📖 book: add ipam contract #10108

Merged
merged 1 commit into from
Nov 26, 2024

Conversation

schrej
Copy link
Member

@schrej schrej commented Feb 6, 2024

What this PR does / why we need it:
Adds the IPAM contract to the book.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):

/area ipam
/area documentation

@k8s-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. area/ipam Issues or PRs related to ipam area/documentation Issues or PRs related to documentation cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Feb 6, 2024
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Feb 6, 2024
@schrej schrej force-pushed the book/ipam-contract branch from 04ef806 to 3900311 Compare February 6, 2024 18:22
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 6, 2024
@sbueringer
Copy link
Member

@schrej Still interested in this one?

@schrej
Copy link
Member Author

schrej commented May 7, 2024

Yes, just forgot about it... I think I put it on hold due to some uncertainty with regards to clusterctl move. And now I also need to update regarding spec.clusterName instead of the annotation.

@schrej
Copy link
Member Author

schrej commented May 7, 2024

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 7, 2024
@enxebre
Copy link
Member

enxebre commented May 31, 2024

@schrej is this still wip? lgtm as good starting point

@sbueringer
Copy link
Member

@schrej friendly reminder 😀

@schrej schrej force-pushed the book/ipam-contract branch from 3900311 to f1d5f69 Compare July 31, 2024 14:35
@schrej schrej marked this pull request as ready for review July 31, 2024 14:35
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 31, 2024
@k8s-ci-robot k8s-ci-robot requested a review from richardcase July 31, 2024 14:35
@schrej
Copy link
Member Author

schrej commented Jul 31, 2024

I think this should be ready now. I've updated it to include the new spec.clusterName field and noted that the cluster name label is deprecated.

Sorry that it took so long.

@schrej schrej force-pushed the book/ipam-contract branch from f1d5f69 to ddf8026 Compare July 31, 2024 15:44
@sbueringer
Copy link
Member

@lubronzhan Do you maybe have some time to take a first look? (in case you're familiar with what we did in CAPV at the time)

Copy link
Contributor

@lubronzhan lubronzhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late reply. Overall LGTM!

Copy link
Member

@sbueringer sbueringer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx! Just a few small findings.

docs/book/src/developer/providers/ipam.md Outdated Show resolved Hide resolved
docs/book/src/developer/providers/ipam.md Outdated Show resolved Hide resolved
docs/book/src/developer/providers/ipam.md Outdated Show resolved Hide resolved
docs/book/src/developer/providers/ipam.md Outdated Show resolved Hide resolved
docs/book/src/developer/providers/ipam.md Outdated Show resolved Hide resolved
docs/book/src/developer/providers/ipam.md Outdated Show resolved Hide resolved

1. Create an IPAddressClaim
1. The `spec.poolRef` must reference the pool you want to use
2. It should have an owner reference to the infrastructure Machine it is created for (required to support `clusterctl move`)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about controller / blockOwnerDeletion here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. We're currently investigating an issue when deleting metal3 based clusters where claims are deadlocked due to the cluster vanishing before they are cleaned up. The paused check prevents the claim from being released if the cluster can't be found. We'll either have to make sure that the cluster doesn't get deleted, or ignore the paused check when releasing addresses.

Copy link
Member Author

@schrej schrej Sep 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I propose to merge this as is, and we'll update it if we change how this works in the in-cluster ipam implementation.
I've added a note to the ipam issue: kubernetes-sigs/cluster-api-ipam-provider-in-cluster#289

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's a good idea to set both and I've added a bullet point that recommends it. I've also added a sentence to deletion indicating that the infra Machine deletion should block until the claim is gone, which is the case with the correct owner ref.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 19, 2024
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 20, 2024
@fabriziopandini
Copy link
Member

Nice!
Happy to lgtm/approve once findings are addressed

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 20, 2024
@k8s-ci-robot k8s-ci-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Sep 20, 2024
@schrej schrej force-pushed the book/ipam-contract branch from a3fcd3d to 8f1147b Compare November 18, 2024 14:24
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 18, 2024
@schrej schrej force-pushed the book/ipam-contract branch from 8f1147b to a06e6b1 Compare November 18, 2024 14:30
@schrej schrej force-pushed the book/ipam-contract branch from a06e6b1 to 074ede5 Compare November 18, 2024 14:43
@schrej schrej requested a review from sbueringer November 20, 2024 14:09
@fabriziopandini
Copy link
Member

Thanks for documenting this contract, good documentation is the foundation of CAPI extensibility!
/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 26, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 0d317cd80dc02c2a55e5f6cc1ff25b80820ebd11

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fabriziopandini

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 26, 2024
@k8s-ci-robot k8s-ci-robot merged commit 9fc8de6 into kubernetes-sigs:main Nov 26, 2024
16 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.9 milestone Nov 26, 2024
@schrej schrej deleted the book/ipam-contract branch November 26, 2024 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/documentation Issues or PRs related to documentation area/ipam Issues or PRs related to ipam cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants