node-feature-discovery
node-feature-discovery copied to clipboard
Add NodeFeatureGroup API
Fixes: #1423
Deploy Preview for kubernetes-sigs-nfd ready!
| Name | Link |
|---|---|
| Latest commit | f984814d65477857b2fcba73b0a4e19dce1da8d0 |
| Latest deploy log | https://app.netlify.com/sites/kubernetes-sigs-nfd/deploys/662ac0b7c34f4b0008edc7e0 |
| Deploy Preview | https://deploy-preview-1487--kubernetes-sigs-nfd.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
/assign @marquiz
/cc @zvonkok
Great job @ArangoGutierrez! I left some comments below. Apart from that, should we mark the
enable-nodefeaturegroup-apiflag as experimental, or make it disabled by default? And can we support enabling/disabling it using configuration files?
Thanks for all the comments and reviews, I think I have addressed them all
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: AhmedGrati, ArangoGutierrez
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~OWNERS~~ [ArangoGutierrez]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
/retest
/milestone v0.16
This will be the big thing in v0.16 βοΈ
Rebased and refreshed @marquiz PTAL
@adrianchiris @AhmedGrati PTAL
The committers listed above are authorized under a signed CLA.
- :white_check_mark: login: ArangoGutierrez / name: Carlos Eduardo Arango Gutierrez (f984814d65477857b2fcba73b0a4e19dce1da8d0)
@ArangoGutierrez please rebase and address review comments. I'll take a full pass after that
@ArangoGutierrez please rebase and address review comments. I'll take a full pass after that
Rebased!
Thanks @AhmedGrati for your comments
The more I look at this, I feel that the NFG updates should be wired into the existing node updater pool (instead of creating a parallel one). This way nfd-master follows the -nfd-api-parallelism flag (instead of doubling on that).
It also should greatly reduce the stress on Kubernetes apiserver as evaluating an NFG basically requires fetching the same objects from the apiserver as any node update (get node object and all related NRs). Just need to refactor the nfd-master code so that everything is re-used, e.g. just modify/rename nfdAPIUpdateOneNode to handle NFG, too.
One special consideration is that now there are multiple parallel worker threads (as node-updater-pool workers) acting/racing on the same NFG object, trying to update its status. Maybe the easiest way to handle this would be through internal locking (have a per-NFG lock in nfd-master).
I'd be happy to hear others' thoughts on this, too. @PiotrProkop @adrianchiris @ahmedThresh
The more I look at this, I feel that the NFG updates should be wired into the existing node updater pool (instead of creating a parallel one). This way nfd-master follows the
-nfd-api-parallelismflag (instead of doubling on that).It also should greatly reduce the stress on Kubernetes apiserver as evaluating an NFG basically requires fetching the same objects from the apiserver as any node update (get node object and all related NRs). Just need to refactor the nfd-master code so that everything is re-used, e.g. just modify/rename
nfdAPIUpdateOneNodeto handle NFG, too.One special consideration is that now there are multiple parallel worker threads (as node-updater-pool workers) acting/racing on the same NFG object, trying to update its status. Maybe the easiest way to handle this would be through internal locking (have a per-NFG lock in nfd-master).
I'd be happy to hear others' thoughts on this, too. @PiotrProkop @adrianchiris @AhmedThresh
I like the idea of reusing the worker pool to handle both. As for locking if we would use patch instead of update maybe we can just implement some retries when resource version mismatch happens.
As for locking if we would use patch instead of update maybe we can just implement some retries when resource version mismatch happens.
Reliably deleting a specific item from a list isn't possible with patching AFAIU.
As for locking if we would use patch instead of update maybe we can just implement some retries when resource version mismatch happens.
Reliably deleting a specific item from a list isn't possible with patching AFAIU.
Yeah, I haven't thought about removing π
Blocked by https://github.com/kubernetes-sigs/node-feature-discovery/pull/1605
Blocked by #1605
Not Blocked anymore #1606 unblocked this
Codecov Report
Attention: Patch coverage is 21.55963% with 171 lines in your changes are missing coverage. Please review.
Project coverage is 39.13%. Comparing base (
abb31ae) to head (f984814).
Additional details and impacted files
@@ Coverage Diff @@
## master #1487 +/- ##
==========================================
- Coverage 39.71% 39.13% -0.58%
==========================================
Files 80 80
Lines 6841 7021 +180
==========================================
+ Hits 2717 2748 +31
- Misses 3864 4010 +146
- Partials 260 263 +3
| Files | Coverage Ξ | |
|---|---|---|
| pkg/nfd-master/metrics.go | 0.00% <ΓΈ> (ΓΈ) |
|
| pkg/nfd-master/updater-pool.go | 67.22% <66.00%> (ΓΈ) |
|
| pkg/apis/nfd/nodefeaturerule/rule.go | 71.92% <0.00%> (-10.11%) |
:arrow_down: |
| pkg/nfd-master/nfd-api-controller.go | 9.09% <0.00%> (-3.86%) |
:arrow_down: |
| pkg/nfd-master/nfd-master.go | 38.73% <15.73%> (-2.29%) |
:arrow_down: |
Depends on https://github.com/kubernetes-sigs/node-feature-discovery/pull/1681