Skip to content

CORE-11417: added localASNumber field to BGPPeer #2158

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

skoryk-oleksandr
Copy link
Contributor

@skoryk-oleksandr skoryk-oleksandr commented Jul 10, 2025

Product Version(s):
OSS v3.31
Enterprise v3.22 EP2

Issue:
https://tigera.atlassian.net/browse/CORE-11417

Link to docs preview:

SME review:

  • An SME has approved this change.

DOCS review:

  • A member of the docs team has approved this change.

Additional information:
This PR introduces support for the optional localASNumber field within the BGPPeer resource in Calico. When specified, localASNumber sets the local ASN that Calico will use to establish the BGP session with the peer. This value overrides the default asNumber for that specific BGP peer only.

  • Key behavior:

    • If localASNumber is set, it takes precedence over the asNumber field for the local ASN used in the BGP session.

    • If localASNumber is omitted, the default asNumber is used.

    • This field is supported for both global and node-specific peers.

  • Use case:

As Paul from Platform Engineering, I would like to configure different local AS numbers for each BGP peer, so that I can establish BGP sessions with external networks that require the remote peer to have a specific ASN. I am not able to allocate a node per BGP peer.

Merge checklist:

  • Deploy preview inspected wherever changes were made
  • Build completed successfully
  • Test have passed

@skoryk-oleksandr skoryk-oleksandr requested a review from a team as a code owner July 10, 2025 23:33
Copy link

netlify bot commented Jul 10, 2025

Deploy Preview for calico-docs-preview-next ready!

Name Link
🔨 Latest commit 5c751be
🔍 Latest deploy log https://app.netlify.com/projects/calico-docs-preview-next/deploys/687814844067a0000883c313
😎 Deploy Preview https://deploy-preview-2158--calico-docs-preview-next.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

netlify bot commented Jul 10, 2025

Deploy Preview for tigera failed. Why did it fail? →

Name Link
🔨 Latest commit
🔍 Latest deploy log https://app.netlify.com/projects/tigera/deploys/68832fb92cace5c7ce313f14

Copy link
Member

@mazdakn mazdakn left a comment

Choose a reason for hiding this comment

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

@skoryk-oleksandr the target release is v3.31.

Copy link
Collaborator

@ctauchen ctauchen left a comment

Choose a reason for hiding this comment

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

Very small nit.

You've currently got this aimed form OSS 3.31 and CE 3.22 EP1. Is that right? Does this change need to go into 3.22 EP2, which sill incorporate code from 3.31?

@@ -43,6 +43,7 @@ spec:
| node | If specified, the scope is node level, otherwise the scope is global. | The hostname of the node to which this peer applies. | string | |
| peerIP | The IP address of this peer and an optional port number. If port number is not set, and peer is Calico node with `listenPort` set, then `listenPort` is used. | Valid IPv4 or IPv6 address. If port number is set use, `IPv4:port` or `[IPv6]:port` format. | string | |
| asNumber | The remote AS Number of the peer. | A valid AS Number, may be specified in dotted notation. | integer/string |
| localASNumber | Specifies AS Number $[prodname] uses as its local AS Number for this peer, overriding the global AS Number set in the default BGPConfiguration. | A valid AS Number, may be specified in dotted notation. | integer/string |
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
| localASNumber | Specifies AS Number $[prodname] uses as its local AS Number for this peer, overriding the global AS Number set in the default BGPConfiguration. | A valid AS Number, may be specified in dotted notation. | integer/string |
| localASNumber | Specifies AS Number $[prodname] uses as its local AS Number for this peer, overriding the global AS Number set in the default BGPConfiguration. | A valid AS Number, may be specified in dotted notation. | integer/string |

Same in repeated section below.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@skoryk-oleksandr
Copy link
Contributor Author

skoryk-oleksandr commented Jul 21, 2025

Very small nit.

You've currently got this aimed form OSS 3.31 and CE 3.22 EP1. Is that right? Does this change need to go into 3.22 EP2, which sill incorporate code from 3.31?

@ctauchen We are targeting it for OSS v3.31 and Enterprise v3.22 EP2

@ctauchen
Copy link
Collaborator

@ctauchen We are targeting it for OSS v3.31 and Enterprise v3.22 EP2

Thanks. I'll hold this until I cut 3.22 ep1, then I'll merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants