From dc0450283c641afdc19f4d21fd46287b6129884f Mon Sep 17 00:00:00 2001 From: caseydavenport <1944093+caseydavenport@users.noreply.github.com> Date: Thu, 1 Oct 2026 10:18:12 +0000 Subject: [PATCH] Automatic API update from tigera/calico-private release-calient-v3.23 --- config/crd/projectcalico.org_bgppeers.yaml | 12 +++++++++ pkg/apis/projectcalico/v3/bgppeer.go | 27 +++++++++++++++++++ .../projectcalico/v3/bgppeerspec.go | 18 +++++++++++++ pkg/openapi/generated.openapi.go | 7 +++++ 4 files changed, 64 insertions(+) diff --git a/config/crd/projectcalico.org_bgppeers.yaml b/config/crd/projectcalico.org_bgppeers.yaml index 2837e68..6fede25 100644 --- a/config/crd/projectcalico.org_bgppeers.yaml +++ b/config/crd/projectcalico.org_bgppeers.yaml @@ -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 diff --git a/pkg/apis/projectcalico/v3/bgppeer.go b/pkg/apis/projectcalico/v3/bgppeer.go index 62d72f0..df4488a 100644 --- a/pkg/apis/projectcalico/v3/bgppeer.go +++ b/pkg/apis/projectcalico/v3/bgppeer.go @@ -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"` } // +kubebuilder:validation:Enum=UseNodeIP;None @@ -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. diff --git a/pkg/client/applyconfiguration_generated/projectcalico/v3/bgppeerspec.go b/pkg/client/applyconfiguration_generated/projectcalico/v3/bgppeerspec.go index 244d4b7..f7492c7 100644 --- a/pkg/client/applyconfiguration_generated/projectcalico/v3/bgppeerspec.go +++ b/pkg/client/applyconfiguration_generated/projectcalico/v3/bgppeerspec.go @@ -108,6 +108,16 @@ type BGPPeerSpecApplyConfiguration struct { // automatically. If set to Manual, a separate BGPPeer must be created // for the reverse peering. [Default: Auto] ReversePeering *projectcalicov3.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] + ConnectionMode *projectcalicov3.BGPPeerConnectionMode `json:"connectionMode,omitempty"` } // BGPPeerSpecApplyConfiguration constructs a declarative configuration of the BGPPeerSpec type for use with @@ -315,3 +325,11 @@ func (b *BGPPeerSpecApplyConfiguration) WithReversePeering(value projectcalicov3 b.ReversePeering = &value return b } + +// WithConnectionMode sets the ConnectionMode field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ConnectionMode field is set to the value of the last call. +func (b *BGPPeerSpecApplyConfiguration) WithConnectionMode(value projectcalicov3.BGPPeerConnectionMode) *BGPPeerSpecApplyConfiguration { + b.ConnectionMode = &value + return b +} diff --git a/pkg/openapi/generated.openapi.go b/pkg/openapi/generated.openapi.go index 858c6e2..69b5754 100644 --- a/pkg/openapi/generated.openapi.go +++ b/pkg/openapi/generated.openapi.go @@ -2801,6 +2801,13 @@ func schema_pkg_apis_projectcalico_v3_BGPPeerSpec(ref common.ReferenceCallback) Format: "", }, }, + "connectionMode": { + SchemaProps: spec.SchemaProps{ + Description: "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]", + Type: []string{"string"}, + Format: "", + }, + }, }, }, },