Skip to content

Conversation

YutaroHayakawa
Copy link
Member

A node in the cluster can only be selected by one CiliumBGPClusterConfig. However, API-wise it is still possible. Such an error has been reported in the operator's log. This PR introduces a new condition ConflictingClusterConfig to the CiliumBGPClusterConfig which reports the error in the condition for better trouble shooting experience.

Note that this PR removes the BGPResourceManager node config XXX already exist error we mention in the doc. The corresponding document update will be covered in the separate PR with the description of other conditions we've introduced recently.

bgpv2: Introduce a condition to indicate nodeSelector conflicts

@maintainer-s-little-helper maintainer-s-little-helper bot added the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Oct 28, 2024
@YutaroHayakawa YutaroHayakawa added the release-note/misc This PR makes changes that have no direct user impact. label Oct 28, 2024
@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 Oct 28, 2024
@YutaroHayakawa YutaroHayakawa force-pushed the yutaro/bgpv2-invalid-selection-cond branch from 189211d to e54900f Compare October 28, 2024 14:30
@YutaroHayakawa YutaroHayakawa marked this pull request as ready for review October 28, 2024 14:39
@YutaroHayakawa YutaroHayakawa requested review from a team as code owners October 28, 2024 14:39
@YutaroHayakawa
Copy link
Member Author

/test

The current owner reference check checks the owner just by the name.
This may matches to the owner of different kind of resource with the
same name. Practically, it shouldn't happen, but for the sake of
correctness, fix it. Also, unexport the IsOwner function since it is
only used within the package.

Signed-off-by: Yutaro Hayakawa <yutaro.hayakawa@isovalent.com>
Introduce a new status condition ConflictingClusterConfig to the
CiliumBGPClusterConfig which indicates that the ClusterConfig is
selecting the node that is already selected by other ClusterConfig.

We reused an existing conflict detection mechanism in the Cilium
Operator which checks the existing NodeConfig's owner reference when it
tries to create the new NodeConfig. If there's another ClusterConfig
owning the same node, it is observed as a conflict.

Because of this detection mechanism, the condition in the single
ClusterConfig doesn't have the global view of the conflict relationship.
To get the complete view, users need to gather the observed conflicts
from multiple ClusterConfigs.

Signed-off-by: Yutaro Hayakawa <yutaro.hayakawa@isovalent.com>
@YutaroHayakawa YutaroHayakawa force-pushed the yutaro/bgpv2-invalid-selection-cond branch from e54900f to c08cecf Compare October 30, 2024 01:46
@YutaroHayakawa
Copy link
Member Author

YutaroHayakawa commented Oct 30, 2024

Rebased to resolve conflict

@YutaroHayakawa
Copy link
Member Author

/test

@YutaroHayakawa
Copy link
Member Author

Cilium IPsec upgrade: GitHub timeout

@YutaroHayakawa
Copy link
Member Author

Closing since the content of this PR is mistakenly merged in #35601 which was suppose to be a doc-only PR.

#35601 was built on targeted the this branch, but I switched the base branch in the middle. I meant to merge the docs change first, but I forgot to remove the commits came from the old base branch.

@YutaroHayakawa YutaroHayakawa deleted the yutaro/bgpv2-invalid-selection-cond branch October 31, 2024 23:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note/misc This PR makes changes that have no direct user impact.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants