Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this
name: "BGPBasedVIPManagement Infrastructure"
crdName: infrastructures.config.openshift.io
featureGates:
- BGPBasedVIPManagement
tests:
onUpdate:
- name: Should allow setting vipManagement to BGP on BareMetal
initial: |
apiVersion: config.openshift.io/v1
kind: Infrastructure
spec:
platformSpec:
baremetal: {}
type: BareMetal
updated: |
apiVersion: config.openshift.io/v1
kind: Infrastructure
spec:
platformSpec:
baremetal: {}
type: BareMetal
status:
platform: BareMetal
platformStatus:
baremetal:
vipManagement: BGP
type: BareMetal
expected: |
apiVersion: config.openshift.io/v1
kind: Infrastructure
spec:
platformSpec:
baremetal: {}
type: BareMetal
status:
platform: BareMetal
platformStatus:
baremetal:
vipManagement: BGP
loadBalancer:
type: OpenShiftManagedDefault
type: BareMetal
cpuPartitioning: None
infrastructureTopology: HighlyAvailable
controlPlaneTopology: HighlyAvailable
- name: Should allow setting vipManagement to Keepalived on BareMetal
initial: |
apiVersion: config.openshift.io/v1
kind: Infrastructure
spec:
platformSpec:
baremetal: {}
type: BareMetal
updated: |
apiVersion: config.openshift.io/v1
kind: Infrastructure
spec:
platformSpec:
baremetal: {}
type: BareMetal
status:
platform: BareMetal
platformStatus:
baremetal:
vipManagement: Keepalived
type: BareMetal
expected: |
apiVersion: config.openshift.io/v1
kind: Infrastructure
spec:
platformSpec:
baremetal: {}
type: BareMetal
status:
platform: BareMetal
platformStatus:
baremetal:
vipManagement: Keepalived
loadBalancer:
type: OpenShiftManagedDefault
type: BareMetal
cpuPartitioning: None
infrastructureTopology: HighlyAvailable
controlPlaneTopology: HighlyAvailable
- name: Should reject an invalid vipManagement value
initial: |
apiVersion: config.openshift.io/v1
kind: Infrastructure
spec:
platformSpec:
baremetal: {}
type: BareMetal
updated: |
apiVersion: config.openshift.io/v1
kind: Infrastructure
spec:
platformSpec:
baremetal: {}
type: BareMetal
status:
platform: BareMetal
platformStatus:
baremetal:
vipManagement: VRRP
type: BareMetal
expectedStatusError: 'platformStatus.baremetal.vipManagement: Unsupported value: "VRRP": supported values: "Keepalived", "BGP"'
10 changes: 10 additions & 0 deletions config/v1/types_infrastructure.go
Original file line number Diff line number Diff line change
Expand Up @@ -1075,6 +1075,16 @@ type BareMetalPlatformStatus struct {
// +optional
LoadBalancer *BareMetalPlatformLoadBalancer `json:"loadBalancer,omitempty"`

// vipManagement indicates which VIP management mechanism is active
// on this cluster. When set to "BGP", kube-vip (Routing Table Mode)
// and frr-k8s are deployed as static pods to advertise VIPs via BGP,
// replacing the default keepalived/VRRP mechanism. When omitted or set
// 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"`
Comment on lines +1082 to +1086

// dnsRecordsType determines whether records for api, api-int, and ingress
// are provided by the internal DNS service or externally.
// Allowed values are `Internal`, `External`, and omitted.
Expand Down
2 changes: 1 addition & 1 deletion config/v1/types_infrastructure_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

const (
infraCRDDefaultFilePath = "0000_10_config-operator_01_infrastructures-Default.crd.yaml"
infraCRDTestPreviewFilePath = "0000_10_config-operator_01_infrastructures-SelfManagedHA-TechPreviewNoUpgrade.crd.yaml"
infraCRDTestPreviewFilePath = "0000_10_config-operator_01_infrastructures-TechPreviewNoUpgrade.crd.yaml"
)

// TestInfrastructureStatusDefault verifies that the infrastructure CR status does not have default value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1785,6 +1785,17 @@ spec:
datacenter DNS, a DNS service is hosted as a static pod to serve those hostnames
to the nodes in the cluster.
type: string
vipManagement:
description: |-
vipManagement indicates which VIP management mechanism is active
on this cluster. When set to "BGP", kube-vip (Routing Table Mode)
and frr-k8s are deployed as static pods to advertise VIPs via BGP,
replacing the default keepalived/VRRP mechanism. When omitted or set
to "Keepalived", the default keepalived-based VIP management is used.
enum:
- Keepalived
- BGP
type: string
type: object
x-kubernetes-validations:
- message: dnsRecordsType may only be set to External when loadBalancer.type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1770,6 +1770,17 @@ spec:
datacenter DNS, a DNS service is hosted as a static pod to serve those hostnames
to the nodes in the cluster.
type: string
vipManagement:
description: |-
vipManagement indicates which VIP management mechanism is active
on this cluster. When set to "BGP", kube-vip (Routing Table Mode)
and frr-k8s are deployed as static pods to advertise VIPs via BGP,
replacing the default keepalived/VRRP mechanism. When omitted or set
to "Keepalived", the default keepalived-based VIP management is used.
enum:
- Keepalived
- BGP
type: string
type: object
x-kubernetes-validations:
- message: dnsRecordsType may only be set to External when loadBalancer.type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1785,6 +1785,17 @@ spec:
datacenter DNS, a DNS service is hosted as a static pod to serve those hostnames
to the nodes in the cluster.
type: string
vipManagement:
description: |-
vipManagement indicates which VIP management mechanism is active
on this cluster. When set to "BGP", kube-vip (Routing Table Mode)
and frr-k8s are deployed as static pods to advertise VIPs via BGP,
replacing the default keepalived/VRRP mechanism. When omitted or set
to "Keepalived", the default keepalived-based VIP management is used.
enum:
- Keepalived
- BGP
type: string
type: object
x-kubernetes-validations:
- message: dnsRecordsType may only be set to External when loadBalancer.type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1785,6 +1785,17 @@ spec:
datacenter DNS, a DNS service is hosted as a static pod to serve those hostnames
to the nodes in the cluster.
type: string
vipManagement:
description: |-
vipManagement indicates which VIP management mechanism is active
on this cluster. When set to "BGP", kube-vip (Routing Table Mode)
and frr-k8s are deployed as static pods to advertise VIPs via BGP,
replacing the default keepalived/VRRP mechanism. When omitted or set
to "Keepalived", the default keepalived-based VIP management is used.
enum:
- Keepalived
- BGP
type: string
type: object
x-kubernetes-validations:
- message: dnsRecordsType may only be set to External when loadBalancer.type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ metadata:
annotations:
api-approved.openshift.io: https://github.com/openshift/api/pull/470
api.openshift.io/merged-by-featuregates: "true"
include.release.openshift.io/ibm-cloud-managed: "true"
include.release.openshift.io/self-managed-high-availability: "true"
release.openshift.io/bootstrap-required: "true"
release.openshift.io/feature-set: TechPreviewNoUpgrade
Expand Down
1 change: 1 addition & 0 deletions config/v1/zz_generated.featuregated-crd-manifests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,7 @@ infrastructures.config.openshift.io:
- AWSDualStackInstall
- AzureClusterHostedDNSInstall
- AzureDualStackInstall
- BGPBasedVIPManagement
- DualReplica
- DyanmicServiceEndpointIBMCloud
- MutableTopology
Expand Down
Loading