Skip to content

OPNET-780: Add BGPBasedVIPManagement feature gate and BGP VIP management fields#2923

Open
mkowalski wants to merge 2 commits into
openshift:masterfrom
mkowalski:opnet-595-bgp-vip-api
Open

OPNET-780: Add BGPBasedVIPManagement feature gate and BGP VIP management fields#2923
mkowalski wants to merge 2 commits into
openshift:masterfrom
mkowalski:opnet-595-bgp-vip-api

Conversation

@mkowalski

@mkowalski mkowalski commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

What

API surface for BGP-based VIP management on on-premise clusters — enhancement openshift/enhancements#1982 (OPNET-595). Two commits:

  1. config/v1: BGPBasedVIPManagement feature gate (DevPreviewNoUpgrade) and BareMetalPlatformStatus.VIPManagement — reports which mechanism (Keepalived/BGP) manages the API and Ingress VIPs. Set at install time by the installer; consumed by MCO and CNO.
  2. machineconfiguration/v1: ControllerConfigSpec.BGPVIPPeersJSON — internal MCO API carrying the installer-generated BGP peer configuration (the bgp-vip-config ConfigMap payload, validated and compacted by the MCO operator) to the template controller, which renders the frr-k8s static pod peer file on control plane nodes. Bounded (1–65536), optional.

Safety without backing implementation

Deliberately safe to merge stand-alone:

  • Both fields are behind +openshift:enable:FeatureGate=BGPBasedVIPManagement; the gate is enabled only in DevPreviewNoUpgrade (verified across all 8 payload featuregate manifests). The fields are pruned from Default/TechPreview/OKD CRD variants (verified: zero occurrences outside CustomNoUpgrade/DevPreviewNoUpgrade schemas, including the ControllerConfig CRDs that embed Infrastructure).
  • Both fields are +optional/omitempty with no defaults; nothing in-payload sets or reads them until the implementation PRs land.
  • make lint clean, make update idempotent on the branch.

Reviewer note on the large generated diff in commit 1

Enabling a profile-agnostic gate in DevPreviewNoUpgrade changes which feature-set CRD schemas are byte-identical, so the manifest-merge generator regroups files (SelfManagedHA {CustomNoUpgrade,DevPreviewNoUpgrade} pair up; Hypershift TechPreview variants merge across profiles). Verified with a control experiment: make update twice on pristine master produces zero changes — the regrouping is entirely attributable to the new gate, per tools/codegen/pkg/manifestmerge/generator.go grouping logic.

Validation

The consuming implementation exists and was validated end to end on a dev-scripts baremetal cluster (installation over a BGP-advertised API VIP, health-gated ECMP for both VIPs, CRD handover); reference implementation and evidence: https://github.com/mkowalski/bgp-vip-demo. Related PRs in flight: kube-vip/kube-vip#1627, openshift-metal3/dev-scripts#1929.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 9, 2026
@openshift-ci-robot

openshift-ci-robot commented Jul 9, 2026

Copy link
Copy Markdown

@mkowalski: This pull request references OPNET-595 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 epic to target the "5.0.0" version, but no target version was set.

Details

In response to this:

What

API surface for BGP-based VIP management on on-premise clusters — enhancement openshift/enhancements#1982 (OPNET-595). Two commits:

  1. config/v1: BGPBasedVIPManagement feature gate (DevPreviewNoUpgrade) and BareMetalPlatformStatus.VIPManagement — reports which mechanism (Keepalived/BGP) manages the API and Ingress VIPs. Set at install time by the installer; consumed by MCO and CNO.
  2. machineconfiguration/v1: ControllerConfigSpec.BGPVIPPeersJSON — internal MCO API carrying the installer-generated BGP peer configuration (the bgp-vip-config ConfigMap payload, validated and compacted by the MCO operator) to the template controller, which renders the frr-k8s static pod peer file on control plane nodes. Bounded (1–65536), optional.

Safety without backing implementation

Deliberately safe to merge stand-alone:

  • Both fields are behind +openshift:enable:FeatureGate=BGPBasedVIPManagement; the gate is enabled only in DevPreviewNoUpgrade (verified across all 8 payload featuregate manifests). The fields are pruned from Default/TechPreview/OKD CRD variants (verified: zero occurrences outside CustomNoUpgrade/DevPreviewNoUpgrade schemas, including the ControllerConfig CRDs that embed Infrastructure).
  • Both fields are +optional/omitempty with no defaults; nothing in-payload sets or reads them until the implementation PRs land.
  • make lint clean, make update idempotent on the branch.

Reviewer note on the large generated diff in commit 1

Enabling a profile-agnostic gate in DevPreviewNoUpgrade changes which feature-set CRD schemas are byte-identical, so the manifest-merge generator regroups files (SelfManagedHA {CustomNoUpgrade,DevPreviewNoUpgrade} pair up; Hypershift TechPreview variants merge across profiles). Verified with a control experiment: make update twice on pristine master produces zero changes — the regrouping is entirely attributable to the new gate, per tools/codegen/pkg/manifestmerge/generator.go grouping logic.

Validation

The consuming implementation exists and was validated end to end on a dev-scripts baremetal cluster (installation over a BGP-advertised API VIP, health-gated ECMP for both VIPs, CRD handover); reference implementation and evidence: https://github.com/mkowalski/bgp-vip-demo. Related PRs in flight: kube-vip/kube-vip#1627, openshift-metal3/dev-scripts#1929.

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.

@openshift-ci

openshift-ci Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Hello @mkowalski! Some important instructions when contributing to openshift/api:
API design plays an important part in the user experience of OpenShift and as such API PRs are subject to a high level of scrutiny to ensure they follow our best practices. If you haven't already done so, please review the OpenShift API Conventions and ensure that your proposed changes are compliant. Following these conventions will help expedite the api review process for your PR.

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 31a5f352-5778-4a72-955d-daa5f3aaed58

📥 Commits

Reviewing files that changed from the base of the PR and between 661c092 and 00a1277.

⛔ Files ignored due to path filters (19)
  • config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-Hypershift-CustomNoUpgrade.crd.yaml is excluded by !**/zz_generated.crd-manifests/*
  • config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-Hypershift-DevPreviewNoUpgrade.crd.yaml is excluded by !**/zz_generated.crd-manifests/*
  • config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-SelfManagedHA-CustomNoUpgrade.crd.yaml is excluded by !**/zz_generated.crd-manifests/*
  • config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml is excluded by !**/zz_generated.crd-manifests/*
  • config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-TechPreviewNoUpgrade.crd.yaml is excluded by !**/zz_generated.crd-manifests/*
  • config/v1/zz_generated.featuregated-crd-manifests.yaml is excluded by !**/zz_generated*
  • config/v1/zz_generated.featuregated-crd-manifests/infrastructures.config.openshift.io/BGPBasedVIPManagement.yaml is excluded by !**/zz_generated.featuregated-crd-manifests/**
  • config/v1/zz_generated.swagger_doc_generated.go is excluded by !**/zz_generated*
  • machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_controllerconfigs-Hypershift-CustomNoUpgrade.crd.yaml is excluded by !**/zz_generated.crd-manifests/*
  • machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_controllerconfigs-Hypershift-DevPreviewNoUpgrade.crd.yaml is excluded by !**/zz_generated.crd-manifests/*
  • machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_controllerconfigs-Hypershift-TechPreviewNoUpgrade.crd.yaml is excluded by !**/zz_generated.crd-manifests/*
  • machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_controllerconfigs-SelfManagedHA-CustomNoUpgrade.crd.yaml is excluded by !**/zz_generated.crd-manifests/*
  • machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_controllerconfigs-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml is excluded by !**/zz_generated.crd-manifests/*
  • machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_controllerconfigs-TechPreviewNoUpgrade.crd.yaml is excluded by !**/zz_generated.crd-manifests/*
  • machineconfiguration/v1/zz_generated.featuregated-crd-manifests.yaml is excluded by !**/zz_generated*
  • machineconfiguration/v1/zz_generated.featuregated-crd-manifests/controllerconfigs.machineconfiguration.openshift.io/BGPBasedVIPManagement.yaml is excluded by !**/zz_generated.featuregated-crd-manifests/**
  • machineconfiguration/v1/zz_generated.swagger_doc_generated.go is excluded by !**/zz_generated*
  • openapi/generated_openapi/zz_generated.openapi.go is excluded by !openapi/**, !**/zz_generated*
  • openapi/openapi.json is excluded by !openapi/**
📒 Files selected for processing (26)
  • config/v1/tests/infrastructures.config.openshift.io/BGPBasedVIPManagement.yaml
  • config/v1/types_infrastructure.go
  • config/v1/types_infrastructure_test.go
  • features.md
  • features/features.go
  • machineconfiguration/v1/tests/controllerconfigs.machineconfiguration.openshift.io/BGPBasedVIPManagement.yaml
  • machineconfiguration/v1/types.go
  • payload-manifests/crds/0000_10_config-operator_01_infrastructures-Hypershift-CustomNoUpgrade.crd.yaml
  • payload-manifests/crds/0000_10_config-operator_01_infrastructures-Hypershift-DevPreviewNoUpgrade.crd.yaml
  • payload-manifests/crds/0000_10_config-operator_01_infrastructures-Hypershift-TechPreviewNoUpgrade.crd.yaml
  • payload-manifests/crds/0000_10_config-operator_01_infrastructures-SelfManagedHA-CustomNoUpgrade.crd.yaml
  • payload-manifests/crds/0000_10_config-operator_01_infrastructures-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml
  • payload-manifests/crds/0000_10_config-operator_01_infrastructures-TechPreviewNoUpgrade.crd.yaml
  • payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-Hypershift-CustomNoUpgrade.crd.yaml
  • payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-Hypershift-DevPreviewNoUpgrade.crd.yaml
  • payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-SelfManagedHA-CustomNoUpgrade.crd.yaml
  • payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml
  • payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-TechPreviewNoUpgrade.crd.yaml
  • payload-manifests/featuregates/featureGate-4-10-Hypershift-Default.yaml
  • payload-manifests/featuregates/featureGate-4-10-Hypershift-DevPreviewNoUpgrade.yaml
  • payload-manifests/featuregates/featureGate-4-10-Hypershift-OKD.yaml
  • payload-manifests/featuregates/featureGate-4-10-Hypershift-TechPreviewNoUpgrade.yaml
  • payload-manifests/featuregates/featureGate-4-10-SelfManagedHA-Default.yaml
  • payload-manifests/featuregates/featureGate-4-10-SelfManagedHA-DevPreviewNoUpgrade.yaml
  • payload-manifests/featuregates/featureGate-4-10-SelfManagedHA-OKD.yaml
  • payload-manifests/featuregates/featureGate-4-10-SelfManagedHA-TechPreviewNoUpgrade.yaml
✅ Files skipped from review due to trivial changes (5)
  • payload-manifests/featuregates/featureGate-4-10-Hypershift-OKD.yaml
  • config/v1/types_infrastructure_test.go
  • payload-manifests/featuregates/featureGate-4-10-SelfManagedHA-DevPreviewNoUpgrade.yaml
  • payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-TechPreviewNoUpgrade.crd.yaml
  • payload-manifests/crds/0000_10_config-operator_01_infrastructures-TechPreviewNoUpgrade.crd.yaml
🚧 Files skipped from review as they are similar to previous changes (15)
  • payload-manifests/featuregates/featureGate-4-10-SelfManagedHA-OKD.yaml
  • payload-manifests/featuregates/featureGate-4-10-Hypershift-DevPreviewNoUpgrade.yaml
  • payload-manifests/featuregates/featureGate-4-10-Hypershift-Default.yaml
  • payload-manifests/featuregates/featureGate-4-10-SelfManagedHA-Default.yaml
  • payload-manifests/crds/0000_10_config-operator_01_infrastructures-Hypershift-DevPreviewNoUpgrade.crd.yaml
  • payload-manifests/featuregates/featureGate-4-10-Hypershift-TechPreviewNoUpgrade.yaml
  • payload-manifests/featuregates/featureGate-4-10-SelfManagedHA-TechPreviewNoUpgrade.yaml
  • payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml
  • payload-manifests/crds/0000_10_config-operator_01_infrastructures-SelfManagedHA-CustomNoUpgrade.crd.yaml
  • config/v1/types_infrastructure.go
  • machineconfiguration/v1/types.go
  • features.md
  • features/features.go
  • payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-Hypershift-CustomNoUpgrade.crd.yaml
  • payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-Hypershift-DevPreviewNoUpgrade.crd.yaml

📝 Walkthrough

Walkthrough

This PR adds the BGPBasedVIPManagement feature gate and enables it for DevPreviewNoUpgrade in Hypershift and SelfManagedHA. It introduces vipManagement fields for Infrastructure BareMetal status and ControllerConfig BGP peer configuration, with enum and length validation. The generated CRDs and feature-gate manifests are updated, and new CRD test cases cover accepted and rejected values.

🚥 Pre-merge checks | ✅ 14 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Ipv6 And Disconnected Network Test Compatibility ⚠️ Warning A loaded Ginkgo test fixture adds hardcoded IPv4 literals (192.168.111.1, 10.38.153.2/3) in machineconfiguration/v1/tests/.../BGPBasedVIPManagement.yaml. Make the fixture IP-family-aware (IPv6-safe or cluster-detected) and verify with the IPv6 CI job; avoid hardcoded IPv4 literals in generated test data.
✅ Passed checks (14 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding the BGPBasedVIPManagement gate and related VIP management fields.
Description check ✅ Passed The description is directly related to the changeset and accurately explains the new feature gate and API fields.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed All added test titles are static strings; no dynamic identifiers, timestamps, IPs, or Ginkgo-style titles were introduced in the changed test files.
Test Structure And Quality ✅ Passed PASS: The YAML-driven tests fit the repo’s envtest/Ginkgo harness with shared cleanup and 5s timeouts, and each case is narrowly scoped with specific error checks.
Microshift Test Compatibility ✅ Passed No new Ginkgo e2e specs were added; the changed files are YAML schema-test fixtures and a unit test, not MicroShift-sensitive test code.
Single Node Openshift (Sno) Test Compatibility ✅ Passed No new Ginkgo e2e tests were added; the diff is API/schema updates and generated manifests only, with no SNO-sensitive test logic.
Topology-Aware Scheduling Compatibility ✅ Passed Changed files add API/CRD fields, feature gates, and validation tests only; no pod specs, affinities, nodeSelectors, replicas, or PDBs were modified.
Ote Binary Stdout Contract ✅ Passed Changed files only add API types/feature-gate registration; no stdout-writing calls or process-level entrypoints were added in the touched code.
No-Weak-Crypto ✅ Passed Touched files add only feature-gated API/schema YAML; scans found no MD5/SHA1/DES/RC4/3DES/Blowfish/ECB or secret-compare code.
Container-Privileges ✅ Passed Full PR diff only touches CRD/schema, feature-gate, and test files; no workload manifests or securityContext/privileged settings were added.
No-Sensitive-Data-In-Logs ✅ Passed No log/print calls or sensitive-data emission paths were added; the diff is limited to API schema, feature-gate, and test YAML metadata.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.12.2)

Error: build linters: unable to load custom analyzer "kubeapilinter": tools/_output/bin/kube-api-linter.so, plugin: not implemented
The command is terminated due to an error: build linters: unable to load custom analyzer "kubeapilinter": tools/_output/bin/kube-api-linter.so, plugin: not implemented


Comment @coderabbitai help to get the list of available commands.

@openshift-ci openshift-ci Bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Jul 9, 2026
@openshift-ci openshift-ci Bot requested review from JoelSpeed and jkyros July 9, 2026 16:19
@openshift-ci

openshift-ci Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign everettraven for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@mkowalski mkowalski changed the title OPNET-595: Add BGPBasedVIPManagement feature gate and BGP VIP management fields OPNET-780: Add BGPBasedVIPManagement feature gate and BGP VIP management fields Jul 9, 2026
@openshift-ci-robot

openshift-ci-robot commented Jul 9, 2026

Copy link
Copy Markdown

@mkowalski: This pull request references OPNET-780 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 story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

What

API surface for BGP-based VIP management on on-premise clusters — enhancement openshift/enhancements#1982 (OPNET-595). Two commits:

  1. config/v1: BGPBasedVIPManagement feature gate (DevPreviewNoUpgrade) and BareMetalPlatformStatus.VIPManagement — reports which mechanism (Keepalived/BGP) manages the API and Ingress VIPs. Set at install time by the installer; consumed by MCO and CNO.
  2. machineconfiguration/v1: ControllerConfigSpec.BGPVIPPeersJSON — internal MCO API carrying the installer-generated BGP peer configuration (the bgp-vip-config ConfigMap payload, validated and compacted by the MCO operator) to the template controller, which renders the frr-k8s static pod peer file on control plane nodes. Bounded (1–65536), optional.

Safety without backing implementation

Deliberately safe to merge stand-alone:

  • Both fields are behind +openshift:enable:FeatureGate=BGPBasedVIPManagement; the gate is enabled only in DevPreviewNoUpgrade (verified across all 8 payload featuregate manifests). The fields are pruned from Default/TechPreview/OKD CRD variants (verified: zero occurrences outside CustomNoUpgrade/DevPreviewNoUpgrade schemas, including the ControllerConfig CRDs that embed Infrastructure).
  • Both fields are +optional/omitempty with no defaults; nothing in-payload sets or reads them until the implementation PRs land.
  • make lint clean, make update idempotent on the branch.

Reviewer note on the large generated diff in commit 1

Enabling a profile-agnostic gate in DevPreviewNoUpgrade changes which feature-set CRD schemas are byte-identical, so the manifest-merge generator regroups files (SelfManagedHA {CustomNoUpgrade,DevPreviewNoUpgrade} pair up; Hypershift TechPreview variants merge across profiles). Verified with a control experiment: make update twice on pristine master produces zero changes — the regrouping is entirely attributable to the new gate, per tools/codegen/pkg/manifestmerge/generator.go grouping logic.

Validation

The consuming implementation exists and was validated end to end on a dev-scripts baremetal cluster (installation over a BGP-advertised API VIP, health-gated ECMP for both VIPs, CRD handover); reference implementation and evidence: https://github.com/mkowalski/bgp-vip-demo. Related PRs in flight: kube-vip/kube-vip#1627, openshift-metal3/dev-scripts#1929.

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.

mkowalski added 2 commits July 9, 2026 19:46
…ield

BGP-based VIP management for on-premise clusters (enhancement 1982, OPNET-595): the gate ships in DevPreviewNoUpgrade; BareMetalPlatformStatus.VIPManagement reports which mechanism (Keepalived/BGP) manages the API and Ingress VIPs. Set at install time by the installer; consumed by MCO and CNO. Safe with no backing implementation: feature-gated (field pruned outside DevPreviewNoUpgrade CRD variants), optional, and nothing in-payload sets or reads it until the implementation lands.
Internal MCO API carrying the installer-generated BGP peer configuration
from the bgp-vip-config ConfigMap to the template controller, which
renders the frr-k8s static pod peer file on control plane nodes
(enhancement 1982, OPNET-595). Feature-gated, optional and bounded; a
no-op until the MCO implementation consumes it. The controllerconfigs
CRD manifests also pick up the vipManagement enum refresh through the
embedded Infrastructure schema.
@mkowalski mkowalski force-pushed the opnet-595-bgp-vip-api branch from 661c092 to 00a1277 Compare July 9, 2026 18:10
@openshift-ci

openshift-ci Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

@mkowalski: all tests passed!

Full PR test history. Your PR dashboard.

Details

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 kubernetes-sigs/prow repository. I understand the commands that are listed here.

mkowalski added a commit to mkowalski/cluster-network-operator that referenced this pull request Jul 10, 2026
Render a sessions-only FRRConfiguration CR named bgp-vip
(namespace openshift-frr-k8s) when BGP-based VIP management is active:
BareMetal platform, the BGPBasedVIPManagement feature gate enabled,
and the Infrastructure CR reporting vipManagement "BGP". Peer/VIP data
is read from the installer's bgp-vip-config ConfigMap (schema =
baremetal-runtimecfg's FRRPeerMapping).

The CR carries only the BGP sessions (neighbors, BFD profiles). VIP
advertisement deliberately does not use CRD prefixes/toAdvertise:
frr-k8s renders router-level prefixes as unconditional `network`
statements that would defeat kube-vip's health gating, and toAdvertise
cannot express "advertise redistributed routes" - without it frr-k8s
renders deny-any egress prefix-lists. Advertisement therefore happens
exclusively via rawConfig: `ip import-table 198` plus health-gated
table-direct redistribution of routing table 198 (populated by
kube-vip only for VIPs with healthy backends), filtered through
route-maps/prefix-lists permitting exactly the VIP prefixes, with
high-sequence per-neighbor <peer>-out permits opening egress only for
the VIP prefix-lists.

The CR carries no node selector: workers' frr-k8s DaemonSet consumes
the same sessions and gated redistribution so router-bearing workers
advertise the ingress VIP.

The feature gate is defined locally and guarded via KnownFeatures
until openshift/api#2923 ships the gate, and the Infrastructure
vipManagement field is read unstructured until it lands in the
vendored openshift/api - the feature is inert until then.

Validated end to end (github.com/mkowalski/bgp-vip-demo).
@mkowalski mkowalski requested a review from Copilot July 10, 2026 12:41

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces the API surface (behind a new BGPBasedVIPManagement feature gate) needed to support BGP-based management of API/Ingress VIPs on on-premise clusters, along with the corresponding feature-set manifests, CRD/OpenAPI regeneration, and validation tests.

Changes:

  • Adds the BGPBasedVIPManagement feature gate (enabled only in DevPreviewNoUpgrade) and wires it into payload featuregate manifests.
  • Adds feature-gated API fields:
    • config/v1: BareMetalPlatformStatus.VIPManagement to report the active VIP management mechanism (Keepalived/BGP).
    • machineconfiguration/v1: ControllerConfigSpec.BGPVIPPeersJSON to carry installer-provided BGP peer config to MCO internals.
  • Updates generated CRDs/OpenAPI artifacts and adds feature-gated API validation tests.

Reviewed changes

Copilot reviewed 43 out of 45 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
payload-manifests/featuregates/featureGate-4-10-SelfManagedHA-TechPreviewNoUpgrade.yaml Adds BGPBasedVIPManagement to the disabled set for this feature-set/profile.
payload-manifests/featuregates/featureGate-4-10-SelfManagedHA-OKD.yaml Adds BGPBasedVIPManagement to the disabled set for OKD.
payload-manifests/featuregates/featureGate-4-10-SelfManagedHA-DevPreviewNoUpgrade.yaml Ensures BGPBasedVIPManagement is enabled in DevPreviewNoUpgrade.
payload-manifests/featuregates/featureGate-4-10-SelfManagedHA-Default.yaml Adds BGPBasedVIPManagement to the disabled set for Default.
payload-manifests/featuregates/featureGate-4-10-Hypershift-TechPreviewNoUpgrade.yaml Adds BGPBasedVIPManagement to the disabled set for this feature-set/profile.
payload-manifests/featuregates/featureGate-4-10-Hypershift-OKD.yaml Adds BGPBasedVIPManagement to the disabled set for OKD.
payload-manifests/featuregates/featureGate-4-10-Hypershift-DevPreviewNoUpgrade.yaml Ensures BGPBasedVIPManagement is enabled in DevPreviewNoUpgrade.
payload-manifests/featuregates/featureGate-4-10-Hypershift-Default.yaml Adds BGPBasedVIPManagement to the disabled set for Default.
payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-TechPreviewNoUpgrade.crd.yaml Generated CRD update reflecting regrouping/annotations.
payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml Generated CRD includes feature-gated bgpVIPPeersJSON and related schema updates.
payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-SelfManagedHA-CustomNoUpgrade.crd.yaml Generated CRD includes feature-gated bgpVIPPeersJSON and related schema updates.
payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-Hypershift-DevPreviewNoUpgrade.crd.yaml Generated CRD includes feature-gated bgpVIPPeersJSON and related schema updates.
payload-manifests/crds/0000_80_machine-config_01_controllerconfigs-Hypershift-CustomNoUpgrade.crd.yaml Generated CRD includes feature-gated bgpVIPPeersJSON and related schema updates.
payload-manifests/crds/0000_10_config-operator_01_infrastructures-TechPreviewNoUpgrade.crd.yaml Generated CRD update reflecting regrouping/annotations.
payload-manifests/crds/0000_10_config-operator_01_infrastructures-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml Generated CRD includes feature-gated vipManagement schema.
payload-manifests/crds/0000_10_config-operator_01_infrastructures-SelfManagedHA-CustomNoUpgrade.crd.yaml Generated CRD includes feature-gated vipManagement schema.
payload-manifests/crds/0000_10_config-operator_01_infrastructures-Hypershift-TechPreviewNoUpgrade.crd.yaml Removes/regroups generated CRD due to manifest-merge grouping changes.
payload-manifests/crds/0000_10_config-operator_01_infrastructures-Hypershift-DevPreviewNoUpgrade.crd.yaml Generated CRD includes feature-gated vipManagement schema.
payload-manifests/crds/0000_10_config-operator_01_infrastructures-Hypershift-CustomNoUpgrade.crd.yaml Generated CRD includes feature-gated vipManagement schema.
openapi/openapi.json Updates generated OpenAPI definitions to include vipManagement field.
openapi/generated_openapi/zz_generated.openapi.go Updates generated Go OpenAPI schema for the new field(s).
machineconfiguration/v1/zz_generated.swagger_doc_generated.go Updates generated swagger docs for bgpVIPPeersJSON.
machineconfiguration/v1/zz_generated.featuregated-crd-manifests/controllerconfigs.machineconfiguration.openshift.io/BGPBasedVIPManagement.yaml Generated feature-gated CRD manifest updated for the new field.
machineconfiguration/v1/zz_generated.featuregated-crd-manifests.yaml Registers the new feature gate for feature-gated CRD generation.
machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_controllerconfigs-TechPreviewNoUpgrade.crd.yaml Generated CRD update reflecting regrouping/annotations.
machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_controllerconfigs-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml Generated CRD includes feature-gated bgpVIPPeersJSON.
machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_controllerconfigs-SelfManagedHA-CustomNoUpgrade.crd.yaml Generated CRD includes feature-gated bgpVIPPeersJSON.
machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_controllerconfigs-Hypershift-DevPreviewNoUpgrade.crd.yaml Generated CRD includes feature-gated bgpVIPPeersJSON.
machineconfiguration/v1/zz_generated.crd-manifests/0000_80_machine-config_01_controllerconfigs-Hypershift-CustomNoUpgrade.crd.yaml Generated CRD includes feature-gated bgpVIPPeersJSON.
machineconfiguration/v1/types.go Adds ControllerConfigSpec.BGPVIPPeersJSON behind BGPBasedVIPManagement.
machineconfiguration/v1/tests/controllerconfigs.machineconfiguration.openshift.io/BGPBasedVIPManagement.yaml Adds feature-gated CRD validation tests for bgpVIPPeersJSON.
features/features.go Registers the new BGPBasedVIPManagement feature gate (DevPreviewNoUpgrade).
features.md Updates the feature gate matrix to include BGPBasedVIPManagement.
config/v1/zz_generated.swagger_doc_generated.go Updates generated swagger docs for vipManagement.
config/v1/zz_generated.featuregated-crd-manifests/infrastructures.config.openshift.io/BGPBasedVIPManagement.yaml Generated feature-gated CRD manifest updated for the new field.
config/v1/zz_generated.featuregated-crd-manifests.yaml Registers the new feature gate for feature-gated CRD generation.
config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-TechPreviewNoUpgrade.crd.yaml Generated CRD update reflecting regrouping/annotations.
config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-SelfManagedHA-DevPreviewNoUpgrade.crd.yaml Generated CRD includes feature-gated vipManagement.
config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-SelfManagedHA-CustomNoUpgrade.crd.yaml Generated CRD includes feature-gated vipManagement.
config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-Hypershift-DevPreviewNoUpgrade.crd.yaml Generated CRD includes feature-gated vipManagement.
config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-Hypershift-CustomNoUpgrade.crd.yaml Generated CRD includes feature-gated vipManagement.
config/v1/types_infrastructure.go Adds BareMetalPlatformStatus.VIPManagement behind BGPBasedVIPManagement.
config/v1/types_infrastructure_test.go Updates the TechPreview CRD filename reference to match regrouped manifests.
config/v1/tests/infrastructures.config.openshift.io/BGPBasedVIPManagement.yaml Adds feature-gated CRD validation tests for vipManagement.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +116 to +120
// bgpVIPPeersJSON carries the BGP VIP peer configuration (the config.json
// payload of the bgp-vip-config ConfigMap) for rendering the frr-k8s
// static pod peer file on control plane nodes. Only set when BGP-based
// VIP management is enabled.
// When set, the value must be between 1 and 65536 characters long.
Comment on lines +1082 to +1086
// to "Keepalived", the default keepalived-based VIP management is used.
// +kubebuilder:validation:Enum=Keepalived;BGP
// +openshift:enable:FeatureGate=BGPBasedVIPManagement
// +optional
VIPManagement string `json:"vipManagement,omitempty"`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants