Implement Direct Controller for NetworkServices LBRouteExtension#6957
Conversation
- Refactor LBRouteExtensionAdapter to defer reference resolution and proto mapping to Create/Update phase, ensuring safe deletion when dependencies are gone. - Add nil pointer safety checks for ForwardingRuleRefs to prevent controller panics. - Update the Update() method to always refresh status (externalRef and observedState), enabling correct behavior for resource acquisition. - Remove redundant updateMask normalization in mock service, as the direct controller now handles deterministic field sorting.
maqiuyujoyce
left a comment
There was a problem hiding this comment.
/lgtm
The comments are not blockers and feel free to address the important ones in v1beta1 promotion.
|
I would rather address all nits and comments now, so we get to beta in a better state (Also, I would for sure forget to implement your nits 😄 ) |
|
I have created a task to address recent feedback on this PR. |
codebot-robot
left a comment
There was a problem hiding this comment.
Thanks @katrielt for addressing the feedback and adding the project equivalency check! The recent commits look good and fully resolve the nits and comments. I have verified the changes.
(This comment was generated by Overseer)
- Move project ID extraction to common utility with unit tests. - Relocate GCP label handling to AdapterForObject for consistency. - Strengthen project ID validation for resource references. - Store desiredProto in the adapter to streamline reconciliation logic.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: maqiuyujoyce The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
90723ea
Change description
Implemented the direct controller, identity logic, and fixture tests for the NetworkServicesLBRouteExtension resource.
Addresses #6513
WHY do we need this change?
To support NetworkServicesLBRouteExtension using the modern "direct" controller approach, replacing the need for Terraform-based reconciliation for this resource.
Special notes for your reviewer:
loops.
Tests you have done
make ready-prto ensure this PR is ready for review.