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

23 commits

Author SHA1 Message Date
Markus Lehtonen
2b5488299e Makefile: add install target 2020-08-21 14:27:39 +03:00
Markus Lehtonen
02dc1ae1e9 Makefile: add build target 2020-08-21 14:27:39 +03:00
Markus Lehtonen
844c73799e Makefile: change image registry to k8s.gcr.io/nfd 2020-08-07 10:25:19 +03:00
Markus Lehtonen
704c81a4d2 Make host mount prefix configurable in Makefile and Dockerfile
Introduce a new makefile variable and dockerfile build arg named
HOSTMOUNT_PREFIX for changing the prefix used for mounting host
directories inside the container. Adds a sed rule in Makefile to
generate deployment yamls accordingly.
2020-05-20 22:15:41 +03:00
Markus Lehtonen
4e04d1d61c Makefile: add ci-lint target
Use golangci-lint to make use of a number of different linters.
2020-05-20 21:48:06 +03:00
Markus Lehtonen
447eee261d Makefile: add gofmt and gofmt-verify targets
For re-formatting the code and checking that we comply.

Inspired by what we have in node-feature-discovery-operator.
2020-05-19 14:24:44 +03:00
Markus Lehtonen
3d5866a06d test/e2e: more comprehensive per-node testing
Implement an end-to-end test with all feature sources enabled. The new
test runs nfd-worker as a daemonset on all (schedulable) nodes of the
test cluster which makes it possible to cover a wide range features,
assuming the test cluster is heterogenous containing nodes with varying
system configurations.

The features available depends on the node(s) the e2e testa are run on.
Thus, some runtime parameterization of the tests is needed. The patch
adds a new command line test flag 'nfd.e2e-config' that is used to
specify the per-node feature labels and annotations that is expected to
be present in the cluster. An example configuration file is provided
with the patch. The pod spec of nfd-worker deployment is changed to
better correspond the default deployment and thus enable wider feature
discovery. This means using hostnetwork and adding mounts for /sys /boot
and /etc/os-release.

The patch changes node object management so that all nfd-related labels
are removed after each test (not just the ones the test is expected to
add). Also, all nfd-related annotations are now removed.
2020-02-28 10:37:26 +02:00
Markus Lehtonen
fec55ec335 Makefile: define go binary in a make variable
Makes testing with different go versions easier.
2019-12-17 15:41:42 +02:00
Markus Lehtonen
67ddd87c41 Switch to using go modules
Update go version in Docker build image to v1.12.
2019-11-20 18:38:42 +02:00
Markus Lehtonen
b5d71f421d Makefile: add 'e2e-test' target
For running end-to-end tests it is required to explicitly specify in the
command line the kubeconfig to be used, e.g.:
$ make e2e-test KUBECONFIG=$HOME/.kube/config
2019-06-27 06:29:45 +03:00
Markus Lehtonen
2cfb3ade5d Makefile: add IMAGE_BUILD_EXTRA_OPTS variable 2019-06-18 16:23:25 +03:00
Markus Lehtonen
a8e7259bf8 Makefile: add 'push' target
Now 'make push' can be used to push the container image to the remote
registry.
2019-06-18 16:23:25 +03:00
Antti Kervinen
9b96407b26 Makefile: create default yamls, configurable namespace
- Create default yamls for deploying master and worker.
- Use kube-system namespace by default.
- Configurable namespace:
  make IMAGE_REGISTRY=myhost:5000 K8S_NAMESPACE=my-nfd-devel
2019-06-05 13:13:53 +03:00
Markus Lehtonen
e7d272ad0f Makefile: reorganise container image variables
Change the structure and naming of the make variables that control the
container image name/tag that gets created. Default values and behavior
stay the same, but, this change tries to make it easier to customize the
build from command line.

Also, document all the relevant make variables in readme.
2019-04-25 15:25:49 +03:00
Markus Lehtonen
f8bc07952f Fix unit tests after master-worker split
Refactor old tests and add tests for new functions. Add 'test' target in
Makefile.
2019-04-04 22:40:24 +03:00
Markus Lehtonen
12d6c2410e Re-generate mock sources
Add a new Makefile target for regenerating these files.  Also, add a
note that the files are auto-generated, including instructions how to
re-generate them.

Renames the mock files, using the defaults provided by the mockery tool,
in order to make their generation easier.
2019-04-04 22:40:24 +03:00
Markus Lehtonen
607e95f290 Makefile: drop docker build-args for https(s) proxy
Docker v17.07 and later supports configuring proxy servers via the
docker client configuration (https://docs.docker.com/network/proxy/).

This is better than using --build-args for passing the proxy settings to
the build environment. Previously, we could end up with empty variables
values which could cause the build to fail. E.g. if you had
http_proxy=<myproxy> defined but HTTP_PROXY unset in the host
environment, you ended up with http_proxy=<myproxy> and HTTP_PROXY=""
(i.e. empty value) inside the build which caused problems in some cases.
In addition, this makes builds via make and directly with docker more
similar.
2018-11-30 13:21:41 +02:00
Markus Lehtonen
ed5a259eaa Configurable image build tool
Make it possible to specify an image build tool other than docker - a
limitation is that the build tool must be compatible with docker files,
of course. This makes it possible to build an NFD image without the
Docker daemon, for example.

The image build command is specified in a makefile variable and can be
overridden from command line, for example:
$ make IMAGE_BUILD_CMD="buildah bud"

Thanks: Zvonko Kosic for suggesting this
2018-09-20 09:28:28 +03:00
Markus Lehtonen
bb32ef83f7 Export proxy env vars inside docker build
Without correct proxy settings propagated to docker build it is not possible to
build node-feature-discovery from behind a proxy server, e.g. in corporate
networks. This patch fixes the issue by exporting all http(s) proxy related
environment variables as build-time variables.
2018-04-03 12:46:33 +03:00
Balaji Subramaniam
d527d588f3 Fix to report the correct version inside container.
- Used build args to pass the correct version.
2016-12-09 13:36:15 -08:00
Balaji Subramaniam
9e37744d5c Hosted docker image in quay.io.
- Updated makefile, job template and readme.
2016-09-02 16:04:04 -07:00
Connor Doyle
570d1ae5be Replayed commit history. 2016-08-31 11:44:06 -07:00
Connor Doyle
e79ffd2c2a Refactored feature sources.
- Added interface FeatureSource, moved cpuid, rdt and pstate
  discovery logic into implementations.
- Updated logging output to make it more machine-readable
  (one feature, in label-format, per line).
- Normalized label names (derived from the underlying feature source).
- Added makefile.
- Added command-line argument parsing and proper CLI documentation.
- Added ability to filter the enabled feature sources: cpuid,rdt,pstate.
- Added ability to print the software version and exit.
- Added ability to print the CLI help.
- Updated README.
- Updated dep versions.
- Added -s -w to ldflags.
- Output version label along with discovered feature labels.
- Added sources section to README.
- Normalized README link for pstate
2016-08-30 14:41:59 -07:00