-
Notifications
You must be signed in to change notification settings - Fork 8
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
Deploy NFD as topology-updater component #88
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the general direction seems good
in a future PR, we will need to clarify (or, even better, automate) how we pull the manifests for the external projects like NFD and scheduler-plugins and RTE.
Thinking about it, we should clarify indeed what's the relationship between the deployer and these manifests, because the users would benefit to know which source is truly authoritative.
But again, all of this should be addressed by a separate future PR.
The idea is not so good because it was relying on the fact that NFD and RTE have the same K8S resources (i.e. both have This assumption was wrong because NFD also has separate manifests for |
565a63b
to
a0a594e
Compare
Add all the relevant yamls for the nfd-master and nfd-topology-updater components Signed-off-by: Talor Itzhak <[email protected]>
- Add nfd constants - Validate the new component - Expand the DaemonSet function - Expand Deployment function with namespace parameter Signed-off-by: Talor Itzhak <[email protected]>
a0a594e
to
8044411
Compare
8044411
to
5ec198f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
initial review
in general there are some minor things. My biggest concern is trying to reduce the API surface as much as possible. I'm looking at the Deployable
interface, let's see if we can get rid of it.
pkg/deployer/deployer.go
Outdated
@@ -30,6 +30,12 @@ import ( | |||
"github.com/k8stopologyawareschedwg/deployer/pkg/tlog" | |||
) | |||
|
|||
type Deployable interface { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
next time, I suggest to consider adding the interface/new API alongside with its intended use case.
In general we should demostrate new APIs/interfaces as soon as possible, splitting them out only if the change is really huge.
demo of possible changes: https://gist.github.com/fromanirh/55976a935e3af56c763d1066c04ee9b5 |
played a bit with the implementation. Overall looks good! Let's spend a bit more time trying to refining the API side, and if we get the chance let's do some polishing, but it's close to be ready. |
Thank you for your comments.
BTW we can change the interface name as well to something more elegant/catchy. In general I would like to hear from you, what is so bad with that API that we're trying to avoid from it here. |
Implement the business logic that creates the nfd manifests and render it Signed-off-by: Talor Itzhak <[email protected]>
24bd3c7
to
f01854a
Compare
True. But in your code we need a form of dispatching (= a if chain) as well, only at module level: eed7c0d#diff-ead887f2895c525a257ae9593cdfd903139ab12da417dc111b47d059844a0a96R46 (and others)
We can, but we should? I don't really see a benefit here. A consistent interface among different modules is good enough I believe.
Another problem is
It is not so bad by any mean. But I think is not the best direction either. |
f01854a
to
e834d6a
Compare
Since rte and nfd deployment procedure is almost identical, let's have a single implmentation for them both, but yet keep the API changes as minimal as possible. Signed-off-by: Talor Itzhak <[email protected]> Co-authored-by: Francesco Romani <[email protected]>
Added coverage for the following packages: - manifests/updates Signed-off-by: Talor Itzhak <[email protected]>
Control the image selection via an environment variable or use the latest release as default: https://github.com/kubernetes-sigs/node-feature-discovery/releases Signed-off-by: Talor Itzhak <[email protected]>
Signed-off-by: Talor Itzhak <[email protected]>
e834d6a
to
d763bb5
Compare
I change the implementation as you suggested. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
thanks for the updates
This change will allow deployer to deploy NFD as the topology-updater component.
NFD is the u/s version of RTE, thus it's is important to have the ability to use it.
The default topology-updater component is still RTE since it's more mature and tested for quite some time.
This PR provides NFD support only for K8S.
We'll add support for OCP in the future when NFD will catch up with RTE (from abilities perspective)