Skip to content
Merged
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
12 changes: 12 additions & 0 deletions config/crd/projectcalico.org_bgppeers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,18 @@ spec:
type: integer
birdGatewayMode:
type: string
connectionMode:
allOf:
- enum:
- Auto
- Active
- Passive
- enum:
- Auto
- Active
- Passive
default: Auto
type: string
extensions:
additionalProperties:
type: string
Expand Down
27 changes: 27 additions & 0 deletions pkg/apis/projectcalico/v3/bgppeer.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,19 @@ type BGPPeerSpec struct {
// for the reverse peering. [Default: Auto]
// +kubebuilder:validation:Enum=Auto;Manual;
ReversePeering *ReversePeering `json:"reversePeering,omitempty"`

// ConnectionMode controls which end initiates the BGP TCP connection for the peerings generated
// by this resource, from the perspective of the node(s) selected by Node/NodeSelector. "Auto"
// (the default, equivalent to leaving the field unset) uses Calico's built-in active/passive
// selection. "Active" makes the selected node(s) initiate the connection; "Passive" makes them
// wait for the far end to initiate. Active and Passive are only valid for an explicit-PeerIP or
// LocalWorkloadSelector peer; a PeerSelector peer must be Auto (Calico owns both ends). When
// PeerIP matches another cluster node, the automatically-generated reverse peering takes the
// opposite mode.
// [Default: Auto]
// +kubebuilder:default=Auto
// +kubebuilder:validation:Enum=Auto;Active;Passive
ConnectionMode BGPPeerConnectionMode `json:"connectionMode,omitempty" validate:"omitempty,bgpPeerConnectionMode"`
Comment on lines +213 to +214
}

// +kubebuilder:validation:Enum=UseNodeIP;None
Expand Down Expand Up @@ -230,6 +243,20 @@ const (
BIRDGatewayModeDirectIfDirectlyConnected BIRDGatewayMode = "DirectIfDirectlyConnected"
)

// +kubebuilder:validation:Enum=Auto;Active;Passive
type BGPPeerConnectionMode string

const (
// BGPPeerConnectionModeAuto uses Calico's built-in per-peer selection of active vs passive
// (the default, and equivalent to leaving the field unset).
BGPPeerConnectionModeAuto BGPPeerConnectionMode = "Auto"
// BGPPeerConnectionModeActive means the selected node(s) initiate the BGP TCP connection.
BGPPeerConnectionModeActive BGPPeerConnectionMode = "Active"
// BGPPeerConnectionModePassive means the selected node(s) do not initiate the connection; they
// wait for the far end to initiate.
BGPPeerConnectionModePassive BGPPeerConnectionMode = "Passive"
)

// BGPPassword contains ways to specify a BGP password.
type BGPPassword struct {
// Selects a key of a secret in the node pod's namespace.
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions pkg/openapi/generated.openapi.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading