Repository navigation
feat(api)!: report loadBalancerClass in IPAddressClass status, not spec - #19
Merged
Timofei Larkin (lllamnyp) merged 2 commits intoNov 27, 2026
Merged
Conversation
The loadBalancerClass a Service consuming a claim must carry belongs to the provisioner's deployment: the driver is configured with the --lb-class of the implementation it fronts. Restating it on every class let a class name a value no driver serves, and its claims then stayed pending with nothing reporting why. This follows decision 0003 of the ip-address-claims design proposal (cozystack/community#35). - API: IPAddressClass.spec.loadBalancerClass and its immutability rule are removed. The class gains a status subresource, written by the provisioner and never by the core: status.loadBalancerClass, and an Accepted condition. The value is valid only while Accepted is True for the class's current generation, since an empty value otherwise cannot be told from an unreported one. AcceptedLoadBalancerClass() applies that rule for consumers. - Auto-claim claims nothing from a class its provisioner has not accepted, and matches the Service's loadBalancerClass against the reported value. A Service that names an unaccepted class gets a ClassNotAccepted warning event. - Docs: design.md §2, §7 (a seventh driver obligation, reporting the class) and §10, the README, and the operating guide's schema table. - The envtest CRD suite now checks that a write to the class does not reset the provisioner's status. The CRD no longer defines spec.loadBalancerClass, so the apiserver drops it from classes that set it. Assisted-By: LLM Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
Cozystack vendors chart/address-controller/ from the tagged commit, so Chart.yaml's version and appVersion, and the Makefile's CHART_VERSION, must match the v0.3.0 tag. The operating guide's schema table moves its unreleased row to v0.3.0. Assisted-By: LLM Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
myasnikovdaniil
approved these changes
Nov 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes
IPAddressClass.spec.loadBalancerClass, added in #18, and has the provisioner report the value in the class's status instead, as decision 0003 of the ip-address-claims design proposal (cozystack/community#35) specifies. Releases as v0.3.0.Why
The
loadBalancerClassa consuming Service must carry is a property of the driver's deployment: the driver is configured with the--lb-classof the implementation it fronts. With the field on the class, an admin restated it on every class. A class naming a value no driver serves left its claims pending, and nothing could report why. #18 added the field so that cozystack/cozystack#4324 had a value to read; 0003's driver-reported status was the specified contract and had not been implemented.Changes
spec.loadBalancerClassand its CEL immutability rule are removed.IPAddressClassgains a status subresource written by the provisioner, never by the core:status.loadBalancerClass, empty for the cluster's default implementation;Acceptedcondition. The value is valid only whileAcceptedisTruefor the class's current generation; before that an empty value is unreported, not the default.IPAddressClass.AcceptedLoadBalancerClass()applies the rule for consumers, which must wait for it because a Service'sloadBalancerClasscannot change after creation.loadBalancerClassis matched against the reported value, unset matching empty. A Service that names an unaccepted class gets aClassNotAcceptedwarning event; for the marked auto-claim class this is silent, as a mismatch already is.docs/design.md§2, §7 (a seventh driver obligation: report the class) and §10, the README, and the operating guide's schema table.version/appVersionand the Makefile'sCHART_VERSIONset to 0.3.0.Upgrade
spec.loadBalancerClass, so the apiserver drops it from classes that set it. The CRDs must be reapplied (make install-crds), since Helm never upgradescrds/.Accepted, auto-claim claims nothing from it. metallb-iad reports it from v0.3.0 (feat!: report loadBalancerClass in class status; one driver per cluster metallb-iad#13).mainpins it; feat(api): add EndpointAttachment to attach addresses to app endpoints cozystack#4324 does and moves to v0.3.0.Tests
internal/controller: auto-claim waits for a class with no status,Accepted=False, orAcceptedfor an older generation, with and without the class named by the Service, recordingClassNotAcceptedonly when named. The match cases (both unset, equal, either side only, different) now take the class's value from status.test/crd(envtest): a class's status survives an update of the class itself, as the core's finalizer handling needs.make testandmake lintpass.