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

bgpv1: Unconditionally select node when empty nodeSelector is given #26590

Merged

Conversation

YutaroHayakawa
Copy link
Member

The CRD spec of CiliumBGPPeeringPolicy states

NodeSelector selects a group of nodes where this BGP Peering Policy
applies. If empty / nil this policy applies to all nodes.

However, our current implementation treats empty / nil selector as an error. This commit fixes it.

This issue was reported by an OSS community user on Slack.

スクリーンショット 2023-07-03 15 57 33

bgpv1: Unconditionally select node when empty nodeSelector is given

The CRD spec of CiliumBGPPeeringPolicy states

```
NodeSelector selects a group of nodes where this BGP Peering Policy
applies. If empty / nil this policy applies to all nodes.
```

However, our current implementation treats empty / nil selector as an
error. This commit fixes it.

Signed-off-by: Yutaro Hayakawa <yutaro.hayakawa@isovalent.com>
@YutaroHayakawa YutaroHayakawa added kind/bug This is a bug in the Cilium logic. area/bgp needs-backport/1.12 needs-backport/1.13 This PR / issue needs backporting to the v1.13 branch needs-backport/1.14 This PR / issue needs backporting to the v1.14 branch labels Jul 3, 2023
@maintainer-s-little-helper maintainer-s-little-helper bot added dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. labels Jul 3, 2023
@maintainer-s-little-helper maintainer-s-little-helper bot added this to Needs backport from main in 1.13.5 Jul 3, 2023
@maintainer-s-little-helper maintainer-s-little-helper bot added this to Needs backport from main in 1.12.12 Jul 3, 2023
@YutaroHayakawa YutaroHayakawa added the release-note/bug This PR fixes an issue in a previous release of Cilium. label Jul 3, 2023
@maintainer-s-little-helper maintainer-s-little-helper bot removed the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Jul 3, 2023
@YutaroHayakawa
Copy link
Member Author

/test

@YutaroHayakawa
Copy link
Member Author

K8sUpstreamNetConformance: #26492
ClusterMesh: #25816
ConformanceAKS: #26075

@YutaroHayakawa
Copy link
Member Author

/ci-multicluster

@YutaroHayakawa
Copy link
Member Author

/ci-aks

@YutaroHayakawa YutaroHayakawa marked this pull request as ready for review July 3, 2023 12:57
@YutaroHayakawa YutaroHayakawa requested a review from a team as a code owner July 3, 2023 12:57
@ldelossa
Copy link
Contributor

ldelossa commented Jul 5, 2023

In our current code, only a single CiliumBGPPeeringPolicy may apply to a node.

So in this change, what happens if multiple 'CiliumBGPPeeringPolicies' do not specify a node selector?

We will pick the latest created 'CiliumBGPPeeringPolicy' and ignore all others, correct?

@YutaroHayakawa
Copy link
Member Author

So in this change, what happens if multiple 'CiliumBGPPeeringPolicies' do not specify a node selector?
We will pick the latest created 'CiliumBGPPeeringPolicy' and ignore all others, correct?

No, essentially the empty/nil selector is a selector that selects everything. So, when there are multiple policies select the same node, BGP sessions will be reset. This is the same behavior as before.

@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Jul 6, 2023
@ldelossa ldelossa merged commit 8a5f1c6 into cilium:main Jul 6, 2023
66 checks passed
@jibi jibi mentioned this pull request Jul 10, 2023
19 tasks
@jibi jibi added backport-pending/1.14 The backport for Cilium 1.14.x for this PR is in progress. and removed needs-backport/1.14 This PR / issue needs backporting to the v1.14 branch labels Jul 10, 2023
@jibi jibi mentioned this pull request Jul 10, 2023
4 tasks
@jibi jibi added backport-pending/1.13 The backport for Cilium 1.13.x for this PR is in progress. and removed needs-backport/1.13 This PR / issue needs backporting to the v1.13 branch labels Jul 10, 2023
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Needs backport from main to Backport pending to v1.13 in 1.13.5 Jul 10, 2023
@jibi jibi mentioned this pull request Jul 10, 2023
1 task
@jibi jibi added the backport/author The backport will be carried out by the author of the PR. label Jul 10, 2023
@YutaroHayakawa YutaroHayakawa added backport/author The backport will be carried out by the author of the PR. and removed backport/author The backport will be carried out by the author of the PR. labels Jul 11, 2023
@YutaroHayakawa YutaroHayakawa mentioned this pull request Jul 11, 2023
1 task
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Needs backport from main to Backport pending to v1.12 in 1.12.12 Jul 11, 2023
@julianwiedmann julianwiedmann added backport-done/1.13 The backport for Cilium 1.13.x for this PR is done. and removed backport-pending/1.13 The backport for Cilium 1.13.x for this PR is in progress. labels Jul 11, 2023
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Backport pending to v1.13 to Backport done to v1.13 in 1.13.5 Jul 11, 2023
@julianwiedmann julianwiedmann added backport-done/1.14 The backport for Cilium 1.14.x for this PR is done. backport-done/1.12 The backport for Cilium 1.12.x for this PR is done. and removed backport-pending/1.14 The backport for Cilium 1.14.x for this PR is in progress. backport-pending/1.12 labels Jul 11, 2023
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Backport pending to v1.12 to Backport done to v1.12 in 1.12.12 Jul 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/bgp backport/author The backport will be carried out by the author of the PR. backport-done/1.12 The backport for Cilium 1.12.x for this PR is done. backport-done/1.13 The backport for Cilium 1.13.x for this PR is done. backport-done/1.14 The backport for Cilium 1.14.x for this PR is done. kind/bug This is a bug in the Cilium logic. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/bug This PR fixes an issue in a previous release of Cilium.
Projects
No open projects
1.12.12
Backport done to v1.12
1.13.5
Backport done to v1.13
Development

Successfully merging this pull request may close these issues.

None yet

4 participants