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

feat: search PATH for CNI plugins and required binaries #107

Merged
merged 4 commits into from
Feb 15, 2024

Conversation

brianmcgee
Copy link
Contributor

  • adds BinPath to CNI node config and passes this through to CNI.
  • defaults CNI bin path to match the process PATH, pre-pending /opt/cni/bin first.
  • adds preflight support to check multiple directories instead of just one.
  • defaults the user binaries directory list to match the process PATH, pre-pending /usr/local/bin first.
  • if installation of missing dependencies is desired, they are installed in the first entry in the directory lists e.g. /opt/cni/bin, /usr/local/bin which preserves the current behaviour.

This change is designed to make it easier to integrate with Nix, where binaries are not installed in the usual places. More generally I think it provides better ergonomics to check in the PATH.

@brianmcgee brianmcgee requested a review from a team as a code owner February 2, 2024 11:24
brianmcgee added a commit to brianmcgee/nex-experiments that referenced this pull request Feb 2, 2024
@jordan-rash
Copy link
Contributor

Thanks @brianmcgee! When #104 lands later today, this PR will likely need to be edited as a lot of the internals are changing. @kthomas and I have spoken about it, and we are happy to help port this once the pending changes land

@brianmcgee
Copy link
Contributor Author

Thanks @brianmcgee! When #104 lands later today, this PR will likely need to be edited as a lot of the internals are changing. @kthomas and I have spoken about it, and we are happy to help port this once the pending changes land

Seems I have great timing 😉

@brianmcgee
Copy link
Contributor Author

@jordan-rash rebased on #104

@jordan-rash
Copy link
Contributor

Other then the small nit, this LGTM. Could you do one more rebase (to fix the hanging tests) and we will get it merged

@brianmcgee
Copy link
Contributor Author

I'll have a look later this evening, having some trouble running the test suite on NixOS which I need to work through.

@brianmcgee brianmcgee force-pushed the feat/better-path branch 2 times, most recently from e6892a2 to 70936ee Compare February 9, 2024 11:19
- adds `BinPath` to CNI node config and passes this through to CNI.
- defaults CNI bin path to match the process `PATH`, pre-pending `/opt/cni/bin` first.
- adds support to preflight to check multiple directories instead of just one.
- defaults the user binaries directory list to match the process `PATH`, pre-pending `/usr/local/bin` first.
- if installation of missing dependencies is desired, they are installed in the first entry in the directory lists e.g. `/opt/cni/bin`, `/usr/local/bin` which preserves the current behaviour.

This change is designed to make it easier to integrate with Nix, where binaries are not installed in the usual places. More generally I think it provides better ergonomics to check in the `PATH`.
I didn't have docker installed, but it took a while to figure out the issue as the fc-image build was not checking for errors.
This is to allow the tests to run on NixOS.
@jordan-rash
Copy link
Contributor

Awesome. I'll do a quick review and get it merged

@jordan-rash jordan-rash requested a review from kthomas February 9, 2024 23:43
Copy link
Contributor

@kthomas kthomas left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@jordan-rash jordan-rash left a comment

Choose a reason for hiding this comment

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

LGTM

@jordan-rash jordan-rash merged commit b4873fc into synadia-io:main Feb 15, 2024
3 checks passed
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.

3 participants