Commit Graph

115852 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
760cb9042d
Merge pull request #117425 from cbandy/apimachinery-testing-setenv
Replace os.Setenv with testing.T.Setenv in tests
2023-04-29 12:12:28 -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
Arda Güçlü
d94c733ee2
Use absolute path instead requestURI in openapiv3 discovery (#117495)
Currently, openapiv3 discovery uses requestURI to discover resources.
However, that does not work when the rest endpoint contains prefixes
(e.g. `http://localhost/test-endpoint/`).
Because requestURI overwrites prefixes also in rest endpoint
(e.g. `http://localhost/openapiv3/apis/apps/v1`).

Since `absPath` keeps the prefixes in the rest endpoint,
this PR changes to absPath instead requestURI.
2023-04-29 08:28:27 -07:00
Kubernetes Prow Robot
8353d4623b
Merge pull request #117427 from cbandy/pkg-testing-setenv
Replace os.Setenv with testing.T.Setenv in tests
2023-04-29 08:28:16 -07:00
Mohit Sharma
34d3c7520b
update Deps gopkg.in/warnings.v0 v0.1.1 to v0.1.2 2023-04-29 14:27:35 +05:30
carlory
944a4cd311 Remove ability to re-enable serving deprecated autoscalingapiv2beta APIs 2023-04-29 16:51:48 +08:00
Kubernetes Prow Robot
d8bdddcab4
Merge pull request #117531 from mfordjody/master
remove validation GCE-ism
2023-04-28 18:28:16 -07:00
Kubernetes Prow Robot
c5aead3987
Merge pull request #117678 from msau42/changelog
Correct the changelog for GlusterFS removal in 1.26.
2023-04-28 17:32:23 -07:00
Kubernetes Prow Robot
e8130ba572
Merge pull request #117297 from danwinship/proxy-startup-config
proxy startup-time config handling cleanup
2023-04-28 17:32:16 -07: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
Michelle Au
671a3f43fd Correct the changelog for GlusterFS removal in 1.26. 2023-04-28 22:03:31 +00:00
Kubernetes Prow Robot
be7b2eeec6
Merge pull request #117671 from pawbana/enable-auth-provider-in-test
Set ENABLE_AUTH_PROVIDER_GCP to true in gce tests
2023-04-28 14:14:27 -07:00
Kubernetes Prow Robot
9df749c597
Merge pull request #117349 from mohitsharma-in/deps-update/natefinch-lumberjack.v2
dependencies :  update  gopkg.in/natefinch/lumberjack.v2 v2.0.0 to v2.2.1
2023-04-28 14:14: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
Kubernetes Prow Robot
f2073fff6c
Merge pull request #117662 from carlory/fix-005
Remove ability to re-enable serving deprecated batchapiv1beta1 APIs
2023-04-28 11:08:15 -07:00
Kubernetes Prow Robot
51edcd963e
Merge pull request #115019 from Nordix/nodeip-as-lbip
Allow node addresses to be used as loadBalancer addresses for proxy-mode=ipvs
2023-04-28 09:14:16 -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
Swati Sehgal
dc1a592632 node: device-mgr: Handle recovery by checking if healthy devices exist
In case of node reboot/kubelet restart, the flow of events involves
obtaining the state from the checkpoint file followed by setting
the `healthDevices`/`unhealthyDevices` to its zero value. This is
done to allow the device plugin to re-register itself so that
capacity can be updated appropriately.

During the allocation phase, we need to check if the resources requested
by the pod have been registered AND healthy devices are present on
the node to be allocated.

Also we need to move this check above `needed==0` where needed is
required - devices allocated to the container (which is obtained from
the checkpoint file) because even in cases where no additional devices
have to be allocated (as they were pre-allocated), we still need to
make sure he devices that were previously allocated are healthy.

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2023-04-28 14:41:30 +01:00
Kubernetes Prow Robot
f66e1a3386
Merge pull request #116685 from czybjtu/fix_lease_remove_endpoints
Remove last endpoint for kubernetes Service during graceful shutdown of final kube-apiserver
2023-04-28 06:02:16 -07:00
Paweł Banaszewski
53c9103a1d Set ENABLE_AUTH_PROVIDER_GCP to true in gce tests 2023-04-28 11:47:08 +00:00
Kubernetes Prow Robot
9924dc65b7
Merge pull request #117614 from chendave/multi_cri
kubeadm: fix unit test failure on node with multiple cri endpoints
2023-04-28 01:30:16 -07:00
Dave Chen
2572a43034 kubeadm: fix unit test failure on node with multiple cri endpoints
Signed-off-by: Dave Chen <dave.chen@arm.com>
2023-04-28 15:00:16 +08: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
Paco Xu
c6f4bee98d kubeadm: add deprecated FG UpgradeAddonsBeforeControlPlane 2023-04-28 13:55:46 +08:00
Kubernetes Prow Robot
28247d53d2
Merge pull request #117595 from mowangdk/cleanup/cleanup_new_added_tests
Chore: add ipfamilies tweak functions
2023-04-27 22:46:15 -07:00
Shiming Zhang
4d9261c756 Fix LocationOfOrigin shows up unexpectedly 2023-04-28 13:04:04 +08:00
Kubernetes Prow Robot
7077491f68
Merge pull request #117237 from yulng/cleanpolicy
Remove GA feature gates in 1.28 about network
2023-04-27 20:48:15 -07:00
Akhil Mohan
76fe41a996
chore: update cgroups and ttrpc versions
- update github.com/containerd/cgroups to v1.1.0
- update github.com/containerd/ttrpc to v1.2.1

Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
2023-04-27 20:46:23 -07:00
yulng
0dbeff4b6e
remove GA feature gates in 1.28 about network
Signed-off-by: yulng <wei.yang@daocloud.io>
2023-04-28 10:51:37 +08:00
Kubernetes Prow Robot
0d0870e5b4
Merge pull request #117654 from SergeyKanzhelev/initContainerTests
added init containers tests to simplify the sidecar KEP large PR
2023-04-27 16:46:15 -07:00
Sergey Kanzhelev
fc0d2cd32f added init containers tests to simplify the sidecar KEP large PR 2023-04-27 22:42:49 +00:00
Dan Winship
258c4c4251 Remove duplicated config fields from ProxyServer
Rather than duplicating some of the KubeProxyConfiguration into
ProxyServer, just store the KubeProxyConfiguration itself so later
code can reference it directly.

For the fields that get platform-specific defaults (Mode,
DetectLocalMode), fill the defaults directly into the
KubeProxyConfiguration rather than keeping the original there and the
defaulted version in the ProxyServer.
2023-04-27 15:43:35 -04:00
Dan Winship
9d4f10f5d2 Fix up detect-local-mode validation
Validate the --detect-local-mode value in the API object validation
rather than doing it separately later. Also, remove runtime checks and
unit tests for cases that would be blocked by validation
2023-04-27 15:43:35 -04:00
Kubernetes Prow Robot
00eee07272
Merge pull request #117641 from wojtek-t/cleanup_cacher_tests_847
Refactor some watchcache tests
2023-04-27 12:28:41 -07: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
Kubernetes Prow Robot
b44482a37c
Merge pull request #116797 from mengjiao-liu/contextual-looging-scheduler-plugin-podtopologyspread
Migrated `pkg/scheduler/framework/plugins/podtopologyspread` to contextual logging
2023-04-27 12:28:27 -07:00
Kubernetes Prow Robot
a38efaccc0
Merge pull request #116748 from mengjiao-liu/contextual-logging-scheduler-plugin-noderesource
Migrated `pkg/scheduler/framework/plugins/noderesources` to contextual logging
2023-04-27 12:28:15 -07:00
Lars Ekman
5ece6541b8 proxy/ipvs: don't bind nodeips to the dummy device 2023-04-27 21:02:25 +02:00
Lars Ekman
5310305098 proxy/ipvs: add a GetAllLocalAddressesExcept() function 2023-04-27 21:02:20 +02:00
Kubernetes Prow Robot
3a15029a95
Merge pull request #117643 from humblec/etcd
update the etcd base image to v1.4.2
2023-04-27 11:10:27 -07:00
Kubernetes Prow Robot
5170c25609
Merge pull request #116835 from mengjiao-liu/contextual-logging-scheduler-plugin-preemption
Migrated `pkg/scheduler/framework/preemption & defaultpreemption` to use contextual logging
2023-04-27 11:10:16 -07:00
Kubernetes Prow Robot
e8108b5a47
Merge pull request #117651 from humblec/cluster
use go 1.19.x for etcd version monitor compilation
2023-04-27 09:16:16 -07:00
Humble Chirammal
f24d1d2c95 use go 1.19.x for etcd version monitor compilation
Signed-off-by: Humble Chirammal <humble.devassy@gmail.com>
2023-04-27 20:21:00 +05:30