1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2024-12-14 11:57:51 +00:00
Commit graph

2489 commits

Author SHA1 Message Date
Kubernetes Prow Robot
4746c33915
Merge pull request #1675 from marquiz/devel/deps
go.mod: bump kubernetes to v1.30
2024-04-25 06:41:42 -07:00
Kubernetes Prow Robot
391865bbb2
Merge pull request #1651 from cmontemuino/doc-resource-limits
docs: document trade-offs in memory configuration
2024-04-25 06:41:29 -07:00
Kubernetes Prow Robot
688e3ce0ad
Merge pull request #1659 from Links2004/arm-support
add ARMv7 support
2024-04-25 06:21:22 -07:00
Kubernetes Prow Robot
cc9cb87516
Merge pull request #1674 from marquiz/devel/golangci-lint
scripts/test-infra: bump golangci-lint to v1.57.2
2024-04-24 06:47:57 -07:00
Markus Lehtonen
079db984bf go.mod: bump kubernetes to v1.30 2024-04-24 15:39:00 +03:00
Markus Lehtonen
4ffc63b25f scripts/test-infra: bump golangci-lint to v1.57.2 2024-04-24 15:17:47 +03:00
Kubernetes Prow Robot
ca13b4903d
Merge pull request #1669 from marquiz/devel/nfd-api-helpers-refactor
api/nfd: use varargs in the NewInstanceFeatures helper
2024-04-23 06:33:46 -07:00
Kubernetes Prow Robot
be44447dc0
Merge pull request #1670 from marquiz/devel/flag-feature-errors
apis/nfd: no error on ops that never match
2024-04-23 06:09:06 -07:00
Kubernetes Prow Robot
828acaa8cc
Merge pull request #1667 from marquiz/devel/api-tests
apis/nfd: add unit tests for match name functions
2024-04-23 06:08:48 -07:00
Kubernetes Prow Robot
8a2def761f
Merge pull request #1666 from kubernetes-sigs/dependabot/go_modules/api/nfd/golang.org/x/net-0.23.0
build(deps): bump golang.org/x/net from 0.20.0 to 0.23.0 in api/nfd
2024-04-23 04:42:19 -07:00
Markus Lehtonen
fbb7303562 apis/nfd: no error on ops that never match
Return false (i.e. "did not match") but no error when evaluating a match
expression against a "flag" type feature (which don't have any
associated value, just the name) if a MatchOp that never matches is
used.

This is preparation for supporting multi-type features, i.e. one
feature, like "cpu.cpuid", having e.g. "flag" and "attribute" type
features.
2024-04-23 11:07:49 +03:00
Markus Lehtonen
719c5186f6 api/nfd: use varargs in the NewInstanceFeatures helper
Make usage of this helper function more flexible.
2024-04-23 10:29:24 +03:00
Kubernetes Prow Robot
81bdf1dadb
Merge pull request #1668 from TessaIO/chore-remove-nfd-master-test-code-warnings
chore/nfd-master: remove warnings in nfd-master unit tests file
2024-04-23 00:20:39 -07:00
TessaIO
de50ac8800 chore/nfd-master: remove warnings in nfd-master unit tests file
Signed-off-by: TessaIO <ahmedgrati1999@gmail.com>
2024-04-22 22:27:15 +02:00
Markus Lehtonen
6b1e9c7860 apis/nfd: add unit tests for match name functions 2024-04-22 17:20:33 +03:00
dependabot[bot]
a8bb9152f3 build(deps): bump golang.org/x/net from 0.20.0 to 0.23.0 in api/nfd
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.20.0 to 0.23.0.
- [Commits](https://github.com/golang/net/compare/v0.20.0...v0.23.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-22 14:09:10 +03:00
Kubernetes Prow Robot
7dd3034362
Merge pull request #1665 from kubernetes-sigs/dependabot/go_modules/golang.org/x/net-0.23.0
build(deps): bump golang.org/x/net from 0.20.0 to 0.23.0
2024-04-19 06:35:12 -07:00
dependabot[bot]
864f52883d
build(deps): bump golang.org/x/net from 0.20.0 to 0.23.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.20.0 to 0.23.0.
- [Commits](https://github.com/golang/net/compare/v0.20.0...v0.23.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-19 12:58:39 +00:00
Kubernetes Prow Robot
a7c58b121c
Merge pull request #1660 from marquiz/devel/master-reconfigure-change
nfd-master: stop node-updater pool before reconfiguring api-controller
2024-04-15 11:10:32 -07:00
Kubernetes Prow Robot
91d3d5a7b0
Merge pull request #1653 from marquiz/devel/master-multiple-k8sclients
nfd-master: use separate k8s api clients for each updater
2024-04-15 09:18:51 -07:00
Markus Lehtonen
8ad6210d5c nfd-master: use separate k8s api clients for each updater
Sharing the same client between updater threads virtually serializes
access, in practice making the effective parallelism close to 1.

With this patch, in my bench cluster of 300 nodes, the time taken by
updating all nodes drops from ~2 minutes to ~12 seconds (with the
default parallelism of 10 node updater threads). This demonstrates the
10-fold increased parallelism from ~1 to 10.

There might be other solutions that could be explored, e.g. caching
nodes with an indexer/lister but otoh nfd doesn't necessarily need/want
to watch every little change in each node. We only need to get the node
when something in our own CRDs change (we don't react to any changes in
the node object itself). Using multiple clients was the most obvious
choice to solve the problem for now.
2024-04-15 19:00:30 +03:00
Links2004
8acff5ede6
Add armv7 support
This allows the nfd to run on arm devices like the Raspberry Pi > 2
with armv7 core or armv8 in 32Bit mode.

The build tests will only be run for linux/amd64 and linux/arm64.
Releases will be made for all Platforms.
2024-04-15 16:42:44 +02:00
Kubernetes Prow Robot
624c02e1e2
Merge pull request #1633 from marquiz/devel/validate-tests
apis/nfd/validate: loosen validation of feature annotations
2024-04-11 07:26:17 -07:00
Markus Lehtonen
7fbada8b86 apis/nfd/validate: more comprehensive unit tests
Also add license header to the test.go file and fix one bug in
MatchFeature validation.
2024-04-11 14:57:31 +03:00
Kubernetes Prow Robot
86a3817f31
Merge pull request #1662 from ArangoGutierrez/fixgenerated
Fix Make generate
2024-04-09 10:44:16 -07:00
Carlos Eduardo Arango Gutierrez
50d9874e72
Fix update_codegen
Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>
2024-04-09 18:28:04 +02:00
Kubernetes Prow Robot
da7ca56a99
Merge pull request #1661 from kubernetes-sigs/dependabot/go_modules/api/nfd/google.golang.org/protobuf-1.33.0
api/nfd: run go mod tidy
2024-04-09 03:50:12 -07:00
Markus Lehtonen
a9167e6875 apis/nfd/validate: loosen validation of feature annotations
Don't require that the annotation value must conform to the (strict)
requirements of label values. In the Kubernetes API annotation values do
not have other restrictions than that the total size (keys and values)
of _all_ annotations combined of an object must not exceed 256kB.

This patch sets a maximum size limit of 1kB for the value of a single
feature annotation created by NFD. This limit is rather arbitrary but
should be enough for the NFD usage scenarios (until proven wrong).
2024-04-09 13:30:22 +03:00
dependabot[bot]
2f6a06df07 api/nfd: run go mod tidy
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Markus Lehtonen <markus.lehtonen@intel.com>
2024-04-09 13:26:42 +03:00
Kubernetes Prow Robot
6b80f654d4
Merge pull request #1600 from ArangoGutierrez/e2e-not-k8s
Move NFD api to a separate go mod
2024-04-09 02:06:06 -07:00
Markus Lehtonen
ba4cebb29e nfd-master: stop node-updater pool before reconfiguring api-controller
Prevents potential race between node-updater pool and the api-controller
when re-configuring nfd-master. Reconfiguration causes a new
api-controller instance to be created so nfd api lister might change in
the midst of processing a node update (if the pool was running). No
actual issues related to this have been identified but races (like this)
should still be avoided.
2024-04-09 10:45:07 +03:00
Kubernetes Prow Robot
31a56acdd4
Merge pull request #1655 from marquiz/devel/master-no-publish
nfd-master: parse kubeconfig even with NoPublish set
2024-04-08 05:14:21 -07:00
Markus Lehtonen
8709cccf71 nfd-master: parse kubeconfig even with NoPublish set
Don't try to be too smart when kubeconfig is needed. In practice, the
nfd-master really doesn't work anymore (with the NodeFeature API
enabled) without a kubeconfig set. This patch fixes crashes happening
when NoPublish is enabled, e.g. in listing all nodes in the nfd api
handler and in getting single node objects in the node updater pool.

This patch changes the kubeconfig parsing to happen at the creation of
the nfd-master instance. We don't need to do that at reconfigure time as
none of the dynamic config options affect it. Unit tests are adjusted,
accordingly.
2024-04-08 14:25:27 +03:00
Kubernetes Prow Robot
8f5830f3c6
Merge pull request #1658 from marquiz/devel/master-opts
nfd-master: implement opts for modifying NfdMaster instance
2024-04-08 03:59:52 -07:00
Markus Lehtonen
fcb8d3cda4 nfd-master: implement opts for modifying NfdMaster instance
This provides a more controlled way for setting up the NfdMaster
instance for testing.
2024-04-05 20:21:19 +03:00
Kubernetes Prow Robot
199d665046
Merge pull request #1656 from marquiz/devel/channel-simplify
Tidy up usage of channels for signaling
2024-04-05 07:51:34 -07:00
Carlos Eduardo Arango Gutierrez
3434557d7c
Move NFD api to a separate go mod
Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>
2024-04-05 16:35:47 +02:00
Kubernetes Prow Robot
86c88f18f0
Merge pull request #1650 from marquiz/devel/readme
Update readme to v0.15.4 release
2024-04-05 06:01:46 -07:00
Kubernetes Prow Robot
cb24f7c234
Merge pull request #1657 from marquiz/devel/master-label-whitelist
nfd-master: prevent crash on empty config struct
2024-04-05 05:36:52 -07:00
Markus Lehtonen
26a80cf142 Tidy up usage of channels for signaling
This started as a small effort to simplify the usage of "ready" channel
in nfd-master. It extended into a wider simplification/unification of
the channel usage.
2024-04-05 14:39:58 +03:00
Markus Lehtonen
b27676451a nfd-master: prevent crash on empty config struct
Change the handling of LabelWhiteList config option to use a pointer to
detect when the option is unset. This doesn't fix any detected crash but
is merely general improvement and stabilization, serving easier testing.

Also, use the regexp type from the core libs for the config struct -
dropping the unmasrhalling code for our custom regexp type - as the core
regexp now implements unmarshaller itself.
2024-04-05 14:19:44 +03:00
Kubernetes Prow Robot
ad96c301a4
Merge pull request #1642 from marquiz/devel/master-updater-pool-lock
nfd-master: protect node updater pool queueing with a lock
2024-04-05 03:31:10 -07:00
Kubernetes Prow Robot
af8a41cc02
Merge pull request #1639 from TessaIO/chore-add-prometheus-pod-monitor-interval
chore/deploy: make interval property in PodMonitor configurable
2024-04-05 03:03:26 -07:00
Carlos M
cc53b604c5
chore: include suggestions from code review
Co-authored-by: Carlos Eduardo Arango Gutierrez <arangogutierrez@gmail.com>
2024-04-05 10:01:08 +02:00
Kubernetes Prow Robot
275e625c2a
Merge pull request #1652 from marquiz/devel/reuse-node
nfd-master: get node object only once when updating node
2024-04-04 05:02:45 -07:00
Markus Lehtonen
44a5a5b4a8 nfd-master: get node object only once when updating node
Prevent excess queries of node objects from the Kubernetes apiserver.
This significantly speeds up node updates (and reduces the load on the
apiserver) as the client-side throttling (which is good) does not bite
us that hard.
2024-04-04 14:44:52 +03:00
Kubernetes Prow Robot
fcf819ad9f
Merge pull request #1643 from ozhuraki/topology-health
nfd-topology-updater: Add liveness probe
2024-04-03 07:34:08 -07:00
Oleg Zhurakivskyy
f2e9557a2d nfd-topology-updater: Add liveness probe
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
2024-04-03 13:15:54 +03:00
cmontemuino
54b01a2576
docs: document trade-offs in memory configuration
Problem: memory requests and limits has been set for `master` process in
PR #1631. It does not follow best practices for setting those values,
but the intention was provide default values for a wide variety of
clusters, including small ones.

Solution: provide solid documentation about the problems that might
happen in production environments when
`resource.memory.requests << resource.memory.limits`. Add a link to
relevant external sources, which includes the advise from Tim Hockin:
> Always set memory limit == request

Signed-off-by: cmontemuino <1761056+cmontemuino@users.noreply.github.com>
2024-04-02 19:01:50 +02:00
Kubernetes Prow Robot
7938e81c33
Merge pull request #1631 from TessaIO/chore-add-resources-limits-and-requests
chore/deployment: add resources requests and limits for helm and Kustomize
2024-04-02 02:03:59 -07:00