← Back to Pull requests

OPNET-811: operator: source BGP VIP peers from the BGPVIPConfig CR #6686

Closed
unknown closed this pull request without merging on Nov 04, 2026 08:50 UTC
View on GitHub
unknown unknown commented on Oct 27, 2026 11:01 UTC
Author

Stacked on #6685 (the first commit; this PR is the second commit).

What

Under BGP-based VIP management the operator read the per-peer configuration from the Dev Preview bgp-vip-config ConfigMap. The Tech Preview surface is the BGPVIPConfig CRD (openshift/api#2972; in the payload since openshift/api#3127; the installer emits the cluster CR since openshift/installer#11026). This switches the operator to the CR and drops the ConfigMap path — there are no deployments on it.

  • Day 2: a dynamic informer on bgpvipconfigs (openshift/client-go has no typed clients for it) feeds syncBGPVIPPeersJSON, which serializes the CR into ControllerConfigSpec.BGPVIPPeersJSON exactly as the installer's ConfigMap producer did (only BFD/MultiHop written, as "true"; bare-seconds timers) — the peers file on the nodes is byte-identical across the switch, templates and baremetal-runtimecfg are untouched. The informer exists only when the BGPBasedVIPManagement gate is on (the CRD arrives with the gate); a cache miss before its first list falls back to a direct GET. A missing CR degrades and keeps the last good ControllerConfig, as the missing ConfigMap did.

  • passwordSecret references are resolved from openshift-config: type kubernetes.io/basic-auth, non-empty password key ≤ 80 bytes (TCP MD5 limit); failures fail the render and never surface the Secret contents.

  • Bootstrap: the same conversion runs on the installer manifests — the CR from --bgp-vip-config-file (default /assets/manifests/cluster-bgp-vip-02-config.yml), Secrets found by namespace/name among the YAML manifests in the same directory (no file-name coupling).

  • Status: Rendered condition via SSA (field manager machine-config-operator), with the condition's observedGeneration (the API has no status-level one). Rendered=True only after the ControllerConfig carrying the rendered peers was applied; render/apply failures report Rendered=False/RenderFailed.

  • NodeDisruptionPolicy: the peers file is non-disruptive by default, so day-2 peer edits roll out without reboots (after the bootstrap-to-CRD handover the file only matters at early boot).
  • Testing

  • Unit: CR → transport serialization (golden dual-stack payload captured from a live cluster; enums/timers/port/password/communities/overrides; omitted-stays-omitted), resolver errors, password Secret validation, the sync table (present / missing CR, apply failure → Rendered=False, password resolved, missing Secret degrades), bootstrap file path incl. Secret lookup by name among decoys, NodeDisruptionPolicy default + user override, resourcemerge day-2 merge. go test ./pkg/operator/ ./pkg/apihelpers/ ./lib/resourcemerge/ ./pkg/controller/template/... green; vendored golangci-lint clean.

  • End to end: MCO has no bgp-vip presubmit; the day-0 CR path is exercised by /testwith openshift/installer/main/e2e-metal-ipi-bgp-vip including this PR (the lane's bgp-vip-verify asserts the sessions/VIPs that only exist if the peers file was rendered from the CR).
  • Design validated live in August on a dual-stack cluster (byte-identical peers file vs the ConfigMap path, day-2 edit applied in ~45 s with zero disruption); this is that work adapted to the API as merged.

    This PR description was generated using AI. Please verify before acting on it.

    <!-- This is an auto-generated comment: release notes by coderabbit.ai -->
    <!-- coderabbit-ai-generated:v1 -->

    Summary by CodeRabbit

    New Features
    BGP-based VIP configuration can be provided through a BGP VIP manifest, with peer passwords resolved from referenced Secrets in the same configuration directory.
    The operator reports whether BGP VIP configuration rendered successfully and whether it was applied.
    Bug Fixes
    Changes to FRR peer configuration no longer trigger a node reboot by default.
    Invalid or missing required BGP VIP configuration and invalid or missing password Secrets are reported as errors.
    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 508 lines (+381 / -127) across 6 files Reviewer: mkowalski Review duration: 11388m
    All Vouch review confidence checks passed
    Residual risk 0.28 = Change Risk (0.71) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.71 · 508 lines diff across 6 files
    0.71
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.373
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.071
    Real PR Conversation Timeline
    1 comments
    "Review active on #6686"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 70.8% (HIGH) · Higher = larger blast radius
    70.8%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 28.0% · Safe to merge
    28.0%