Repository navigation
hosted: admit the full uint32 serial range through the apiserver (format int64) - #20
Merged
Merged
Conversation
…mat int64)
controller-gen emits format int32 for uint32 fields, and the apiserver's
format-aware bound check rejects a maximum of 4294967295 against int32
("Maximum boundary value must be of type integer with format int32"),
so every HostedZone create failed live (SnapshotRejected). Override the
schema format on spec.serial and status.servers[].serial and pin the
range with a real-apiserver envtest.
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.
Live defect (platform on-prem PoC, dns-api 0.4.1): every
HostedZonecreate was rejected withMaximum boundary value must be of type integer with format int32 in spec.serial→ ZoneProgrammed=False/SnapshotRejected. controller-gen emitsformat: int32foruint32, and the apiserver's format-aware bound check refusesmaximum: 4294967295. The in-process schema validator used by the existing test does not apply that check.+kubebuilder:validation:Format=int64onspec.serialandstatus.servers[].serial(Go type unchanged).TestHostedZoneSerialRangeAdmittedByAPIServer(envtest, real apiserver) creates/updates serials 1, 2^31, 2^32−1 — red on the old CRD with the exact live message, green now.Full
go test ./...(envtest) +go vetPASS.