Skip to content

feat(api): move VPC/VPCAttachment status to condition-based model - #3

Merged
privateip merged 2 commits into
mainfrom
feat/vpc-status-conditions
Jul 30, 2026
Merged

feat(api): move VPC/VPCAttachment status to condition-based model#3
privateip merged 2 commits into
mainfrom
feat/vpc-status-conditions

Conversation

@privateip

Copy link
Copy Markdown
Collaborator

Summary

  • Replace Ready bool / Identifier string status fields on VPC and VPCAttachment with the standard ObservedGeneration + Conditions []metav1.Condition pattern.
  • Add VPCFinalizer and mark VPCSpec immutable after creation (self == oldSelf CEL rule).
  • Expand VPCAttachmentStatus with the fields needed to reconcile a single attachment: node, containerID, hostInterface, vrfInterface, guestInterface, podSubnet.
  • Regenerate deepcopy, CRD manifests, and API docs via task generate.

Test plan

  • task build
  • task test:unit
  • task lint
  • Review generated CRD YAML diffs match the type changes

Replace the Ready/Identifier bool+string status fields with standard
ObservedGeneration + Conditions, add VPCFinalizer, mark VPCSpec
immutable after creation, and expand VPCAttachmentStatus with the
fields the datapath controller needs to reconcile a single attachment
(node, containerID, host/vrf/guest interface names, podSubnet).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@privateip
privateip requested a review from a team as a code owner July 19, 2026 20:34
@privateip
privateip requested a review from JoseSzycho July 19, 2026 20:34
ecv
ecv previously approved these changes Jul 19, 2026
This branch added an XValidation rule making VPCSpec immutable after
creation (self == oldSelf), but the vpc-networks-update e2e step still
patched an existing VPC's spec.networks and asserted the patch
succeeded -- which now fails with "spec is immutable", the cause of
the failing E2E Tests check on this PR.

Replace the step with reject-vpc-spec-update, asserting the patch is
rejected, matching the reject-* pattern used for the other schema
constraints in this test.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@privateip
privateip marked this pull request as draft July 19, 2026 21:26
@privateip
privateip marked this pull request as ready for review July 30, 2026 11:55
@privateip
privateip requested review from 0xmc, ecv, scotwells and slindseysr and removed request for JoseSzycho July 30, 2026 11:55
@privateip
privateip merged commit b54fa20 into main Jul 30, 2026
5 checks passed
@privateip
privateip deleted the feat/vpc-status-conditions branch July 30, 2026 13:36
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.

3 participants