Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add BGP confederation field in BGPPolicy API #6905

Merged
merged 1 commit into from
Jan 22, 2025
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
15 changes: 15 additions & 0 deletions build/charts/antrea/crds/bgppolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,21 @@ spec:
minimum: 1
maximum: 65535
default: 179
confederation:
type: object
properties:
identifier:
type: integer
format: int32
antoninbas marked this conversation as resolved.
Show resolved Hide resolved
minimum: 1
maximum: 65535
memberASNs:
type: array
items:
type: integer
antoninbas marked this conversation as resolved.
Show resolved Hide resolved
format: int32
minimum: 1
maximum: 65535
Comment on lines +71 to +72
Copy link
Contributor

Choose a reason for hiding this comment

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

I saw there is a suggestion is to use private ASN 64512–65534 for peers. But I am not sure if it's mandatory or just a recommendation. Could you double check the range?
If it's mandatory, we may need to remind users in the guide later when the full feature is ready. Thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is this one #6905 (comment)?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think private ASNs are typically used inside a confederation but I don't believe it's required. We can mention it in the documentation as you suggested.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will add.

advertisements:
type: object
properties:
Expand Down
15 changes: 15 additions & 0 deletions build/yamls/antrea-aks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,21 @@ spec:
minimum: 1
maximum: 65535
default: 179
confederation:
type: object
properties:
identifier:
type: integer
format: int32
minimum: 1
maximum: 65535
memberASNs:
type: array
items:
type: integer
format: int32
minimum: 1
maximum: 65535
advertisements:
type: object
properties:
Expand Down
15 changes: 15 additions & 0 deletions build/yamls/antrea-crds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,21 @@ spec:
minimum: 1
maximum: 65535
default: 179
confederation:
type: object
properties:
identifier:
type: integer
format: int32
minimum: 1
maximum: 65535
memberASNs:
type: array
items:
type: integer
format: int32
minimum: 1
maximum: 65535
advertisements:
type: object
properties:
Expand Down
15 changes: 15 additions & 0 deletions build/yamls/antrea-eks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,21 @@ spec:
minimum: 1
maximum: 65535
default: 179
confederation:
type: object
properties:
identifier:
type: integer
format: int32
minimum: 1
maximum: 65535
memberASNs:
type: array
items:
type: integer
format: int32
minimum: 1
maximum: 65535
advertisements:
type: object
properties:
Expand Down
15 changes: 15 additions & 0 deletions build/yamls/antrea-gke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,21 @@ spec:
minimum: 1
maximum: 65535
default: 179
confederation:
type: object
properties:
identifier:
type: integer
format: int32
minimum: 1
maximum: 65535
memberASNs:
type: array
items:
type: integer
format: int32
minimum: 1
maximum: 65535
advertisements:
type: object
properties:
Expand Down
15 changes: 15 additions & 0 deletions build/yamls/antrea-ipsec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,21 @@ spec:
minimum: 1
maximum: 65535
default: 179
confederation:
type: object
properties:
identifier:
type: integer
format: int32
minimum: 1
maximum: 65535
memberASNs:
type: array
items:
type: integer
format: int32
minimum: 1
maximum: 65535
advertisements:
type: object
properties:
Expand Down
15 changes: 15 additions & 0 deletions build/yamls/antrea.yml
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,21 @@ spec:
minimum: 1
maximum: 65535
default: 179
confederation:
type: object
properties:
identifier:
type: integer
format: int32
minimum: 1
maximum: 65535
memberASNs:
type: array
items:
type: integer
format: int32
minimum: 1
maximum: 65535
advertisements:
type: object
properties:
Expand Down
11 changes: 11 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,omitempty"`

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

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

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

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

type ServiceIPType string

const (
Expand Down
28 changes: 27 additions & 1 deletion 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.

Loading