node-feature-discovery
node-feature-discovery copied to clipboard
Discussion: moving source logic into separate module
Hi there! We are working on a compatiibility spec for the opencontainer intiaitive, and interested to use NFD in a TBA plugin to extract information about a system. I started looking at this idea tonight, and the contents of source are what I'm wanting to try. However, I'm not liking having the need to bump up the version of Go to 1.21 and install all of kubernetes.
While Kubernetes is one of my top use cases, it's not a use case for all of compatibility checking, and I'd want a plugin tool we develop to not have this strict requirement. Thus, I wanted to start discussion about if it might be possible to have a library that provides the contents of source, and one that is more streamlined, dependency wise, that both (and ultimately multiple projects) might use. I can definitely help with this, and in the meantime I will test out NFD for this use case.
Ping @ArangoGutierrez and thank you!
Also there is so much here, I seriously love this library :heart:
The Attributes / Flags / Instances I still need to parse (will likely do tomorrow) but just seeing all of it in go structs printed to my terminal... awesome.
Thanks @vsoch for the proposal. Maybe this is something we could do, if there are potential users and something that you would like work on. We could e.g. have sigs.k8s.io/node-feature-discovery/source as a separate go module to streamline the dependencies. We just need to carefully think what it means to provide this an API for external users, e.g. in terms of API compatibility.
Hey @marquiz if it’s ok with you, can I start to prototype this in another repository? If you like it, you can test out here and eventually transfer here. We are needing to use the functionality in several projects and it’s becoming very problematic to add in Kubernetes and require an update to go.
Hi folks! To keep this discussion moving (and not block our projects) I made a prototype of a "source only" node-feature-discovery, here https://github.com/converged-computing/nfd-source and you can see the number of dependencies we could nix by way of it here https://github.com/compspec/compspec-go/pull/22/files and that includes not needing to bump up to 1.21. It would be great to continue discussion, and I'd be happy to prototype something here to test out! I'm not familiar with the code base but I pick things up fairly quickly so not worried about that.