Repository navigation
docs(api): Define Accepted on NetworkService and NetworkEgressPolicy - #1006
Conversation
The NetworkService and NetworkEgressPolicy type and field docs said an admission webhook verifies that the requester owns the referenced VPC before the object is accepted, and that the OwnershipVerified and OwnershipDenied reasons come from it. No such webhook exists and nothing sets those reasons. On a NetworkService the controller sets Accepted to True once a gateway node is registered in the namespace, and the platform API that serves tenants checks VPC ownership before it writes the service. Nothing sets any condition on a NetworkEgressPolicy. A client reading the CRD descriptions would take Accepted as proof of ownership, which it is not. Describe the actual contract on both kinds and their vpcRef fields, mark the two reason constants as reserved, point NetworkEgressPolicy's conditions at the reason constant instead of rule_types.go, which no longer exists, and drop the gateway architecture note that called these comments stale. The constants stay, since the tenant-facing API may still set them. The CRD descriptions and API reference are regenerated with the pinned controller-gen. Related to #708 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
55c6d74 to
ac620ba
Compare
|
Review summary for head ac620ba. First pass at 0b1b68e: pr-adversary returned merge, with one nit on wording and one decision about not regenerating the files itself, which the user resolved as proceed. pr-conventions-reviewer returned merge, with a warning on the title naming, two nits, and a merge-order note about #845 and #1005. A fix commit applied all four findings. Second pass at 55c6d74: pr-rereviewer returned merge and confirmed all four findings fixed. pr-conventions-reviewer returned merge, with commit-shape warnings. The user then chose to squash, so the branch is one signed commit, ac620ba, with a tree identical to 55c6d74. CI on ac620ba is green: every check passes. E2E Tests passed on rerun attempt 2 of run 39811273268. Attempt 1 was cancelled at the 25-minute job timeout because the eBPF build-dependency apt install stalled for 24 minutes, so the tests never ran. CI on 55c6d74 failed Unit Tests (root) once, when TestActivateTrafficPolicyKeepsTheToken hit an eBPF map update ENOMEM. The same tree passed on ac620ba, and the cause is unexplained. Auto-merge is enabled with the merge method, the only one the ruleset allows. The ruleset requires one approving review and a code owner review, and a push dismisses stale approvals, so the PR waits for a human approval. |
Summary
The NetworkService and NetworkEgressPolicy API docs claimed an admission webhook checks VPC ownership, so a client would read the accepted condition as proof of ownership.
No such webhook exists. On a NetworkService, the accepted condition means a gateway node is registered, and nothing sets conditions on a NetworkEgressPolicy.
The docs now say that and mark the two ownership reasons reserved, changing comments and generated descriptions only.
Test plan
Related to #708
🤖 Generated with Claude Code