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

init.sh: move node_config.h header generation to Go #25378

Closed
ti-mo opened this issue May 11, 2023 · 0 comments · Fixed by #25380
Closed

init.sh: move node_config.h header generation to Go #25378

ti-mo opened this issue May 11, 2023 · 0 comments · Fixed by #25380
Assignees
Labels
kind/cleanup This includes no functional changes. sig/datapath Impacts bpf/ or low-level forwarding details, including map management and monitor messages.

Comments

@ti-mo
Copy link
Contributor

ti-mo commented May 11, 2023

init.sh writes and seds a bunch of values in node_config.h, and this should be done from Go going forward.

Some things to pay attention to:

  • Taking the same approach of appending values to an existing header is a bad idea in general. node_config.h should include an autogenerated file that is generated from Go using a template or equivalent logic if a template is overkill. That way, compilation will fail if the header is not generated yet, making bugs in the startup sequence more obvious.
  • grep for node_config.h in the codebase to form an idea of which components explicitly depend on it. There are comments in Go files mentioning the file, so those spots may be of particular interest.
  • ip link show info may be available in DeviceManager.
  • sysctls can be obtained through package pkg/sysctl.
@ti-mo ti-mo added sig/datapath Impacts bpf/ or low-level forwarding details, including map management and monitor messages. kind/cleanup This includes no functional changes. labels May 11, 2023
@rgo3 rgo3 added this to the Deprecate init.sh milestone Jun 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/cleanup This includes no functional changes. sig/datapath Impacts bpf/ or low-level forwarding details, including map management and monitor messages.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants