Skip to content

Commit

Permalink
Add BGP confederation definition in BGPPolicy
Browse files Browse the repository at this point in the history
Signed-off-by: Hongliang Liu <[email protected]>
  • Loading branch information
hongliangl committed Jan 8, 2025
1 parent 503239f commit a61659d
Show file tree
Hide file tree
Showing 9 changed files with 127 additions and 0 deletions.
13 changes: 13 additions & 0 deletions build/charts/antrea/crds/bgppolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,19 @@ spec:
minimum: 1
maximum: 65535
default: 179
confederation:
type: object
properties:
enable:
type: boolean
default: false
identifier:
type: integer
format: int32
peers:
type: array
items:
type: integer
advertisements:
type: object
properties:
Expand Down
13 changes: 13 additions & 0 deletions build/yamls/antrea-aks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,19 @@ spec:
minimum: 1
maximum: 65535
default: 179
confederation:
type: object
properties:
enable:
type: boolean
default: false
identifier:
type: integer
format: int32
peers:
type: array
items:
type: integer
advertisements:
type: object
properties:
Expand Down
13 changes: 13 additions & 0 deletions build/yamls/antrea-crds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,19 @@ spec:
minimum: 1
maximum: 65535
default: 179
confederation:
type: object
properties:
enable:
type: boolean
default: false
identifier:
type: integer
format: int32
peers:
type: array
items:
type: integer
advertisements:
type: object
properties:
Expand Down
13 changes: 13 additions & 0 deletions build/yamls/antrea-eks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,19 @@ spec:
minimum: 1
maximum: 65535
default: 179
confederation:
type: object
properties:
enable:
type: boolean
default: false
identifier:
type: integer
format: int32
peers:
type: array
items:
type: integer
advertisements:
type: object
properties:
Expand Down
13 changes: 13 additions & 0 deletions build/yamls/antrea-gke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,19 @@ spec:
minimum: 1
maximum: 65535
default: 179
confederation:
type: object
properties:
enable:
type: boolean
default: false
identifier:
type: integer
format: int32
peers:
type: array
items:
type: integer
advertisements:
type: object
properties:
Expand Down
13 changes: 13 additions & 0 deletions build/yamls/antrea-ipsec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,19 @@ spec:
minimum: 1
maximum: 65535
default: 179
confederation:
type: object
properties:
enable:
type: boolean
default: false
identifier:
type: integer
format: int32
peers:
type: array
items:
type: integer
advertisements:
type: object
properties:
Expand Down
13 changes: 13 additions & 0 deletions build/yamls/antrea.yml
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,19 @@ spec:
minimum: 1
maximum: 65535
default: 179
confederation:
type: object
properties:
enable:
type: boolean
default: false
identifier:
type: integer
format: int32
peers:
type: array
items:
type: integer
advertisements:
type: object
properties:
Expand Down
14 changes: 14 additions & 0 deletions pkg/apis/crd/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,9 @@ type BGPPolicySpec struct {
// ListenPort is the port on which the BGP process listens, and the default value is 179.
ListenPort *int32 `json:"listenPort,omitempty"`

// Confederation specifies BGP confederation configuration.
Confederation Confederation `json:"confederation"`

// Advertisements configures IPs or CIDRs to be advertised to BGP peers.
Advertisements Advertisements `json:"advertisements,omitempty"`

Expand All @@ -289,6 +292,17 @@ type Advertisements struct {
Egress *EgressAdvertisement `json:"egress,omitempty"`
}

type Confederation struct {
// Enabled indicates whether BGP confederation is enabled.
Enabled bool `json:"enabled,omitempty"`

// Identifier specifies the confederation's ASN.
Identifier int32 `json:"identifier,omitempty"`

// Peers lists the ASNs of other members in the confederation.
Peers []int32 `json:"peers,omitempty"`
}

type ServiceIPType string

const (
Expand Down
22 changes: 22 additions & 0 deletions pkg/apis/crd/v1alpha1/zz_generated.deepcopy.go

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

0 comments on commit a61659d

Please sign in to comment.