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

daemon: New route-based device detection and reconfiguration #17187

Conversation

joamaki
Copy link
Contributor

@joamaki joamaki commented Aug 18, 2021

This implements a new device detection for kube-proxy-replacement
and bandwidth manager. Devices are discovered by looking at all
global unicast routes configured in the system and extracting
from them suitable devices for Cilium to attach to.

Additionally this PR adds a runtime datapath reconfiguration for
new devices discovered at runtime. When a new device is detected
the node addressing information is rebuilt, node_config.h regenerated,
the datapath reloaded and finally the load-balancing service map is
rebuilt to include the IP addresses of the new device.

TODO:

  • Break this PR up into potentially multiple ones. The device reconfiguration can be separated.
  • Add ginkgo tests for the device reconfiguration. Covers both creating and removing devices. Should cover KPR, IPsec and BandwidthManager reconfig.
  • Modify device detection to be used even without KPR/option.Config.NodePort so it can be used for IPsec.
  • Test this in the wild, especially under AWS to test ENI interfaces added at runtime.

@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 Aug 18, 2021
@joamaki joamaki requested review from brb and borkmann August 18, 2021 20:10
daemon/cmd/daemon.go Outdated Show resolved Hide resolved
@joamaki joamaki force-pushed the pr/joamaki/new-device-detection-and-reconfiguration branch from 062c88b to f720cd9 Compare August 19, 2021 09:49
@joamaki
Copy link
Contributor Author

joamaki commented Aug 19, 2021

test-me-please

@joamaki joamaki force-pushed the pr/joamaki/new-device-detection-and-reconfiguration branch 2 times, most recently from bf28d87 to c9a70f9 Compare August 19, 2021 12:32
@joamaki
Copy link
Contributor Author

joamaki commented Aug 19, 2021

test-me-please

@joamaki joamaki force-pushed the pr/joamaki/new-device-detection-and-reconfiguration branch 3 times, most recently from a1c65db to 3649a21 Compare August 19, 2021 17:06
@joamaki
Copy link
Contributor Author

joamaki commented Aug 19, 2021

ci-gke

@joamaki
Copy link
Contributor Author

joamaki commented Aug 19, 2021

test-runtime

This helper is useful in other places as well.

Renamed it to DeduplicateStrings as KeepUniqueNames is confusing
as the name implies that only unique names would be left, e.g.
[a,b,b] => [a].

Signed-off-by: Jussi Maki <jussi@isovalent.com>
This implements a new device detection for kube-proxy-replacement
and bandwidth manager. Devices are discovered by looking at all
global unicast routes configured in the system and extracting
from them suitable devices for Cilium to attach to.

Additionally this PR adds a runtime datapath reconfiguration for
new devices discovered at runtime. When a new device is detected
the node addressing information is rebuilt, node_config.h regenerated,
the datapath reloaded and finally the load-balancing service map is
rebuilt to include the IP addresses of the new device.

Signed-off-by: Jussi Maki <jussi@isovalent.com>
@joamaki joamaki force-pushed the pr/joamaki/new-device-detection-and-reconfiguration branch from 3649a21 to 811e538 Compare August 23, 2021 15:14
@maintainer-s-little-helper
Copy link

Commit 811e538 does not contain "Signed-off-by".

Please follow instructions provided in https://docs.cilium.io/en/stable/contributing/development/contributing_guide/#developer-s-certificate-of-origin

@maintainer-s-little-helper maintainer-s-little-helper bot added the dont-merge/needs-sign-off The author needs to add signoff to their commits before merge. label Aug 23, 2021
@joamaki
Copy link
Contributor Author

joamaki commented Aug 23, 2021

I've split the initial device detection stuff into #17219. Keeping this open for reference for now.

@joamaki joamaki closed this Oct 4, 2021
@joamaki joamaki deleted the pr/joamaki/new-device-detection-and-reconfiguration branch October 4, 2021 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. dont-merge/needs-sign-off The author needs to add signoff to their commits before merge.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants