Skip to content

Document adoption, teardown and CRD upgrades for operators - #14

Open
Timofei Larkin (lllamnyp) wants to merge 2 commits into
feat/addressname-admission-policyfrom
docs/operating
Open

Timofei Larkin (lllamnyp) wants to merge 2 commits into
feat/addressname-admission-policyfrom
docs/operating

Conversation

@lllamnyp

Copy link
Copy Markdown
Member

Adds docs/operating.md, linked from the README, covering operator procedures that a review of cozystack/cozystack#3382 found undocumented. Stacked on #13.

  • Adopting an address a Service already holds. Create a claim, create the IPAddress pre-bound to it, then name the claim on the Service; the driver's pin equals the existing one. It notes the class and family check that Auto-claim addresses for LoadBalancer Services that name no claim #7 applies to pre-bindings, and that removing the hand-written pin later needs an allowlisted principal under the driver's admission policy.
  • Removing the controllers. The teardown order: claim annotations, claims, leftover addresses, classes, then the driver and the core. This avoids the finalizer hangs the review described: a namespace holding claims that cannot be deleted while a controller is down. It also gives the commands to clear finalizers when the controllers are already gone, with the API group spelled out, because ipaddresses alone resolves to networking.k8s.io.
  • Upgrading the CRDs. The API is v1alpha1 with no conversion, so a removed or renamed field invalidates stored objects. A table records each release's schema changes. Unreleased so far: IPAddressClass.spec.releaseDelay (Return Released addresses to the pool after a class's releaseDelay #11) and the core-set Bound condition on IPAddress.

Docs only.

docs/operating.md covers bringing an address a Service already holds
under the ledger, the order in which to remove claims, addresses,
classes and controllers so finalizers do not hang, and the schema
changes each release makes to the v1alpha1 CRDs.

Assisted-By: LLM
Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
Assisted-By: LLM
Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
@coderabbitai

coderabbitai Bot commented Nov 6, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2b5d8a85-3307-4cf4-9b9c-796f80827922

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@IvanHunters IvanHunters left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review: document adoption, teardown and CRD upgrades

Most of the document checks out against the code: the API group and kinds, the IPAddress example fields and the fromClass source, the pre-binding acceptance rule and PreBindingRefused event, the finalizer names, the teardown order, and the v1alpha1-without-conversion CRD-upgrade notes are all accurate.

[MEDIUM] The pin-protection claim describes a policy that is not shipped here

docs/operating.md:34-35: "The hand-written pin stays on the Service. Under the driver's admission policy, removing it later takes an allowlisted principal." That policy is real but it is the metallb-iad admission policy from cozystack/metallb-iad#6, which is not merged, is opt-in, and is off by default. As written the sentence reads as a standing guarantee; on a cluster without that optional policy enabled, removing a hand-written pin is ungated and the only backstop is the driver's after-the-fact Conflict detection. Please qualify it: the protection applies only where the optional metallb-iad admission policy is enabled.

[MINOR] The adoption step order invites a race

The guide creates the IPAddressClaim first (step 1) and the pre-bound IPAddress second (step 2). If the claim reconciles before the admin creates the pre-bound address, the driver allocates a different address for the pending claim, and the admin's hand-written IPAddress is then refused with PreBindingRefused while the ledger holds an address other than the one pinned on the Service. Creating the pre-bound IPAddress first (or together) avoids it.

Note

Worth adding a teardown caveat: under reclaim Retain, a class accumulates Released/Available addresses that the class-deletion finalizer (#10) holds on, and releaseDelay (#11) returns addresses to Available rather than deleting them, so deleting a used class requires deleting its addresses first. Documenting this keeps a held class deletion from looking stuck.

Request changes for the pin-protection statement; the rest are notes.

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