Skip to content

feat(api): validate storage configuration at admission (PR-16) - #118

Merged
amuraru merged 3 commits into
masterfrom
feat/storage-admission-validation
Nov 20, 2026
Merged

amuraru merged 3 commits into
masterfrom
feat/storage-admission-validation

Conversation

@amuraru

@amuraru amuraru commented Nov 18, 2026 •

Copy link
Copy Markdown

Change log description

  • Validate storage choices while preserving legacy casing, omission and unchanged invalid configurations.
  • Default nested reclaim policy to Retain; retain controller fallbacks.
  • Fix metadata integration startup readiness without increasing its timeout.

Purpose of the change

PR-16 of #103. PVC retention migration remains deferred.

What the code does

Adds update-aware CEL, generated CRDs and admission/upgrade/rollback tests. The metadata fixture waits for serving readiness before opening sessions.

How to verify it

Passed locally:

  • make controller-gen generate; git diff --exit-code (generated drift); make check
  • make test; make test-envtest; go vet ./...
  • go test -tags=zkintegration ./pkg/zk -run '^TestMetadataCreate' -count=10 -timeout=4m -v
  • go test -race -tags=zkintegration ./pkg/zk -run '^TestMetadataCreate' -count=3 -timeout=4m
  • Kubernetes 1.34.3 kind admission, upgrade and rollback validation.

Hosted checks are tracked separately; e2e label enabled.

@amuraru amuraru added the e2e label Nov 18, 2026
@amuraru

amuraru commented Nov 18, 2026

Copy link
Copy Markdown
Author

Hosted validation completed for commit 49e4190c0835869f31862f44c1346b9b6fc3b1a4:

The duplicate initial e2e run was cancelled before executing any test steps: https://github.com/adobe/zookeeper-operator/actions/runs/44362507949 . Its cancelled placeholder check remains visible, and GitHub currently reports mergeStateStatus: UNSTABLE; the completed replacement e2e run succeeded. No workflow changes or merges were made.

@amuraru

amuraru commented Nov 18, 2026

Copy link
Copy Markdown
Author

Metadata integration follow-up for f15c000: the first attempt failed during disposable ZooKeeper startup, before metadata assertions. The server logged ZooKeeperServer not running and a NullPointerException in removeCnxn (zkDb was null); the container was still running and not OOM-killed. The readiness fixture timed out waiting for a session.

The exact CI integration command passed locally. A targeted rerun of the failed metadata job also passed; CI run https://github.com/adobe/zookeeper-operator/actions/runs/44371831763 is now successful. No code, workflow, timeout or validation-gate changes were made. The shared fixture startup race remains outside PR-16; the independent e2e check continues to be watched.

amuraru and others added 3 commits November 18, 2026 21:08
Implement PR-16 from #103 with explicit update-aware CEL storage validation, compatible case folding and the nested Retain default. Preserve all controller fallbacks and legacy-invalid unrelated updates; cover real API-server upgrade and rollback.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Document the CEL policy as a readable multiline breakdown while keeping its executable marker unchanged. Remove the legacy-specific sentence from generated CRD descriptions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Avoid the ZooKeeper startup race exposed by CI by polling the bounded srvr response before opening a client session. Preserve the shared 20-second readiness deadline and cover transient responses and stalled probes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@amuraru
amuraru force-pushed the feat/storage-admission-validation branch from 0daaf86 to 566270b Compare November 18, 2026 20:09
@amuraru
amuraru merged commit 5b370c0 into master Nov 20, 2026
13 checks passed
@amuraru
amuraru deleted the feat/storage-admission-validation branch November 20, 2026 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant