Commit Graph

23725 Commits

Author SHA1 Message Date
Daman Arora
569695b022 e2e/network: setting --max-time for curl
Signed-off-by: Daman Arora <aroradaman@gmail.com>
2023-05-10 22:28:23 +05:30
Kubernetes Prow Robot
626b2db1ca
Merge pull request #117335 from kkkkun/update-etcd-3.5.8
etcd: Update version to 3.5.8
2023-05-10 03:38:59 -07:00
Kubernetes Prow Robot
65c13c5c21
Merge pull request #117836 from ruquanzhao/addPodUID
Passing podUID in AddReference and DeleteReference
2023-05-10 00:18:59 -07:00
Kubernetes Prow Robot
a9b08f4cc2
Merge pull request #117642 from carlory/fix-001
remove ability to re-enable serving deprecated node.k8s.io/v1beta1 types
2023-05-09 09:35:56 -07:00
HirazawaUi
5289a7b029 fix fd leaks and failed file removing for test directory 2023-05-09 09:22:31 -05:00
Min Ni
e865b30abd
update serial number to a valid non-zero number in ca certificate (#117791)
* update serial number to a valid non-zero number in ca certificate

* fix the existing problem (0 SerialNumber in all certificate) as part of this PR in a separate commit
2023-05-09 06:34:08 -07:00
Kubernetes Prow Robot
dee34b7076
Merge pull request #117858 from wojtek-t/debug_kubemark
Tweak annotating kubemark nodes on startup
2023-05-09 02:26:54 -07:00
Wojciech Tyczyński
99ebc8d9f8 Tweak annotating kubemark nodes on startup 2023-05-09 10:29:12 +02:00
Kubernetes Prow Robot
6442024f1c
Merge pull request #116779 from jpbetz/cel-ratcheting
Controlled rollout of CEL libraries and language feautres
2023-05-08 09:51:40 -07:00
Joe Betz
e740f8340e Introduce CEL EnvSets for managing safe rollout of new CEL features, libraries and expression variables 2023-05-08 11:52:31 -04:00
Kubernetes Prow Robot
b09b7e5bdb
Merge pull request #117864 from aojea/ServiceInternalTrafficPolicye2e
remove ServiceInternalTrafficPolicy e2e feature tag
2023-05-08 07:56:01 -07:00
Kubernetes Prow Robot
dd43d864c1
Merge pull request #116901 from pacoxu/cleanup-KubeletCredentialProviders
remove GAed KubeletCredentialProviders (1.28)
2023-05-08 07:55:53 -07:00
Kubernetes Prow Robot
4d0f75d183
Merge pull request #114873 from tnqn/fix-conformance-test
Fix unknown field error in deployment lifecycle e2e
2023-05-08 07:55:41 -07:00
Fabian Fulga
bbf5c03dd8 Add NodeLogQuery e2e tests
e2e tests for feature-gate NodeLogQuery
2023-05-08 16:09:21 +03:00
Antonio Ojea
ddb8c8a38b remove ServiceInternalTrafficPolicy e2e feature tag
Change-Id: I5b0fccb6323b5b28183e3ea3e20aeb1375e6e783
2023-05-08 12:48:50 +00:00
Kubernetes Prow Robot
f0417ac850
Merge pull request #110779 from jbartosik/extend-e2e-framework-helpers
Add parameter to set SecurityContext for containers in tests
2023-05-07 23:49:17 -07:00
Paco Xu
27cdddeaf1 update Feature:KubeletCredentialProviders] e2e test name 2023-05-08 11:53:14 +08:00
Kubernetes Prow Robot
a8e3344634
Merge pull request #115452 from my-git9/cleanup/sts
Cleanup: modify some sentences about statefulset
2023-05-07 19:47:29 -07:00
Kubernetes Prow Robot
510b3366be
Merge pull request #111730 from olemarkus/strip-default-annotation
Remove default annotations from copied storage class
2023-05-07 19:47:18 -07:00
Antonio Ojea
4e24237f3b e2e services: retry if healthcheck nodeport is not avaioable
There are some e2e tets on networking services that depend on the
healthcheck nodeport to be available. However, the healtcheck nodeport
will be available asynchronously, so we should wait until it is
available on the tests and not fail hard if it is not.

Change-Id: I595402c070c263f0e7855ee8d5662ae975dbd1d3
2023-05-06 10:45:27 +00:00
kkkkun
c56839c0a1 etcd: Update version to 3.5.8
Signed-off-by: kkkkun <scuzk373x@gmail.com>
2023-05-06 17:29:47 +08:00
RuquanZhao
936265e870 Add podUID in AddReference and DeleteReference
Signed-off-by: Ruquan Zhao <ruquan.zhao@arm.com>
2023-05-06 13:58:14 +08:00
CoderSherlock
5ea40d14fd Added e2e_node test for sigkilled pods exit code and exit reason check 2023-05-05 17:01:01 +00:00
Maciej Wyrzuc
194ac957ad make resize of hollow objects more verbose in start-kubemark 2023-05-05 13:31:36 +00:00
Kubernetes Prow Robot
8a58c00c2a
Merge pull request #117735 from nilekhc/fix-TestKMSv2Healthz-flake
[KMSv2] fix: fixes flake in TestKMSv2Healthz
2023-05-04 15:45:33 -07:00
Kubernetes Prow Robot
7dec98cdcc
Merge pull request #117718 from aojea/ProxyTerminatingEndpoints
promote ProxyTerminatingEndpoints to GA
2023-05-04 13:23:13 -07:00
Kubernetes Prow Robot
f9340f3cf1
Merge pull request #117785 from danilo-gemoli/feat/e2e-net-flags
[E2E] Don't use Nodes.ExternalIPs to verify the NodePorts connectivity
2023-05-04 08:28:45 -07:00
Danilo Gemoli
ec2cc36404
e2e: disable jig.ExternalIPs 2023-05-04 15:52:34 +02:00
Kubernetes Prow Robot
23a8642120
Merge pull request #117764 from aojea/tcp_rst
e2e agnhost functionality to RST TCP connections
2023-05-04 06:48:43 -07:00
Antonio Ojea
b849ff57b8 e2e reasonable grace termination period timeout
The existing termination period of 600 seconds for pods on the
e2e test causes that those pods are kept running after the
test has finished. 100 seconds is a good compromise to avoid
leaving pods lingering and more than enought for the test to finish.

Change-Id: I993162a77125345df1829044dc2514e03b13a407
2023-05-04 13:04:52 +00:00
Antonio Ojea
791573ddb6 promote ProxyTerminatingEndpoints to GA
Change-Id: Ife524c831d905acbc606aa7631e1194f91199938
2023-05-04 12:58:33 +00:00
Patrick Ohly
034528a9f0 scheduler perf: add DynamicResourceAllocation test cases
The default scheduler configuration must be based on the v1 API where the
plugin is enabled by default. Then if (and only if) the
DynamicResourceAllocation feature gate for a test is set, the corresponding
API group also gets enabled.

The normal dynamic resource claim controller is started if needed to create
ResourceClaims from ResourceClaimTemplates.

Without the upcoming optimizations in the scheduler, scheduling with dynamic
resources is fairly slow. The new test cases take around 15 minutes wall clock
time on my desktop.
2023-05-04 13:08:06 +02:00
Kubernetes Prow Robot
fb5e90e5d7
Merge pull request #116634 from kerthcet/feat/integration-test-performance
Improve integration test performance in scheduler
2023-05-04 01:46:42 -07:00
Antonio Ojea
19f7cb23c8 e2e agnhost functionality to RST TCP connections
add a new functionality to the agnhost image to run a server that
closes the connections received by sending a RST.

If a TCP servers closes the connection before all the socket is read,
it sends a RST. This implementations just reads only one byte from the
connection and closes it after that, that means that in order for this
to work the client has to send at least 2 bytes of data.

Using a simple curl is enough to trigger a RST:

curl http://127.0.0.1:8080
curl: (56) Recv failure: Connection reset by peer

Change-Id: I238fba0f790f2c92b37c732f51910a8b125f65db
2023-05-04 08:33:59 +00:00
Kubernetes Prow Robot
7efa07c74e
Merge pull request #117380 from yulng/dryrun1
Remove GA feature gates in 1.28 about DryRun
2023-05-03 23:54:41 -07:00
Kante Yin
859359ad6a Fix strict linting
Signed-off-by: Kante Yin <kerthcet@gmail.com>
2023-05-04 10:25:10 +08:00
Kante Yin
a7035f5459 Pass Context to StartTestServer
Signed-off-by: Kante Yin <kerthcet@gmail.com>
2023-05-04 10:25:09 +08:00
Kante Yin
2d866ec2fc Teardown only scheduler in integration tests
Signed-off-by: Kante Yin <kerthcet@gmail.com>
2023-05-04 10:09:24 +08:00
Kubernetes Prow Robot
20578f7daa
Merge pull request #117746 from xmudrii/iptables-go1204
Update distroless-iptables to v0.2.4
2023-05-03 12:02:54 -07:00
Kubernetes Prow Robot
b26a07a660
Merge pull request #117710 from hyangah/master
test/e2e_node: move getSampleDevicePluginPod to a test-only source file
2023-05-03 12:02:47 -07:00
Kubernetes Prow Robot
fb93000eb5
Merge pull request #117468 from HirazawaUi/replace-test-deprecated-ioutil
Replace the deprecated ioutil methods in the test directory
2023-05-03 12:02:32 -07:00
Kubernetes Prow Robot
47f1bd9f80
Merge pull request #117649 from SataQiu/scheduler-remove-v1beta2-20230427
scheduler: remove deprecated v1beta2 KubeSchedulerConfiguration  component config
2023-05-03 09:54:41 -07:00
Kubernetes Prow Robot
aece6838e8
Merge pull request #117232 from pohly/scheduler-perf-code-cleanups
scheduler_perf: code cleanups
2023-05-03 09:54:13 -07:00
Ian K. Coolidge
cede96336a Depend on k8s.io/utils cpuset
Steps performed:

$ find . -name '*.go' -exec sed -i
's|k8s.io/kubernetes/pkg/kubelet/cm/cpuset|k8s.io/utils/cpuset|g' {} \
$ ./hack/update-vendor.sh
$ ./hack/update-gofmt.sh
$ git rm -r pkg/kubelet/cm/cpuset/
2023-05-03 16:26:09 +00:00
Kubernetes Prow Robot
78833e1b33
Merge pull request #117713 from flant/ssr-ga
KEP-3325: Promote SelfSubjectReview to GA
2023-05-03 08:54:24 -07:00
SataQiu
1f7c07f355 scheduler: remove deprecated v1beta2 KubeSchedulerConfiguration 2023-05-03 21:43:19 +08:00
Hana (Hyang-Ah) Kim
17c17da97b e2e_node: move getSampleDevicePluginPod to device_plugin_test.go
image_list.go is one of the files included in the non-test variant Go build list, but its getSampleDevicePluginPod function references readDaemonSetV1OrDie function defined in device_plugin_test.go which is included in the test variant Go build list only. (The file name is *_test.go).

As a result, "go build" fails with the undefined reference error.

In practice, that may not be an issue since k8s project contributors aren't meant to run go build on this package. However, tools that depend on go build to operate - e.g., gopls or govulncheck ./... - will report this as an error.

Fix this error and make test/e2e package pass go build by moving this file to also test-only source code.
2023-05-03 08:37:40 -04:00
Marko Mudrinić
c53cc4fe0d
Update distroless-iptables to v0.2.4
Signed-off-by: Marko Mudrinić <mudrinic.mare@gmail.com>
2023-05-03 14:26:43 +02:00
Marko Mudrinić
19885264f3
[go] Bump images, dependencies and versions to go 1.20.4
Signed-off-by: Marko Mudrinić <mudrinic.mare@gmail.com>
2023-05-03 12:22:23 +02:00
m.nabokikh
7c5573d326 Fix cmd, integration, and conformance tests
Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com>
2023-05-03 01:29:37 +02:00
Nilekh Chaudhari
9d19c207d2
fix: fixes flake in TestKMSv2Healthz
Signed-off-by: Nilekh Chaudhari <1626598+nilekhc@users.noreply.github.com>
2023-05-02 21:01:48 +00:00
kannon92
5f489a3327 feat: rename PodHasNetwork to PodReadyToStartContainers 2023-05-02 19:52:23 +00:00
Kubernetes Prow Robot
d5329696c7
Merge pull request #117721 from ionutbalutoiu/windows-tests/update-conn-check
windows-tests: Update connectivity check util function
2023-05-02 12:44:14 -07:00
Kubernetes Prow Robot
0a30e39209
Merge pull request #116947 from rphillips/bump_all_nodes_ready_timeout
e2e node: bump all nodes ready timeout
2023-05-02 10:02:13 -07:00
Michal Wozniak
e1e38148bb Add DisruptionTarget condition when preempting for critical pod 2023-05-02 18:53:19 +02:00
Kubernetes Prow Robot
e114fc0cdc
Merge pull request #117611 from ii/create-apiresources-test
Write e2e test for APIResources endpoints + 12 Endpoints
2023-05-02 08:18:51 -07:00
carlory
e7396e3551 remove ability to re-enable serving deprecated versions of the runtimeclasses kind 2023-05-02 22:40:26 +08:00
Ionut Balutoiu
d96f83f02f windows-tests: Update connectivity check util function
Sometimes, the kube-proxy endpoints take longer than 10 seconds to
be ready, so the initial connection check fails (via `gomega.Eventually`).

This patch uses a separate longer timeout for `gomega.Eventually`.

Signed-off-by: Ionut Balutoiu <ibalutoiu@cloudbasesolutions.com>
2023-05-02 16:56:09 +03:00
m.nabokikh
40de26dcff KEP-3325: Promote SelfSubjectReview to GA
Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com>
2023-05-02 14:50:40 +02:00
Piotr Betkier
d952437921
Fix flaky HPA e2e tests by not failing on context cancelled (#117669)
* Fix flaky HPA e2e tests by not failing on context cancelled

Consume requests are sent during test execution in a loop in a separate goroutine. Once the test completes, it is expected that a consumption request may be pending. Cancelling the request during cleanup should not cause test failures.

Tests started being flaky since #112923 introduced passing test context that gets cancelled during cleanup.

* Use PollUntilContextTimeout and restructure error ignoring logic
2023-05-02 05:42:12 -07:00
yulng
b899ae4847
remove genericfeatures.DryRun in 1.28
Signed-off-by: yulng <wei.yang@daocloud.io>
2023-05-02 13:16:31 +08:00
Kubernetes Prow Robot
1241ddc567
Merge pull request #116376 from swatisehgal/device-mgr-recovery-wip
node: device-mgr: Handle recovery flow by checking if healthy devices exist- attempt 2
2023-05-01 21:30:11 -07:00
Kubernetes Prow Robot
d6471d01a4
Merge pull request #115843 from rikatz/remote-netpol-status
Remove/Withdraw  NetworkPolicy Status
2023-05-01 18:30:10 -07:00
Kubernetes Prow Robot
af20b027c6
Merge pull request #117568 from alexzielenski/apiserver/smp/merge-with-empty
Fix Strategic Merge merging leaving patch directives in objects when field doesn't exist
2023-05-01 16:34:23 -07:00
Stephen Heywood
c6bdde8051 Create e2e test for APIResources endpoints
e2e test validates the following 12 endpoints
- getAutoscalingV1APIResources
- getAutoscalingV2APIResources
- getPolicyV1APIResources
- getEventsV1APIResources
- getCoordinationV1APIResources
- getSchedulingV1APIResources
- getApiregistrationV1APIResources
- getAppsV1APIResources
- getAuthenticationV1APIResources
- getAuthorizationV1APIResources
- getBatchV1APIResources
- getCoreV1APIResources
2023-05-02 10:13:15 +12:00
Alexander Zielenski
6de6cd0a65 add integration test for nested $patch in SMP 2023-05-01 11:53:58 -07:00
Ricardo Katz
bff8a6cd9f Remove withdrawn feature NetworkPolicyStatus 2023-05-01 15:19:25 -03:00
carlory
da922f0af6 Remove ability to re-enable serving deprecated discoveryv1beta1 APIs 2023-04-30 19:21:46 +08:00
Kubernetes Prow Robot
7278eaddca
Merge pull request #117661 from carlory/fix-004
Remove ability to re-enable serving deprecated autoscalingapiv2beta APIs
2023-04-29 19:52:23 -07:00
Kubernetes Prow Robot
b4c6a70927
Merge pull request #117230 from pohly/scheduler-perf-throughput
scheduler_perf: update throughputCollector
2023-04-29 12:12:17 -07:00
carlory
944a4cd311 Remove ability to re-enable serving deprecated autoscalingapiv2beta APIs 2023-04-29 16:51:48 +08:00
Kubernetes Prow Robot
54284f1068
Merge pull request #117657 from tzneal/add-init-container-restart-test
test for init container restarts
2023-04-28 15:40:16 -07:00
Todd Neal
28c573358b test for init container restarts
Refactor tests and add an additional one to ensure init containers
don't restart upon regular container restart.
2023-04-28 13:13:55 -05:00
Kubernetes Prow Robot
4ca7bcec24
Merge pull request #117665 from carlory/fix-007
Remove ability to re-enable serving deprecated eventv1beta1 APIs
2023-04-28 11:08:27 -07:00
Swati Sehgal
d727df1741 node: device-plugin: e2e: Additional test cases
Additional test cases added:
Keeps device plugin assignments across pod and kubelet restarts (no device plugin re-registration)
Keeps device plugin assignments after the device plugin has re-registered (no kubelet or pod restart)

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2023-04-28 14:45:21 +01:00
Swati Sehgal
3dbb741c97 node: device-plugin: add node reboot test scenario
Add a test suit to simulate node reboot (achieved by removing pods
using CRI API before kubelet is restarted).

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2023-04-28 14:45:21 +01:00
Swati Sehgal
a26f4d855d node: device-plugin: e2e: Capture pod admission failure
This test captures that scenario where after kubelet restart,
application pod comes up and the device plugin pod hasn't re-registered
itself, the pod fails with admission error. It is worth noting that
once the device plugin pod has registered itself, another
application pod requesting devices ends up running
successfully.

For the test case where kubelet is restarted and device plugin
has re-registered without involving pod restart, since the
pod after kubelet restart ends up with admission error,
we cannot be certain the device that the second pod (pod2) would
get. As long as, it gets a device we consider the test to pass.

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2023-04-28 14:44:42 +01:00
Swati Sehgal
9697573703 node: device-mgr: e2e: adapt to sample device plugin refactoring
These updates are to adapt to the sample device plugin
refactoring done here: 92e00203e0.

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2023-04-28 14:43:25 +01:00
Swati Sehgal
282a6a80b9 node: device-mgr: e2e: Update the e2e test to reproduce issue:109595
Breakdown of the steps implemented as part of this e2e test is as follows:
1. Create a file `registration` at path `/var/lib/kubelet/device-plugins/sample/`
2. Create sample device plugin with an environment variable with
   `REGISTER_CONTROL_FILE=/var/lib/kubelet/device-plugins/sample/registration` that
    waits for a client to delete the control file.
3. Trigger plugin registeration by deleting the abovementioned directory.
4. Create a test pod requesting devices exposed by the device plugin.
5. Stop kubelet.
6. Remove pods using CRI to ensure new pods are created after kubelet restart.
7. Restart kubelet.
8. Wait for the sample device plugin pod to be running. In this case,
   the registration is not triggered.
9. Ensure that resource capacity/allocatable exported by the device plugin is zero.
10. The test pod should fail with `UnexpectedAdmissionError`
11. Delete the test pod.
12. Delete the sample device plugin pod.
13. Remove `/var/lib/kubelet/device-plugins/sample/` and its content, the directory
    created to control registration

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2023-04-28 14:43:17 +01:00
Swati Sehgal
d509e79837 node: device-mgr: e2e: Implement End to end test
This commit reuses e2e tests implmented as part of https://github.com/kubernetes/kubernetes/pull/110729.
The commit is borrowed from the aforementioned PR as is to preserve
authorship. Subsequent commit will update the end to end test to
simulate the problem this PR is trying to solve by reproducing
the issue: 109595.

Co-authored-by: Francesco Romani <fromani@redhat.com>
Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2023-04-28 14:41:38 +01:00
carlory
f81b49d873 Remove ability to re-enable serving deprecated eventv1beta1 APIs 2023-04-28 14:58:59 +08:00
carlory
48d01d6d9b Remove ability to re-enable serving deprecated batchapiv1beta1 APIs 2023-04-28 14:08:31 +08:00
Sergey Kanzhelev
fc0d2cd32f added init containers tests to simplify the sidecar KEP large PR 2023-04-27 22:42:49 +00:00
Kubernetes Prow Robot
299db84401
Merge pull request #117057 from ffromani/e2e-device-plugin-test-fixes
node: e2e device plugin test improvements
2023-04-27 12:28:34 -07:00
Patrick Ohly
b3e0bc8864 scheduler_perf: let the test decide which informers are needed
This will change when adding dynamic resource allocation test cases. Instead of
changing mustSetupScheduler and StartScheduler for that, let's return the
informer factory and create informers as needed in the test.
2023-04-27 15:31:40 +02:00
Patrick Ohly
969d28b12b scheduler_perf: refactor common code 2023-04-27 15:31:37 +02:00
Humble Chirammal
6b40cd8cd3 update test/conformance/image version to v1.4.2
Signed-off-by: Humble Chirammal <humble.devassy@gmail.com>
2023-04-27 17:08:04 +05:30
Kubernetes Prow Robot
3554bcde87
Merge pull request #117368 from sunnylovestiramisu/fix
Fix nil pointer in test AfterEach for volumeperf.go
2023-04-26 21:54:14 -07:00
Kubernetes Prow Robot
dd62a53e1a
Merge pull request #117196 from pohly/scheduler-perf-labels
scheduler_perf: support test case selection via labels
2023-04-26 14:26:14 -07:00
Patrick Ohly
550d4c0074 scheduler_perf: support test case selection via labels
Entire test cases and workloads can have labels attached to them. The union of
these must match the label filter which works as in GitHub. The benchmark by
default runs the tests that are labeled "performance", which is the same as
before.
2023-04-26 21:01:31 +02:00
Julianne DeMars
217196c59f
Add ROX storage tests (#114628)
* Add ROX tests

* Add capability and switch to secpod

* addmissing file

* remove extra param

* run-formatter

* add anticapability for resize w/ Restore + ROX

* remove size checking in ROX tests

* fix spacing

* fix spacing
2023-04-26 10:22:16 -07:00
Swati Sehgal
0a58243159 node: device-plugin: e2e: Add test case for kubelet restart
Capture explicitly a test case pertaining to kubelet restart
but with no pod restart and device plugin re-registration.

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2023-04-26 15:33:00 +02:00
Swati Sehgal
0910080472 node: device-plugin: e2e: Provide sleep intervals via constants
Based on whether the test case requires pod restart or not, the sleep
interval needs to be updated and we define constants to represent the two
sleep intervals that can be used in the corresponding test cases.

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
Co-authored-by: Francesco Romani <fromani@redhat.com>
2023-04-26 15:32:59 +02:00
Swati Sehgal
4a0f7c791f node: device-plugin: e2e: Update test description to make it explicit
Explicitly state that the test involves kubelet restart and device plugin
re-registration (no pod restart)

We remove the part of the code where we wait for the pod to restart as this
test case should no longer involve pod restart.

In addition to that, we use `waitForNodeReady` instead of `WaitForAllNodesSchedulable`
for ensuring that the node is ready for pods to be scheduled on it.

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
Co-authored-by: Francesco Romani <fromani@redhat.com>
2023-04-26 15:32:57 +02:00
Swati Sehgal
fd459beeff node: device-plugin: e2e: Isolate test to pod restart scenario
Rather than testing out for both pod restart and kubelet restart,
we change the tests to just handle pod restart scenario.

Clarify the test purpose and add extra check to tighten the test.

We would be adding additional tests to cover kubelet restart scenarios
in subsequent commits.

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
Signed-off-by: Francesco Romani <fromani@redhat.com>
2023-04-26 15:32:54 +02:00
Swati Sehgal
5ab4ba6205 node: device-plugin: e2e: Annotate device check with error message
With this change the error message are more helpful and easier
to troubleshoot in case of test failures.

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2023-04-26 15:32:21 +02:00
Swati Sehgal
5c4f397361 node: device-plugins: e2e: s/devLen/expectedSampleDevsAmount
We rename to make the intent more explicit;
We make it global to be able to reuse the value all across the module
(e.g. to check the node readiness) later on.

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
Co-authored-by: Francesco Romani <fromani@redhat.com>
2023-04-26 15:32:16 +02:00
Swati Sehgal
0aa6a5726a node: device-plugins: e2e: Refactor parse log to return string and error
Rather than only returning a string forcing us to log failure with
`framework.Fail`, we return a string and error to handle error cases
more conventionally. This enables us to use the `parseLog` function
inside `Eventually` and `Consistently` blocks, or in general to delegate
the error processing and enable better composability.

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
Co-authored-by: Francesco Romani <fromani@redhat.com>
2023-04-26 15:31:16 +02:00
Kubernetes Prow Robot
0b53923a7a
Merge pull request #117286 from humblec/e2e-improvements
remove `expansionFailed` const in volume expansion and avoid var name collision
2023-04-26 06:16:13 -07:00
Patrick Ohly
78b8af9fed scheduler_perf: update throughputCollector
The previous solution had some shortcomings:

- It was based on the assumption that the goroutine gets woken up at regular
  intervals. This is not actually guaranteed. Now the code keeps track of the
  actual start and end of an interval and verifies that assumption.

- If no pod was scheduled (unlikely, but could happen), then
  "0 pods/s" got recorded. In such a case, the metric was always either
  zero or >= 1. A better solution is to extend the interval
  until some pod gets scheduled. With the larger time interval
  it is then possible to also track, for example, 0.5 pods/s.
2023-04-26 08:11:50 +02:00
Kubernetes Prow Robot
08755fe249
Merge pull request #117110 from pohly/test-integration-race-detection-auth
test/integration/auth: fix data race
2023-04-23 22:11:13 -07:00
Kubernetes Prow Robot
10d9d4b741
Merge pull request #117449 from TommyStarK/e2e/gh_117443
e2e: fix flaky test 'should contain OpenAPI V3 for Aggregated APIServer'
2023-04-19 11:31:11 -07:00
TommyStarK
a02e94ae2b e2e: fix flaky test 'should contain OpenAPI V3 for Aggregated APIServer'
Signed-off-by: TommyStarK <thomasmilox@gmail.com>
2023-04-19 08:25:30 +02:00
Kubernetes Prow Robot
9db01b6eb3
Merge pull request #117453 from liggitt/fix-applyset-e2e-env
Fix stomping os env in kubectl e2e tests
2023-04-18 22:26:45 -07:00
Jordan Liggitt
0c54d9af6f
Fix stomping os env in kubectl e2e tests 2023-04-19 01:32:20 +02:00
HirazawaUi
a8b808ee6c Replace the deprecated ioutil methods in the test directory 2023-04-18 21:51:10 +08:00
Kubernetes Prow Robot
84f5684c2d
Merge pull request #117416 from skitt/beequal
Document gomega.Equal() instead of gomega.BeEqual()
2023-04-18 01:40:58 -07:00
Kubernetes Prow Robot
53cccbe4f9
Merge pull request #117019 from bobbypage/gh_116925
kubelet: Mark new terminal pods as non-finished in pod worker
2023-04-17 15:10:58 -07:00
Stephen Kitt
0a8343352b
Document gomega.Equal() instead of gomega.BeEqual()
BeEqual() doesn't exist, document Equal() instead (as used in the
actual code).

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2023-04-17 22:47:38 +02:00
Sunny Song
e340325024 Fix nil pointer in test AfterEach for volumeperf.go 2023-04-17 18:44:13 +00:00
Todd Neal
453f81d1ca
kubelet: pass context to VolumeManager.WaitFor*
This allows us to return with a timeout error as soon as the
context is canceled.  Previously in cases where the mount will
never succeed pods can get stuck deleting for 2 minutes.

In the Sync*Pod methods that call VolumeManager.WaitFor*, we
must filter out wait.Interrupted errors from being logged as
they are part of control flow, not runtime problems. Any
early interruption should result in exiting the Sync*Pod method
as quickly as possible without logging intermediate errors.
2023-04-17 11:53:28 -05:00
Ed Bartosh
ff9ebfa90d e2e framework: control k/k/pkg imports
Modified import restrictions for the e2e framework submodules
to enable control of the k/k/pkg imports.
2023-04-17 00:17:16 +03:00
Ed Bartosh
dc4f6f9da6 e2e framework: remove last dependency to k/k/pkg/util
Copied and modified RemoveString function from
k/k/pkg/util/slice/slice.go to e2e/framework/pod/pod_client.go

This is the last dependency from e2e framework to k/k/pkg/util
2023-04-15 14:28:32 +03:00
Ed Bartosh
40521fe360 e2e framework: remove last dependency to k/k/pkg/kubelet
Copied and modified pod format function from
k/k/pkg/kubelet/util/format/pod.go to e2e/framework/pod/pod_client.go

This is the last dependency from e2e framework to k/k/pkg/kubelet
2023-04-14 22:32:06 +03:00
Ed Bartosh
1b93abb9ba Move kubelet config API to e2e_node
This API is only used by e2e_node, moved it out of e2e framework.
2023-04-14 17:56:15 +03:00
Kubernetes Prow Robot
27475f6cf4
Merge pull request #117277 from p0lyn0mial/upstream-e2e-watchlist
e2e/apimachinery: Add an e2e test for the API Streaming feature
2023-04-14 05:54:42 -07:00
Lukasz Szaszkiewicz
06dc3d00fc e2e/apimachinery: Add an e2e test for the API Streaming feature 2023-04-14 13:59:41 +02:00
Kubernetes Prow Robot
c1bbf791dd
Merge pull request #117282 from bart0sh/PR108-e2e-framework-get-rid-of-k/k/pkg/kubelet-dep
get rid of e2e/framework -> k/k/pkg/kubelet dependency
2023-04-14 02:06:40 -07:00
Hao Ruan
c4e1b01416 replace spew methods with dump methods 2023-04-14 08:05:53 +08:00
Ed Bartosh
867be8fc3e get rid of e2e/framework -> k/k/pkg/kubelet dependency
It's conceptually wrong to have dependencies to k/k/pkg in
the e2e framework code. They should be moved to corresponding
packages, in this particular case to the test/e2e_node.
2023-04-14 00:28:33 +03:00
Tim Hockin
bc302fa414
Replace uses of ObjectReflectDiff with cmp.Diff
ObjectReflectDiff is already a shim over cmp.Diff, so no actual output
or behavior changes
2023-04-12 08:48:03 -07:00
Tim Hockin
9627c50ef3
Replace uses of ObjectGoPrintDiff with cmp.Diff
ObjectGoPrintDiff is already a shim over cmp.Diff, so no actual output
or behavior changes
2023-04-12 08:46:16 -07:00
Tim Hockin
dd7af241c1
Replace diff.ObjectDiff with cmp.Equal
More obvious and cheaper, and ObjectDiff is already written in terms of
cmp.
2023-04-12 08:45:32 -07:00
Kubernetes Prow Robot
bd24043551
Merge pull request #117216 from gnufied/fix-azure-disk-e2e
Fix azure disk e2e after migration and while using external CCM
2023-04-12 08:34:32 -07:00
Kubernetes Prow Robot
5f23f83587
Merge pull request #116865 from alexzielenski/apiserver/apply/move-transformer
move check for noop managed field timestamp updates
2023-04-11 23:18:42 -07:00
Kubernetes Prow Robot
aa026a6b30
Merge pull request #117202 from pohly/scheduler-perf-zero-count
scheduler perf: allow creating 0 items
2023-04-11 21:18:20 -07:00
Kubernetes Prow Robot
251d4a00e6
Merge pull request #117201 from pohly/scheduler-perf-node-labels
test/integration: create nodes directly with kubernetes.io/hostname label
2023-04-11 21:18:12 -07:00
Kubernetes Prow Robot
69b59b9d42
Merge pull request #117199 from pohly/scheduler-perf-race-fix
scheduler_perf: fix race condition
2023-04-11 21:18:05 -07:00
Kubernetes Prow Robot
2bfaaf21c1
Merge pull request #117197 from pohly/scheduler-perf-cleanup
scheduler perf: remove cleanup func
2023-04-11 21:17:57 -07:00
Kubernetes Prow Robot
743cc9db44
Merge pull request #117170 from jongwooo/hotfix/fix-typo-in-comments
Fix typo at job_test.go
2023-04-11 21:17:27 -07:00
Kubernetes Prow Robot
162485fda3
Merge pull request #117141 from dims/specify-kube-root-for-test-e2e-node/AWS
Specify kube root for test-e2e-node/aws to work
2023-04-11 20:21:59 -07:00
Kubernetes Prow Robot
730d811036
Merge pull request #117109 from pohly/test-integration-race-detection-framework-grpclog
test/integration/framework: avoid race around grpclog.SetLoggerV2
2023-04-11 20:21:31 -07:00
Kubernetes Prow Robot
950b2af3c8
Merge pull request #117103 from humblec/storage-e2e-image
Storage e2e image base version update for RBD and ISCSI
2023-04-11 20:21:24 -07:00
Kubernetes Prow Robot
19f3cf66d3
Merge pull request #117053 from dims/refactor-remote-runner-to-be-pluggable
Refactor remote runners to allow pluggable cloud specific extensions
2023-04-11 20:20:56 -07:00
Kubernetes Prow Robot
a9edbee708
Merge pull request #117034 from ardaguclu/events-support-fullnames
kubectl events: Support fully qualified names for --for flag
2023-04-11 20:20:41 -07:00
gxwilkerson33
5da386745a
Kubectl convert - warn users with NotRegisteredError and Fail on all other errors (#117002)
* Convert file but warn user with impossible conversions

* Only continuing for NotRegisteredErrors. Using iostreams for warning user instead of stdError

* Formatting, correct tests to use valid DNS-1035.
2023-04-11 19:17:53 -07:00
Kubernetes Prow Robot
95d3492eb8
Merge pull request #117000 from bobbypage/gh_116998
test: Fix flake in node e2e mirror pod tests
2023-04-11 19:17:45 -07:00
Kubernetes Prow Robot
242702cb86
Merge pull request #116940 from sarab97/sarab/feat/sets
Use the generic Set in scheduler
2023-04-11 19:17:14 -07:00
Kubernetes Prow Robot
96d743e85c
Merge pull request #116899 from aramase/aramase/d/kmsv2_run_e2e_readme
[KMSv2] update ci script and add readme
2023-04-11 19:16:50 -07:00
Kubernetes Prow Robot
66c78653f1
Merge pull request #116881 from ritazh/kms-test-fix
kmsv2: test cleanup
2023-04-11 19:16:31 -07:00
Kubernetes Prow Robot
1f777557f3
Merge pull request #116652 from pacoxu/kubemark-test
print node status when failed for kubemark start
2023-04-11 18:18:55 -07:00
Kubernetes Prow Robot
d0fc9d16ce
Merge pull request #114800 from haoruan/feature-8976-spew-sprintf-refactor
Capture spew.Sprintf() with all our favorite config into a util func
2023-04-11 15:34:57 -07:00
Hemant Kumar
901dea7307 Fix azure disk e2e after migration 2023-04-11 15:02:25 -04:00
Patrick Ohly
464edfe6f6 test/integration: create nodes directly with kubernetes.io/hostname label
By generating the unique name in advance, the label also can be set to a
matching value directly in the Create request. This makes test startup in
test/integration/scheduler_perf a bit faster because the extra patching can be
avoided.

It also leads to a better label because previously, the unique label value
didn't match the node name. This is required for simulating dynamic resource
allocation, which relies on the label to track where an allocated claim is
available.
2023-04-11 16:35:37 +02:00
Humble Chirammal
9204e6b286 remove unused constant expansionFailed in expansion test.
Signed-off-by: Humble Chirammal <humble.devassy@gmail.com>
2023-04-11 16:51:35 +05:30
Humble Chirammal
4491ba8917 rename variable delete to avoid collision to builtin variable
Signed-off-by: Humble Chirammal <humble.devassy@gmail.com>
2023-04-11 16:51:35 +05:30
David Porter
0020631985 test: Add node e2e to restart kubelet while pod is terminating
Add a regression test for https://issues.k8s.io/116925. The test
exercises the following:

1) Start a restart never pod which will exit with
   `v1.PodSucceeded` phase.
2) Start a graceful deletion of the pod (set a deletion timestamp)
3) Restart the kubelet as soon as the kubelet reports the pod is
   terminal (but before the pod is deleted).
4) Verify that after kubelet restart, the pod is deleted.

As of v1.27, there is a delay between the pod being marked terminal
phaes, and the status manager deleting the pod. If the kubelet is
restarted in the middle, after starting up again, the kubelet needs to
ensure the pod will be deleted on the API server.

Signed-off-by: David Porter <david@porter.me>
2023-04-11 01:39:05 -07:00
Patrick Ohly
aa73f06e56 scheduler perf: allow creating 0 items
It makes sense to define a test where, depending on the parameters, some
operation creations zero pods, namespaces or nodes. The validation didn't allow
that previously due to the way how it was implemented although the underlying
code works fine with zero as count.
2023-04-11 09:59:16 +02:00
Patrick Ohly
49bbf7c268 scheduler_perf: fix race condition
collector.collect got called without ensuring that collector.run had
terminated, so it could have happened that collector.run adds another sample
while collector.collect is reading them.
2023-04-11 09:46:34 +02:00
Patrick Ohly
a869a89825 scheduler perf: remove cleanup func
b.Cleanup may as well get called inside the function instead
of leaving that to the caller.
2023-04-11 09:43:45 +02:00
sarab
8d18ae6fc2 Use the generic Set in scheduler 2023-04-09 11:34:17 +05:30
Jongwoo Han
1dec97436c
Fix typo at job_test.go
Signed-off-by: jongwooo <jongwooo.han@gmail.com>
2023-04-09 01:47:42 +09:00
Davanum Srinivas
d3ae6c2df3
Specify KUBE_ROOT for test-e2e-node/AWS to work
test-e2e-node for AWS is out-of-tree so that we won't need to vendor
in AWS related packages. For this to work, some of the scripts/golang
code need to know where the k8s tree is git cloned.

So let's add an option to lookup the env var, so that we can then,
change directory to this specified directory to run some make commands

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-04-06 10:42:17 -04:00
Marko Mudrinić
b19c362bf5
Update distroless-iptables to v0.2.3
Signed-off-by: Marko Mudrinić <mudrinic.mare@gmail.com>
2023-04-06 01:37:14 +02:00
Marko Mudrinić
2a69edb43d
[go] Bump images, dependencies and versions to go 1.20.3
Signed-off-by: Marko Mudrinić <mudrinic.mare@gmail.com>
2023-04-05 23:46:34 +02:00
Patrick Ohly
a2fb32870f test/integration/auth: fix data race
"username" gets read by one goroutine and written by another. Therefore it must
be protected by a mutex to avoid triggering the race detector.
2023-04-05 16:11:38 +02:00
Patrick Ohly
1dde8ef026 test/integration/framework: avoid race around grpclog.SetLoggerV2
grpclog.SetLoggerV is not thread-safe and may only be called before code starts
using GRPC. Calling RunCustomEtcd multiple times, for example in
k8s.io/kubernetes/test/integration/apiserver.TestWatchCacheUpdatedByEtcd,
causes a data race:

WARNING: DATA RACE
Read at 0x00000c8e8d20 by goroutine 135612:
  k8s.io/kubernetes/vendor/google.golang.org/grpc/grpclog.V()
      /home/prow/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/google.golang.org/grpc/grpclog/grpclog.go:41 +0x30
  k8s.io/kubernetes/vendor/google.golang.org/grpc/grpclog.(*componentData).V()
      /home/prow/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/google.golang.org/grpc/grpclog/component.go:103 +0x4e
  k8s.io/kubernetes/vendor/google.golang.org/grpc/internal/transport.(*loopyWriter).run.func1()
      /home/prow/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/google.golang.org/grpc/internal/transport/controlbuf.go:528 +0xf1
  runtime.deferreturn()
      /home/prow/go/src/k8s.io/kubernetes/_output/local/.gimme/versions/go1.20.2.linux.amd64/src/runtime/panic.go:476 +0x32
  k8s.io/kubernetes/vendor/google.golang.org/grpc/internal/transport.newHTTP2Client.func6()
      /home/prow/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/google.golang.org/grpc/internal/transport/http2_client.go:442 +0x112

Previous write at 0x00000c8e8d20 by goroutine 140228:
  k8s.io/kubernetes/vendor/google.golang.org/grpc/grpclog.SetLoggerV2()
      /home/prow/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/google.golang.org/grpc/grpclog/loggerv2.go:76 +0xc6a
  k8s.io/kubernetes/test/integration/framework.RunCustomEtcd()
      /home/prow/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/integration/framework/etcd.go:153 +0xb89
  k8s.io/kubernetes/test/integration/apiserver.multiEtcdSetup()
      /home/prow/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/integration/apiserver/watchcache_test.go:40 +0xac
  k8s.io/kubernetes/test/integration/apiserver.TestWatchCacheUpdatedByEtcd()
      /home/prow/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/integration/apiserver/watchcache_test.go:88 +0x4a
  testing.tRunner()
      /home/prow/go/src/k8s.io/kubernetes/_output/local/.gimme/versions/go1.20.2.linux.amd64/src/testing/testing.go:1576 +0x216
  testing.(*T).Run.func1()
      /home/prow/go/src/k8s.io/kubernetes/_output/local/.gimme/versions/go1.20.2.linux.amd64/src/testing/testing.go:1629 +0x47
2023-04-05 16:08:01 +02:00
Humble Chirammal
2d06601b81 RBD: e2e containers base image has been udpated to F38
This commit update the e2e test image if RBD to latest fedora
version.

Signed-off-by: Humble Chirammal <humble.devassy@gmail.com>
2023-04-05 18:03:10 +05:30
Humble Chirammal
0518dffd25 iscsi: e2e containers base image has been udpated to F38
This commit update the e2e test image if iscsi to latest fedora
version.

Signed-off-by: Humble Chirammal <humble.devassy@gmail.com>
2023-04-05 18:02:03 +05:30
Michal Wozniak
b5dd5f1f3a Investigate and fix the handling of Succeeded pods in DaemonSet 2023-04-04 19:21:15 +02:00
Davanum Srinivas
bda73bd112
Refactor remote runners
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-04-02 16:51:39 -04:00
Arda Güçlü
457bb58ebb kubectl events: Support fully qualified names for --for flag
Users can pass resources into `kubectl events` command via `--for` flag,
if they have desire to only get events for the resource they specify.

However, current `kubectl events` does not support passing fully qualified
names(e.g. `replicasets.apps`, `cronjobs.v1.batch`, etc.). This PR adds support
for this.
2023-03-31 12:34:00 +03:00
David Porter
1893f639d0 test: Fix flake in node e2e mirror pod tests
The newly added `MirrorPodWithGracePeriod when create a mirror pod and
the container runtime is temporarily down during pod termination` test
is currently flaking because in some cases when it is run there are
other pods from other tests that are still in progress of being
terminated. This results in the test failing because it asserts metrics
that assume that there is only one pod running on the node.

To fix the flake, prior to starting the test, verify that no pods exist
in the api server other then the newly created mirror pod.

Signed-off-by: David Porter <david@porter.me>
2023-03-31 02:10:39 -07:00
Paco Xu
70369bfe29 remove GAed KubeletCredentialProviders 2023-03-31 10:09:58 +08:00
Rita Zhang
906f0607ef
Clean up kms test
Signed-off-by: Rita Zhang <rita.z.zhang@gmail.com>
2023-03-28 22:36:41 -07:00
Hao Ruan
d3f6cb717f update conformance yaml 2023-03-29 11:18:52 +08:00
weizhichen
7bfcfc4d5d docs: fix storage e2e test README 2023-03-28 23:36:42 +00:00
Anish Ramasekar
449f847630
[KMSv2] update ci script and add readme
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>
2023-03-27 20:43:37 +00:00
Ryan Phillips
86e1f4b9d1 e2e node: bump all nodes ready timeout 2023-03-27 11:22:18 -05:00
Hao Ruan
e9b384f5a7 fix typo 2023-03-27 10:23:27 +08:00
Hao Ruan
f638e2849f replaced spew.Sprintf with a util pretty print function 2023-03-27 09:24:22 +08:00
Moshe Levi
9a776cbf21 kubelet pod-resources: e2e node test add failure description ExpectNoError
Signed-off-by: Moshe Levi <moshele@nvidia.com>
2023-03-23 11:05:21 +02:00
Alexander Zielenski
2b01f63b11 move check for noop managed field timestamp updates
this check needs to go after any mutations. After the mutating admission chain, rest.BeforeUpdate (which is responsible for reverting updates to immutable timestamp fields, among other things.) is called in the store.Update function. Without moving this check, it will be possible for an object to be written to etcd with only a change to its managed fields timestamp.
2023-03-22 11:29:33 -07:00
Tim Allclair
7537cec567
Fix MatchConditions webhook validation testing (#116784)
* Fix MatchConditions webhook validation testing

* #squash verify error type

* #squash fix duplicate registration

* #squash uncomment validation test
2023-03-21 21:38:35 -07:00
Kubernetes Prow Robot
8dd3807f4d
Merge pull request #116770 from alexzielenski/agg-discovery-err-sources
Fix aggregated discovery race when using CRD and Aggregated APIService under same group
2023-03-21 15:18:12 -07:00
Alexander Zielenski
933dfe3a51 use longer timeouts to avoid flakes on heavily loaded systems 2023-03-21 14:18:34 -07:00
Alexander Zielenski
0740b11073 allow multiple sources to add/remove from discovery without clobbering each other 2023-03-21 14:14:23 -07:00
Kubernetes Prow Robot
6ec366261c
Merge pull request #116658 from Riaankl/add-get-resources-endpoint
Add 12 get * V1APIResources to file pending_eligible_endpoints.yaml
2023-03-21 12:28:11 -07:00
Kubernetes Prow Robot
956fa9b9ce
Merge pull request #116785 from enj/enj/i/clean_front_proxy_headers
Clear front proxy headers after authentication is complete
2023-03-21 11:30:11 -07:00
Monis Khan
e9866d2794
Clear front proxy headers after authentication is complete
This matches the logic we have for the Authorization header as well
as the impersonation headers.

Signed-off-by: Monis Khan <mok@microsoft.com>
2023-03-21 10:51:22 -04:00
Paco Xu
a2cf4e7345
use describe node to print node events as well 2023-03-21 14:57:12 +08:00
Tim Allclair
9cce3fa107 Deflake GC e2e test 2023-03-20 16:09:30 -07:00
Kubernetes Prow Robot
15894cfc85
Merge pull request #116550 from alculquicondor/fix-bind-uid
Preserve UID and ResourceVersion in BindingREST
2023-03-20 08:49:20 -07:00
Kubernetes Prow Robot
fe91bc257b
Merge pull request #116554 from atiratree/eviction-resource-version-fix
API-initiated eviction: handle deleteOptions correctly
2023-03-17 16:59:15 -07:00
Filip Křepinský
51c0e2374f API-initiated eviction: handle deleteOptions correctly
when adding a DisruptionTarget condition into a pod that will be deleted

- handle ResourceVersion and Preconditions correctly
- handle DryRun option correctly

Co-authored-by: Jordan Liggitt jordan@liggitt.net
2023-03-17 22:18:07 +01:00
Paco Xu
a780544f58 add log for kubemark start 2023-03-17 11:33:48 +08:00
Michal Wozniak
3d68f362c3 Give terminal phase correctly to all pods that will not be restarted 2023-03-16 21:25:29 +01:00
Kubernetes Prow Robot
a34e37c996
Merge pull request #113218 from ahmedtd/kep-3257
Add certificates.k8s.io/v1alpha1 ClusterTrustBundle
2023-03-16 11:13:20 -07:00
Sathyanarayanan Saravanamuthu
c84c8add70
Decouple batch/job back-off logic from workqueues (#114768)
* batch/job: decouple backoff from workqueue

Signed-off-by: Sathyanarayanan Saravanamuthu <sathyanarays@vmware.com>

* Resolving review comments

* Resolving more review comments

* Resolving review comments

Signed-off-by: Sathyanarayanan Saravanamuthu <sathyanarays@vmware.com>

* Computing finish time to now when FinishedAt is unix epoch

* Addressing review comments

Signed-off-by: Sathyanarayanan Saravanamuthu <sathyanarays@vmware.com>

---------

Signed-off-by: Sathyanarayanan Saravanamuthu <sathyanarays@vmware.com>
2023-03-16 10:15:21 -07:00
Taahir Ahmed
51f759aa05 ClusterTrustBundles: kube-apiserver integration tests 2023-03-15 20:19:48 -07:00
Kubernetes Prow Robot
742316ee21
Merge pull request #116631 from bobbypage/standalone-repro
test: Update standalone test in node e2e
2023-03-15 18:27:26 -07:00
Kubernetes Prow Robot
6711a81f02
Merge pull request #116657 from pacoxu/fix-explain
make `kubectl explan` test tolerate either  "RESOURCE" or "FIELD"
2023-03-15 14:43:05 -07:00
David Porter
6ead3e3945 test: Update standalone test in node e2e
* Slightly changed pod spec to repro issue #116262
* Refactor test to ensure that the static pod is deleted even if the
  test fails

Signed-off-by: David Porter <david@porter.me>
2023-03-15 14:00:39 -07:00
Kubernetes Prow Robot
ad4cbd4c85
Merge pull request #116628 from SergeyKanzhelev/fixStandaloneTest
fix standalone test
2023-03-15 13:47:17 -07:00
Paco Xu
b3690bf637 accept either FIELD or RESOURCE for kubectl explain to meet skew policy 2023-03-16 03:38:43 +08:00
Kubernetes Prow Robot
2ae7bc36de
Merge pull request #116664 from logicalhan/md
update documentation for metrics for 1.27
2023-03-15 12:20:43 -07:00
Kubernetes Prow Robot
20e8b20b75
Merge pull request #116569 from tukwila/validate_testVols
check if test volumes created
2023-03-15 12:20:31 -07:00
Han Kang
9d27f5c934 update documentation for metrics for 1.27 2023-03-15 10:10:02 -07:00
Riaan Kleinhans
0b09566dcf
Update pending_eligible_endpoints.yaml 2023-03-16 04:17:37 +13:00
Madhav Jivrajani
88b498f23e test/e2e: Improve kubectl subresource e2e test
We now get structured output using jsonpath for the
name and version fields of the node object and then
compare the outputs.

Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>
2023-03-15 17:27:34 +05:30
Kubernetes Prow Robot
50070e664b
Merge pull request #116626 from nilekhc/fix-kmsv2-healthz-flake
[KMSv2] fix: increases timeout to avoid flake
2023-03-14 20:28:34 -07:00
Igor Velichkovich
5e5b3029f3
Matchconditions admission webhooks alpha implementation for kep-3716 (#116261)
* api changes adding match conditions

* feature gate and registry strategy to drop fields

* matchConditions logic for admission webhooks

* feedback

* update test

* import order

* bears.com

* update fail policy ignore behavior

* update docs and matcher to hold fail policy as non-pointer

* update matcher error aggregation, fix early fail failpolicy ignore, update docs

* final cleanup

* openapi gen
2023-03-14 20:28:26 -07:00
Kubernetes Prow Robot
c072cae4d0
Merge pull request #108838 from nckturner/webhook-framework
Webhook framework for cloud controller manager
2023-03-14 20:28:14 -07:00
Mengjiao Liu
017bb93887 certificate controller: use contextual logging 2023-03-15 11:26:08 +08:00
Kubernetes Prow Robot
602ba9a714
Merge pull request #116611 from dims/missed-registering-kubelet-config-file-for-make-test-e2e-node-usecase
missed registering kubelet-config-file for the command line use case running test-e2e-node target
2023-03-14 19:27:21 -07:00
Kubernetes Prow Robot
815b1bf0d8
Merge pull request #116558 from klueska/update-dra-kubeletplugin-v1alpha2
Update kubeletplugin API for DRA to v1alpha2
2023-03-14 19:27:06 -07:00
Kubernetes Prow Robot
ae36991498
Merge pull request #116332 from klueska/extend-resourceclaimstatus
Update resource.AllocationResult with a slice of ResourceHandlers
2023-03-14 19:26:50 -07:00
Kubernetes Prow Robot
9053b5dc2c
Merge pull request #116119 from vinaykul/restart-free-pod-vertical-scaling-fixes
Restructure resize policy naming and set default resize policy values
2023-03-14 19:26:42 -07:00
Kubernetes Prow Robot
15040e1c86
Merge pull request #115123 from aramase/v2beta1
[KMSv2] Generate proto API and update feature gate for beta
2023-03-14 19:26:25 -07:00
Kubernetes Prow Robot
f44d561c1f
Merge pull request #115075 from aojea/ipaddress
IPAddress allocator
2023-03-14 19:26:13 -07:00
Sergey Kanzhelev
ef0485e428 first iteration to add standalone mode 2023-03-15 00:59:55 +00:00
Kubernetes Prow Robot
2c8dffdd5f
Merge pull request #116619 from MadhavJivrajani/fix-subresource-e2e-flake
test/e2e: Fix flaking subresource test
2023-03-14 17:45:02 -07:00
Kubernetes Prow Robot
fa5253976c
Merge pull request #116551 from SergeyKanzhelev/standaloneMode
Test kubelet standalone mode
2023-03-14 17:44:47 -07:00
Kubernetes Prow Robot
f22504a9ba
Merge pull request #116539 from pohly/ginkgo-gomega-update
dependencies: ginkgo v2.9.1, gomega v1.27.3
2023-03-14 17:44:40 -07:00
Nilekh Chaudhari
c09aa7dead
fix: increases timeout to avoid flake
Signed-off-by: Nilekh Chaudhari <1626598+nilekhc@users.noreply.github.com>
2023-03-15 00:18:58 +00:00
Kubernetes Prow Robot
f7bcff44cd
Merge pull request #116425 from jsafrane/flip-selinux
Flip SELinuxMountReadWriteOncePod to Beta
2023-03-14 16:34:41 -07:00
Nick Turner
86f4136003 Webhook framework for cloud controller manager
Provides framework for CCMs to host webhooks.
2023-03-14 23:28:05 +00:00
Anish Ramasekar
ad698cc0ae
[KMSv2] Generate proto API and update feature gate for beta
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>
2023-03-14 23:18:16 +00:00
Kevin Klues
579295e727 Update kubeletplugin API for DynamicResourceAllocation to v1alpha2
This PR makes the NodePrepareResources() and NodeUnprepareResource()
calls of the kubeletplugin API for DynamicResourceAllocation
symmetrical. It wasn't clear how one would use the set of CDIDevices
passed back in the NodeUnprepareResource() of the v1alpha1 API, and the
new API now passes back the full ResourceHandle that was originally
passed to the Prepare() call. Passing the ResourceHandle is strictly
more informative and a plugin could always (re)derive the set of
CDIDevice from it.

This is a breaking change, but this release is scheduled to break
multiple APIs for DynamicResourceAllocation, so it makes sense to do
this now instead of later.

Signed-off-by: Kevin Klues <kklues@nvidia.com>
2023-03-14 23:09:44 +00:00
Antonio Ojea
ca1cba8f91 integration etcd data 2023-03-14 22:58:11 +00:00
Antonio Ojea
23252d70b4 add integration test 2023-03-14 22:58:11 +00:00
Kevin Klues
6ba9b91604 Update e2e tests for recent changes to resource.k8s.io/v1alpha2
Signed-off-by: Kevin Klues <kklues@nvidia.com>
2023-03-14 22:34:19 +00:00
Kubernetes Prow Robot
fbfc887a09
Merge pull request #116556 from pohly/dra-podschedulingcontext
dra: PodScheduling -> PodSchedulingContext
2023-03-14 15:14:34 -07:00
Kubernetes Prow Robot
900278dd41
Merge pull request #116390 from alexzielenski/kubectl/explain/openapiv3/on-by-default
kubectl explain: use openapiv3 by default
2023-03-14 15:14:26 -07:00
Madhav Jivrajani
87b64744dc test/e2e: Fix flaking subresource test
Avoid comparing fields that might end up changing
between two invocations of kubectl.

Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>
2023-03-15 03:42:17 +05:30
Patrick Ohly
fe59e091eb dependencies: ginkgo v2.9.1, gomega v1.27.4
They contain some nice-to-have improvements (for example, better printing of
errors with gomega/format.Object) but nothing that is critical right now.

"go mod tidy" was run manually in
staging/src/k8s.io/kms/internal/plugins/mock (https://github.com/kubernetes/kubernetes/pull/116613
not merged yet).
2023-03-14 22:26:27 +01:00
Kubernetes Prow Robot
60be214af1
Merge pull request #116599 from justinsb/kubectl_applyset_e2e_test
kubectl prunev2: simple e2e/integration test
2023-03-14 14:13:33 -07:00
Kubernetes Prow Robot
c0ef73222f
Merge pull request #116522 from robscott/topology-1-27-updates
Introducing Topology Mode Annotation, Deprecating Topology Hints Annotation
2023-03-14 14:12:48 -07:00
Sergey Kanzhelev
1e6281e4a2 first iteration to add standalone mode 2023-03-14 20:46:41 +00:00
Alexander Zielenski
4fb6385140 fix test to look for FIELD: not RESOURCE: when a field was looked up 2023-03-14 12:47:09 -07:00
Davanum Srinivas
ee294de56d
missed registering kubelet-config-file for the command line use case running test-e2e-node target
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-03-14 15:46:31 -04:00
Kubernetes Prow Robot
abb6328661
Merge pull request #116590 from MadhavJivrajani/e2e-kubectl-subresource
test/e2e: Add e2e tests for kubectl --subresource
2023-03-14 12:38:42 -07:00
Aldo Culquicondor
d1dfa89953
Add integration test for DefaultBinder
Change-Id: I71ea08104024403a7d9ebcf3725fc3ff17997229
2023-03-14 13:57:11 -04:00
Kubernetes Prow Robot
1cb334960c
Merge pull request #116591 from gjkim42/add-service-feature-gates-to-e2e_node
Add service-feature-gates argument to node_e2e
2023-03-14 10:41:17 -07:00
Kubernetes Prow Robot
94ed45ab4a
Merge pull request #116568 from pacoxu/fix-alpha-feature-ci
get pvc again to get the pv name that bound to the PVC
2023-03-14 10:41:09 -07:00
Kubernetes Prow Robot
bab2774b21
Merge pull request #116517 from dims/re-organize-remote-e2e-test-to-be-pluggable
re-organize remote e2e test to be pluggable
2023-03-14 10:41:00 -07:00
Kubernetes Prow Robot
4950f51903
Merge pull request #116155 from enj/enj/f/dek_reuse
kmsv2: re-use DEK while key ID is unchanged
2023-03-14 10:40:28 -07:00
Kubernetes Prow Robot
49649c89ea
Merge pull request #113584 from yangjunmyfm192085/volume-contextual-logging
volume: use contextual logging
2023-03-14 10:40:16 -07:00
justinsb
04ae8e9b2e kubectl prunev2: simple e2e/integration test
Starting with the most basic e2e test, checking that we can create and
prune configmaps.
2023-03-14 16:45:29 +00:00
Kubernetes Prow Robot
f769c66aa8
Merge pull request #113622 from 249043822/br-context-logging-daemon
daemonset: use contextual logging
2023-03-14 09:38:28 -07:00
Kubernetes Prow Robot
204a9a1f17
Merge pull request #116459 from ffromani/podresources-ratelimit-minimal
add podresources DOS prevention using rate limit
2023-03-14 08:36:45 -07:00
Madhav Jivrajani
a466b7f5aa test/e2e: Add e2e tests for kubectl --subresource
Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>
2023-03-14 21:01:44 +05:30
Davanum Srinivas
a1d157bf32
Add some missing flags
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-03-14 10:36:25 -04:00
Kubernetes Prow Robot
689fc37dd2
Merge pull request #112334 from dgrisonnet/fix-eventseries-count
Fix EventSeries starting count discrepancy
2023-03-14 07:28:16 -07:00
Monis Khan
832d6f0e19
kmsv2: re-use DEK while key ID is unchanged
This change updates KMS v2 to not create a new DEK for every
encryption.  Instead, we re-use the DEK while the key ID is stable.

Specifically:

We no longer use a random 12 byte nonce per encryption.  Instead, we
use both a random 4 byte nonce and an 8 byte nonce set via an atomic
counter.  Since each DEK is randomly generated and never re-used,
the combination of DEK and counter are always unique.  Thus there
can never be a nonce collision.  AES GCM strongly encourages the use
of a 12 byte nonce, hence the additional 4 byte random nonce.  We
could leave those 4 bytes set to all zeros, but there is no harm in
setting them to random data (it may help in some edge cases such as
live VM migration).

If the plugin is not healthy, the last DEK will be used for
encryption for up to three minutes (there is no difference on the
behavior of reads which have always used the DEK cache).  This will
reduce the impact of a short plugin outage while making it easy to
perform storage migration after a key ID change (i.e. simply wait
ten minutes after the key ID change before starting the migration).

The DEK rotation cycle is performed in sync with the KMS v2 status
poll thus we always have the correct information to determine if a
read is stale in regards to storage migration.

Signed-off-by: Monis Khan <mok@microsoft.com>
2023-03-14 10:23:50 -04:00
Gunju Kim
cdf501f77b
Add service-feature-gates argument to node_e2e
This separates the "service-feature-gates" argument from the
"feature-gates" to set feature gates of API service independently.
2023-03-14 22:54:30 +09:00
Jan Safranek
a84dc2d5c5 Flip SELinuxMountReadWriteOncePod to Beta
And enable all e2e tests by default. They're still behind
`[Feature:SELinux]` tag to ensure the underlying OS supports SELinux.
2023-03-14 14:32:38 +01:00
zhucan
80ff4b90a5 e2e: test for node expand volume with secrets failed
Signed-off-by: zhucan <zhucan.k8s@gmail.com>
2023-03-14 21:12:31 +08:00
Paco Xu
a5587de2e4 print all calls when compare CSI call failed 2023-03-14 18:03:08 +08:00
Patrick Ohly
fec5233668 api: resource.k8s.io PodScheduling -> PodSchedulingContext
The name "PodScheduling" was unusual because in contrast to most other names,
it was impossible to put an article in front of it. Now PodSchedulingContext is
used instead.
2023-03-14 10:18:08 +01:00
Paco Xu
4e5171b396 upgrade csi provisioner to v3.4.0
Signed-off-by: Paco Xu <paco.xu@daocloud.io>
2023-03-14 16:51:46 +08:00
Paco Xu
40d543a59d check node expand secret ref and fix CSI calls compare failure
Signed-off-by: Paco Xu <paco.xu@daocloud.io>
2023-03-14 16:51:46 +08:00
Paco Xu
2f71a635af get pvc again to get the pv name that bound to the PVC
Signed-off-by: Paco Xu <paco.xu@daocloud.io>
2023-03-14 16:51:46 +08:00
Patrick Ohly
29941b8d3e api: resource.k8s.io v1alpha1 -> v1alpha2
For Kubernetes 1.27, we intend to make some breaking API changes:
- rename PodScheduling -> PodSchedulingHints (https://github.com/kubernetes/kubernetes/issues/114283)
- extend ResourceClaimStatus (https://github.com/kubernetes/enhancements/pull/3802)

We need to switch from v1alpha1 to v1alpha2 for that.
2023-03-14 07:52:03 +01:00
Kubernetes Prow Robot
152876a3eb
Merge pull request #115668 from jiahuif-forks/feature/validating-admission-policy/type-system
Type System for ValidatingAdmissionPolicy
2023-03-13 23:27:09 -07:00
guangli.bao
e0e835c63c check if test volumes created 2023-03-14 14:09:54 +08:00
Kubernetes Prow Robot
6612af0af0
Merge pull request #110304 from RomanBednar/resize-e2e
add e2e test for correct resizing of a snaphot restore
2023-03-13 22:27:08 -07:00
Kubernetes Prow Robot
cd56332d06
Merge pull request #116501 from mattcary/ss-beta
Graduate StatefulSetAutoDelete to beta
2023-03-13 19:31:20 -07:00
Rob Scott
e23af041f5
Introducing Topology Mode Annotation, Deprecating Topology Hints
Annotation

As part of this change, kube-proxy accepts any value for either
annotation that is not "disabled".

Change-Id: Idfc26eb4cc97ff062649dc52ed29823a64fc59a4
2023-03-14 02:23:11 +00:00
ZhangKe10140699
7198bcffcd daemonset: use contextual logging 2023-03-14 08:50:27 +08:00
杨军10092085
361e4ff0fa volume: use contextual logging 2023-03-14 08:37:30 +08:00
Matthew Cary
1d6df8233c Graduate StatefulSetAutoDelete to beta
Change-Id: Iee385580d313c69fbb8a893eb5c165aa0b75725d
2023-03-13 17:09:29 -07:00
Kubernetes Prow Robot
b740a34302
Merge pull request #116545 from flant/table-ssr-e2e
Fix DescribeTable for selfsubjectreview e2e
2023-03-13 16:49:21 -07:00
Davanum Srinivas
a889cc7f79
prevent initializing the same flag more than once
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-03-13 17:07:00 -04:00
m.nabokikh
d5aa8351e3 Fix DescribeTable for selfsubjectreview e2e
Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com>
2023-03-13 20:06:10 +01:00
Davanum Srinivas
be42dcfd73
re-organize remote e2e test to be pluggable
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-03-13 12:33:47 -04:00
Sergey Kanzhelev
009a2cbbc8 initialize feature gates in test project 2023-03-13 16:16:03 +00:00
Kubernetes Prow Robot
a0b1bee7c5
Merge pull request #115840 from atosatto/remove-taint-manager-cli
Remove enable-taint-manager and pod-eviction-timeout CLI flags
2023-03-13 08:13:10 -07:00
Kubernetes Prow Robot
492a08c916
Merge pull request #113525 from 249043822/br-context-logging-deployment
deployment controller: use contextual logging
2023-03-13 08:13:02 -07:00
Kubernetes Prow Robot
85524e7da6
Merge pull request #116518 from tzneal/refactor-remote-runner
test: refactor remote test running
2023-03-13 05:56:59 -07:00
Damien Grisonnet
d00364902b events: fix EventSeries starting count discrepancy
The kube-apiserver validation expects the Count of an EventSeries to be
at least 2, otherwise it rejects the Event. There was is discrepancy
between the client and the server since the client was iniatizing an
EventSeries to a count of 1.

According to the original KEP, the first event emitted should have an
EventSeries set to nil and the second isomorphic event should have an
EventSeries with a count of 2. Thus, we should matcht the behavior
define by the KEP and update the client.

Also, as an effort to make the old clients compatible with the servers,
we should allow Events with an EventSeries count of 1 to prevent any
unexpected rejections.

Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2023-03-13 13:31:07 +01:00
Kubernetes Prow Robot
185cd95b9c
Merge pull request #113443 from yangjunmyfm192085/namespace-contextual-logging
namespace controller: use contextual logging
2023-03-13 04:34:44 -07:00
ZhangKe10140699
66bda6c092 deployment controller: use contextual logging 2023-03-13 19:00:44 +08:00
JunYang
f5bd8c86d4 namespace controller: use contextual logging 2023-03-13 14:59:17 +08:00
Kubernetes Prow Robot
ca7804fe13
Merge pull request #115909 from sding3/integration-test-for-debug-profiles-general-baseline
add integration tests for debug profiles general & baseline
2023-03-12 22:32:41 -07:00
Todd Neal
23f71f0eba refactor remote test running 2023-03-12 21:26:01 -05:00
vinay kulkarni
9a805db010 Set default resize policy only for specified resource types, rename RestartNotRequired -> NotRequired 2023-03-12 23:46:40 +00:00
vinay kulkarni
8b23497ae7 Restructure naming of resource resize restart policy 2023-03-12 23:11:32 +00:00
Kubernetes Prow Robot
3c6e419cc3
Merge pull request #116450 from vinaykul/restart-free-pod-vertical-scaling-api
Rename ContainerStatus.ResourcesAllocated to ContainerStatus.AllocatedResources
2023-03-12 16:06:40 -07:00
Kubernetes Prow Robot
3710d93d14
Merge pull request #115976 from ii/pending_eligible_endpoints
Create pending_eligible_endpoints.yaml and move endpoints from ineligible_endpoints.yaml
2023-03-12 12:20:51 -07:00
cpanato
7b0b87e057
Updated distroless iptables to use released image registry.k8s.io/build-image/distroless-iptables:v0.2.2
Signed-off-by: cpanato <ctadeu@gmail.com>
2023-03-12 15:26:15 +01:00
Kubernetes Prow Robot
cc3855e0cf
Merge pull request #116170 from aojea/watch_instead_poll_system_namespaces
Watch instead poll system namespaces
2023-03-11 11:24:39 -08:00
Francesco Romani
b837a0c1ff kubelet: podresources: DOS prevention with builtin ratelimit
Implement DOS prevention wiring a global rate limit for podresources
API. The goal here is not to introduce a general ratelimiting solution
for the kubelet (we need more research and discussion to get there),
but rather to prevent misuse of the API.

Known limitations:
- the rate limits value (QPS, BurstTokens) are hardcoded to
  "high enough" values.
  Enabling user-configuration would require more discussion
  and sweeping changes to the other kubelet endpoints, so it
  is postponed for now.
- the rate limiting is global. Malicious clients can starve other
  clients consuming the QPS quota.

Add e2e test to exercise the flow, because the wiring itself
is mostly boilerplate and API adaptation.
2023-03-11 08:00:54 +01:00
Kubernetes Prow Robot
71b596e0d6
Merge pull request #116426 from SergeyKanzhelev/twoMoreLifecycleChecks
Three more lifecycle checks to demonstrate various validation techniques for containers lifecycle checks
2023-03-10 15:22:51 -08:00
Kubernetes Prow Robot
1f2d49972c
Merge pull request #116424 from jsafrane/add-selinux-metric-test
Add e2e tests for SELinux metrics
2023-03-10 12:41:06 -08:00
Kubernetes Prow Robot
0010333bdd
Merge pull request #116161 from danielvegamyhre/mutable-scheduling-directives
Mutable pod scheduling directives
2023-03-10 12:40:58 -08:00
Kubernetes Prow Robot
7529178924
Merge pull request #111372 from HeavenTonight/master
code cleanup
2023-03-10 11:44:40 -08:00
Sergey Kanzhelev
13855373e5 three more checks for containers lifecycle 2023-03-10 18:42:14 +00:00
Daniel Vega-Myhre
86f41dc012 mutable pod scheduling directives 2023-03-10 18:30:09 +00:00
Antonio Ojea
eecfaf658e decouple system namespaces from bootstrap controller
Use an informer instead of polling.

Change-Id: Ib071e53addb914fcb31d8a1346cf61ca6d22520b
2023-03-10 17:49:47 +00:00
Kubernetes Prow Robot
2e3c5003b9
Merge pull request #115630 from Jefftree/agg-discovery-metrics
Add metrics for aggregated discovery
2023-03-10 07:44:41 -08:00
vinay kulkarni
01b96e7704 Rename ContainerStatus.ResourcesAllocated to ContainerStatus.AllocatedResources 2023-03-10 14:49:26 +00:00
Jan Safranek
771c9be291 Add e2e test for SELinux metrics
This is the commit message for patch #2 (refresh-temp):
2023-03-10 15:03:56 +01:00
Kubernetes Prow Robot
bdf5af93e8
Merge pull request #115468 from pwschuurman/kep-3335-e2e-tests
Add e2e tests for StatefulSetStartOrdinal feature
2023-03-10 04:35:13 -08:00
Kubernetes Prow Robot
cb00077cd3
Merge pull request #113471 from ncdc/gc-contextual-logging
garbagecollector: use contextual logging
2023-03-10 04:34:39 -08:00
Kubernetes Prow Robot
08fbe92fa7
Merge pull request #116423 from ffromani/e2e-podres-node-conformance
e2e: podresources: promote platform-independent test as NodeConformance
2023-03-10 00:06:52 -08:00
Kubernetes Prow Robot
8ce3a2bbef
Merge pull request #116398 from tzneal/rework-init-containers-test
rework init containers test to remove host file dependency
2023-03-09 22:44:25 -08:00
Kubernetes Prow Robot
16d2d55bc0
Merge pull request #115969 from DangerOnTheRanger/messageExpression-for-crd
Add messageExpression field for CRD validation
2023-03-09 22:43:19 -08:00
Kubernetes Prow Robot
e8ae6658ed
Merge pull request #115065 from apelisse/apimachinery-managed-fields
managedfields: Move most of fieldmanager package to managefields
2023-03-09 21:34:22 -08:00
Kermit Alexander II
4e26f680a9 Implement MessageExpression. 2023-03-09 23:37:59 +00:00
Kubernetes Prow Robot
45b96eae98
Merge pull request #113145 from smarterclayton/zombie_terminating_pods
kubelet: Force deleted pods can fail to move out of terminating
2023-03-09 15:32:30 -08:00
Jefftree
387d97605e Add metrics for aggregated discovery 2023-03-09 17:24:02 +00:00
Francesco Romani
5ca235e0ee e2e: podresources: promote platform-independent test as NodeConformance
We have quite a few podresources e2e tests and, as the feature
progresses to GA, we should consider moving them to NodeConformance.
Unfortunately most of them require linux-specific features not in the
test themselves but in the test prelude (fixture) to check or create the
node conditions (e.g. presence or not of devices, online CPUS...) to be
verified in the test proper.

For this reason we promote only a single test for starters.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2023-03-09 16:26:01 +01:00
Kubernetes Prow Robot
f90643435e
Merge pull request #113840 from 249043822/br-context-logging-statefulset
statefulset: use contextual logging
2023-03-09 06:42:02 -08:00
Kubernetes Prow Robot
f02da82e36
Merge pull request #116404 from cpanato/go1202
[go] Bump images, dependencies and versions to go 1.20.2
2023-03-09 05:16:20 -08:00
Kubernetes Prow Robot
da87af638f
Merge pull request #115856 from lanycrost/e2e-115780-grpc-probe-tests
Promote gRPC probe e2e test to Conformance
2023-03-09 01:06:03 -08:00
cpanato
99c80ac119
[go] Bump images, dependencies and versions to go 1.20.2 2023-03-09 09:57:45 +01:00
Todd Neal
78ca93e39c rework init containers test to remove host file dependency
Since we can't rely on the test runner and hosts under test to
be on the same machine, we write to the terminate log from each
container and concatenate the results.
2023-03-08 23:17:17 -06:00
Clayton Coleman
6b9a381185
kubelet: Force deleted pods can fail to move out of terminating
If a CRI error occurs during the terminating phase after a pod is
force deleted (API or static) then the housekeeping loop will not
deliver updates to the pod worker which prevents the pod's state
machine from progressing. The pod will remain in the terminating
phase but no further attempts to terminate or cleanup will occur
until the kubelet is restarted.

The pod worker now maintains a store of the pods state that it is
attempting to reconcile and uses that to resync unknown pods when
SyncKnownPods() is invoked, so that failures in sync methods for
unknown pods no longer hang forever.

The pod worker's store tracks desired updates and the last update
applied on podSyncStatuses. Each goroutine now synchronizes to
acquire the next work item, context, and whether the pod can start.
This synchronization moves the pending update to the stored last
update, which will ensure third parties accessing pod worker state
don't see updates before the pod worker begins synchronizing them.

As a consequence, the update channel becomes a simple notifier
(struct{}) so that SyncKnownPods can coordinate with the pod worker
to create a synthetic pending update for unknown pods (i.e. no one
besides the pod worker has data about those pods). Otherwise the
pending update info would be hidden inside the channel.

In order to properly track pending updates, we have to be very
careful not to mix RunningPods (which are calculated from the
container runtime and are missing all spec info) and config-
sourced pods. Update the pod worker to avoid using ToAPIPod()
and instead require the pod worker to directly use
update.Options.Pod or update.Options.RunningPod for the
correct methods. Add a new SyncTerminatingRuntimePod to prevent
accidental invocations of runtime only pod data.

Finally, fix SyncKnownPods to replay the last valid update for
undesired pods which drives the pod state machine towards
termination, and alter HandlePodCleanups to:

- terminate runtime pods that aren't known to the pod worker
- launch admitted pods that aren't known to the pod worker

Any started pods receive a replay until they reach the finished
state, and then are removed from the pod worker. When a desired
pod is detected as not being in the worker, the usual cause is
that the pod was deleted and recreated with the same UID (almost
always a static pod since API UID reuse is statistically
unlikely). This simplifies the previous restartable pod support.
We are careful to filter for active pods (those not already
terminal or those which have been previously rejected by
admission). We also force a refresh of the runtime cache to
ensure we don't see an older version of the state.

Future changes will allow other components that need to view the
pod worker's actual state (not the desired state the podManager
represents) to retrieve that info from the pod worker.

Several bugs in pod lifecycle have been undetectable at runtime
because the kubelet does not clearly describe the number of pods
in use. To better report, add the following metrics:

  kubelet_desired_pods: Pods the pod manager sees
  kubelet_active_pods: "Admitted" pods that gate new pods
  kubelet_mirror_pods: Mirror pods the kubelet is tracking
  kubelet_working_pods: Breakdown of pods from the last sync in
    each phase, orphaned state, and static or not
  kubelet_restarted_pods_total: A counter for pods that saw a
    CREATE before the previous pod with the same UID was finished
  kubelet_orphaned_runtime_pods_total: A counter for pods detected
    at runtime that were not known to the kubelet. Will be
    populated at Kubelet startup and should never be incremented
    after.

Add a metric check to our e2e tests that verifies the values are
captured correctly during a serial test, and then verify them in
detail in unit tests.

Adds 23 series to the kubelet /metrics endpoint.
2023-03-08 22:03:51 -06:00
Kubernetes Prow Robot
8d5c96fed2
Merge pull request #116093 from swatisehgal/topologymanager-ga-graduation
node: topologymgr: Graduate Kubelet Topology Manager to GA
2023-03-08 16:56:06 -08:00
Kubernetes Prow Robot
30ee6914c5
Merge pull request #115149 from nilekhc/encrypt-all
Allow encryption for all resources
2023-03-08 16:55:59 -08:00
Kubernetes Prow Robot
8fa82976fc
Merge pull request #116356 from pacoxu/cleanup-bump_qps_kubelet
sync default qps of kubelet change everywhere
2023-03-08 15:42:41 -08:00
Maksim Nabokikh
c1431af4f8
KEP-3325: Promote SelfSubjectReview to Beta (#116274)
* Promote SelfSubjectReview to Beta

Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com>

* Fix whoami API

Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com>

* Fixes according to code review

Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com>

---------

Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com>
2023-03-08 15:42:33 -08:00
Kubernetes Prow Robot
0a5310fe9a
Merge pull request #116232 from aojea/e2e_terminating_connectivity
test connectivity for terminating pods
2023-03-08 15:42:21 -08:00
Kubernetes Prow Robot
8ee9b82b10
Merge pull request #115984 from tzneal/init-container-tests
add more init container testing
2023-03-08 15:42:08 -08:00
Jiahui Feng
0a954cc10d always get fresh object before updating. 2023-03-08 15:17:58 -08:00
Jiahui Feng
82eb24156a add test for reset fields. 2023-03-08 15:01:06 -08:00
Peter Schuurman
c57bc292de Add e2e tests for StatefulSetStartOrdinal feature 2023-03-08 14:55:58 -08:00
Nilekh Chaudhari
9382fab9b6
feat: implements encrypt all
Signed-off-by: Nilekh Chaudhari <1626598+nilekhc@users.noreply.github.com>
2023-03-08 22:18:49 +00:00
Antoine Pelisse
4f3859ce91 managedfields: Move most of fieldmanager package to managefields 2023-03-08 13:44:00 -08:00
Kubernetes Prow Robot
8319ac5274
Merge pull request #116383 from Huang-Wei/fix/sched-perf-test
fix: remove SchedulingMigratedInTreePVs feature gate in sched perf test
2023-03-08 13:12:20 -08:00
Kubernetes Prow Robot
2a22864d9c
Merge pull request #116381 from pohly/cronjob-integration-test-shutdown
cronjob: shut down integration test quickly again
2023-03-08 13:12:08 -08:00
Todd Neal
123ab80333 add more init container lifetime testing
Add some additional init container tests that work via monitoring
container lifetime based on logs written to a common file. This allows
more easily writing assertions about the container lifetimes with
respect to one another.
2023-03-08 14:39:10 -06:00
Kubernetes Prow Robot
7598ff36cf
Merge pull request #116333 from aojea/multiport_service
e2e network test for multiple protocol services on same port
2023-03-08 11:27:12 -08:00
Wei Huang
c9bc2f98d0
fix: remove SchedulingMigratedInTreePVs feature gate in sched perf test 2023-03-08 08:34:44 -08:00
Patrick Ohly
be82872eff cronjob: shut down integration test quickly again
6f2cd1b5bd swapped the order of cancel() and
closeFn() so that closeFn got called first when the test was done. This caused
it to block while waiting for goroutines which themselves were waiting for
the context cancellation. The test still shut down, it just took ~86s instead
of ~30s.

The fix is to register the cancel twice: once as soon as the context is
created (to clean up in case of an unexpected panic) and once after
closeFn (because then it'll get called first, as before).
2023-03-08 17:26:47 +01:00
Kubernetes Prow Robot
499a03d88b
Merge pull request #115451 from zhucan/nodeexpandvolume-secret-e2e
e2e: add e2e test to node expand volume with secret
2023-03-08 07:53:12 -08:00
Kubernetes Prow Robot
03ff890ef4
Merge pull request #116329 from dims/drop-aws-kubelet-credential-provider-and-cleanup-aws-storage-e2e-tests
Drop aws kubelet credential provider and cleanup aws storage e2e tests
2023-03-08 06:49:11 -08:00
Andy Goldstein
26e3dab78b garbagecollector: use contextual logging
Signed-off-by: Andy Goldstein <andy.goldstein@redhat.com>
2023-03-08 08:37:56 -05:00
ZhangKe10140699
a239b9986b Migrated the StatefulSet controller (within `kube-controller-manager) to use [contextual logging](https://k8s.io/docs/concepts/cluster-administration/system-logs/#contextual-logging) 2023-03-08 18:57:57 +08:00
Paco Xu
f368413d65 sync default qps of kubelet change 2023-03-08 14:04:51 +08:00
Kubernetes Prow Robot
e390791e5f
Merge pull request #116341 from bobbypage/revert-114640-handle-device-mgr-recovery
Revert "node: device-mgr: Handle recovery flow by checking if healthy devices exist"
2023-03-07 19:31:33 -08:00
Kubernetes Prow Robot
83334ccaa1
Merge pull request #116320 from wangchen615/lastminute-scheduler-fix
Address last-minute requested changes for inplace update feature testing in scheduler
2023-03-07 19:31:26 -08:00
Kubernetes Prow Robot
548e856b58
Merge pull request #116144 from dashpole/apiserver_tracing_beta_round_2
Graduate API Server tracing to beta
2023-03-07 19:31:12 -08:00
zhucan
7a87b4363b e2e: add e2e test to node expand volume with secret
Signed-off-by: zhucan <zhucan.k8s@gmail.com>
2023-03-08 10:27:50 +08:00
Jiahui Feng
feb18b3f5f implmementing type checking
with multi-type support.
2023-03-07 15:49:19 -08:00
Jiahui Feng
54283a1d38 exempt validatingadmissionpolicies/status
because admission control object does not apply to themselves.
2023-03-07 15:48:21 -08:00
Kubernetes Prow Robot
88cce39155
Merge pull request #116200 from Jefftree/e2e-openapi
Add OpenAPI V3 E2E Tests
2023-03-07 15:08:55 -08:00
David Ashpole
4014d0fbbf
graduate API Server tracing to beta 2023-03-07 21:39:39 +00:00
Antonio Ojea
7cb135a888 e2e network test for multiple protocol services on same port
The test creates a Service exposing two protocols on the same port
and a backend that replies on both protocols.

1. Test that Service with works for both protocol
2. Update Service to expose only the TCP port
3. Verify that TCP works and UDP does not work
4. Update Service to expose only the UDP port
5. Verify that TCP does not work and UDP does work

Change-Id: Ic4f3a6509e332aa5694d20dfc3b223d7063a7871
2023-03-07 21:30:39 +00:00
Jefftree
658ea4b591 Refactor aggregated apiserver e2e, add openapi e2e 2023-03-07 20:04:00 +00:00
David Porter
9c20cee504
Revert "node: device-mgr: Handle recovery flow by checking if healthy devices exist" 2023-03-07 11:50:52 -08:00
Kubernetes Prow Robot
2bac225e42
Merge pull request #116331 from aojea/revert_aojea_mistake
Revert "do not assume backend on e2e service jig"
2023-03-07 10:44:53 -08:00
Kubernetes Prow Robot
7ec3c2727b
Merge pull request #115358 from pohly/logs-performance-benchmarks
Logs performance benchmarks
2023-03-07 10:44:46 -08:00
Andrea Tosatto
cae19f9e85 Remove deprecated pod-eviction-timeout flag from controller-manager 2023-03-07 18:14:18 +00:00
kerthcet
e5c812bbe7 Remove CLI flag enable-taint-manager
Signed-off-by: kerthcet <kerthcet@gmail.com>
2023-03-07 18:11:49 +00:00
Antonio Ojea
bcc61bbb8b test connectivity for terminating pods
Test 2 scenarios:

- pod can connect to a terminating pods
- terminating pod can connect to other pods

Change-Id: Ia5dc4e7370cc055df452bf7cbaddd9901b4d229d
2023-03-07 17:48:07 +00:00
Kubernetes Prow Robot
0e9ad242bd
Merge pull request #116298 from soltysh/simplify_sset_test
Get rid of context.TODO and simplify waitForStatusCurrentReplicas
2023-03-07 09:40:45 -08:00
Kubernetes Prow Robot
37326f7cea
Merge pull request #112670 from yangjunmyfm192085/delklogV0
use contextual logging(nodeipam and nodelifecycle part)
2023-03-07 09:40:33 -08:00
Davanum Srinivas
b50d9d1e28
Cleanup vendor/
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-03-07 10:27:15 -05:00
Antonio Ojea
0826438d72 Revert "do not assume backend on e2e service jig"
This reverts commit 909a08d011.

Change-Id: Ie9ba4284ac739b3ea7eb57c44bb4551316121920
2023-03-07 15:12:22 +00:00
Patrick Ohly
5ee679b340 test/integration/logs: use stable struct for unit test
v1.Container is still changing a log which caused the test to fail each time a
new field was added. To test loading, let's better use something that is
unlikely to change. The runtimev1.VersionResponse gets logged by kubelet and
seems to be stable.
2023-03-07 16:04:32 +01:00
Patrick Ohly
eaa95b9178 test/integration/logs: benchmark using logsapi
The benchmarks and unit tests were written so that they used custom APIs for
each log format. This made them less realistic because there were subtle
differences between the benchmark and a real Kubernetes component. Now all
logging configuration is done with the official
k8s.io/component-base/logs/api/v1.

To make the different test cases more comparable, "messages/s" is now reported
instead of the generic "ns/op".
2023-03-07 16:04:32 +01:00
Patrick Ohly
10c15d7a67 test/integration/logs: replace assert.Contains
For long strings the output of assert.Contains is not very readable.
2023-03-07 16:04:32 +01:00
Patrick Ohly
a862a269b0 test/integration/logs: remove useless stats case
The same effect can be achieved with `-bench=BenchmarkEncoding/none`.
2023-03-07 16:04:32 +01:00
Patrick Ohly
97a8d72a67 test/integration/logs: update benchmark support
When trying again with recent log files from the CI job, it was found that some
JSON messages get split across multiple lines, both in container logs and in
the systemd journal:

   2022-12-21T07:09:47.914739996Z stderr F {"ts":1671606587914.691,"caller":"rest/request.go:1169","msg":"Response ...
   2022-12-21T07:09:47.914984628Z stderr F 70 72  6f 78 79 10 01 1a 13 53 ... \".|\n","v":8}

Note the different time stamp on the second line. That first line is
long (17384 bytes). This seems to happen because the data must pass through a
stream-oriented pipe and thus may get split up by the Linux kernel.

The implication is that lines must get merged whenever the JSON decoder
encounters an incomplete line. The benchmark loader now supports that. To
simplifies this, stripping the non-JSON line prefixes must be done before using
a log as test data.

The updated README explains how to do that when downloading a CI job
result. The amount of manual work gets reduced by committing symlinks under
data to the expected location under ci-kubernetes-kind-e2e-json-logging and
ignoring them when the data is not there.

Support for symlinks gets removed and path/filepath is used instead of path
because it has better Windows support.
2023-03-07 16:03:48 +01:00
Davanum Srinivas
90d185b7e1
Drop AWS kubelet credential provider and cleanup AWS storage e2e tests
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-03-07 09:00:12 -05:00
Maciej Szulik
27d5cda811
Simplify waitForStatusCurrentReplicas helper 2023-03-07 14:18:31 +01:00
Maciej Szulik
17117dc47d
Replace context.TODO with proper context 2023-03-07 14:18:29 +01:00
Antonio Ojea
4482d1c2f4 e2e support Services with multiple EndpointSlices
A Service can use multiple EndpointSlices for its backend, when
using custom Endpoint Slices, the data plane should forward traffic
to any of the endpoints in the Endpointslices that belong to the
Service.

Change-Id: I80b42522bf6ab443050697a29b94d8245943526f
2023-03-07 13:00:46 +00:00
Kubernetes Prow Robot
4eb29bcb21
Merge pull request #116040 from pbeschetnov/master
[HPA e2e] Reduce possible number of scale steps to minimize stabilization test flakiness
2023-03-07 04:20:16 -08:00
Naman Lakhwani
b6f9a65558
Migrating pkg/controller/serviceaccount to contextual logging (#114918)
* migrating pkg/controller/serviceaccount to contextual logging

Signed-off-by: Naman <namanlakhwani@gmail.com>

* small nit

Signed-off-by: Naman <namanlakhwani@gmail.com>

* capitalising first letter of error

Signed-off-by: Naman <namanlakhwani@gmail.com>

* addressed review comments

Signed-off-by: Naman <namanlakhwani@gmail.com>

* small nit to add key

Signed-off-by: Naman <namanlakhwani@gmail.com>

---------

Signed-off-by: Naman <namanlakhwani@gmail.com>
2023-03-07 04:19:59 -08:00
Naman Lakhwani
8f45b64c93
Migrated pkg/controller/replicaset to contextual logging (#114871)
* migrated controller/replicaset to contextual logging

Signed-off-by: Naman <namanlakhwani@gmail.com>

* small nits

Signed-off-by: Naman <namanlakhwani@gmail.com>

* addressed changes

Signed-off-by: Naman <namanlakhwani@gmail.com>

* small nit

Signed-off-by: Naman <namanlakhwani@gmail.com>

* taking t as input

Signed-off-by: Naman <namanlakhwani@gmail.com>

---------

Signed-off-by: Naman <namanlakhwani@gmail.com>
2023-03-07 04:19:51 -08:00
Kubernetes Prow Robot
4aaa4df840
Merge pull request #113986 from songxiao-wang87/runwxs-test2
Migrate StorageVersionGC to contextual logging
2023-03-07 04:19:43 -08:00
Kubernetes Prow Robot
471b392f43
Merge pull request #113916 from songxiao-wang87/runwxs-test1
Migrate ttl_controller to contextual logging
2023-03-07 04:18:30 -08:00
Swati Sehgal
e5ad3cbf6a node: topologymgr: update node e2e test tags
Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2023-03-07 09:52:07 +00:00
Kubernetes Prow Robot
3489796d5c
Merge pull request #113428 from mengjiao-liu/contextual-logging-controller-cronjob
Update `pkg/controller/cronjob/` for contextual logging
2023-03-07 01:28:18 -08:00
JunYang
780ef3afb0 use klog.InfoS instead of klog.V(0),Info 2023-03-07 15:50:01 +08:00
Kubernetes Prow Robot
04675428bb
Merge pull request #115973 from jpbetz/enforcement-actions
KEP-3488: Implement Enforcement Actions and Audit Annotations
2023-03-06 21:56:37 -08:00
Joe Betz
c2b3871502 Add integration tests 2023-03-06 21:51:33 -05:00
Chen Wang
fd6105d015 fix last minute scheduler changes for inplace update 2023-03-06 18:47:02 -05:00
David Porter
d3214226de test: Fix node e2e shutdown test flake
Bump the timeout as the previous timeout was sometimes too short,
resulting in the pod status update not sent. Also, fixed a typo in
previous refactor.

Signed-off-by: David Porter <david@porter.me>
2023-03-06 15:38:45 -08:00
Kubernetes Prow Robot
64259b43b8
Merge pull request #116054 from jpbetz/secondary-authz
KEP-3488: Implement secondary authz for ValidatingAdmissionPolicy
2023-03-06 11:54:16 -08:00
Joe Betz
4d30c43494 Add integration tests for secondary authz 2023-03-06 12:08:53 -05:00
Kubernetes Prow Robot
d6e9cff212
Merge pull request #115838 from torredil/remove-aws
Remove AWS legacy cloud provider + EBS in-tree storage plugin
2023-03-06 08:18:29 -08:00
torredil
6aebda9b1e Remove AWS legacy cloud provider + EBS in-tree storage plugin
Signed-off-by: torredil <torredil@amazon.com>
2023-03-06 14:01:15 +00:00
Swati Sehgal
d536a342b4 node: topologymgr: GA graduation implies Feature Gate is ON by default
Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2023-03-06 12:51:05 +00:00
Swati Sehgal
01a9148887 node: device-mgr: e2e: adapt to sample device plugin refactoring
These updates are to adapt to the sample device plugin
refactoring done here: 92e00203e0.

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2023-03-06 12:15:59 +00:00
Swati Sehgal
bae8a164e0 node: device-mgr: e2e: address e2e test review comments
Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2023-03-06 12:15:58 +00:00
Swati Sehgal
674879a959 node: device-mgr: e2e: Update the e2e test to reproduce issue:109595
Breakdown of the steps implemented as part of this e2e test is as follows:
1. Create a file `registration` at path `/var/lib/kubelet/device-plugins/sample/`
2. Create sample device plugin with an environment variable with
   `REGISTER_CONTROL_FILE=/var/lib/kubelet/device-plugins/sample/registration` that
    waits for a client to delete the control file.
3. Trigger plugin registeration by deleting the abovementioned directory.
4. Create a test pod requesting devices exposed by the device plugin.
5. Stop kubelet.
6. Remove pods using CRI to ensure new pods are created after kubelet restart.
7. Restart kubelet.
8. Wait for the sample device plugin pod to be running. In this case,
   the registration is not triggered.
9. Ensure that resource capacity/allocatable exported by the device plugin is zero.
10. The test pod should fail with `UnexpectedAdmissionError`
11. Delete the test pod.
12. Delete the sample device plugin pod.
13. Remove `/var/lib/kubelet/device-plugins/sample/` and its content, the directory
    created to control registration

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2023-03-06 12:15:58 +00:00
Swati Sehgal
db7afc1cd8 node: device-mgr: e2e: Implement End to end test
This commit reuses e2e tests implmented as part of https://github.com/kubernetes/kubernetes/pull/110729.
The commit is borrowed from the aforementioned PR as is to preserve
authorship. Subsequent commit will update the end to end test to
simulate the problem this PR is trying to solve by reproducing
the issue: 109595.

Co-authored-by: Francesco Romani <fromani@redhat.com>
Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2023-03-06 11:52:23 +00:00
Ed Bartosh
35fd124f4d DRA: fix CDI spec version
The latest CDI release includes spec version check that fails
if version is less than 0.3.0:
  https://github.com/container-orchestrated-devices/container-device-interface/blob/v0.5.4/pkg/cdi/version.go#L42

Updating CDI spec version to 0.3.0 in the test kubelet plugin code
should fix e2e test failures on the CRI runtimes that use CDI >= 0.5.4
(Containerd master atm, CRI-O soon).
2023-03-05 16:49:56 +02:00
Kubernetes Prow Robot
20c3a007f5
Merge pull request #115693 from bobbypage/shutdown_test
test: e2e node shutdown test logging improvements
2023-03-03 15:20:57 -08:00
Kubernetes Prow Robot
15c5366a1c
Merge pull request #116240 from bobbypage/devicepluginfix
test: Fix path to e2e node sample device plugin
2023-03-03 14:15:09 -08:00
Kubernetes Prow Robot
9f0b491953
Merge pull request #113270 from rrangith/fix/create-pvc-for-pending-pod
Automatically recreate PVC for pending STS pod
2023-03-03 10:24:58 -08:00
Kubernetes Prow Robot
37d8b5a2b8
Merge pull request #116227 from gnufied/wait-for-pod-startup-before-resize
Wait for pod to be running before expanding
2023-03-03 09:18:59 -08:00
David Porter
c5a1f0188b
test: Add node e2e test to verify static pod termination
Add node e2e test to verify that static pods can be started after a
previous static pod with the same config temporarily failed termination.

The scenario is:

1. Static pod is started
2. Static pod is deleted
3. Static pod termination fails (internally `syncTerminatedPod` fails)
4. At later time, pod termination should succeed
5. New static pod with the same config is (re)-added
6. New static pod is expected to start successfully

To repro this scenario, setup a pod using a NFS mount. The NFS server is
stopped which will result in volumes failing to unmount and
`syncTerminatedPod` to fail. The NFS server is later started, allowing
the volume to unmount successfully.

xref:

1. https://github.com/kubernetes/kubernetes/pull/113145#issuecomment-1289587988
2. https://github.com/kubernetes/kubernetes/pull/113065
3. https://github.com/kubernetes/kubernetes/pull/113093

Signed-off-by: David Porter <david@porter.me>
2023-03-03 10:00:48 -06:00
David Porter
1c75c2cda8
test: Add e2e to verify static pod termination
Add a node e2e to verify that if a static pod is terminated while the
container runtime or CRI returns an error, the pod is eventually
terminated successfully.

This test serves as a regression test for k8s.io/issue/113145 which
fixes an issue where force deleted pods may not be terminated if the
container runtime fails during a `syncTerminatingPod`.

To test this behavior, start a static pod, stop the container runtime,
and later start the container runtime. The static pod is expected to
eventually terminate successfully.

To start and stop the container runtime, we need to find the container
runtime systemd unit name. Introduce a util function
`findContainerRuntimeServiceName` which finds the unit name by getting
the pid of the container runtime from the existing
`ContainerRuntimeProcessName` flag passed into node e2e and using
systemd dbus `GetUnitNameByPID` function to convert the pid of the
container runtime to a unit name. Using the unit name, introduce helper
functions to start and stop the container runtime.

Signed-off-by: David Porter <david@porter.me>
2023-03-03 10:00:48 -06:00
Hemant Kumar
53585ec009 Bump the timeout for volume expansion 2023-03-02 22:36:24 -05:00
David Porter
8647c23c11 test: Fix path to e2e node sample device plugin
The existing path is incorrect (missing `sample-device-plugin`)
directory and thus causing test failures. The full path should be
`test/e2e/testing-manifests/sample-device-plugin/sample-device-plugin.yaml`.

Signed-off-by: David Porter <david@porter.me>
2023-03-02 19:22:59 -08:00
Kubernetes Prow Robot
74f0819069
Merge pull request #116152 from torredil/fix-windows-e2e-test
Add windows nodeSelector to provisioning functions
2023-03-02 11:36:56 -08:00
Kubernetes Prow Robot
ab002db788
Merge pull request #116223 from logicalhan/metric-docs
include beta metrics in documentation and update docs for metrics
2023-03-02 10:31:04 -08:00
Hemant Kumar
99fe00797d Wait for pod to be running before expanding 2023-03-02 12:57:17 -05:00
Kubernetes Prow Robot
b6d102d634
Merge pull request #116071 from yuanchen8911/symlink
Add symlink data verification to statefulset e2e
2023-03-02 05:43:07 -08:00
Kubernetes Prow Robot
78e5db0931
Merge pull request #115107 from swatisehgal/handle-device-mgr-recovery-sample-dp-changes
node: device-mgr: sample device plugin: Add support to control registration process
2023-03-02 05:42:55 -08:00
Paco Xu
e2b1050516 add some buff for pod initial restart count that is not zero 2023-03-02 17:01:38 +08:00
Paco Xu
efee9b4866 cleanup: promote ProbeTerminationGracePeriod to conformance tests 2023-03-02 17:00:16 +08:00
Kubernetes Prow Robot
949bee0118
Merge pull request #116189 from marosset/windows-hyperv-basic-e2e-test
Adding e2e test to verify hyperv container is running inside a VM on Windows
2023-03-01 22:27:07 -08:00
Kubernetes Prow Robot
d788d436c9
Merge pull request #115893 from mgoltzsche/go-jose-update-2.6
bump go-jose to v2.6.0
2023-03-01 20:23:06 -08:00
Kubernetes Prow Robot
59a7e34052
Merge pull request #115442 from bobbypage/unknown_pods_test
test: Add e2e node test to check for unknown pods
2023-03-01 19:08:55 -08:00
Max Goltzsche
df8fa2eab5
bump go-jose to v2.6.0
Update go-jose from v2.2.2 to v2.6.0.
This is to make the kubernetes code compatible with newer go-jose versions that have a small breaking change (`jwt.NewNumericDate()` returns a pointer).

Signed-off-by: Max Goltzsche <max.goltzsche@gmail.com>
2023-03-02 02:53:17 +01:00
Kubernetes Prow Robot
1646ed8222
Merge pull request #116057 from bobbypage/nodee2elog
test: Add log artifact for ginkgo node e2e and tune default ginkgo flags
2023-03-01 16:55:16 -08:00
Kubernetes Prow Robot
dfa03231da
Merge pull request #116110 from knabben/knabben/polling-hpc-stats
Poll for stats until Windows kubelet present it in the stats endpoint
2023-03-01 15:11:27 -08:00
Kubernetes Prow Robot
51dedff4f3
Merge pull request #115277 from pohly/klog-update
klog update
2023-03-01 15:11:16 -08:00
Mark Rossetti
ab020ee628
Adding e2e test to verify hyperv container is running inside a VM on Windows
Signed-off-by: Mark Rossetti <marosset@microsoft.com>
2023-03-01 14:08:46 -08:00
Kubernetes Prow Robot
b0c949d9dd
Merge pull request #116148 from aramase/aramase/f/ci-metrics
[KMSv2] update ci script to create cluster and gather metrics
2023-03-01 12:39:30 -08:00
Amim Knabben
3fd3a76eb9 Poll for stats until Windows kubelet present it in the stats endpoint 2023-03-01 17:17:23 -03:00
Han Kang
0199276f85 include beta metrics in documentation and update docs for metrics 2023-03-01 11:32:19 -08:00
Kubernetes Prow Robot
60eefa8066
Merge pull request #115425 from pohly/scheduler-perf-benchstat
scheduler perf: benchstat support
2023-03-01 11:19:29 -08:00
Kubernetes Prow Robot
fe671737ec
Merge pull request #116181 from pohly/dra-test-driver-update
e2e: dra test driver update
2023-03-01 10:10:39 -08:00
Patrick Ohly
961819a4d0 dependencies: update klog v2.90.1
This improves performance of the text formatting and ktesting.

Because ktesting no longer buffers messages by default, one unit
test needs to ask for that explicitly.
2023-03-01 19:03:50 +01:00
Anish Ramasekar
c52ac0d59d
[KMSv2] update ci script to create cluster and gather metrics
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>
2023-03-01 18:03:37 +00:00
Patrick Ohly
74785074c6 e2e dra: update logging
When running as part of the scheduler_perf benchmark testing, we want to print
less information by default, so we should use V to limit verbosity

Pretty-printing doesn't belong into "application" code. I am moving that into
the ktesting formatting (https://github.com/kubernetes/kubernetes/pull/116180).
2023-03-01 15:02:03 +01:00
Patrick Ohly
106fce6fae e2e dra: improve goroutine handling
There is an API now to wait for informer factory goroutine termination.
While at it, an incorrect comment for mutex locking gets removed.
2023-03-01 15:00:30 +01:00
Justin SB
50a025acdb e2e: Remove dead code in tests
We were building a local pod variable that we were no longer using.

Co-authored-by: Patrick Ohly <patrick.ohly@intel.com>
2023-03-01 08:08:33 -05:00
Kubernetes Prow Robot
9ef145d3a7
Merge pull request #116127 from pacoxu/negative-grace-period
retry for negative TerminationGracePeriodSeconds update
2023-03-01 04:29:16 -08:00
Swati Sehgal
7ea35d0cd8 node: device-mgr: sample device plugin: manifest to avoid registration
Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2023-03-01 10:01:34 +00:00
Swati Sehgal
2c8fc26b89 node: device-mgr: sample device plugin: control registration process
Update the sample device plugin to enable the e2e node tests (or any
other entity with full access to the node filesystem) to control the
registration process. We add a new environment variable `REGISTER_CONTROL_FILE`.
The value of this variable must be a file which prevents the plugin
to register itself while it's present. Once removed, the plugin will
go on and complete the registration. The plugin will automatically
detect the parent directory on which the file resides and detect
deletions, unblocking the registration process. If the file is specified
but unaccessible, the plugin will fail. If the file is not specified,
the registration process will progress as usual and never pause.
The plugin will need read access to the parent directory.

This feature is useful because it is not possible to control the order
in which the pods are recovered after node reboot/kubelet restart.

In this approach, the testing environment will create a directory and
then a empty file to pause the registration process of the plugin.
Once pointed to that file, the plugin will start and wait for it to
be deleted. Only after the directory has been deleted,
the plugin would proceed to registration.

This feature is used in #114640 where e2e test is implemented to
simulate scenarios where application pods requesting devices come up before
the device plugin pod on node reboot/ kubelet restart.

Co-authored-by: Francesco Romani <fromani@redhat.com>
Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2023-03-01 10:00:52 +00:00
Paco Xu
7d8437933e retry on conflict for negative TerminationGracePeriodSeconds update 2023-03-01 12:55:58 +08:00
Kubernetes Prow Robot
93a5181871
Merge pull request #116022 from nilekhc/reference-implementation-provider
[kmsv2] feat: add kms mock plugin for e2e tests
2023-02-28 17:57:17 -08:00
Nilekh Chaudhari
43acba8084
feat: kms base64 plugin for e2e tests
Signed-off-by: Nilekh Chaudhari <1626598+nilekhc@users.noreply.github.com>
2023-03-01 00:11:17 +00:00
Kubernetes Prow Robot
9b213330f5
Merge pull request #116153 from alexzielenski/podsecurity-featuregate-re-enable
skip special features in TestPodSecurityGAOnly
2023-02-28 16:07:23 -08:00
Kubernetes Prow Robot
6e202d6fdb
Merge pull request #116116 from ahg-g/ahg-mutable-job-ga
Graduate JobMutableNodeSchedulingDirectives feature to GA
2023-02-28 14:53:52 -08:00
Kubernetes Prow Robot
0469455ff7
Merge pull request #116082 from mimowo/fix-oomkiller-test
Fix the flaky OOMKiller test by sleep at start
2023-02-28 14:53:37 -08:00
Patrick Ohly
cc4bcd1d8e scheduler_perf: report data items as benchmark results
This replaces the pretty useless us/op metric (useless because it includes
setup and teardown times) with the same values that also get stored in the JSON
file.

The main advantage is that benchstat can be used to analyze and compare
results.
2023-02-28 23:08:23 +01:00
Patrick Ohly
961129c5f1 scheduler_perf: add logging flags
This enables testing of different real production configurations (JSON
vs. text, different log levels, contextual logging).
2023-02-28 23:08:17 +01:00
Patrick Ohly
00d1459530 test/utils: extend ktesting
The upstream ktesting has to be very flexible to accommodate different ways of
using it. In Kubernetes, we can be opinionated and make certain choices, like
using klog flags, and only those.
2023-02-28 23:06:00 +01:00
Patrick Ohly
c008732948 test/integration: add StartEtcd
In contrast to EtcdMain, it can be called by individual tests or benchmarks and
each caller will get a fresh etcd instance. However, it uses the same
underlying code and the same port for all instances, so tests cannot run in
parallel.
2023-02-28 23:05:17 +01:00
Alexander Zielenski
9ef1fc543f skip special features in TestPodSecurityGAOnly
was causing some alpha/beta features to be disabled after running sometimes
2023-02-28 13:21:35 -08:00
torredil
42909af615
Add windows nodeSelector to provisioning functions
Signed-off-by: torredil <torredil@amazon.com>
2023-02-28 21:21:29 +00:00
ahg-g
2ecd24011a Graduate JobMutableNodeSchedulingDirectives feature to GA 2023-02-28 15:47:13 +00:00
Kubernetes Prow Robot
6f68a13696
Merge pull request #115961 from pohly/e2e-framework-deprecate-gomega-wrappers
e2e framework: deprecate gomega wrappers
2023-02-28 06:27:29 -08:00
Kubernetes Prow Robot
04e7021d06
Merge pull request #114625 from Divya063/feature-private-image-registry
[E2E] Add support for pulling images from private registry
2023-02-28 06:27:17 -08:00
Kubernetes Prow Robot
806b215cce
Merge pull request #115987 from yuanchen8911/cleanup
Replace closures in test packages
2023-02-28 01:47:29 -08:00
Divya Rani
a8b1e57246 add support for pulling images from private registry 2023-02-28 00:40:51 -08:00
David Porter
e001884594 test: Add some default flags ginkgo flags for node e2e
Add the following ginkgo flags for each node e2e similar to the
existing hack/ginkgo-e2e.sh script.

* --no-color, colors aren't rendered properly in prow and make examining
  the log in text editors more difficult, so let's disable them.
  `hack/ginkgo-e2e.sh` (used for kind e2e tests) also disables them
  already.
* -v, enable verbose logs. This is needed so we get more detailed info
  even when the tests pass. This is useful so we can compare successful
  runs to failed runs.

Signed-off-by: David Porter <david@porter.me>
2023-02-28 00:24:40 -08:00
David Porter
e9ecdf3534 test: Emit ginkgo log for each node e2e
When running multiple node e2e with multiple machine images, the tests
are run separately for each node. The final build log has all of the
results for each of the hosts combined together which make debugging the
log difficult. To make it easier, emit a log for each host that was run.
This log will be written to the results directory and uploaded as an
artifact in prow jobs.

Signed-off-by: David Porter <david@porter.me>
2023-02-28 00:21:34 -08:00
David Porter
0980f026c9 test: Remove tests argument from node e2e image config
This was never being used, the only config that used it was deleted in
https://github.com/kubernetes/test-infra/pull/26017 so we don't need
this anymore, so let's delete it.

Signed-off-by: David Porter <david@porter.me>
2023-02-28 00:21:03 -08:00
Kubernetes Prow Robot
b9fd1802ba
Merge pull request #102884 from vinaykul/restart-free-pod-vertical-scaling
In-place Pod Vertical Scaling feature
2023-02-27 22:53:15 -08:00
Kevin Delgado
9828f62237 turn field validation e2e tests into conformance tests 2023-02-27 14:39:21 -08:00
Kubernetes Prow Robot
12ceec47aa
Merge pull request #115977 from elmiko/fix-lb-test
remove aws from e2e loadbalancer udp conntrack tests
2023-02-27 10:26:50 -08:00
Yuan Chen
a24aef6510 Replace a function closure
Replace more closures with pointer conversion

Replace deprecated Int32Ptr to Int32
2023-02-27 09:13:36 -08:00
Roman Bednar
fbe39a8e96 skip e2e test for checking filesystem resizing on Windows
Test is currently using `stat` Linux command which won't work on Windows.
2023-02-27 10:47:02 +01:00
Roman Bednar
7484c69a16 add e2e test for snapshot restore resizing 2023-02-27 10:47:02 +01:00
Roman Bednar
8567eafa02 add anti-capability to allow resize test skipping 2023-02-27 10:47:02 +01:00
Roman Bednar
b62794c52e fix a typo 2023-02-27 10:47:02 +01:00
Kubernetes Prow Robot
015e2fa20c
Merge pull request #115953 from pohly/lint-gomega
test: fixing + linting gomega usage
2023-02-27 00:56:20 -08:00
Michal Wozniak
36eef0600d Fix the flaky OOMKiller test by sleep at start 2023-02-27 08:15:46 +01:00
Yuan Chen
b929908f3b Add symlink check to e2e statefulset app
Fix a bug
2023-02-26 18:37:58 -08:00
Khachatur Ashotyan
1033cf80df e2e: promote gRPC probe tests to conformance 2023-02-25 08:54:51 +04:00