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 annotations for configuring which devices cilium use for routing #728

Merged
merged 2 commits into from
Oct 18, 2024

Conversation

berkayoz
Copy link
Member

Fixes #702

Cilium excludes bridge devices while performing auto detection and suggests providing the selection filtermanually through the devices flag if auto detection is not suitable.

This PR adds the k8sd/v1alpha1/cilium/devices and k8sd/v1alpha1/cilium/direct-routing-device annotations to let users configure which devices(interfaces) can be used by cilium.

Initially we aimed to override this auto detection and select the device based on the node internal ip however the device names could be different on multiple machines which breaks this assumption. As an alternative we could set the devices field with a certain default value with wildcard filters to cover common interface names, e.g. eth+ lxdbr+ enp+.

@berkayoz berkayoz marked this pull request as ready for review October 14, 2024 09:19
@berkayoz berkayoz requested a review from a team as a code owner October 14, 2024 09:19
Copy link
Contributor

@bschimke95 bschimke95 left a comment

Choose a reason for hiding this comment

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

Great stuff, did a first pass

src/k8s/pkg/k8sd/features/cilium/internal.go Outdated Show resolved Hide resolved
src/k8s/pkg/k8sd/features/cilium/internal.go Outdated Show resolved Hide resolved
src/k8s/pkg/k8sd/features/cilium/internal.go Show resolved Hide resolved
Copy link
Contributor

@HomayoonAlimohammadi HomayoonAlimohammadi left a comment

Choose a reason for hiding this comment

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

Great job! Thanks a lot @berkayoz! Left a minor comment.

src/k8s/pkg/k8sd/features/cilium/network.go Show resolved Hide resolved
Copy link
Contributor

@HomayoonAlimohammadi HomayoonAlimohammadi left a comment

Choose a reason for hiding this comment

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

Thanks a lot @berkayoz! LGTM. Just some minor nit comments.

src/k8s/cmd/k8s/k8s_bootstrap_test.go Show resolved Hide resolved
@mateoflorido mateoflorido merged commit cabc958 into main Oct 18, 2024
18 of 19 checks passed
@mateoflorido mateoflorido deleted the KU-1783/cilium-devices branch October 18, 2024 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't access l2 loadbalancers with cilium CNI from a VM
4 participants