OSAC-2077: CaaS template writes VIPs to ClusterOrder status - #321
OSAC-2077: CaaS template writes VIPs to ClusterOrder status#321ori-amizur wants to merge 1 commit into
Conversation
The external_access service role now writes the discovered API and ingress VIPs as annotations on the ClusterOrder CR after the network-class-specific provisioning completes. The ClusterOrder controller copies these annotations into the status fields (apiEndpoint, ingressEndpoint) during reconciliation. The feedback controller then syncs them to the fulfillment-service Cluster object, enabling the ExternalIPAttachment flow. Uses the established annotation-to-status pattern since the kubernetes.core Ansible modules don't support the status subresource. Assisted-by: Claude Code <noreply@anthropic.com> Signed-off-by: Ori Amizur <oamizur@redhat.com>
|
@ori-amizur: This pull request references OSAC-2077 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "5.0.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ori-amizur 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 |
|
Warning Review limit reached
Next review available in: 76 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository: osac-project/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
🤖 Finished Review · ✅ Success · Started 3:56 PM UTC · Completed 4:14 PM UTC Commit: |
ReviewFindingsMedium
Low
Labels: PR adds new VIP endpoint reconciliation feature spanning osac-aap and osac-operator components |
| }) | ||
| }) | ||
|
|
||
| Context("VIP endpoint reconciliation", func() { |
There was a problem hiding this comment.
[low] test coverage gap
Tests cover both-annotations-present and nil-annotations cases but not partial annotations (one annotation set, the other absent). The implementation handles each independently and is correct, but a partial-annotation test would guard against future refactoring that accidentally couples the checks.
| // into the ClusterOrder status fields consumed by the feedback controller. | ||
| func reconcileVIPEndpoints(instance *v1alpha1.ClusterOrder) { | ||
| annotations := instance.GetAnnotations() | ||
| if annotations == nil { |
There was a problem hiding this comment.
[low] input validation
reconcileVIPEndpoints copies annotation values directly to status fields without IP format validation. Values flow to the ExternalIPAttachment controller resolveClusterEndpoint. Risk is mitigated by ClusterOrders living in the operator-managed osac-orders namespace, but net.ParseIP validation would provide defense-in-depth against non-IP strings propagating through the ExternalIPAttachment flow.
Suggested fix: Add net.ParseIP validation before assigning annotation values to status fields; log a warning and skip when the value is not a valid IP.
The external_access service role now writes the discovered API and ingress VIPs as annotations on the ClusterOrder CR after the network-class-specific provisioning completes.
The ClusterOrder controller copies these annotations into the status fields (apiEndpoint, ingressEndpoint) during reconciliation. The feedback controller then syncs them to the fulfillment-service Cluster object, enabling the ExternalIPAttachment flow.
Uses the established annotation-to-status pattern since the kubernetes.core Ansible modules don't support the status subresource.
Assisted-by: Claude Code noreply@anthropic.com