Skip to content

admission: validate spec.hibernatePolicy#4

Merged
CMGS merged 1 commit into
mainfrom
feat/validate-hibernate-policy
Jul 24, 2026
Merged

admission: validate spec.hibernatePolicy#4
CMGS merged 1 commit into
mainfrom
feat/validate-hibernate-policy

Conversation

@CMGS

@CMGS CMGS commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

What

  • CocoonSet validator: reject unknown spec.hibernatePolicy values via HibernatePolicy.IsValid, same message shape as the snapshotPolicy check — every other spec enum already gets this defense-in-depth next to the CRD enum validation.
  • Pins cocoon-common to the feat: add spec.hibernatePolicy, Waking phase, hibernated-on-node annotation cocoon-common#7 merge commit (4363e4f). The newer commonhttpx drops the unused cert/key params from HTTPSServerSpec; main.go adapted (it passed "", "" before — behavior unchanged).

Tests

New rejects bad hibernate policy case in the validator table; go test ./... green, dual-GOOS lint clean.

@CMGS
CMGS force-pushed the feat/validate-hibernate-policy branch 2 times, most recently from 3806a7a to e3d8650 Compare July 24, 2026 15:01
Every other spec enum gets an IsValid check in the CocoonSet validator;
hibernatePolicy was missing when cocoon-common introduced it. Rejects
unknown values with the same message shape as snapshotPolicy.

cocoon-common is pinned to the spec.hibernatePolicy merge commit; the
newer commonhttpx drops the unused cert/key params from HTTPSServerSpec,
adapted in main.
@CMGS
CMGS force-pushed the feat/validate-hibernate-policy branch from e3d8650 to 1632c72 Compare July 24, 2026 15:22
@CMGS
CMGS merged commit a281f3e into main Jul 24, 2026
2 checks passed
@CMGS
CMGS deleted the feat/validate-hibernate-policy branch July 24, 2026 15:23
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