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

1575 commits

Author SHA1 Message Date
Talor Itzhak
727de56191 documentaion: document the reactive updates feature
Signed-off-by: Talor Itzhak <titzhak@redhat.com>
2023-03-16 11:53:12 +02:00
Talor Itzhak
91daff3b59 deployment/helm: update helm charts
Adding kubelet state directory mount

Signed-off-by: Talor Itzhak <titzhak@redhat.com>
2023-03-16 11:51:45 +02:00
Talor Itzhak
6de13fe456 e2e: reactive updates test
Signed-off-by: Talor Itzhak <titzhak@redhat.com>
2023-03-12 12:43:17 +02:00
Talor Itzhak
8924213d14 topology-updater: make it possible to disable sleep-interval
Especially convenient for testing porpuses and
completely harmless

Signed-off-by: Talor Itzhak <titzhak@redhat.com>
2023-03-12 12:43:17 +02:00
Talor Itzhak
8afd819132 deployment/topology-updater: add mount for kubelet state dir
This mount is needed for watching the state files

Signed-off-by: Talor Itzhak <titzhak@redhat.com>
2023-03-12 12:43:13 +02:00
Talor Itzhak
1c12876815 topology-updater: log event type that triggered update
Specify the event type as part of the log message.
In order to reduce the log volume, make it V4

Signed-off-by: Talor Itzhak <titzhak@redhat.com>
2023-03-12 12:37:24 +02:00
Talor Itzhak
7b248ecae2 topology-updater: update CRs when notified
When a message received via the channel,
the main loop updates the `NodeResourceTopology` objects.

The notifier will send a message via the channel if:
1. It reached the sleep timeout.
2. It detected a change in Kubelet state files

Signed-off-by: Talor Itzhak <titzhak@redhat.com>
2023-03-12 12:37:24 +02:00
Talor Itzhak
175e0c81aa topology-updater: add kubelet-state-dir flag
On different Kubernetes flavors like OpenShift for exmaple,
the Kubelet state directory path is different. make it configurable
for maximum flexability.

Signed-off-by: Talor Itzhak <titzhak@redhat.com>
2023-03-12 12:37:24 +02:00
Talor Itzhak
0f65b87329 kubeletnotifier: introduce kubeletnotifier package
Enabling reactive update for nfd-topology-updater
by detecting changes in Kubelet state/checkpoint files,
and signaling to the main loop to update the NodeResourceTopology
objects.

This has high value when scaling is an issue.
Having multiple pods deployed in between single update instance
might reflect incorrect resource accounting in the NRT CRs.
Example:
Time Interval = 5s
t0 - New update sent to NRT CRs
t1 - Schedule guaranteed podA
t2 - Schedule guaranteed podB
time elapsed between t0-t2 < 5 seconds,
IOW the update on t0 is the recent update.

In t2 the resource accounting reflected by NRT
is not aligned with the actual accounting because
NRT CRs doesn't reflect the change happened in t1.

With this reactive update feature we expect an update to be trigger
between t1 and t2 so the NRT objects will reflect more accurate
picture.

There still might be a scenario when the updates
aren't fast enough, but this is an additional
future planned optimization.

The notifier has two event types:
1. Time based - keeping the old behavior, trigger
an update per interval.
2. FS event - trigger an update when Kubelet state/checkpoint files modified.

Signed-off-by: Talor Itzhak <titzhak@redhat.com>
2023-03-12 12:37:24 +02:00
Kubernetes Prow Robot
adea670ded
Merge pull request #1077 from marquiz/devel/deps
go.mod: update kubernetes to v1.26.2
2023-03-10 05:54:40 -08:00
Markus Lehtonen
5e5b1749d9 go.mod: update kubernetes to v1.26.2
Also updates golang.org/x/net to v0.7.0.
2023-03-10 15:31:16 +02:00
Kubernetes Prow Robot
56d186b4d1
Merge pull request #1070 from AhmedGrati/feat-implement-e2e-denylabelns-flag
test: implement e2e test of the deny-label-ns flag
2023-03-10 05:10:39 -08:00
Kubernetes Prow Robot
260c2f26ba
Merge pull request #1082 from marquiz/devel/ci-lint
scripts/test-infra: bump golangci-lint to v1.51.2
2023-03-10 02:30:41 -08:00
Markus Lehtonen
28cb0cd15d scripts/test-infra: bump golangci-lint to v1.51.2 2023-03-10 12:12:09 +02:00
AhmedGrati
16abfd7b0e test: implement e2e test of the deny-label-ns flag
Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>
2023-03-10 11:11:36 +01:00
Kubernetes Prow Robot
fb69bac17f
Merge pull request #1076 from Sajiyah-Salat/sajiyah-#1075
Update worker-configuration-reference.md
2023-03-09 13:06:30 -08:00
Kubernetes Prow Robot
37504109d6
Merge pull request #1080 from marquiz/devel/deploy-topology-updater
deployment: fixes for mounting kubelet config
2023-03-09 09:50:02 -08:00
Kubernetes Prow Robot
d90a4f4d04
Merge pull request #1078 from marquiz/devel/helm
helm: fix topology-updater rbac
2023-03-09 09:42:02 -08:00
Markus Lehtonen
ed8a87b131 helm: fix handling of topologyUpdater.kubeletConfigPath
By default we use the configz API endpoint so no mounts are needed.
2023-03-09 17:49:31 +02:00
Markus Lehtonen
33a1e3d114 kustomize: drop mount for kubelet config in topology-updater
We use the configz endpoint nowadays.
2023-03-09 17:48:56 +02:00
Markus Lehtonen
40644aab60 helm: create topology-updater RBAC rules by default
Create RBAC rules if topology-updater is enabled. Previously installing
with topologyUpdater.enable=true (without
topologyUpdater.rbac.create=true) resulted in a crashloogbackoff as RBAC
was missing.
2023-03-09 16:16:09 +02:00
Markus Lehtonen
40d7139257 helm: fix topology-updater rbac clusterrole
Access to nodes/proxy resource was accidentally given to nfd-master
(which really doesn't need it), not topology-updater.
2023-03-09 16:15:03 +02:00
Sajiyah Salat
43bcacbb42
Create worker-configuration-reference.md 2023-03-08 21:34:52 +05:30
Sajiyah Salat
7082c31d6c
Update worker-configuration-reference.md 2023-03-08 21:33:44 +05:30
Sajiyah Salat
fb2d70a313
Update worker-configuration-reference.md 2023-03-08 21:28:45 +05:30
Kubernetes Prow Robot
9e55028c92
Merge pull request #1069 from fmuyassarov/codecov
test: add code coverage reporting
2023-03-07 06:58:42 -08:00
Kubernetes Prow Robot
f84e05e035
Merge pull request #1066 from AhmedGrati/fix-customization-guide-typos
docs: fix usage customization guide typos
2023-03-07 06:58:35 -08:00
Kubernetes Prow Robot
2b865759fd
Merge pull request #1073 from marquiz/devel/e2e-worker-wait
test/e2e: reduce worker wait-for-ready period to 2s
2023-03-07 04:18:18 -08:00
Kubernetes Prow Robot
9d517162ba
Merge pull request #1074 from marquiz/devel/e2e-crd-cleanup
test/e2e: cleanup NodeFeature objects before/after tests
2023-03-07 03:52:18 -08:00
Markus Lehtonen
66f6ea76dd test/e2e: cleanup NodeFeature objects before/after tests
Make sure that stale NodeFeature objects from previous test case are not
interfering the next one.
2023-03-07 13:24:01 +02:00
Markus Lehtonen
67bb6c2d5f test/e2e: reduce worker wait-for-ready period to 2s
Reduce the wait time of nfd-worker pods to be in ready-state (before
proceeding with tests) from five to two seconds. Make tests faster to
run. Two seconds should be enough for nfd-workers to do their job and
get nodes labeled.
2023-03-07 11:35:42 +02:00
Muyassarov, Feruzjon
82b388fc3b test: add code coverage reporting
Add code coverage reporting so that the report is then available
to the PR author and reviewers via codecov GitHub app.

Signed-off-by: Muyassarov, Feruzjon <feruzjon.muyassarov@intel.com>
2023-03-01 14:34:30 +02:00
AhmedGrati
ff2dddd27d docs: fix usage cusomization guide typos
Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>
2023-02-27 10:26:25 +01:00
Kubernetes Prow Robot
163a6dc502
Merge pull request #1049 from jlojosnegros/node-signature
topology-updater:compute pod set fingerprint
2023-02-22 02:05:58 -08:00
Jose Luis Ojosnegros Manchón
b65015027f topology-updater: e2e test for podFingerprint 2023-02-22 10:22:50 +01:00
Jose Luis Ojosnegros Manchón
b340d112a8 topology-updater:compute pod set fingerprint
Add an option to compute the fingerprint of the current pod set on each
node.

Report this new fingerprint using an attribute in NRT object.
2023-02-22 10:22:50 +01:00
Kubernetes Prow Robot
fab3c8842c
Merge pull request #1065 from marquiz/devel/e2e-focus
test/e2e: rename ginkgo focus for tests
2023-02-22 01:15:59 -08:00
Jose Luis Ojosnegros Manchón
1a687cb286 topology-updater: Refactor Scan to expand response
We are gonna add new data to Scan response so better introduce a new
ScanResponse struct as Scan return value to make it easier.
2023-02-22 09:56:28 +01:00
Markus Lehtonen
adf79d5e38 test/e2e: rename ginkgo focus for tests
Make it easier to only run tests for nfd master/worker and skip
topology-updater tests.
2023-02-21 13:37:25 +02:00
Kubernetes Prow Robot
69440d7820
Merge pull request #1062 from yanggangtony/fix-doc
docs: describe nfd-topology-gc in introduction.md
2023-02-21 02:17:48 -08:00
Kubernetes Prow Robot
d88b39d56d
Merge pull request #1064 from fmuyassarov/cpuid-2.2.4
go.mod: bump cpuid to v2.2.4
2023-02-21 00:47:49 -08:00
Muyassarov, Feruzjon
0e2f2c4587 go.mod: bump cpuid to v2.2.4
Bump cpuid version to v2.2.4 in the go.mod so that WRMSRNS (
Non-Serializing Write to Model Specific Register) and MSRLIST
(Read/Write List of Model Specific Registers) instructions are
detectable.

Signed-off-by: Muyassarov, Feruzjon <feruzjon.muyassarov@intel.com>
2023-02-20 22:58:59 +02:00
Kubernetes Prow Robot
6235de0646
Merge pull request #1063 from marquiz/fixes/darwin-arm64
source/cpu: fix build flags of cpuid detection
2023-02-20 01:43:40 -08:00
yanggang
150d4f4db2
docs: describe nfd-topology-gc in introduction.md
Signed-off-by: yanggang <gang.yang@daocloud.io>
2023-02-18 06:12:35 +08:00
Markus Lehtonen
52fcf0b0e9 source/cpu: fix build flags of cpuid detection
Non-x86_64 platforms are virtually only buildable on Linux because the
getauxval() glibc function is missing on many platforms.
2023-02-17 21:46:05 +02:00
Kubernetes Prow Robot
f3402b9c9b
Merge pull request #1059 from ArangoGutierrez/go1-20
GO Update version to 1.20
2023-02-16 10:03:39 -08:00
Kubernetes Prow Robot
c007c9eccf
Merge pull request #1061 from marquiz/devel/golang-ci-lint
scripts/test-infra: bump golangci-lint to v1.51.1
2023-02-16 09:41:39 -08:00
Markus Lehtonen
cc57fa6a93 test/e2e: drop deprecated rand.Seed()
Just drop it, bump to golang v1.20 will cause the generator to be
automatically seeded at program startup:

https://pkg.go.dev/math/rand@go1.20#Seed
2023-02-16 19:22:35 +02:00
Markus Lehtonen
1b8ab4b862 scripts/test-infra: bump golangci-lint to v1.51.1
Update to the latest release.
2023-02-16 19:04:12 +02:00
Kubernetes Prow Robot
d1eb3c567e
Merge pull request #1058 from fenggw-fnst/typo
Fix some typos
2023-02-16 03:05:39 -08:00