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

178 commits

Author SHA1 Message Date
Carlos Eduardo Arango Gutierrez
04e954a7c3
Enable NodeFeature API by default
Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>
Co-authored-by: Markus Lehtonen <markus.lehtonen@intel.com>
2023-09-05 20:21:31 +02:00
Markus Lehtonen
f8162a0106 e2e/test: make the nfd-gc test pass on one-node cluster
Also remove some leftover debug print.
2023-09-05 14:16:50 +03:00
Francesco Romani
000c919071 nfd-updater: events: enable timer-only flow
The nfd-topology-updater has state-directories notification mechanism
enabled by default.
In theory, we can have only timer-based updates, but if the option
is given to disable the state-directories event source, then all
the update mechanism is mistakenly disabled, including the
timer-based updates.

The two updaters mechanism should be decoupled.
So this PR changes this to make sure we can enable just and only
the timer-based updates.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2023-09-04 13:05:50 +02:00
Markus Lehtonen
f9fadd2102 test/e2e: add e2e test for nfd-gc 2023-08-22 21:24:26 +03:00
Markus Lehtonen
2e79a015f5 test/e2e: align with latest kubernetes code base 2023-08-16 12:43:52 +03:00
guoguangwu
29118f67bb fix: Drop the e2elog instead
Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
2023-06-25 09:44:08 +08:00
guoguangwu
92482e45d8 node_feature_discovery_test.go rm pkg imported twice
Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
2023-06-21 16:55:25 +08:00
AhmedGrati
08b9c3486e feat: support dynamic values for labels in the NodeFeatureRule
This PR aims to support the dynamic values for labels in the
NodeFeatureRule CRD, it would offer more flexible labeling for users.
To achieve this, we check whether label value starts with "@", and if
it's the case, we will get the value of the feature value, and update
the value of the label with the feature value.

Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>
2023-05-31 23:30:26 +01:00
Muyassarov, Feruzjon
cfb8530083 e2e: delete CRs only if found
Delete NodeFeatureRule and NodeFeature CRs only if found.
Signed-off-by: Muyassarov, Feruzjon <feruzjon.muyassarov@intel.com>
2023-05-08 13:46:29 +03:00
Markus Lehtonen
2d9db2ccec test/e2e: rework taints matching
Add new MatchTaints matcher replacing the old waitForNfdNodeTaints
helper function. Also, drop the now-unused simplePoll() helper function.
2023-05-03 08:44:03 +03:00
Markus Lehtonen
f93ab9d423 test/e2e: rework node capacity matching
Add new MatchCapacity matcher replacing the old waitForCapacity helper
function.
2023-05-03 08:44:03 +03:00
Markus Lehtonen
a85e396200 test/e2e: rework annotations matcher
Add new MatchAnnotations Gomega matcher and drop the old
waitForNfdNodeAnnotations helper function.
2023-05-03 08:44:03 +03:00
Markus Lehtonen
2330896620 test/e2e: refactor matching of node properties
Implement a new generic type nodeListPropertyMatcher, a generic Gomega
matcher for matching basically any property of a set of node objects. We
will be using it for verifying labels, annotations, extended resources
and taints for now. This moves the tests in a more Gomega'ish direction,
leveraging code re-use and providing way more informative error messages
in case of test failures.

The patch adds a new eventuallyNonControlPlaneNodes helper assertion for
asserting all (non-control-plane) nodes in the cluster, intended to
replace the ugly simplePoll() helper function.

This patch implements a matcher for node labels and converts tests to
use it instead of the old checkForNodeLabels helper function.
2023-05-03 08:44:03 +03:00
AhmedGrati
87c2d7e184 nfd-master: fix resync period config option
This PR fixes the resync-period configuration option of the nfd-master.
In fact, previously, changes were not reflected in the nfd-master at
runtime. e2e tests are also implemented to make sure that the fix is
already working as expected.

Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>
2023-05-02 13:17:01 +02:00
Markus Lehtonen
87371e2df0 test/e2e: adapt tests to updates in k8s e2e-framework
Add context to functions that now require it. Also, replace the
deprecated wait.Poll* calls with wait.PollUntilContextTimeout.
2023-04-18 23:04:34 +03:00
Markus Lehtonen
ad8bd057b7 test/e2e: use proper context
Eliminate all context.TODO() from the e2e tests and use ginkgo context
instead. This ensures that calls involving context are properly
cancelled and return fast in case the tests get aborted.
2023-04-18 14:55:09 +03:00
Fabiano Fidêncio
250aea4741
Create extended resources with NodeFeatureRule
Add support for management of Extended Resources via the
NodeFeatureRule CRD API.

There are usage scenarios where users want to advertise features
as extended resources instead of labels (or annotations).

This patch enables the discovery of extended resources, via annotation
and patch of node.status.capacity and node.status.allocatable. By using
the NodeFeatureRule API.

Co-authored-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>
Co-authored-by: Markus Lehtonen <markus.lehtonen@intel.com>
Co-authored-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>
2023-04-07 16:14:56 +02:00
Markus Lehtonen
cc6c20ff5f nfd-master: disallow unprefixed and kubernetes taints
Disallow taints having a key with "kubernetes.io/" or "*.kubernetes.io/"
prefix. This is a precaution to protect the user from messing up with
the "official" well-known taints from Kubernetes itself. The only
exception is that the "nfd.node.kubernetes.io/" prefix is allowed.

However, there is one allowed NFD-specific namespace (and its
sub-namespaces) i.e. "feature.node.kubernetes.io" under the
kubernetes.io domain that can be used for NFD-managed taints.

Also disallow unprefixed taint keys. We don't add a default prefix to
unprefixed taints (like we do for labels) from NodeFeatureRules. This is
to prevent unpleasant surprises to users that need to manage matching
tolerations for their workloads.
2023-04-06 16:12:37 +03:00
Markus Lehtonen
2e85b8a914 test/e2e: refactor nfd pod configuration
Make the default master pod run with no special options. Move the
customizations of the master pod to the setup functions of the tests
that actually need it.

Also, cleanup the configuration of nfd-worker of some tests.
2023-04-05 21:51:25 +03:00
Kubernetes Prow Robot
60f052f086
Merge pull request #1116 from marquiz/devel/e2e-crd-deletion
test/e2e: wait for CRD deletion to complete
2023-04-05 07:31:40 -07:00
Markus Lehtonen
5793207cf2 test/e2e: wait for CRD deletion to complete
Wait for the deletion of NFD CRDs to complete before trying to re-create
them. Prevents errors in case CRDs already exist on the cluster when
e2e-tests are launched.
2023-04-05 15:56:26 +03:00
Markus Lehtonen
68c3bf317b test/e2e: fix node cleanup function
The node cleanup function was not removing all NFD-labels. It omitted
NFD-originated labels that used a non-default label namespace. This
patch fixes the issue by getting all NFD-managed labels from the special
annotation (nfd.node.kubernetes.io/feature-labels).

The patch also adds the ability to cleanup extended resources in a
similar way. This will be needed by future work.

Also changes the order of cleaning up CRs and the node. It is the right
order as cleaning up the CRs may still update the node.
2023-04-05 15:09:25 +03:00
Kubernetes Prow Robot
193c552b33
Merge pull request #1084 from AhmedGrati/feat-add-master-config-file
feat: add master config file
2023-04-04 10:41:40 -07:00
AhmedGrati
3fff409f6d Add master config file
Similar to the nfd-worker, in this PR we want to support the
dynamic run-time configurability through a config file for the nfd-master.

We'll use a json or yaml configuration file along with the fsnotify in
order to watch for changes in the config file. As a result, we're
allowing dynamic control of logging params, allowed namespaces,
extended resources, label whitelisting, and denied namespaces.

Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>
2023-04-03 09:52:09 +01:00
Talor Itzhak
6de13fe456 e2e: reactive updates test
Signed-off-by: Talor Itzhak <titzhak@redhat.com>
2023-03-12 12:43:17 +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
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
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
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
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
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
pprokop
b51e34d84c Modify e2e tests to check if Topology Manager policy and scope are advertise as Attributes
Signed-off-by: pprokop <pprokop@nvidia.com>
2023-02-10 12:03:16 +01:00
Jose Luis Ojosnegros Manchón
2967f3307a nrt-api: move from v1alpha1 to v1alpha2 2023-02-09 12:29:54 +01:00
Talor Itzhak
97ca4deabc e2e: init docker image
The docker image that used during e2e test
composed of repo and tag flags that are
passed to the test itself.

The problem is that the docker image initialized
before the flags are parsed. Hence, it will always contains
the default flags value.
Moving the variable into a separate function, fixing the issue.

Also, moving the global variables to `e2e_test.go` since
it commonly used by all tests.

Signed-off-by: Talor Itzhak <titzhak@redhat.com>
2023-01-11 16:44:40 +02:00
Talor Itzhak
d8981f892e e2e: append _test suffix to test files
This PR is a result of conversation started here:
https://github.com/kubernetes-sigs/node-feature-discovery/pull/1028#issuecomment-1378634404

Signed-off-by: Talor Itzhak <titzhak@redhat.com>
2023-01-11 14:15:45 +02:00
Markus Lehtonen
099f52ca36 test/e2e: more comprehensive test for NodeFeature objects
Test creation of multiple NodeFeature objects per node, mocking 3rd
party extensions.
2023-01-03 17:50:48 +02:00
Markus Lehtonen
59a2757115 Use single-dash format for nfd cmdline flags
Use the "single-dash" version of nfd command line flags in deployment
files and e2e-tests. No impact in functionality, just aligns with
documentation and other parts of the codebase.
2022-12-21 15:00:49 +02:00
Markus Lehtonen
f5ae3fe2c7 Simplify usage of ObjectMeta fields
No need to explicitly spell out ObjectMeta as it's embedded in the
object types.
2022-12-19 17:40:10 +02:00
Markus Lehtonen
b67d6d7282 test/e2e: add basic e2e-tests for NodeFeature API
Add an initial test set for the NodeFeature API. This is done simply by
running a second pass of the tests but with -enable-nodefeature-api
(i.e. NodeFeature API enabled and gRPC disabled). This should give basic
confidence that the API actually works and form a basis for further
imporovements on testing the new CRD API.
2022-12-19 16:58:21 +02:00
Markus Lehtonen
958db56680 test/e2e: isolate tests into a separate function
Preparation for running the same tests with NodeFeature API enabled
(instead of gRPC).
2022-12-19 14:08:05 +02:00
Kubernetes Prow Robot
e684197634
Merge pull request #932 from fmuyassarov/e2e-taints
Add E2E test for NFD tainting feature
2022-12-19 03:59:45 -08:00
Feruzjon Muyassarov
3e29f5c5df Add nfd E2E tests for tainting feature
Extend current E2E tests to check tainting feature of nfd implemented
in https://github.com/kubernetes-sigs/node-feature-discovery/pull/910

Signed-off-by: Feruzjon Muyassarov <feruzjon.muyassarov@intel.com>
2022-12-19 13:39:03 +02:00
Kubernetes Prow Robot
4635b99832
Merge pull request #1003 from marquiz/devel/e2e-host-usr-src
test/e2e: drop host-usr-src mount
2022-12-19 02:35:45 -08:00
Markus Lehtonen
51f4c5447b test/e2e: don't expect control-plane nodes to be labeled
Without this e2e tests may fail in clusters with control-plane-only
nodes.
2022-12-16 22:56:19 +02:00
Kubernetes Prow Robot
87c1a3d47d
Merge pull request #1002 from marquiz/devel/e2e-podsecurity
test/e2e: drop pod security enforcement label from the test namespace
2022-12-15 23:01:37 -08:00
Kubernetes Prow Robot
8d2adfd1f5
Merge pull request #996 from fmuyassarov/parametirize-image
E2E: parameterize container image and tag
2022-12-15 08:35:37 -08:00
Markus Lehtonen
7b2add434c test/e2e: drop pod security enforcement label from the test namespace
Drop the pod-security.kubernetes.io/enforce label from the test
namespace, i.e. remove pod security admission enforcement. NFD-worker
uses restricted host mounts (/sys) etc so pod creation fails even in
privileged mode if pod security admission enforcement is enabled.
2022-12-15 17:43:44 +02:00
Markus Lehtonen
fd0b812433 test/e2e: drop host-usr-src mount
Allows running e2e-tests in some more restricted environments.
2022-12-15 16:49:27 +02:00
Kubernetes Prow Robot
323fd5c6ec
Merge pull request #995 from fmuyassarov/seccomp-profile-nfd-worker
E2E: default seccompProfile to runtimeDefault for nfd worker
2022-12-14 12:45:34 -08:00
Markus Lehtonen
f04e1a9404 test/e2e: fix mistake in ginkgo focus
Leftover from development that got accidentally merged in
43910e6925
2022-12-14 21:59:15 +02:00
Markus Lehtonen
43910e6925 test/e2e: create CRDs once in the beginning of the tests
Only generate CRDs once in the beginning of the test run. Use the "Ordered"
option for the test container so that we can utilize ginkgo.BeforeAll to
only do stuff once before the first test. Changing from unordered to
ordered shouldn't make a big difference here.

Add a cleanup function to remove stale NodeFeatureRule objects that are
cluster-scoped and not deleted with the test namespace.
2022-12-14 18:42:00 +02:00
Feruzjon Muyassarov
5d08f1cd7c E2E:parameterize container image and tag
Signed-off-by: Feruzjon Muyassarov <feruzjon.muyassarov@intel.com>
2022-12-14 17:16:03 +02:00
Feruzjon Muyassarov
ae8ba01c2c E2E: default seccompProfile to runtimeDefault for nfd worker
Use RuntimeDefault seccomp profile in nfd worker and topology
updater pod spec similar to nfd master.

Signed-off-by: Feruzjon Muyassarov <feruzjon.muyassarov@intel.com>
2022-12-14 17:04:38 +02:00
Markus Lehtonen
13f3959ebe test/e2e: fix creation of NFD CRDs
After introducing NodeFeatureRule we packed two CRD definitions in one
yaml file. Our e2e-tests were not prepared to that and the file itself
was also renamed so it couldn't even be read by the test suite.

With this change the e2e-tests start to create NodeFeatre CRD in the
test cluster, preparing for the addition of e2e-tests for NodeFeature
API.
2022-12-14 14:44:17 +02:00
Feruzjon Muyassarov
b296bdf0b3 update test functions according to upstream deprecated/removed methods
Signed-off-by: Feruzjon Muyassarov <feruzjon.muyassarov@intel.com>
2022-12-13 12:12:50 +02:00
Feruzjon Muyassarov
409312e111 Bump go.mod k8s.io to 1.26
Signed-off-by: Feruzjon Muyassarov <feruzjon.muyassarov@intel.com>
2022-12-13 12:12:46 +02:00
Markus Lehtonen
f13ed2d91c nfd-topology-updater: update NodeResourceTopology objects directly
Drop the gRPC communication to nfd-master and connect to the Kubernetes
API server directly when updating NodeResourceTopology objects.
Topology-updater already has connection to the API server for listing
Pods so this is not that dramatic change. It also simplifies the code
a lot as there is no need for the NFD gRPC client and no need for
managing TLS certs/keys.

This change aligns nfd-topology-updater with the future direction of
nfd-worker where the gRPC API is being dropped and replaced by a
CRD-based API.

This patch also update deployment files and documentation to reflect
this change.
2022-12-08 11:03:22 +02:00
Markus Lehtonen
42ae216284 test/e2e: no pod restart policy of nfd-worker by default
Fixes stricter API check on daemonset pod spec that started to cause e2e
test failures. RestartPolicyNever that we previously set (by defaylt)
isn't compatible with DaemonSets.
2022-12-01 16:14:11 +02:00
Talor Itzhak
0a06562930 e2e: simplify sleeper pod
Make it more flexiable by allowing modifying both
CPU and memory values, using functional options

Signed-off-by: Talor Itzhak <titzhak@redhat.com>
2022-11-29 14:39:54 +02:00
Talor Itzhak
9c725c378f e2e: separate daemonset functions from pod
The new package should provide pod-related utilities,
hence let's move all the daemonset-related utilities
to their own package as well.

Signed-off-by: Talor Itzhak <titzhak@redhat.com>
2022-11-29 14:39:52 +02:00
Talor Itzhak
6364803b0c e2e: move pod utils to a seperate package
By moving those utils in to a seperate package,
we can make the functions names shorter and clearer.

For example, instead of:
```
testutils.NFDWorkerPod(opts...)
testutils.NFDMasterPod(opts...)
testutils.SpecWithContainerImage(...)
```
we'll have:
```
testpod.NFDWorker(opts...)
testpod.NFDMaster(opts...)
testpod.SpecWithContainerImage(...)
```

It will also make the package more isolated and portable.

Signed-off-by: Talor Itzhak <titzhak@redhat.com>
2022-11-29 13:47:00 +02:00
Markus Lehtonen
6f02ef92de test/e2e: remove dropped -sleep-interval arg
Replace with a ConfigMap-based configuration.
2022-11-29 10:22:48 +02:00
Kubernetes Prow Robot
ef2c498a6f
Merge pull request #966 from k8stopologyawareschedwg/sc_for_master
e2e: add SecurityContext to master
2022-11-24 22:18:04 -08:00
Talor Itzhak
f31b70dce4 e2e: add SecurityContext to master
The master pod need these `SecurityContext` configurations
In order to run inside a namespace with restricted policy

Signed-off-by: Talor Itzhak <titzhak@redhat.com>
2022-11-24 14:48:01 +02:00
Markus Lehtonen
0174a6405b test/e2e: add helper for creating new configmaps
Implement a simple helper for creating a configmap with one key. One key
(one config file) is enough for our current tests.
2022-11-24 10:56:15 +02:00
Markus Lehtonen
1719ce6736 test/e2e: more flexible pod spec generation
Change the pod spec generator functions to accept parameterization in
the form of more generic "mutator functions". This makes the addition of
new test specific pod spec customizations a lot cleaner. Plus, hopefully
makes the code a bit more readable as well.

Also, slightly simplify the SpecWithConfigMap() but dropping one
redundant argument.

Inspired by latest contributions by Talor Itzhak (titzhak@redhat.com).
2022-11-23 09:36:14 +02:00
Talor Itzhak
2896541bf1 e2e: topology-updater: add e2e test for exclude-list feature
Signed-off-by: Talor Itzhak <titzhak@redhat.com>
2022-11-21 21:30:53 +02:00
Talor Itzhak
1385d50222 e2e: topology-updater: decouple configuration from creation
Different tests requires different configuration
of the topology-updater DaemonSet.
Here, we decouple the configuration from the creation part
using `JustBeforeEach` so that each test container
will has its own configuration.

Additional reading:
https://onsi.github.io/ginkgo/#separating-creation-and-configuration-justbeforeeach

Signed-off-by: Talor Itzhak <titzhak@redhat.com>
2022-11-21 14:08:25 +02:00
Talor Itzhak
546d0c3a1b e2e: topologyupdater: wait for deletion
It might take time for the CRD to get deleted
and it might cause some falkiness in the tests.

Now before we create the CRD, we make sure to delete
the old object, wait for it deletion to complete
and only then create a new CRD object.

Signed-off-by: Talor Itzhak <titzhak@redhat.com>
2022-11-21 12:26:42 +02:00
Talor Itzhak
1b6fad6427 e2e: topologyupdater: insert condition check into eventually
We might not get the most updated node topology
resource on the first `GET` call.
Hence, put the whole check inside `Eventually`,
and check for the most updated node topology resource on every
iteration.

Signed-off-by: Talor Itzhak <titzhak@redhat.com>
2022-11-21 12:26:42 +02:00
Talor Itzhak
a65278d890 e2e: podSecurity: adapt PodSecurity constraints
The tested pods have some lax spec wrt security,
hence a restrict podSecurity namespace won't allow running those pods.

In topology-updater tests, the topology-updater pod
needs to run the container as root
so change the namespace podSecurity from restricted to priviliged.

In node-feature-discovery tests, we don't need root access,
so add the required security context configuration.

Signed-off-by: Talor Itzhak <titzhak@redhat.com>
2022-11-21 12:26:36 +02:00
Markus Lehtonen
a32ed5ecb1 test/e2e: fix topologu-updater cmdline args
The -kubelet-config-file flag got renamed to -kubelet-config-uri and the
expected format changed from plain filepath to URI.
2022-11-17 13:53:41 +02:00
Feruzjon Muyassarov
71434a1392 Standardize "k8s.io/api/core/v1" package short name
Signed-off-by: Feruzjon Muyassarov <feruzjon.muyassarov@intel.com>
2022-10-15 02:22:41 +03:00
Feruzjon Muyassarov
e79f09deb2 Error strings should not be capitalized
Error strings should not be capitalized (ST1005) & remove the
redundancy from array, slice or map composite literals.
Signed-off-by: Feruzjon Muyassarov <feruzjon.muyassarov@intel.com>
2022-10-14 15:43:18 +03:00
Markus Lehtonen
6ef6112d58 test/e2e: add tests for NodeFeatureRules
Add tests covering the basic functionality of NodeFeatureRule objects,
covering different feature types ("flag features", "attribute features"
and "instance features") as well as backreferencing (using the output of
previously run rules) and templating. The test relies on the "fake"
feature source and its default configuration.
2022-10-11 17:23:52 +03:00
Kubernetes Prow Robot
37e21bfd37
Merge pull request #891 from marquiz/fixes/e2e-no-config
test/e2e: fix segfault in case no e2e config file is specified
2022-10-10 04:09:20 -07:00
Markus Lehtonen
c1e6b41e56 apis/nfd: move annotation and label consts from nfd-master
Move consts related to NFD annotations and labels from nfd-master to the
api. Makes them more logically accessible for clients.
2022-10-06 11:23:56 +03:00
Markus Lehtonen
02955b57c7 test/e2e: fix segfault in case no e2e config file is specified 2022-09-14 11:00:16 +03:00
Kubernetes Prow Robot
15f0cea172
Merge pull request #888 from marquiz/devel/k8s-1.25
Update kubernetes to v1.25.0
2022-09-13 08:17:05 -07:00
Markus Lehtonen
f21315d85f Update kubernetes registry to registry.k8s.io
Update registry location for non-nfd images.
2022-09-12 11:23:04 +03:00
Markus Lehtonen
c09225f75c test/e2e: drop utils/kubeletconfig.go
The required fix is in kubernetes v1.25.0 so we can drop this local
copy.
2022-09-09 10:55:03 +03:00
Markus Lehtonen
449b0b2199 go.mod: update kubernetes to v1.25.0 2022-09-09 10:55:03 +03:00
Francesco Romani
d70f8c65af test: utils: borrow fixed GetKubeletConfig from k/k
We need this fix https://github.com/kubernetes/kubernetes/pull/110875
to have reliable tests, but up until we can bump the k/k deps to 1.25+,
we can't consume it.

So borrow it from k/k repo for the time being.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2022-08-11 08:53:01 +02:00
Francesco Romani
7d37f72480 e2e: add basic topology updater test
Co-authored-by: Swati Sehgal <swsehgal@redhat.com>
Co-authored-by: Francesco Romani <fromani@redhat.com>
Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
2022-08-11 08:53:01 +02:00
Francesco Romani
622adf3863 test: e2e: configurable pull policy
In some cases (CI) it is useful to run NFD e2e tests using
ephemeral clusters. To save time and bandwidth, it is also useful
to prime the ephemeral cluster with the images under test.

In these circumstances there is no risk of running a stale image,
and having a `Always` PullPolicy hardcoded actually makes
the whole exercise null.

So we add a new option, disabled by default, to make the e2e
manifest use the `IfNotPresent` pull policy, to effectively
cover this use case.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2022-08-10 15:06:59 +02:00
Markus Lehtonen
190e3200b1 test/e2e: refactor setup and cleanup 2022-08-09 20:14:41 +03:00
Artyom Lukianov
e169edcb9f Move helpers method to the separate package
Co-Authored-By Francesco Romani <fromani@redhat.com>
Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
2022-08-09 13:47:52 +02:00
Kubernetes Prow Robot
3df81d1ace
Merge pull request #827 from marquiz/devel/drop-iommu
Drop the iommu source
2022-07-08 02:01:47 -07:00
Markus Lehtonen
380936e417 test/e2e: change node-specific config to a list
Change the part of the e2e-test configuration that contains
node-specific expected labels and annotations to a list, instead of a
map. This makes the parsing order deterministic and makes it possible to
e.g. have a default at the end of the list that captures "all the rest".
2022-06-30 23:34:22 +03:00
Markus Lehtonen
b8ab0d8a9e test/e2e: update e2e-test example config
Add feature labels that have been added lately.
2022-06-30 14:21:38 +03:00
Markus Lehtonen
60fdad684b test/e2e: fix checking of nfd-master annotation
The test was broken twofold: Firstly, the annotation was not checked at
all because the name of the node where nfd-master is running was not
set. Secondly, the annotation prefix was used incorrectly.
2022-06-29 20:51:26 +03:00
Markus Lehtonen
136c036d4d Drop the iommu source
It was deprecated in v0.10.0.
2022-06-14 15:00:29 +03:00
Markus Lehtonen
d1bd603052 go.mod: bump kubernetes to v1.23.1
Update k/k to the latest release and sync all related dependencies.

Align e2e-tests with changes in the k8s e2e test framework.
2022-01-12 16:43:21 +02:00
Markus Lehtonen
3468e65387 test/e2e: revise usage of nfd command line flags
Use the "single-dash" notation of flags and replace deprecated -sources
with -label-sources.
2021-12-03 10:18:57 +02:00
Markus Lehtonen
f7b2bcc457 Revert "test/e2e: drop /boot mount"
This reverts commit 261ab113bf.
2021-11-23 10:50:20 +02:00
Kubernetes Prow Robot
67330e1441
Merge pull request #644 from marquiz/devel/e2e-boot-mount
test/e2e: drop /boot mount
2021-11-10 11:13:27 -08:00
Markus Lehtonen
261ab113bf test/e2e: drop /boot mount
This is not currently needed by end-to-end tests. Dropping it enables
testing in restricted environments that don't have /boot directory.
2021-11-10 20:58:25 +02:00
Markus Lehtonen
0161bd5ca4 test/e2e: make e2e tests run on single-node cluster
Lift the restriction to run custom rule tests on non-master node. Try to
find one but do not fail if that fails. Makes the end-to-end tests
runnable on single-node clusters such a simple minikube deployments.
2021-11-10 20:33:55 +02:00