1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2024-12-15 17:50:49 +00:00
Commit graph

1076 commits

Author SHA1 Message Date
Kubernetes Prow Robot
bf8a1a217a
Merge pull request #629 from marquiz/devel/go-117
Bump to golang v1.17
2021-10-21 04:32:10 -07:00
Markus Lehtonen
9d1eea243b Bump to golang v1.17 2021-10-21 14:16:55 +03:00
Kubernetes Prow Robot
f46b4e0e03
Merge pull request #628 from marquiz/devel/helm-fix
deployment/helm: don't force sleep-interval in  worker cmdline flags
2021-10-21 01:54:09 -07:00
Markus Lehtonen
890d9455f1 deployment/helm: don't force sleep-interval in worker cmdline flags
Drop --sleep-interval from the template. We really don't want to do that
as. First, it's the default value so no use repeating that in the
template. And more importantly, the commandline flag will override
anything that will be provided in the worker config file, making it
impossible for users to specify the sleep interval (other than by
editing the template directly).
2021-10-21 11:33:19 +03:00
Kubernetes Prow Robot
93a0a9f14a
Merge pull request #624 from marquiz/docs/jekyll-theme
docs: update dependencies
2021-10-19 07:11:03 -07:00
Kubernetes Prow Robot
6f0948efc5
Merge pull request #625 from Tal-or/fix_klog
topology-updater:fix klog initialization
2021-10-12 03:19:47 -07:00
Talor Itzhak
674720e922 topology-updater:fix klog initialization
We should use the same flag set for both program and klog arguments.
Otherwise we won't be able to provide klog flags properly

Signed-off-by: Talor Itzhak <titzhak@redhat.com>
2021-10-11 21:36:54 +03:00
Markus Lehtonen
d65d6ab2f4 docs: update ruby deps 2021-10-11 11:27:16 +03:00
Markus Lehtonen
f8bacd9097 docs: update jekyll-rdt-theme to v2.0.10
Update jekyll-rdt-theme to the latest released version. Also sync site
customization (docs/_includes) with that.
2021-10-11 11:26:37 +03:00
Markus Lehtonen
e342076a5e deployment: clean up base/topologyupdater-daemonset
The base should really have the very bare minimum. Remove all redundant
(at default-value) args and move the others to the specific
topologyupdater kustomize component. This also makes these settings
re-usable in user-specific overlays (that are not based on
topologyupdater-daemonset).
2021-10-06 21:42:31 +03:00
Kubernetes Prow Robot
06e7a784f3
Merge pull request #622 from zwpaper/master
drop the topology updater job
2021-10-06 06:54:34 -07:00
Wei Zhang
4b1e9d7211
deployment: drop the topology updater job 2021-10-06 10:28:37 +08:00
Kubernetes Prow Robot
b445c11589
Merge pull request #607 from marquiz/devel/deployment
deployment: align topologyupdater overlays
2021-10-05 03:07:09 -07:00
Kubernetes Prow Robot
7b8e7f0806
Merge pull request #610 from marquiz/documentation/toc-fix
docs: fix TOCs
2021-10-04 06:33:08 -07:00
Kubernetes Prow Robot
a7bda36df5
Merge pull request #615 from marquiz/devel/ci-lint
scripts/test-infra: bump golangci-lint to v1.42.1
2021-10-04 06:13:07 -07:00
Markus Lehtonen
0b386981a6 pkg/nfd-master: fix linter errors in tests 2021-10-04 09:51:38 +03:00
Markus Lehtonen
f1f79575fe scripts/test-infra: bump golangci-lint to v1.42.1 2021-10-04 09:43:21 +03:00
Markus Lehtonen
819f333118 docs: fix TOCs
Make table of contents in the pages cleaner and more readable by
dropping the main heading (H1 level) from TOCs. This was the original
intention with the usage of "no_toc" kramdown magic, which was broken,
however. The kramdown class magic needs to be specified on the line
immediately following the headinds, otherwise it has no effect. We need
to disable MD022 rule of mdlint as it does not understand this magic.
2021-09-30 10:26:25 +03:00
Markus Lehtonen
1e85001a5f deployment: align topologyupdater overlays
Align "topologyupdater" overlay with "topologyupdater-job". Both should
deploy topologyupdater as a standalone application. Previously the
topologyupdater overlay did not deploy nfd-master at all (but deployed
nfd-worker instead) causing the pods to end up in crashloopbackoff as
there was no master to communicate with.
2021-09-30 10:22:24 +03:00
Kubernetes Prow Robot
d76af7dca3
Merge pull request #613 from krishna2603/patch-1
Update developer-guide.md
2021-09-29 13:09:21 -07:00
Kubernetes Prow Robot
c9fe0d77f5
Merge pull request #609 from marquiz/devel/deployment-rename
deployment: fix typo in overlay name
2021-09-29 12:35:20 -07:00
krishna2603
dbb99c6f18
Update developer-guide.md
changed exapmle to example
2021-09-29 23:58:27 +05:30
Kubernetes Prow Robot
f5efca2dbb
Merge pull request #611 from marquiz/documentation/wip-note
docs: remote wip note from worker configuration reference
2021-09-28 06:18:43 -07:00
Markus Lehtonen
89d0f4ff3c docs: remote wip note from worker configuration reference
All configuration options are documented.
2021-09-27 15:37:50 +03:00
Markus Lehtonen
d2751102ef deployment: fix typo in overlay name
Rename topologupdater-job to topologyupdater-job.
2021-09-24 22:04:35 +03:00
Kubernetes Prow Robot
ccf5feecfb
Merge pull request #606 from dagrayvid/parseOSRelease-trim-single-quotes
Trim single quotes in parseOSRelease
2021-09-23 05:09:22 -07:00
David Gray
3d9b18b087 Trim single quotes in parseOSRelease
Signed-off-by: David Gray <dagray@redhat.com>
2021-09-22 15:04:44 -04:00
Kubernetes Prow Robot
9cf732b64e
Merge pull request #602 from marquiz/devel/go-generate
Utilize go generate
2021-09-21 06:16:24 -07:00
Kubernetes Prow Robot
f2b23bdc5c
Merge pull request #603 from ArangoGutierrez/issue/598
Fix broken link on docs/get-started
2021-09-21 06:06:23 -07:00
Carlos Eduardo Arango Gutierrez
6f4fbefacd
Fix broken link on docs/get-started
Signed-off-by: Carlos Eduardo Arango Gutierrez <carangog@redhat.com>
2021-09-21 07:57:55 -05:00
Kubernetes Prow Robot
064391f310
Merge pull request #601 from marquiz/devel/feature-source-interface
source: introduce FeatureSource interface
2021-09-21 05:48:25 -07:00
Markus Lehtonen
51c0d70383 Update auto-generated code
Generated by running "make generate".
2021-09-21 13:37:36 +03:00
Markus Lehtonen
9487fbeb18 Utilize go generate
Use 'go generate' for auto-generating code. Drop the old 'mock' and
'apigen' makefile targets. Those are replaced with a single
  make generate

which (re-)generates everything.
2021-09-21 13:36:37 +03:00
Kubernetes Prow Robot
16139ae1f5
Merge pull request #525 from k8stopologyawareschedwg/topology-updater-implementation
Introducing NFD Topology Updater exposing Resource hardware Topology info through CRs
2021-09-21 03:04:23 -07:00
Swati Sehgal
a2c066dc0d topologyupdater: manifests: topologyupdater deployment files
- create an overlay for deployment of all components
- create an overlay for just topologyupdater deployment (to be deployed in
  conjunction with the default overlay)
- create a separate overlay for deployment of master and topologyupdater-job

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2021-09-21 10:48:10 +01:00
Swati Sehgal
a311719d1e topologyupdater: Updates based on latest changes made to CRD API
There have been recent changes made to the noderesourcetopology API
storing the proto file generated using go-to-protobuf tool and
this code inports the proto generated in the API in the topology-updater.proto
The PRs corresponding to the changes are as follows:
https://github.com/k8stopologyawareschedwg/noderesourcetopology-api/pull/9
https://github.com/k8stopologyawareschedwg/noderesourcetopology-api/pull/13

Commands used to generate topology-updater.pb.go file:

go install github.com/golang/protobuf/protoc-gen-go@v1.4.3
go mod vendor
protoc --go_opt=paths=source_relative  --go_out=plugins=grpc:. pkg/topologyupdater/topology-updater.proto -I. -Ivendor

As part of implmentation of this patch, reserved (non-allocatable) CPUs
are evaluated by performing a difference between all the CPUs on a system
(determined by using ghw) and allocatable CPUs (determined by querying
GetAllocatableResources podResource API endpoint).

When aggregator creates the NUMA zones, it will skip the zone creation if
there are no allocatable resources. In this update we creates those missing
zone with zero allocatable/available resources so we won't have holes in the
array of reported zones.

Co-Authored-by: Talor Itzhak <titzhak@redhat.com>
Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2021-09-21 10:48:10 +01:00
Swati Sehgal
832f82baaa topologyupdater: Handle pods with devices and integral CPU requests
For accounting we should consider all guaranteed pods with
integral CPU requests and all the pods with device requests
This patch ensures that pods are only considered
for accounting disregarding non-guranteed pods without any
device request.

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2021-09-21 10:48:10 +01:00
Swati Sehgal
aa7ae9265c topologyupdater: watch/consider only guaranteed pods for accounting
- Files obtained after running make mock
- Run `go get github.com/vektra/mockery` and make sure that
  mockery is in your $PATH
- run `make mock`

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2021-09-21 10:48:10 +01:00
Francesco Romani
b4c92e4eed topologyupdater: Bootstrap nfd-topology-updater in NFD
- This patch allows to expose Resource Hardware Topology information
  through CRDs in Node Feature Discovery.
- In order to do this we introduce another software component called
  nfd-topology-updater in addition to the already existing software
  components nfd-master and nfd-worker.
- nfd-master was enhanced to communicate with nfd-topology-updater
  over gRPC followed by creation of CRs corresponding to the nodes
  in the cluster exposing resource hardware topology information
  of that node.
- Pin kubernetes dependency to one that include pod resource implementation
- This code is responsible for obtaining hardware information from the system
  as well as pod resource information from the Pod Resource API in order to
  determine the allocatable resource information for each NUMA zone. This
  information along with Costs for NUMA zones (obtained by reading NUMA distances)
  is gathered by nfd-topology-updater running on all the nodes
  of the cluster and propagate NUMA zone costs to master in order to populate
  that information in the CRs corresponding to the nodes.
- We use GHW facilities for obtaining system information like CPUs, topology,
  NUMA distances etc.
- This also includes updates made to Makefile and Dockerfile and Manifests for
  deploying nfd-topology-updater.
- This patch includes unit tests
- As part of the Topology Aware Scheduling work, this patch captures
  the configured Topology manager scope in addition to the Topology manager policy.
  Based on the value of both attribues a single string will be populated to the CRD.
  The string value will be on of the following {SingleNUMANodeContainerLevel,
  SingleNUMANodePodLevel, BestEffort, Restricted, None}

Co-Authored-by: Artyom Lukianov <alukiano@redhat.com>
Co-Authored-by: Francesco Romani <fromani@redhat.com>
Co-Authored-by: Talor Itzhak <titzhak@redhat.com>
Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2021-09-21 10:47:39 +01:00
Francesco Romani
00cc07da76 topologyupdater: gRPC API definition
Setup the topologyupdater API for gRPC communication of
nfd-topology-updater with master

We generate pb.go file to reflect latest dependency changes
using github.com/golang/protobuf/protoc-gen-go and generate
grpc files via:
`protoc pkg/topologyupdater/topology-updater.proto --go_out=plugins=grpc:.`

Please refer to: https://github.com/k8stopologyawareschedwg/noderesourcetopology-api/blob/master/pkg/apis/topology/v1alpha1/types.go

Co-Authored-by: Artyom Lukianov <alukiano@redhat.com>
Co-Authored-by: Francesco Romani <fromani@redhat.com>
Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2021-09-21 10:47:39 +01:00
Markus Lehtonen
852cf4b61d source: introduce FeatureSource interface
Specify a new interface for managing "raw" feature data. This is the
first step to separate raw feature data from node labels. None of the
feature sources implement this interface, yet.

This patch unifies the data format of "raw" features by dividing them
into three different basic types.
- keys, a set of names without any associated values, e.g. CPUID flags
  or loaded kernel modules
- values, a map of key-value pairs, for features with a single value,
  e.g. kernel config flags or os version
- instances, a list of instances each of which has multiple attributes
  (key-value pairs of their own), e.g. PCI or USB devices

The new feature data types are defined in a new "pkg/api/feature"
package, catering decoupling and re-usability of code e.g. within future
extentions of the NFD gRPC API.

Rename the Discover() method of LabelSource interface to GetLabels().
2021-09-20 09:58:07 +03:00
Kubernetes Prow Robot
102003f8b3
Merge pull request #597 from marquiz/devel/source-register
source: make sources register themselves
2021-09-19 09:10:09 -07:00
Kubernetes Prow Robot
4ee535f1e5
Merge pull request #599 from marquiz/fixes/example-config
deployment: fix formatting of the worker conf sample
2021-09-19 09:02:09 -07:00
Markus Lehtonen
3706de9308 deployment: fix formatting of the worker conf sample 2021-09-17 14:25:48 +03:00
Markus Lehtonen
81378a3235 source: make sources register themselves
Implement new registration infrastructure under the "source" package.
This change loosens the coupling between label sources and the
nfd-worker, making it easier to refactor and move the code around.

Also, create a separate interface (ConfigurableSource) for configurable
feature sources in order to eliminate boilerplate code.

Add safety checks to the sources that they actually implement the
interfaces they should.

In sake of consistency and predictability (of behavior) change all
methods of the sources to use pointer receivers.

Add simple unit tests for the new functionality and include source/...
into make test target.
2021-09-15 18:41:37 +03:00
Kubernetes Prow Robot
5c7706c5bd
Merge pull request #596 from marquiz/devel/label-source
source: rename FeatureSource to LabelSource
2021-09-15 07:44:31 -07:00
Markus Lehtonen
befa7e9796 source: rename FeatureSource to LabelSource
Prepare for separating feature detection from label creation.
2021-09-13 22:48:33 +03:00
Kubernetes Prow Robot
795a7e543e
Merge pull request #592 from marquiz/devel/logging-verbosity
source/network: silence annoying/useless log message
2021-09-13 01:16:09 -07:00
Markus Lehtonen
bd5ee9c616 source/network: silence annoying/useless log message
However, log an error if something unexpected happens, i.e. the file to
read maximum number of vfs exists (sriov_totalvfs) but read fails.
2021-09-13 09:40:06 +03:00
Kubernetes Prow Robot
dc7bda0023
Merge pull request #590 from ArangoGutierrez/fix/docs_borkenlink
Fix broken link for worker-conf example
2021-09-02 10:36:57 -07:00