Repository navigation
Define unresolved PVC admission behavior - #645
Hrishikesh Kashyap (Hrishikeshkashyap) wants to merge 4 commits into
Conversation
9674f6a to
22f8517
Compare
|
The External E2E failure appears capacity-related: the test Pod remained Pending because the single Kind node reported insufficient free storage. The regular amd64/arm64 E2E and CSI sanity checks passed. Could someone with repository permissions rerun the failed job? |
There was a problem hiding this comment.
🟡 Changes recommended
Stale PVC cache misses can incorrectly reject Pods whose claims already exist.
1 open finding
What changed in this PR
Defines unresolved-claim admission behavior while preserving placement constraints from resolved volumes.
Changes:
- Denies Pods referencing missing ordinary PVCs.
- Corrects generic-ephemeral claim naming and continues processing unresolved claims.
- Adds regression tests and documents the behavior.
| File | Description |
|---|---|
| internal/webhook/hyperconverged/handler.go | Updates claim resolution and admission handling. |
| internal/webhook/hyperconverged/handler_unit_test.go | Tests missing, ephemeral, and unbound claims. |
| internal/webhook/hyperconverged/handler_test.go | Tests missing-claim denial in both volume orders. |
| docs/design/webhooks.md | Documents unresolved-claim behavior. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
22f8517 to
7acc4ea
Compare
7acc4ea to
498689c
Compare
ea2f4e6 to
e506468
Compare
3be2d79 to
1646c6e
Compare
Hari (hasethuraman2)
left a comment
There was a problem hiding this comment.
Looks good to me. It is good to fail the admission when the pod has a PVC that is not resolvable at the time of pod creation.
jmclong (jmclong)
left a comment
There was a problem hiding this comment.
Verified the rebase includes #643 and reviewed the missing-claim handling, PVC API-reader fallback, and error handling. Focused webhook unit tests pass; CI checks are green. The previously requested changes are addressed.
Reject Pods that reference missing ordinary PVCs so placement is recalculated on a later CREATE. Preserve generic ephemeral and unbound WFFC claims while continuing to enforce resolved durability volumes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Verify ordinary missing claims, generated ephemeral claim naming, and unbound claims preserve resolved durability placement. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Document admission behavior for ordinary, generated ephemeral, and initially unbound claims. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Preserve Pod-before-PVC behavior while enforcing placement from resolved claims. Confirm PVC cache misses with the API reader and surface lookup failures. Update regression tests and correct the unresolved-claim documentation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
5061a66
1646c6e to
5061a66
Compare


A missing PVC previously caused the webhook to allow the entire Pod early,
discarding placement constraints from other resolved volumes.
Changes
processing other volumes.
as missing.
<pod-name>-<volume-name>.and unbound claims.
Tests
Focused Linux webhook unit tests, manager cross-build, go vet, spelling,
and whitespace checks passed. Regression coverage includes both volume orders,
Pod-before-PVC, cache-miss/API-hit, API failures, and cached-claim reads.
Integration tests were not run locally because envtest binaries are unavailable.
Limitation
Creating a missing PVC later does not rerun Pod admission, so the webhook
cannot retroactively add that claim's placement constraints to an existing Pod.