-
Notifications
You must be signed in to change notification settings - Fork 375
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 support in BGPPolicy #6905
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should there be a minimum and maximum value here like for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My bad, will update. |
||
advertisements: | ||
type: object | ||
properties: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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"` | ||
|
||
|
@@ -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"` | ||
Comment on lines
+296
to
+297
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need an "enabled" field or should the |
||
|
||
// 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"` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the term "members" is typically used for BGP confederation. Should we name this field There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I selected the term "peers" because it is used by the commands of some well-known vendors like Cisco. For example:
The term "peers" is not very readable. I'm fine with |
||
} | ||
|
||
type ServiceIPType string | ||
|
||
const ( | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the range of valid values?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The range should be 1-4294967295 if we can merge #6914