Commit Graph

2738 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
f4e246bc93 Merge pull request #123908 from Nordix/esotsal/OOMKiller
oomkiller_linux_test: fix warnings
2024-03-27 11:42:19 -07:00
Kubernetes Prow Robot
20d0ab7ae8 Merge pull request #124011 from bart0sh/PR138-e2e_node-fix-podresurces-failure
e2e_node: fix podresources test
2024-03-22 08:16:08 -07:00
Kubernetes Prow Robot
95a6f2e4dc Merge pull request #124010 from bart0sh/PR137-e2e_node-fix-admission-error
Fix admission error on podresources e2e test
2024-03-21 14:14:13 -07:00
Ed Bartosh
6f5240b19c e2e_node: fix podresources test
Fixed `The phase of Pod e2e-test-pod is Succeeded which is unexpected`
error. `e2epod.NewPodClient(f).CreateSync` is unable to catch 'Running'
status of the pod as pod finishes too fast.
Using `Create` API should solve the issue as it doesn't query pod
status.
2024-03-21 13:11:03 +02:00
Ed Bartosh
9ce994af9f e2e_node: remove Dbus test case
The test case restarts dbus and systemd, which is considered dangerous
practice and caused slowdown of the test cases for CRI-O Serial jobs.
2024-03-20 18:38:11 +02:00
Ed Bartosh
247392271f Fix admission error
Fixed UnexpectedAdmissionError: Allocate failed due to not enough cpus
available to satisfy request: requested=2, available=1, which is unexpected
2024-03-20 18:03:13 +02:00
Sotiris Salloumis
a7f23e46da Fix OOMKiller test warnings 2024-03-17 09:16:24 +01:00
Akihiro Suda
1dc05009fe api: NodeStatus: rename RuntimeClasses to RuntimeHandlers
The runtime classes are apiserver's concept, while the handlers are kubelet's concept.
For NodeStatus, it makes more sense to return the latter ones here.

This commit modifies the following files:

- pkg/apis/core/types.go
- staging/src/k8s.io/api/core/v1/types.go
- pkg/kubelet/nodestatus/setters.go
- pkg/kubelet/kubelet_node_status.go
- pkg/registry/core/node/strategy.go
- test/e2e_node/mount_rro_linux_test.go

Other changes were auto-generated by running `make update`.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-03-14 08:06:39 +09:00
Kevin Hannon
19ae61bab0 innocent-pod should not be evicted due to exceeding requests/limits 2024-03-12 13:37:11 -04:00
Akihiro Suda
ea14ccdf13 e2e_node: mount_rro: fix error string comparison
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-03-11 11:50:25 +09:00
Akihiro Suda
5cc1e56248 e2e_node: mount_rro: add SkipUnlessFeatureGateEnabled(RecursiveReadOnlyMounts)
Fix issue 123848

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-03-11 11:50:25 +09:00
Akihiro Suda
d4925ce8f8 e2e: KEP-3857: Recursive Read-only (RRO) mounts
Usage:
```
make test-e2e-node \
  TEST_ARGS='--service-feature-gates=RecursiveReadOnlyMounts=true --kubelet-flags="--feature-gates=RecursiveReadOnlyMounts=true"' \
  FOCUS="Mount recursive read-only" SKIP=""
```

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-03-10 03:00:59 +09:00
Patrick Ohly
d59676a545 dra kubelet: publish NodeResourceSlices
The information is received from the DRA driver plugin through a new gRPC
streaming interface. This is backwards compatible with old DRA driver kubelet
plugins, their gRPC server will return "not implemented" and that can be
handled by kubelet. Therefore no API break is needed.

However, DRA drivers need to be updated because the Go API changed. They can
return
    status.New(codes.Unimplemented, "no node resource support").Err()
if they don't support the new ListAndWatchResources method and
structured parameters.

The controller in kubelet then synchronizes this information from the driver
with NodeResourceSlice objects, creating, updating and deleting them as needed.
2024-03-07 22:22:13 +01:00
Kubernetes Prow Robot
bd25605619 Merge pull request #123435 from tallclair/apparmor-ga
AppArmor fields API
2024-03-06 15:35:14 -08:00
Tim Allclair
0eb5f52d06 Rename AppArmor annotation constants with Deprecated 2024-03-06 10:46:31 -08:00
Kubernetes Prow Robot
3686ceb5b8 Merge pull request #122745 from kannon92/swap-no-swap-default
[KEP-2400] add no swap as the default option for swap
2024-03-05 16:32:40 -08:00
Kubernetes Prow Robot
5fd38a8c78 Merge pull request #122907 from sohankunkerkar/prepare-kep-3983-for-beta
[KEP-4419]: promote KubeletConfigDropInDir feature to beta
2024-03-05 14:45:39 -08:00
Kubernetes Prow Robot
1e4124b081 Merge pull request #123726 from haircommander/kubelet_t
e2e_node: use kubelet_exec_t instead of bin_t for kubelet
2024-03-05 13:45:14 -08:00
Kubernetes Prow Robot
5f4a20e65d Merge pull request #120718 from gjkim42/add-restartable-init-containers-to-pod-resources-api
Make PodResources API include restartable init containers
2024-03-05 13:44:54 -08:00
Kevin Hannon
6a4e19a4ec add no swap as the default option for swap 2024-03-05 16:10:42 -05:00
Peter Hunt
646d464203 e2e_node: use kubelet_exec_t instead of bin_t for kubelet
as bin_t isn't powerful enough, and we run into a wack-a-mole situation making bin_t powerful
enough for the tests

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2024-03-05 13:39:52 -05:00
Kubernetes Prow Robot
791fd50eeb Merge pull request #123114 from bzsuni/cleanup/npd/v0.8.15
Bump npd from v0.8.13 to v0.8.16
2024-03-05 05:46:42 -08:00
bzsuni
9ac9fdac8f Bump npd from v0.8.13 to v0.8.16
Signed-off-by: bzsuni <bingzhe.sun@daocloud.io>
2024-03-05 09:30:28 +08:00
Davanum Srinivas
c61b2a3975 Check length of instance name before truncating
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2024-03-03 18:49:57 -05:00
Davanum Srinivas
968aefd1bf Ensure GCP instance names are a max of 63 characters
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2024-03-03 13:19:12 -05:00
Kubernetes Prow Robot
cde4788a27 Merge pull request #123215 from adrianreber/2024-02-09-forensic-container-checkpointing-beta
Switch 'ContainerCheckpoint' from Alpha to Beta
2024-03-01 15:59:24 -08:00
Sohan Kunkerkar
3b630ae1af test/e2e_node:add more coverage for the kubelet config drop-in dir feature
Signed-off-by: Sohan Kunkerkar <sohank2602@gmail.com>
2024-03-01 16:01:01 -05:00
Sohan Kunkerkar
b40b5f86d8 *: promote KubeletConfigDropInDir feature to beta
This change removes the environment variable set during
the Alpha phase and prepares the feature for beta graduation.

xref: https://github.com/kubernetes/enhancements/pull/4419

Signed-off-by: Sohan Kunkerkar <sohank2602@gmail.com>
2024-03-01 15:00:50 -05:00
Shiming Zhang
d303cec118 Update test 2024-02-29 11:48:18 +08:00
Gunju Kim
dd890b899f Make PodResources API include restartable init containers 2024-02-21 22:00:09 +09:00
Kubernetes Prow Robot
d311ce0435 Merge pull request #123343 from haircommander/image-gc-e2e-2
KEP-4210: add e2e tests and add small fix for ImageGCMaxAge
2024-02-20 10:48:15 -08:00
Kubernetes Prow Robot
0f7cc6fcaa Merge pull request #121778 from Tal-or/mm_metrics
kubelet: memorymanager: metrics:  add metrics about static allocation
2024-02-20 09:41:50 -08:00
Peter Hunt
8dddf6d314 e2e_node: add test for max age after kubelet start
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2024-02-19 14:44:20 -05:00
Peter Hunt
6cd78bc5fc node e2e: add image max gc test
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2024-02-19 14:44:20 -05:00
Peter Hunt
be7856e340 e2e_node: factor out waitForKubeletToStart
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2024-02-19 14:31:38 -05:00
Adrian Reber
da8ffcd1dc Switch 'ContainerCheckpoint' from Alpha to Beta
* Forensic Container Checkpointing as described in KEP 2008 moves from
   Alpha to Beta. This is corresponding code change.

 * Adapt e2e test to handle
   '(rpc error: code = Unimplemented desc = unknown method CheckpointContainer'
   and
   '(rpc error: code = Unimplemented desc = method CheckpointContainer not implemented)'
   and
   '(rpc error: code = Unknown desc = checkpoint/restore support not available)'
   One error message is if the CRI implementation does
   not implement the CRI RPC (too old) and the second is
   if the CRI implementation does explicitly not support the feature.
   The third error message can be seen if the container engine
   explicitly disabled the checkpoint/restore support,

 * As described in the corresponding KEP 2008 explicitly test for
   disabled functionality.

 * Extended test to look for the checkpoint kubelet metric.

 * Extended test to look for the CRI error metric.

 *  Add separate sub-resource permission to control permissions on
    the checkpoint kubelet API endpoint

Signed-off-by: Adrian Reber <areber@redhat.com>
2024-02-19 18:09:38 +00:00
Davanum Srinivas
dfc598b6fe Bump containerLogMonitorInterval to the minimum allowed
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2024-02-17 17:53:19 -05:00
Kubernetes Prow Robot
d76d7a1e7a Merge pull request #123288 from AkihiroSuda/agnhost
e2e_node: replace `registry.k8s.io/stress:v1` with agnhost
2024-02-14 18:08:41 -08:00
Akihiro Suda
e8b08cd056 e2e_node: replace registry.k8s.io/stress:v1 with agnhost
agnhost now contains the stress functionality (PR 123258).

Fix issue 123146

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-02-14 19:37:13 +09:00
Harsha Narayana
ab8c784ee9 kubelet: enable configurable rotation duration and parallel rotate 2024-02-09 16:49:11 +05:30
Kubernetes Prow Robot
57e9981dc2 Merge pull request #122865 from pohly/e2e-framework-logging
e2e framework: unify logging, support skipping helpers
2024-02-01 09:37:02 -08:00
Davanum Srinivas
717a0002b7 [gce_runner] use metadata file when values have special characters
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2024-01-30 15:55:51 -08:00
Davanum Srinivas
4716bf8bd4 Fix issues found by linter
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2024-01-28 06:05:04 -05:00
Davanum Srinivas
76ea142051 Use gcloud for gce_runner
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2024-01-27 22:23:37 -05:00
Kubernetes Prow Robot
17ad610559 Merge pull request #121321 from charles-chenzz/fix_flaky_PodReadyToStartContainersCondition
[KEP - 3085] Add e2e test for PodReadyToStartContainerCondition when config map is created
2024-01-24 21:57:24 +01:00
charles-chenzz
367bbd01d7 update testcase on podreadytostartcontainercondition 2024-01-23 18:29:35 +06:00
Patrick Ohly
43539c855f e2e framework: unify logging, support skipping helpers
ginkgo.GinkgoHelper is a recent addition to ginkgo which allows functions to
mark themselves as helper. This then changes which callstack gets reported for
failures. It makes sense to support the same mechanism also for logging.

There's also no reason why framework.Logf should produce output that is in a
different format than klog log entries. Having time stamps formatted
differently makes it hard to read test output which uses a mixture of both.
Another user-visible advantage is that the error log entry from
framework.ExpectNoError now references the test source code.

With textlogger there is a simple replacement for klog that can be reconfigured
to let the caller handle stack unwinding. klog itself doesn't support that
and should be modified to support it (feature freeze).

Emitting printf-style output via that logger would work, but become less
readable because the message string would get quoted instead of printing it
verbatim as before. So instead, the traditional klog header gets reproduced
in the framework code. In this example, the first line is from klog, the second
from Logf:

    I0111 11:00:54.088957  332873 factory.go:193] Registered Plugin "containerd"
    ...
      I0111 11:00:54.987534 332873 util.go:506] >>> kubeConfig: /var/run/kubernetes/admin.kubeconfig

Indention is a bit different because the initial output is printed before
installing the logger which writes through ginkgo.GinkgoWriter.

One welcome side effect is that now "go vet" detects mismatched parameters for
framework.Logf because fmt.Sprintf is called without mangling the format
string. Some of the calls were incorrect.
2024-01-20 18:23:31 +01:00
Patrick Ohly
dd0cee4895 e2e node runner: remove dependency on e2e/framework
A stand-alone binary shouldn't import the test/e2e/framework, which is targeted
towards usage in a Ginkgo test suite. This currently works, but will break once
test/e2e/framework becomes more opinionated about how to configure logging.

The simplest solution is to duplicate the one short function that the binary
was calling in the framework.
2024-01-20 18:23:31 +01:00
Kevin Hannon
8a89a1f5a5 mark density tests as flaky 2024-01-18 09:50:39 -05:00
Kubernetes Prow Robot
7db7824d85 Merge pull request #122178 from saschagrunert/cni-plugins
Update cni-plugins to v1.4.0
2024-01-04 18:00:07 +01:00