Skip to content

hosted: admit the full uint32 serial range through the apiserver (format int64) - #20

Merged
reoring merged 1 commit into
mainfrom
work/20261021/hostedzone-serial-int64
Oct 21, 2026
Merged

reoring merged 1 commit into
mainfrom
work/20261021/hostedzone-serial-int64

Conversation

@reoring

@reoring reoring commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Live defect (platform on-prem PoC, dns-api 0.4.1): every HostedZone create was rejected with Maximum boundary value must be of type integer with format int32 in spec.serial → Zone Programmed=False/SnapshotRejected. controller-gen emits format: int32 for uint32, and the apiserver's format-aware bound check refuses maximum: 4294967295. The in-process schema validator used by the existing test does not apply that check.

  • +kubebuilder:validation:Format=int64 on spec.serial and status.servers[].serial (Go type unchanged).
  • New 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 vet PASS.

…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.
@reoring
reoring merged commit e03bd68 into main Oct 21, 2026
2 checks passed
@reoring
reoring deleted the work/20261021/hostedzone-serial-int64 branch October 21, 2026 06:00
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.

1 participant