Commit Graph

24167 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
232d343d58
Merge pull request #119969 from saschagrunert/cni-plugins
Update CNI plugins to v1.3.0
2023-08-23 12:41:57 -07:00
Kubernetes Prow Robot
2e6eafca3f
Merge pull request #119503 from wojtek-t/pagination_ga
Graduate APIListChunking to GA
2023-08-23 10:39:29 -07:00
Wojciech Tyczyński
f752ca2dc8 Make API chunking conformance test deterministic 2023-08-23 12:18:23 +02:00
Kubernetes Prow Robot
95bb02943d
Merge pull request #118950 from ndixita/node-allocatable-oom
Adding coverage for OOM Kill scenario due to node allocatable memory …
2023-08-22 14:41:54 -07:00
Kubernetes Prow Robot
c0691f3784
Merge pull request #119789 from thockin/deprecate_svc_lb_ingress_with_clusterip
Gate: disallow .status.loadBalancer on non-LB svc
2023-08-22 10:02:55 -07:00
lowang-bh
bd06c26d58 fix: concurrent map writes in e2e test
Signed-off-by: lowang-bh <lhui_wang@163.com>
2023-08-22 16:57:41 +08:00
Antonio Ojea
826f3a130a promote to conformance Service multiprotocol tests
Services can expose network applications that are running on
one or more Pods. User need to specify the Port and Protocol of the
network application, and network implementations must forward only
the traffic indicated in the Service, as it may present a security
problem if you allow to forward traffic to a backend if the user
didn't specify it.

Change-Id: I77fbb23c6415ed09dd81c4f2deb6df7a17de46f0
2023-08-22 08:36:17 +00:00
tao.yang
c6e54169fc e2e_apps: stop using deprecated framework.ExpectConsistOf
Signed-off-by: tao.yang <tao.yang@daocloud.io>
2023-08-22 11:17:26 +08:00
bzsuni
93832de624
stop using deprecated framework.ExpectNotEqual
Signed-off-by: bzsuni <bingzhe.sun@daocloud.io>
2023-08-22 11:12:39 +08:00
bzsuni
145dbb6acc
stop using deprecated framework.ExpectNotEqual
Signed-off-by: bzsuni <bingzhe.sun@daocloud.io>
2023-08-22 09:53:04 +08:00
Dixita Narang
d2dbc583a0 Adding coverage for OOM Kill scenario due to node allocatable memory limits, when pod level memory limits are not set 2023-08-22 00:45:17 +00:00
Kubernetes Prow Robot
f852d7fead
Merge pull request #118653 from pohly/volume-resource-requirements
Volume resource requirements
2023-08-21 14:08:05 -07:00
Davanum Srinivas
3e9a4c15a8
Restrict what imports get into code within test/e2e_node
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-08-21 15:04:23 -04:00
Kubernetes Prow Robot
70a28449a7
Merge pull request #120038 from liyuerich/expectempty
e2e: stoping using deprecated framework.ExpectEmpty
2023-08-21 08:03:23 -07:00
Antonio Ojea
039859b9b7 e2e network test for udp services with hostNetwork clients
There are some implementations of service that use socket loadbalancing
instead of NAT. These implementations don't need to deal with the
conntrack cleanup, however, they need to cleanup the sockets that are
no longer needed, so the application does not get stuck forever.

This can  happen in both TCP or UDP, but since UDP is stateless, the
situation is much complicated because does not have mechanisms like TCP
to detect that socket is no longer needed.

Change-Id: Ic2cfbdf6c8b1f1335e8b5964825dd1fa716fef53
2023-08-21 13:39:39 +00:00
Patrick Ohly
2472291790 api: introduce separate VolumeResourceRequirements struct
PVC and containers shared the same ResourceRequirements struct to define their
API. When resource claims were added, that struct got extended, which
accidentally also changed the PVC API. To avoid such a mistake from happening
again, PVC now uses its own VolumeResourceRequirements struct.

The `Claims` field gets removed because risk of breaking someone is low:
theoretically, YAML files which have a claims field for volumes now
get rejected when validating against the OpenAPI. Such files
have never made sense and should be fixed.

Code that uses the struct definitions needs to be updated.
2023-08-21 15:31:28 +02:00
Kubernetes Prow Robot
4dee8398ae
Merge pull request #120078 from tzneal/investigate-test-failure
expect the new resource_scape_error metric
2023-08-21 04:13:34 -07:00
liyuerich
3546831ceb e2e_storage: stoping using deprecated framework.ExpectEmpty 2023-08-21 09:18:18 +08:00
Tim Hockin
a930892769
Gate: disallow .status.loadBalancer on non-LB svc
The fact that the .status.loadBalancer field can be set while .spec.type
is not "LoadBalancer" is a flub.  Any spec update will already clear
.status.ingress, so it's hard to really rely on this.  After this
change, updates which try to set this combination will fail validation.

Existing cases of this will not be broken.  Any spec/metadata update
will clear it (no error) and this is the only stanza of status.

New gate "AllowServiceLBStatusOnNonLB" is off by default, but can be
enabled if this change actually breaks someone, which seems exceeedingly
unlikely.
2023-08-20 16:40:41 -07:00
Todd Neal
b8512cfe24 expect the new resource_scape_error metric 2023-08-20 14:17:54 -05:00
Todd Neal
905f07f1ac Revert "mark the OOM killer as serial to reduce flakes"
This reverts commit bd6f548746.

Running as serial didn't completely eliminate the flake so I think
there's something more going on here.  Reverting the change to serial
since its not a solution.
2023-08-20 13:38:07 -05:00
Kubernetes Prow Robot
db64cc4a55
Merge pull request #119714 from ritazh/kmsv2-feature-enablement-ut
kmsv2 test feature enablement unit test
2023-08-18 20:27:31 -07:00
Kubernetes Prow Robot
c2bddad813
Merge pull request #119454 from pacoxu/fix-ip-mode
use LoadBalancer type service for e2e service test to patch ingress status
2023-08-18 20:27:19 -07:00
Kubernetes Prow Robot
8a8d63a732
Merge pull request #120059 from tzneal/mark-oomkiller-test-as-serial
mark the OOM killer as serial to reduce flakes
2023-08-18 18:19:31 -07:00
Paco Xu
30ff937aaf add a fake load balancer class to fix e2e test failure 2023-08-19 08:50:13 +08:00
Kubernetes Prow Robot
addc0391e7
Merge pull request #116897 from Richabanker/kubelete-resource-metrics-ga
Graduate kubelet resource metrics to GA
2023-08-18 16:03:37 -07:00
Rita Zhang
d86e72202c
kmsv2 test feature enablement unit test
Signed-off-by: Rita Zhang <rita.z.zhang@gmail.com>
2023-08-18 15:28:32 -07:00
Todd Neal
bd6f548746 mark the OOM killer as serial to reduce flakes
In testing I could only reproduce the flake by running stress-ng to load
the CPU. Running it as serial should reduce and hopefully eliminate the
flakiness.
2023-08-18 13:18:50 -05:00
Kubernetes Prow Robot
fbac8388bf
Merge pull request #120018 from liggitt/validating-admission-beta
Store validating admission as beta
2023-08-18 07:12:28 -07:00
Kubernetes Prow Robot
5929d49f87
Merge pull request #119494 from carlory/cleanup-e2e-network-framework-equal
e2e_network: stop using deprecated framework.ExpectEqual
2023-08-18 03:06:28 -07:00
carlory
e290b4cb3b e2e_network: stop using deprecated framework.ExpectEqual 2023-08-18 14:54:15 +08:00
Kubernetes Prow Robot
ee265c92fe
Merge pull request #119937 from RyanAoh/kep-1860-dev
Make Kubernetes aware of the LoadBalancer behaviour
2023-08-17 14:00:28 -07:00
Todd Neal
577197559a remove the legacy test dependency
This removes the import which added a bunch of apparently
old failing tests.
2023-08-17 12:54:20 -05:00
Richa Banker
4712025ea8 Graduate kubelet resource metrics to GA 2023-08-17 09:22:48 -07:00
Kubernetes Prow Robot
93bf570d46
Merge pull request #119746 from SataQiu/cleanup-scheduler-20230803
using wait.PollUntilContextTimeout instead of deprecated wait.Poll for scheduler
2023-08-17 09:07:21 -07:00
Jordan Liggitt
af9bf7b41e
Prefer non-alpha storage versions when available 2023-08-17 10:35:46 -04:00
Jordan Liggitt
09fa21ab87
Store validating admission policies and bindings as v1beta1 2023-08-17 10:35:45 -04:00
Kubernetes Prow Robot
d4d9f7deee
Merge pull request #119489 from carlory/cleanup-e2e-common-framework-equal
e2e_common: stop using deprecated framework.ExpectEqual
2023-08-17 03:25:22 -07:00
SataQiu
ef7d404702 using wait.PollUntilContextTimeout instead of deprecated wait.Poll for pkg/scheduler
using wait.PollUntilContextTimeout instead of deprecated wait.Poll for test/integration/scheduler

using wait.PollUntilContextTimeout instead of deprecated wait.Poll for test/e2e/scheduling

using wait.ConditionWithContextFunc for PodScheduled/PodIsGettingEvicted/PodScheduledIn/PodUnschedulable/PodSchedulingError
2023-08-17 17:25:09 +08:00
Sascha Grunert
7933368460
Update CNI plugins to v1.3.0
Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2023-08-17 09:50:53 +02:00
SataQiu
427b703c37 scheduler: remove deprecated v1beta2 KubeSchedulerConfiguration 2023-08-17 13:27:21 +08:00
Kubernetes Prow Robot
9ee7185be6
Merge pull request #119501 from Songjoy/cleanup-e2e-node-framework-equal
e2e_node: stop using deprecated framework.ExpectEqual
2023-08-16 16:36:30 -07:00
Kubernetes Prow Robot
4d166947cf
Merge pull request #119097 from pacoxu/fix-eviction-pid
PIDPressure condition is triggered slow on CRI-O with large PID pressure/heavy load
2023-08-16 16:36:19 -07:00
Kubernetes Prow Robot
88d14edc26
Merge pull request #119197 from saschagrunert/stop-container-runtime-err
Check dbus error on container runtime start/stop
2023-08-16 15:27:52 -07:00
Kubernetes Prow Robot
b1e35d5616
Merge pull request #119974 from tzneal/bump-busybox-test-version
bump the busybox test version to resolve test failures
2023-08-16 12:44:13 -07:00
Kubernetes Prow Robot
ad4418516f
Merge pull request #119939 from dims/kubectl-lookup-host-in-kubeconfig-when-needed
[kubectl] Lookup Host from kubeconfig when needed
2023-08-16 12:44:06 -07:00
Kubernetes Prow Robot
dd44792cec
Merge pull request #119880 from saschagrunert/seccomp-filter
Make seccomp status checks in e2e tests more robust
2023-08-16 12:43:54 -07:00
Kubernetes Prow Robot
18290bfdc8
Merge pull request #119966 from aojea/fixfix
e2e framework util subtle bug checking endpoints
2023-08-16 09:33:08 -07:00
git-jxj
a5b3a4b738
cleanup: Update deprecated FromInt to FromInt32 (#119858)
* redo commit

* apply suggestions from liggitt

* update Parse function based on suggestions
2023-08-16 09:33:01 -07:00
Kubernetes Prow Robot
c5a675808b
Merge pull request #119745 from tsmetana/fix-local-stress-flake
Local PV Stress test: don't fail on deleting missing PV
2023-08-16 09:32:53 -07:00
Kubernetes Prow Robot
dd177629ca
Merge pull request #119654 from p0lyn0mial/upstream-watch-list-e2e-panic
e2e/apimachinery/watchlist: stop panicking when run against unsupported cluster/environment
2023-08-16 09:32:46 -07:00
Todd Neal
b75c5d33e5 bump the busybox test version to resolve test failures
- bump busybox version
- specify the path to /bin/sleep to avoid calling a new shell
  builtin
2023-08-16 08:50:20 -05:00
Kubernetes Prow Robot
e298e92115
Merge pull request #119819 from pohly/dra-performance-test-driver
dra test: enhance performance of test driver controller
2023-08-16 04:32:26 -07:00
Antonio Ojea
8314122382 e2e framework util subtle bug checking endpoints
Change-Id: Ied14efcb75a45e3bbd5f76d4ee4c89703161df54
2023-08-16 08:18:11 +00:00
Kubernetes Prow Robot
b57b2dcfcf
Merge pull request #119928 from aojea/fixe2e
e2e WaitForServiceEndpointsNum take into account the address family
2023-08-16 00:24:27 -07:00
Patrick Ohly
1e961af858 scheduler_perf: test case for DRA with multiple claims
The new test case covers pods with multiple claims from multiple drivers. This
leads to different behavior (scheduler waits for information from all drivers
instead of optimistically selecting one node right away) and to more concurrent
updates of the PodSchedulingContext objects.

The test case is currently not enabled for unit testing or integration
testing. It can be used manually with:

   -bench=BenchmarkPerfScheduling/SchedulingWithMultipleResourceClaims/2000pods_100nodes
   ... -perf-scheduling-label-filter=
2023-08-16 08:32:36 +02:00
Patrick Ohly
0331e98957 scheduler_perf: fix installing DRA test driver multiple times
The driver name configuration option was ignored, so a second driver
would have used the same name.
2023-08-16 08:32:36 +02:00
Kubernetes Prow Robot
c41c448b80
Merge pull request #119890 from tzneal/containers-lifecycle-flake
crio: increase test buffer to eliminate test flakes
2023-08-15 23:13:45 -07:00
Kubernetes Prow Robot
130a5a423f
Merge pull request #119785 from sanposhiho/waitonpermit-fiterror
fix: register the plugin rejects Pods in WaitOnPermit to UnschedulablePlugins
2023-08-15 23:13:04 -07:00
Kubernetes Prow Robot
57212647e9
Merge pull request #119769 from Huang-Wei/bug/prefilter-preemption
Fix a bug that PostFilter plugin may don't function if previous PreFilter plugins return Skip
2023-08-15 23:12:50 -07:00
Kubernetes Prow Robot
061ae8a68b
Merge pull request #119765 from tzneal/detect-nfsv3-and-change-mount-path
fix mirror pod nfs test failure due to differing NFS versions
2023-08-15 23:12:44 -07:00
Kubernetes Prow Robot
55c3cd9a30
Merge pull request #119761 from soltysh/fix-sset-test
Statefulset should wait for new replicas when removing .start.ordinal
2023-08-15 23:12:37 -07:00
Kubernetes Prow Robot
251c17113c
Merge pull request #119741 from humblec/cloudbuild
Update the container images used in cloudbuild to their latest version
2023-08-15 19:44:07 -07:00
Kubernetes Prow Robot
ef533decd7
Merge pull request #119715 from logicalhan/ExponentialBucketsRange
add support for ExponentialBucketsRange
2023-08-15 19:43:53 -07:00
Kubernetes Prow Robot
3111fee8bf
Merge pull request #119670 from lengrongfu/fix/oomkill-multi-target-container
fix OOM killer
2023-08-15 19:43:40 -07:00
Kubernetes Prow Robot
22d90ebde2
Merge pull request #119636 from tzneal/update-busybox-test-image
update the busybox test image to 1.36.1
2023-08-15 19:43:25 -07:00
Kubernetes Prow Robot
59f81980a1
Merge pull request #119579 from yt2985/cleanSA
Fix the flaky legacy_service_account_token_clean_up_test.
2023-08-15 19:43:12 -07:00
Kubernetes Prow Robot
de8c36cb56
Merge pull request #119502 from Songjoy/cleanup-e2e-scheduling-framework-equal
e2e_scheduling: stop using deprecated framework.ExpectEqual
2023-08-15 19:42:43 -07:00
Kubernetes Prow Robot
3455845b15
Merge pull request #119492 from carlory/cleanup-e2e-instrumentation-framework-equal
e2e_instrumentation: stop using deprecated framework.ExpectEqual
2023-08-15 19:42:36 -07:00
Kubernetes Prow Robot
e725d10960
Merge pull request #119490 from carlory/cleanup-e2e-dra-framework-equal
e2e_dra: stop using deprecated framework.ExpectEqual
2023-08-15 19:42:25 -07:00
Kubernetes Prow Robot
3525255622
Merge pull request #119212 from CoderSherlock/master
Added oomkill test for init container and fix typos
2023-08-15 15:17:48 -07:00
Heba Elayoty
224087abfa
Add Pod Scheduling SLI Duration metric (#119049)
Signed-off-by: Heba Elayoty <hebaelayoty@gmail.com>
Co-authored-by: Aldo Culquicondor <1299064+alculquicondor@users.noreply.github.com>
2023-08-15 15:17:41 -07:00
Kubernetes Prow Robot
d486180eb0
Merge pull request #118748 from andreaskaris/kubectl-wait-for
Kubectl: Improve conditionFuncFor expression parsing for wait --for jsonpath
2023-08-15 15:17:26 -07:00
Kubernetes Prow Robot
67c33faddd
Merge pull request #117631 from skitt/intstr-fromint32-testing
Test: use new intstr functions
2023-08-15 15:16:27 -07:00
Antonio Ojea
a0f07f2b4d e2e WaitForServiceEndpointsNum take into account the address family
Since EndpointSlices can carry dual stack families, but Endpoints can
only have one single family, the function must take this into account
and only compare the addresses of the same family, otherwise it will
always fail for Services with dual stack endoints, because the endpoint
slices will have always twice addresses than the Endpoints.

Change-Id: Id08cb22f8a2adc103a4f5a4fe3eec25f448cd21b
2023-08-14 17:02:50 +00:00
Davanum Srinivas
a161fa8017
pull Host from kubeconfig when needed
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-08-14 10:16:24 -04:00
Aohan Yang
03415ebc1d Integration tests for IP mode field 2023-08-14 17:21:54 +08:00
Kensei Nakada
cf3f0bd778 fix: register the plugin rejects Pods in WaitOnPermit to UnschedulablePlugins 2023-08-12 07:18:01 +00:00
Todd Neal
e258228e4a use a buffer equivalent to grace period to eliminate test flakes
This modifies the test to wait up to 2x the grace period for the pod to
be removed.
2023-08-11 14:08:11 -05:00
Todd Neal
717c149a73 fix mirror pod nfs test failure due to differing NFS versions
/exports *(rw,fsid=0,insecure,no_root_squash)

can be mounted as `/exports` using NFSv3 and `/` using NFSv4

Mount as '/', since clients that support both can try both.
2023-08-11 07:27:05 -05:00
Roman Bednar
dd7b7073c3 e2e: add test for verification of timestamp for new PVs 2023-08-11 11:39:47 +02:00
Roman Bednar
8e66149870 e2e: remove extra spaces 2023-08-11 11:28:11 +02:00
Wei Huang
765f3916c2
Fix a bug that PostFilter plugin may not function if previous PreFilter plugins return Skip 2023-08-10 13:43:00 -07:00
Kubernetes Prow Robot
a287fd6aa6
Merge pull request #119869 from a-hilaly/e2e-tests/match-conditions/flake-fix
Remove `matchConditions` flaky test
2023-08-10 01:01:28 -07:00
Sascha Grunert
8ab6bee676
Make seccomp status checks in e2e tests more robust
The tests have been introduced in
ca7be7dc6d
and checked for `ecc` in `/proc/self/status` since its creation.

We got a new field `Seccomp_filters:` with the Linux commit
c818c03b66,
means that `ecc` would now match both and interfere with possible test
results depending on the host.

The field `Seccomp:` got introduced in
2f4b3bf6b2
and has never changed since then, means we can use it directly to make
the tests more strict.

Refers to https://github.com/kubernetes-sigs/cri-tools/pull/1236

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2023-08-10 09:51:03 +02:00
Kubernetes Prow Robot
e6218f3d3b
Merge pull request #119876 from marosset/revert-118895
Revert "Merge pull request #118895 from RyanAoh/kep-1860"
2023-08-09 19:27:31 -07:00
Mark Rossetti
0d90d1ffa5
Revert "Merge pull request #118895 from RyanAoh/kep-1860"
This reverts commit 890a6c8f70, reversing
changes made to 4f60a8d493.
2023-08-09 15:51:20 -07:00
Kubernetes Prow Robot
3d941afece
Merge pull request #119835 from liggitt/mitigate-aggregated-discovery-npe
Avoid returning nil responseKind in v1beta1 aggregated discovery
2023-08-09 15:37:30 -07:00
Kubernetes Prow Robot
201f807036
Merge pull request #119784 from sanposhiho/bug-fix
fix: broadcast when pod is pushed back to activeQ directly in AddUnschedulableIfNotPresent
2023-08-09 13:05:31 -07:00
Jordan Liggitt
1876ddf714
Avoid returning nil responseKind in v1beta1 aggregated discovery 2023-08-09 14:45:33 -04:00
Amine Hilaly
55ca1a6ee1 Remove leases test case from AdmissionWebhookMatchConditions suit
Signed-off-by: Amine Hilaly <hilalyamine@gmail.com>
2023-08-09 18:39:01 +02:00
Kensei Nakada
050c0437e6 fix: broadcast when pod is pushed back to activeQ directly in AddUnschedulableIfNotPresent 2023-08-09 03:32:14 +00:00
Stephen Heywood
74053e2151 Create e2e test for PV/PVC endpoints
e2e test validates the following 15 endpoints
- createCoreV1NamespacedPersistentVolumeClaim
- createCoreV1PersistentVolume
- deleteCoreV1CollectionNamespacedPersistentVolumeClaim
- deleteCoreV1CollectionPersistentVolume
- deleteCoreV1NamespacedPersistentVolumeClaim
- deleteCoreV1PersistentVolume
- listCoreV1NamespacedPersistentVolumeClaim
- listCoreV1PersistentVolume
- listCoreV1PersistentVolumeClaimForAllNamespaces
- patchCoreV1NamespacedPersistentVolumeClaim
- patchCoreV1PersistentVolume
- readCoreV1NamespacedPersistentVolumeClaim
- readCoreV1PersistentVolume
- replaceCoreV1NamespacedPersistentVolumeClaim
- replaceCoreV1PersistentVolume
2023-08-09 09:12:42 +12:00
Jeremy Rickard
38a81ca04f
Bump distroless-iptables to 0.2.7
Signed-off-by: Jeremy Rickard <jeremyrrickard@gmail.com>
2023-08-08 07:14:14 -06:00
Kubernetes Prow Robot
68d79b0d69
Merge pull request #119798 from aojea/endpoints_and_slices
Fix flaky test depending on EndpointSlices to be ready
2023-08-08 04:52:14 -07:00
Patrick Ohly
0e23840929 dra test: enhance performance of test driver controller
Analyzing the CPU profile of

    go test -timeout=0 -count=5 -cpuprofile profile.out -bench=BenchmarkPerfScheduling/.*Claim.* -benchtime=1ns -run=xxx ./test/integration/scheduler_perf

showed that a significant amount of time was spent iterating over allocated
claims to determine how many were allocated per node. That "naive" approach was
taken to avoid maintaining a redundant data structure, but now that performance
measurements show that this comes at a cost, it's not "premature optimization"
anymore to introduce such a second field.

The average scheduling throughput in
SchedulingWithResourceClaimTemplate/2000pods_100nodes increases from 16.4
pods/s to 19.2 pods/s.
2023-08-08 13:36:35 +02:00
Jeremy Rickard
72c8cf9fce
[go] Bump images, versions and deps to use Go 1.20.7
Signed-off-by: Jeremy Rickard <jeremyrrickard@gmail.com>
2023-08-07 13:25:59 -06:00
Antonio Ojea
2ceca1c78d e2e WaitForServiceEndpointsNum should watch EndpointSlices
EndpointSlices is the evolution of the Endpoint object and most of the
components are using it for implementing Services, this menas that
despite the Endpoint object is up to date, the EndpointSlices may
lag behind, so test must ensure that both objects are in sync to
avoid race conditions.

Change-Id: I5d9bc7774c68f321537379d1f20b2a1fe0b39e6e
2023-08-07 18:34:06 +00:00
Maciej Szulik
ef51dbfa0c
Drop [Feature: tag to make sure this tests runs on pre-submits
In v1.27 StatefulSetStartOrdinal became beta, which makes it on by
default, but we forgot to turn these tests on along with it. This makes
these tests run always.
2023-08-07 13:38:43 +02:00
carlory
3e908c5bde e2e_common: stop using deprecated framework.ExpectEqual 2023-08-07 01:15:33 +08:00
Maciej Szulik
d154ca9c00
Statefulset should wait for new replicas when removing .start.ordinal 2023-08-04 18:41:01 +02:00
Tomas Smetana
24f32d9d18 Local PV Stress test: don't fail on deleting missing PV 2023-08-03 12:51:31 +02:00
Humble Chirammal
85c385d410 Update the container images used in cloudbuild to their latest version
This carry below GOLLANG_VERSION which got many CVE fixes:

/workspace # echo $GOLANG_VERSION
1.20.5
/workspace #

CVE-2023-29403 and Go issue https://go.dev/issue/60272.
CVE-2023-29404 and CVE-2023-29405:
  Go issues https://go.dev/issue/60305 and https://go.dev/issue/60306
CVE-2023-29402 and Go issue https://go.dev/issue/60167

Signed-off-by: Humble Chirammal <humble.devassy@gmail.com>
2023-08-03 00:09:53 +05:30
Han Kang
d5d90b7b22 add support for ExponentialBucketsRange 2023-08-01 11:38:20 -07:00
Paco Xu
f0b38766a0 use LoadBalancer type service for e2e service test to patch ingress status 2023-07-31 17:13:12 +08:00
lengrongfu
c23cee1be3 fix OOM killer
Signed-off-by: lengrongfu <rongfu.leng@daocloud.io>
2023-07-30 11:16:12 +08:00
Davanum Srinivas
b4ef4015a2
Avoid pulling mounter.tar through the CDN
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-07-28 22:15:55 -04:00
tinatingyu
ca338e517b Fix the flaky legacy_service_account_token_clean_up_test.Fix the flaky
legacy_service_account_token_clean_up_test.
2023-07-28 18:18:40 +00:00
Lukasz Szaszkiewicz
a44ce346d7 e2e/apimachinery/watchlist: stop panicking when run against unsupported cluster/environment 2023-07-28 12:25:13 +02:00
Todd Neal
2a767c9916 update the busybox test image to 1.36.1 2023-07-27 15:26:06 -05:00
HirazawaUi
133696725a implement secret empty string value integration test 2023-07-27 23:23:32 +08:00
upodroid
a65d207507 calculate the correct machine-type 2023-07-26 23:10:06 +00:00
upodroid
7d13c9b096 set map to nil if an empty string is passed 2023-07-26 10:32:27 +03:00
宋文杰
63cf568251 e2e_node: stop using deprecated framework.ExpectEqual 2023-07-26 10:20:30 +08:00
Kubernetes Prow Robot
dc6d8c6b58
Merge pull request #119571 from haircommander/node-log-query-on-node
test: fix NodeLogQuery tests to query the correct node for logs
2023-07-25 15:36:31 -07:00
Amine
eb4063f0ce
Add cases to tests AdmissionWebhook MatchConditions size limit (#119404) 2023-07-25 15:36:19 -07:00
Amine
ef4907eddd
Add e2e tests for admission webhooks MatchCondition fields (#118319)
* Add e2e tests for admission webhooks MatchCondition fields

Signed-off-by: Amine Hilaly <hilalyamine@gmail.com>

* improve naming to distinguish tests

* adding e2e for mutating webhooks and match conditions

* Use `ginkgo.It` instead of `framework.ConformaceIt` and cleanup
resrources after creation

* Enable AdmissionWebhookMatchConditions feature

* Tag only matchcondition tests

* Improve expected error message for denied requests.

* Rename `onlyAllowLeaseObjectMatchConditions` to
`excludeLeasesMatchConditions`

* remove [Alpha] tag from AdmissionWebhookMatchConditions tests

* Using `gomega.Expect` instead of `framworkfail`

* Remove [Feature:AdmissionWebhookMatchConditions] tag

Signed-off-by: Amine <hilalyamine@gmail.com>

* Improve e2e names to specify whether it's using Validating or Mutating admission webhooks

---------

Signed-off-by: Amine Hilaly <hilalyamine@gmail.com>
Signed-off-by: Amine <hilalyamine@gmail.com>
2023-07-25 14:02:17 -07:00
Peter Hunt
a248c4de52 test: fix NodeLogQuery tests to query the correct node for logs
Currently, the test queries the local node, which is not correct for most kubernetes environments.
Instead, ssh to the target node and call journalctl there

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2023-07-25 15:41:38 -04:00
Kubernetes Prow Robot
cacc6e751b
Merge pull request #119531 from ritazh/kmsv2-test-enablement-restart
kmsv2 test feature enablement disablement and restart
2023-07-25 12:03:55 -07:00
Kubernetes Prow Robot
86b44a3222
Merge pull request #119564 from logicalhan/update-docs
update documentation with descriptions
2023-07-25 10:00:07 -07:00
Rita Zhang
67769438e1
kmsv2 test feature enablement disablement and restart
Signed-off-by: Rita Zhang <rita.z.zhang@gmail.com>
2023-07-25 09:50:59 -07:00
Han Kang
18a7025383 update documentation with descriptions 2023-07-25 08:57:54 -07:00
SataQiu
213ed03c00 remove deprecated kube-apiserver identity lease garbage collector 2023-07-25 10:10:18 +08:00
carlory
57226fbd27 e2e_dra: stop using deprecated framework.ExpectEqual
Co-authored-by: Thomas Milox <thomasmilox@gmail.com>
2023-07-25 10:03:56 +08:00
Kubernetes Prow Robot
b53830590f
Merge pull request #119409 from alexzielenski/apiserver/policy/vap-tests
Add test cases for ValidatingAdmissionPolicy
2023-07-24 15:12:13 -07:00
Alexander Zielenski
3b9af47118 add admission policy integration test all resources
duplicates a lot of existing webhook integration test code
2023-07-24 10:54:54 -07:00
Jordan Liggitt
a164005cc0
Fix non-test code relying on test-code 2023-07-24 11:37:57 -04:00
Andreas Karis
4188998430 Improve conditionFuncFor expression parsing for wait --for jsonpath
Make it possible to parse jsonpath filter expressions: Split
jsonpath expressions on single '=' only and leave '==' as part of the
string.

Reported-at: https://github.com/kubernetes/kubernetes/issues/119206
Signed-off-by: Andreas Karis <ak.karis@gmail.com>
2023-07-23 15:54:28 +02:00
Talor Itzhak
3964f71fe0 e2e:podresources: verify count for terminal pods
PodResourcesAPI reports in the List call about resources of pods in terminal phase.
The internal managers reassign resources assigned to pods in terminal phase, so podresources should ignore them.

Whether this behavior intended or not (the docs are not unequivocal)
this e2e test demonstrates and verifies the mentioned above.

Signed-off-by: Talor Itzhak <titzhak@redhat.com>
2023-07-23 12:46:41 +03:00
Kubernetes Prow Robot
d0814fa476
Merge pull request #119513 from borg-land/add-node-env
Add node-env and instance-type flags to node-e2e tests
2023-07-21 17:44:19 -07:00
Kubernetes Prow Robot
18f8cb8398
Merge pull request #118644 from alexzielenski/apiserver/policy/namespaceParamRef
KEP-3488: Promote ValidatingAdmissionPolicy to Beta
2023-07-21 17:44:08 -07:00
Kubernetes Prow Robot
773a6b1e46
Merge pull request #118828 from enj/enj/f/kms_v2_hkdf_expand
kmsv2: KDF based nonce extension
2023-07-21 16:10:19 -07:00
Kubernetes Prow Robot
f3a070f9c6
Merge pull request #116469 from RomanBednar/pv-phase-transition-time
PersistentVolume last phase transition time
2023-07-21 16:10:07 -07:00
upodroid
1c99f9591b add node-env and instance-type flags to node-e2e tests 2023-07-21 21:46:37 +00:00
Alexander Zielenski
d647958744 update codegen 2023-07-21 13:56:23 -07:00
Alexander Zielenski
ef8670c946 refactor: replace usage of v1alpha1 with v1beta1
v1alpha -> v1beta

fill in DenyAction where there is no ParameterNotFoundAction
2023-07-21 13:41:24 -07:00
Roman Bednar
ae185e9118 e2e: test LastPhaseTransitionTime field when binding PV 2023-07-21 21:39:23 +02:00
Monis Khan
bf49c727ba
kmsv2: KDF based nonce extension
Signed-off-by: Monis Khan <mok@microsoft.com>
2023-07-21 15:25:52 -04:00
Wojciech Tyczyński
4e2e059c7b Graduate RemainingItemCount to GA 2023-07-21 16:25:21 +02:00
Kubernetes Prow Robot
4e8908d566
Merge pull request #117015 from kannon92/job-fix-replacement-after-deletion
Job: create replacement pods only after terminated
2023-07-21 06:46:09 -07:00
Wojciech Tyczyński
6acfa3cb4a Graduate APIListChunking to GA 2023-07-21 14:09:40 +02:00
Kubernetes Prow Robot
f5130e4387
Merge pull request #119484 from logicalhan/update-docs
update documented metrics
2023-07-21 04:32:06 -07:00
宋文杰
e9b69d1958 e2e_scheduling: stop using deprecated framework.ExpectEqual 2023-07-21 17:35:16 +08:00
carlory
2222509cb4 e2e_instrumentation: stop using deprecated framework.ExpectEqual 2023-07-21 15:41:26 +08:00
Kubernetes Prow Robot
4457f85eb3
Merge pull request #119473 from gjkim42/fix-e2e-node-to-use-pod-restartpolicy-correctly
node_e2e: Fix `createStaticSystemNodeCriticalPod`'s invalid spec
2023-07-20 18:28:07 -07:00
kannon92
74fcf3e766 implementation of PodReplacementPolicy kep in the job controller 2023-07-21 00:44:53 +00:00
Han Kang
cb6d7fbe66 update documented metrics 2023-07-20 16:05:38 -07:00
Alexander Zielenski
b3b775baa5 test: adjust tests for v1beta1 validatingadmissionpolicy 2023-07-20 13:24:09 -07:00
Kubernetes Prow Robot
5766947ab8
Merge pull request #119437 from serathius/etcd-semantics
Fix the semantic meaning of etcd server within component statuses and metrics.
2023-07-20 13:18:22 -07:00
Kubernetes Prow Robot
8a053c700a
Merge pull request #119215 from alexzielenski/apiserver/policy/namespaceParamRef-alpha
KEP-3488: Per namespace policy params
2023-07-20 13:18:10 -07:00
Kubernetes Prow Robot
4b6c340c13
Merge pull request #119422 from saschagrunert/conformance-debian-base
Use debian-base instead of distroless for conformance image
2023-07-20 11:18:10 -07:00
Alexander Zielenski
b5e9e0168c feature: add multiple params capability to VAP controller 2023-07-20 09:30:10 -07:00
Kubernetes Prow Robot
f9744df78b
Merge pull request #119412 from marosset/mark-node-log-query-tests-linux-only
Mark existing NodeLogQuery e2e tests as [LinuxOnly] since they do not run on Windows
2023-07-20 09:12:09 -07:00
Marek Siarkowicz
03aad1f823 Fix the semantic meaning of etcd server within component statuses and metrics.
Instead of numerating all the etcd endpoints known by apiserver, we will
group them by purpose. `etcd-0` will be the default etcd, `etcd-1` will
be the first resource override, `etcd-2` will be the second override and
so on.
2023-07-20 15:08:41 +02:00
Gunju Kim
e0a6eb93a1
node_e2e: Fix createStaticSystemNodeCriticalPod's invalid spec
This fixes `createStaticSystemNodeCriticalPod` to set pod's
restartPolicy instead of container's restartPolicy.
2023-07-20 20:18:05 +09:00
Itamar Holder
ee82654e39 Add pod_swap_usage_bytes as an expected metric in e2e test
Use haveKeys() matcher from previous commit to ensure
required keys exist.

Signed-off-by: Itamar Holder <iholder@redhat.com>
2023-07-19 14:44:05 +03:00
Itamar Holder
81abfca407 Add a haveKeys() helper function to match multiple keys
Signed-off-by: Itamar Holder <iholder@redhat.com>
2023-07-19 14:44:04 +03:00
Sascha Grunert
1000ed64e0
Use debian-base instead of distroless for conformance image
The `diff` binary (required by the `kubectl diff` e2e test) gets
statically or dynamically linked based on the used glibc version. We
cannot really predict that behavior for the various platforms of
debian-base and therefore cannot copy the binary around. This means that
distroless is not a great choice for the conformance image unless we
stop relying on `diff`.

This means we now switch back to `debian-base` for the conformance image
to simplify the build process and reduce the amount of moving parts.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2023-07-19 10:14:37 +02:00
Kubernetes Prow Robot
66e99b3ff1
Merge pull request #117740 from Richabanker/uvip-impl
Unknown Version Interoperability Proxy Impl
2023-07-18 18:36:02 -07:00
Richa Banker
c1aef65640 Add integration test 2023-07-18 17:36:30 -07:00
Richa Banker
cd5f3d9f9d Add impl for uvip 2023-07-18 17:36:22 -07:00
Kubernetes Prow Robot
d1d86dafb7
Merge pull request #118772 from kannon92/terminating-pod-gc
KEP-3939: pod gc changes for pod replacement policy kep
2023-07-18 16:46:03 -07:00
Michał Woźniak
a15c27661e
Job controller implementation of backoff limit per index (#118009) 2023-07-18 13:44:11 -07:00
Kubernetes Prow Robot
f55f2785e2
Merge pull request #116254 from pohly/dra-node-authorizer
node authorizer: limit kubelet access to ResourceClaim objects
2023-07-18 13:44:04 -07:00
Mark Rossetti
b5012ba1e2
Mark existing NodeLogQuery e2e tests as [LinuxOnly] since they do not run on Windows
Signed-off-by: Mark Rossetti <marosset@microsoft.com>
2023-07-18 13:24:01 -07:00
Kubernetes Prow Robot
7aa4e089cd
Merge pull request #118808 from Jefftree/updated-lazy-crd-controller-v2
Fix lazy OpenAPI V2 CRD Controller
2023-07-18 12:33:20 -07:00
Keerthan Reddy Mala
106a931c29 fix intergration test 2023-07-18 10:24:04 -07:00
Kubernetes Prow Robot
56b59c89f5
Merge pull request #117666 from carlory/fix-008
Remove ability to re-enable serving deprecated policyv1beta1 APIs
2023-07-18 08:41:12 -07:00
Sascha Grunert
a35608cc61
Update debian-base for test images and others
Bump all users of debian-base to the latest bookworm image.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2023-07-18 16:39:03 +02:00
Kubernetes Prow Robot
9946ea9fd8
Merge pull request #119365 from xmudrii/go1206-iptables
Bump distroless-iptables to 0.2.6
2023-07-18 02:11:20 -07:00
Kubernetes Prow Robot
d43e6705f1
Merge pull request #119095 from saschagrunert/debian-base-bookworm
Update debian-base to bookworm
2023-07-18 02:11:08 -07:00
Jefftree
735be024cf Make CRDs built and aggregated lazily for oasv2 2023-07-18 04:49:56 +00:00
Kubernetes Prow Robot
b4d793c450
Merge pull request #118865 from iholder101/kubelet/add-swap-to-summary-stats
Add swap to stats to Summary API and Prometheus endpoints (`/stats/summary` and `/metrics/resource`)
2023-07-17 19:49:18 -07:00
Kubernetes Prow Robot
da2fdf8cc3
Merge pull request #118764 from iholder101/Swap/burstableQoS-impl
Add full cgroup v2 swap support with automatically calculated swap limit for LimitedSwap and Burstable QoS Pods
2023-07-17 19:49:07 -07:00
carlory
850dc6123a Remove ability to re-enable serving deprecated policyv1beta1 APIs 2023-07-18 10:24:26 +08:00
Kubernetes Prow Robot
d17f3ba2cf
Merge pull request #119168 from gjkim42/sidecar-allow-probes-and-lifecycle-hooks
Allow all probes and lifecycle for restartable init containers
2023-07-17 18:11:07 -07:00
Itamar Holder
4cb5547f93 Adjust summary API e2e test
Signed-off-by: Itamar Holder <iholder@redhat.com>
2023-07-18 02:55:56 +03:00
Kubernetes Prow Robot
a9b3ca34b5
Merge pull request #119381 from gjkim42/fix-e2e-tests-overriding-grace-period-when-probe-is-set
Fix e2e tests for overriding timoutGracePeriodSeconds when probe is set
2023-07-17 16:55:18 -07:00
Gunju Kim
d029f0ef06
Add restartable init container lifecycle hook e2e tests 2023-07-18 08:12:25 +09:00
Gunju Kim
f17e911777
Add restartable init container probe e2e tests 2023-07-18 08:12:25 +09:00
Gunju Kim
3bf282652f
Allow restartable init containers to have lifecycle 2023-07-18 08:12:24 +09:00
Kensei Nakada
c7e7eee554
feature(scheduling_queue): track events per Pods (#118438)
* feature(sscheduling_queue): track events per Pods

* fix typos

* record events in one slice and make each in-flight Pod to refer it

* fix: use Pop() in test before AddUnschedulableIfNotPresent to register in-flight Pods

* eliminate MakeNextPodFuncs

* call Done inside the scheduling queue

* fix comment

* implement done() not to require lock in it

* fix UTs

* improve the receivedEvents implementation based on suggestions

* call DonePod when we don't call AddUnschedulableIfNotPresent

* fix UT

* use queuehint to filter out events for in-flight Pods

* fix based on suggestion from aldo

* fix based on suggestion from Wei

* rename lastEventBefore → previousEvent

* fix based on suggestion

* address comments from aldo

* fix based on the suggestion from Abdullah

* gate in-flight Pods logic by the SchedulingQueueHints feature gate
2023-07-17 15:53:07 -07:00
Kubernetes Prow Robot
a776bf0462
Merge pull request #116335 from gnufied/update-api-recovery-apis
Update api recovery apis
2023-07-17 14:52:35 -07:00
Kubernetes Prow Robot
1da70b0736
Merge pull request #119264 from logicalhan/promote-metrics
promote beta metrics
2023-07-17 13:47:41 -07:00
Kubernetes Prow Robot
92856db662
Merge pull request #118973 from ffromani/kubelet-podresources-getallocatable-ga
node: podresources: getallocatable: move to GA
2023-07-17 13:47:33 -07:00
Kubernetes Prow Robot
8633adbb07
Merge pull request #119342 from A-Hilaly/api-server/webhooks/match-conditions-integration-tests
Add integration tests for `MatchConditions` feature gate enablement
2023-07-17 12:47:23 -07:00
Hemant Kumar
e011187114 Update code to use new generic allocatedResourceStatus field 2023-07-17 15:30:35 -04:00
Kubernetes Prow Robot
890a6c8f70
Merge pull request #118895 from RyanAoh/kep-1860
Make Kubernetes aware of the LoadBalancer behaviour
2023-07-17 11:41:10 -07:00
Han Kang
aa788219f4 fix metric names 2023-07-17 11:22:21 -07:00
Amine
00de051729 Make matchConditionsFeatureGateInitiallyEnabled a boolean instead 2023-07-17 18:34:42 +01:00
Gunju Kim
48eee4eed8
Fix e2e tests for overriding timoutGracePeriodSeconds of probes
Passing "/bin/sh" arguments to agnhost container has caused failure by
itself.

This fixes the container image, allowing it to properly test the restart
triggered by probe failure.
2023-07-18 02:31:36 +09:00
Kubernetes Prow Robot
4f60a8d493
Merge pull request #119110 from andrewsykim/apf-metrics-beta
Promote kube-apiserver flowcontrol metrics to Beta
2023-07-17 09:05:12 -07:00
Marko Mudrinić
ff62cca47b
Bump distroless-iptables to 0.2.6
Signed-off-by: Marko Mudrinić <mudrinic.mare@gmail.com>
2023-07-17 12:13:37 +02:00
Paco Xu
709eb6c030 eviction for pid trigger PIDPressure condition slowly on CRI-O
Signed-off-by: Paco Xu <paco.xu@daocloud.io>
2023-07-17 16:34:28 +08:00
Aohan Yang
b1850497b4 Integration tests for IP mode field 2023-07-17 16:03:02 +08:00
kannon92
e38ab6d367 Add PodGC changes for PodReplacementPolicy 2023-07-16 23:47:04 +00:00
Amine
6b3ce3004d Add integration tests for match conditions feature gate enablement 2023-07-16 01:06:08 +01:00
Kubernetes Prow Robot
900237fada
Merge pull request #118635 from ffromani/devmgr-check-pod-running
kubelet: devices: skip allocation for running pods
2023-07-15 05:43:16 -07:00
Kubernetes Prow Robot
5c96e5321e
Merge pull request #119324 from xmudrii/go1206
[go] Bump images, versions and deps to use Go 1.20.6
2023-07-15 03:07:15 -07:00
Kubernetes Prow Robot
8a0ea1bd58
Merge pull request #109616 from wzshiming/feat/pod-host-ips
Field `status.hostIPs` added for Pod
2023-07-15 00:31:04 -07:00
Cici Huang
13172cba5c
ValidatingAdmissionPolicy: support namespace access (#118267)
* Support namespace access from cel expression in validatingadmissionpolicy.

* Whitelist the exposed fields in namespace object and add test

* better handling of cluster-scoped resources.

* [API REVIEW] namespaceObject in Expression doc.

* compatibility with composition.

* generated: ./hack/update-codegen.sh && ./hack/update-openapi-spec.sh

* workaround namespace of namespace is unexpectedly set.

* basic test coverage for namespaceObject.

---------

Co-authored-by: Jiahui Feng <jhf@google.com>
2023-07-14 17:53:08 -07:00
Kubernetes Prow Robot
47aeec63a8
Merge pull request #119272 from deads2k/resources
add list of served versions to storage version
2023-07-14 13:22:41 -07:00
David Eads
90ab7580aa add list of served versions to storage version 2023-07-14 13:47:19 -04:00
Itamar Holder
619be9c153 Add a swap e2e test
Signed-off-by: Itamar Holder <iholder@redhat.com>
2023-07-14 14:52:28 +03:00
Marko Mudrinić
69c4bc29f5
[go] Bump images, versions and deps to use Go 1.20.6
Signed-off-by: Marko Mudrinić <mudrinic.mare@gmail.com>
2023-07-14 12:04:13 +02:00
Shiming Zhang
b2613dd381 Add e2e to check that hostIPs and Downward API works 2023-07-14 09:35:31 +08:00
Jiahui Feng
b635f2a401
ValidatingAdmissionPolicy: Variable Composition (#118642)
* [API REVIEW] Variable Composition

* lazy map.

* variable composition implementation.

* check variables during VAP validation.

* generated: ./hack/update-vendor.sh

* generated: UPDATE_COMPATIBILITY_FIXTURE_DATA

(cd staging/src/k8s.io/api/ && env UPDATE_COMPATIBILITY_FIXTURE_DATA=true go test)

* cost calucation.

* tests for cost calculations.

* e2e test for variables.

* fix doc for Validation.Expression.

* generated: ./hack/update-codegen.sh

* fix missing utilruntime import.

* generated: ./hack/update-openapi-spec.sh
2023-07-13 17:13:28 -07:00
Kubernetes Prow Robot
1e21da87b8
Merge pull request #118988 from nilekhc/hash-keyid
[KMSv2] chore: hashes keyID being logged
2023-07-13 15:47:48 -07:00
Kubernetes Prow Robot
be2cfc9697
Merge pull request #118228 from carlory/move-non-graceful-node-shutdown-to-GA
move non-graceful node shutdown to GA
2023-07-13 15:47:37 -07:00
Kubernetes Prow Robot
bea27f82d3
Merge pull request #118209 from pohly/dra-pre-scheduled-pods
dra: pre-scheduled pods
2023-07-13 14:43:37 -07:00
Kubernetes Prow Robot
1db4658614
Merge pull request #119295 from jsafrane/remove-serial-localvolume
Remove test Pods sharing a single local PV
2023-07-13 13:43:21 -07:00
Nilekh Chaudhari
131216fa8f
chore: hashes keyID
Signed-off-by: Nilekh Chaudhari <1626598+nilekhc@users.noreply.github.com>
2023-07-13 20:42:09 +00:00
Jiahui Feng
049614f884
ValidatingAdmissionPolicy controller for Type Checking (#117377)
* [API REVIEW] ValidatingAdmissionPolicyStatucController config.

worker count.

* ValidatingAdmissionPolicyStatus controller.

* remove CEL typechecking from API server.

* fix initializer tests.

* remove type checking integration tests

from API server integration tests.

* validatingadmissionpolicy-status options.

* grant access to VAP controller.

* add defaulting unit test.

* generated: ./hack/update-codegen.sh

* add OWNERS for VAP status controller.

* type checking test case.
2023-07-13 13:41:50 -07:00
Andrew Sy Kim
d25075f342 update generated list of stable metrics
Signed-off-by: Andrew Sy Kim <andrewsy@google.com>
2023-07-13 20:13:04 +00:00
Patrick Ohly
80ab8f0542 dra: handle scheduled pods in kube-controller-manager
When someone decides that a Pod should definitely run on a specific node, they
can create the Pod with spec.nodeName already set. Some custom scheduler might
do that. Then kubelet starts to check the pod and (if DRA is enabled) will
refuse to run it, either because the claims are still waiting for the first
consumer or the pod wasn't added to reservedFor. Both are things the scheduler
normally does.

Also, if a pod got scheduled while the DRA feature was off in the
kube-scheduler, a pod can reach the same state.

The resource claim controller can handle these two cases by taking over for the
kube-scheduler when nodeName is set. Triggering an allocation is simpler than
in the scheduler because all it takes is creating the right
PodSchedulingContext with spec.selectedNode set. There's no need to list nodes
because that choice was already made, permanently. Adding the pod to
reservedFor also isn't hard.

What's currently missing is triggering de-allocation of claims to re-allocate
them for the desired node. This is not important for claims that get created
for the pod from a template and then only get used once, but it might be
worthwhile to add de-allocation in the future.
2023-07-13 21:27:11 +02:00
Jordan Liggitt
39207dada2 Add integration test for node authorizer claim references 2023-07-13 20:42:21 +02:00
CoderSherlock
b7cbebcd03 Added oomkill test for init container and fix typos 2023-07-13 17:19:34 +00:00
Jan Safranek
052b06bdad Remove test Pods sharing a single local PV
The test runs two pods accessing the same local volume, which is duplicate
with "Two pods mounting a local volume at the same time" test.
2023-07-13 18:33:18 +02:00
Rafael Fonseca
9f5b6db8be test: azure: check error for cloud detection.
If something goes wrong during the Azure cloud detection, trying to cast
the returned value will result in the following panic and give no clue
as to what the error was.

```
  panic: interface conversion: cloudprovider.Interface is nil, not *azure.Cloud

goroutine 1 [running]:
k8s.io/kubernetes/test/e2e/framework/providers/azure.newProvider()
	test/e2e/framework/providers/azure/azure.go:50 +0x2b5
k8s.io/kubernetes/test/e2e/framework.SetupProviderConfig({0xc0007966b8, 0x5})
	test/e2e/framework/provider.go:82 +0x1a6
```
2023-07-13 09:04:24 +02:00
Kubernetes Prow Robot
406d2dfe61
Merge pull request #119250 from pohly/controller-contextual-logging
kube-controller-manager: finish conversion to contextual logging
2023-07-12 18:59:30 -07:00
Kubernetes Prow Robot
4af23c157c
Merge pull request #119242 from carlory/add-logger
change the QueueingHintFn to pass a logger
2023-07-12 13:03:31 -07:00
Kubernetes Prow Robot
047d040ce7
Merge pull request #119012 from pohly/dra-batch-node-prepare
kubelet: support batched prepare/unprepare in v1alpha3 DRA plugin API
2023-07-12 10:57:37 -07:00
Kubernetes Prow Robot
2ec4e14bfa
Merge pull request #118812 from serathius/storage-metric
Improve apiserver storage size metric
2023-07-12 10:57:26 -07:00
carlory
0599b3caa0 change the QueueingHintFn to pass a logger 2023-07-13 00:56:41 +08:00
Patrick Ohly
08d40f53a7 dra: test with and without immediate ReservedFor
The recommendation and default in the controller helper code is to set
ReservedFor to the pod which triggered delayed allocation. However, this
is neither required nor enforced. Therefore we should also test the fallback
path were kube-scheduler itself adds the pod to ReservedFor.
2023-07-12 16:57:17 +02:00
Patrick Ohly
7d064812bb kube-controller-manager: finish conversion to contextual logging
This removes all exceptions and fixes the remaining unconverted log calls.
2023-07-12 14:57:29 +02:00
Kubernetes Prow Robot
3cc729fc7f
Merge pull request #119195 from pohly/dra-reallocate-flake
dra e2e: fix "reallocation works" flake
2023-07-12 05:55:25 -07:00
Patrick Ohly
d743c50bb9 kubelet: support batched prepare/unprepare in v1alpha3 DRA plugin API
Combining all prepare/unprepare operations for a pod enables plugins to
optimize the execution. Plugins can continue to use the v1beta2 API for now,
but should switch. The new API is designed so that plugins which want to work
on each claim one-by-one can do so and then report errors for each claim
separately, i.e. partial success is supported.
2023-07-12 14:50:30 +02:00
Marek Siarkowicz
7a63997c8a Improve apiserver storage size metric to allow it's graduation
Change name to make it compliant with prometheus guidelines.
Calculate it on demand instead of periodic to comply with prometheus standards.
Replace "endpoint" with "server" label to make it semantically consistent with storage factory
2023-07-12 14:33:10 +02:00
Francesco Romani
01c3a51a78 node: podresources: getallocatable: move to GA
lock the feature gate to GA, and remove the now-redundant code.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2023-07-12 14:11:22 +02:00
Francesco Romani
d78671447f e2e: node: add test to check device-requiring pods are cleaned up
Make sure orphanded pods (pods deleted while kubelet is down) are
handled correctly.
Outline:
1. create a pod (not static pod)
2. stop kubelet
3. while kubelet is down, force delete the pod on API server
4. restart kubelet
the pod becomes an orphaned pod and is expected to be killed by HandlePodCleanups.

There is a similar test already, but here we want to check device
assignment.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2023-07-12 13:25:36 +02:00
Francesco Romani
5cf50105a2 e2e: node: devices: improve the node reboot test
The recently added e2e device plugins test to cover node reboot
works fine if runs every time on CI environment (e.g CI) but
doesn't handle correctly partial setup when run repeatedly on
the same instance (developer setup).

To accomodate both flows, we extend the error management, checking
more error conditions in the flow.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2023-07-12 13:25:36 +02:00
Francesco Romani
b926aba268 e2e: node: devicemanager: update tests
Fix e2e device manager tests.
Most notably, the workload pods needs to survive a kubelet
restart. Update tests to reflect that.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2023-07-12 13:25:36 +02:00
Maciej Szulik
ab3a0b78ea
Match both old and new kubectl version for a while in e2e 2023-07-12 12:49:33 +02:00
Kubernetes Prow Robot
745cfa35bd
Merge pull request #119147 from mengjiao-liu/contextual-logging-controller-disruption
Migrate /pkg/controller/disruption to structured and contextual logging
2023-07-12 03:35:25 -07:00
Kubernetes Prow Robot
a8093823c3
Merge pull request #119042 from sttts/sttts-restcore-split
cmd/kube-apiserver: turn core (legacy) rest storage into standard RESTStorageProvider
2023-07-12 03:35:17 -07:00
Patrick Ohly
c143a875ed dra e2e: fix "reallocation works" flake
The main problem probably was that
https://github.com/kubernetes/kubernetes/pull/118862 moved creating the first
pod before setting up the callback which blocks allocating one claim for that
pod. This is racy because allocations happen in the background.

The test also was unnecessarily complex and hard to read:
- The intended effect can be achieved with three instead of four claims.
- It wasn't clear which claim has "external-claim-other" as name.
  Using the claim variable avoids that.
2023-07-12 11:20:47 +02:00
Mengjiao Liu
19869478c1 Migrate /pkg/controller/disruption to structured and contextual logging 2023-07-12 11:30:45 +08:00
Kubernetes Prow Robot
98e7c2a751
Merge pull request #119237 from jpbetz/jpbetz-apiserver-integration-owner
Add jpbetz as approver of apiserver integration tests
2023-07-11 20:03:18 -07:00
Kubernetes Prow Robot
2d9c951abe
Merge pull request #117011 from fabi200123/Add-Node-Log-Query-Tests-
Add e2e tests for feature NodeLogQuery
2023-07-11 20:03:11 -07:00
Kubernetes Prow Robot
6ffca50136
Merge pull request #116443 from benluddy/secondary-authz-decision-caching
Cache authz decisions within the scope of validating policy admission.
2023-07-11 12:41:11 -07:00
Joe Betz
6d6595d0f6 Add jpbetz as approver of apiserver integration tests 2023-07-11 14:36:45 -04:00
Kubernetes Prow Robot
da61644869
Merge pull request #119179 from gjkim42/add-prestop-e2e-test
node-e2e: Add container lifecycle e2e tests for preStop hook
2023-07-11 10:33:23 -07:00
Kubernetes Prow Robot
e0dafe57a3
Merge pull request #117351 from pohly/dra-generated-resource-claim-names
DRA: generated resource claim names
2023-07-11 10:33:11 -07:00
Dr. Stefan Schimanski
75e3576523
kube-apiserver: rewire service controllers: kubernetesservice + IP repair 2023-07-11 17:27:20 +02:00
Arda Güçlü
3267dd9d52
kubectl delete: Introduce new interactive flag for interactive deletion (#114530) 2023-07-11 06:05:11 -07:00
Patrick Ohly
ba810871ad dra e2e: check that not generating a ResourceClaim works
This is not something that normally happens, but the API supports it because it
might be needed at some point, so we have to test it.
2023-07-11 14:23:49 +02:00
Patrick Ohly
444d23bd2f dra: generated name for ResourceClaim from template
Generating the name avoids all potential name collisions. It's not clear how
much of a problem that was because users can avoid them and the deterministic
names for generic ephemeral volumes have not led to reports from users. But
using generated names is not too hard either.

What makes it relatively easy is that the new pod.status.resourceClaimStatus
map stores the generated name for kubelet and node authorizer, i.e. the
information in the pod is sufficient to determine the name of the
ResourceClaim.

The resource claim controller becomes a bit more complex and now needs
permission to modify the pod status. The new failure scenario of "ResourceClaim
created, updating pod status fails" is handled with the help of a new special
"resource.kubernetes.io/pod-claim-name" annotation that together with the owner
reference identifies exactly for what a ResourceClaim was generated, so
updating the pod status can be retried for existing ResourceClaims.

The transition from deterministic names is handled with a special case for that
recovery code path: a ResourceClaim with no annotation and a name that follows
the Kubernetes <= 1.27 naming pattern is assumed to be generated for that pod
claim and gets added to the pod status.

There's no immediate need for it, but just in case that it may become relevant,
the name of the generated ResourceClaim may also be left unset to record that
no claim was needed. Components processing such a pod can skip whatever they
normally would do for the claim. To ensure that they do and also cover other
cases properly ("no known field is set", "must check ownership"),
resourceclaim.Name gets extended.
2023-07-11 14:23:48 +02:00
Kubernetes Prow Robot
86038ae590
Merge pull request #116846 from moshe010/e2e--node-pod-resources
kubelet pod-resources: add e2e for KubeletPodResourcesGet feature
2023-07-11 04:53:24 -07:00
Kubernetes Prow Robot
8f1852bb44
Merge pull request #115295 from Namanl2001/pkg/controller/endpointslice
Migrated `pkg/controller/endpointslice` and `pkg/controller/endpointslicemirroring` to contextual logging
2023-07-11 03:19:12 -07:00
carlory
f443c458af move non-graceful node shutdown to GA 2023-07-11 13:51:51 +08:00
Kubernetes Prow Robot
ad72319ece
Merge pull request #115122 from r-erema/110782-oidc-test-coverage
add integration tests for OIDC authenticator
2023-07-10 15:29:10 -07:00
Naman
645cb90732 migrated pkg/controller/endpointslicemirroring to contextual logging
Signed-off-by: Naman <namanlakhwani@gmail.com>
2023-07-11 01:43:30 +05:30
Naman
09849b09cf migrated pkg/controller/endpointslice to contextual logging
Signed-off-by: Naman <namanlakhwani@gmail.com>
2023-07-11 01:28:22 +05:30
Sascha Grunert
3bae26ae58
Check dbus error on container runtime start/stop
We should evaluate the error, otherwise we risk to hang indefinately on
waiting for the `reschan` in:

64939b66c6/test/e2e_node/util.go (L419)

We also increase the timeout, because it can take a bit longer for
runtimes to determinate depending on the work they have to be done on
running containers.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2023-07-10 13:45:40 +02:00
Kubernetes Prow Robot
80dab4127b
Merge pull request #116720 from soltysh/remove_short_version
Remove long/golang version information making short the default
2023-07-10 02:41:06 -07:00
Sascha Grunert
a6554b9d5d
Make kubelet label types public
We use the label definitions in CRI-O, means we now make them public to
stop vendoring/copying this part of Kubernetes.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2023-07-10 10:58:44 +02:00
Gunju Kim
8fb5b6eb4c
node-e2e: Add container lifecycle e2e tests for preStop hook
This ensures that the container's pre-stop hook is invoked if the
startup or liveness probe fails.
2023-07-10 08:55:48 +09:00
Kubernetes Prow Robot
d653dcab5a
Merge pull request #119048 from pohly/scheduler-perf-metrics-for-perfdash
scheduler-perf: metrics for perfdash
2023-07-09 09:27:04 -07:00
Kubernetes Prow Robot
19a25bac05
Merge pull request #119159 from alculquicondor/fix-job-uncounted
Only declare job as finished after removing all finalizers
2023-07-08 01:55:03 -07:00
kerthcet
47ef977ddd Direct reference to the packages
Signed-off-by: kerthcet <kerthcet@gmail.com>
2023-07-08 12:03:46 +08:00
Kubernetes Prow Robot
0e14098333
Merge pull request #116429 from SergeyKanzhelev/sidecar
Add SidecarContainers feature
2023-07-07 17:39:03 -07:00
Gunju Kim
03c2217687
Sidecar: Add e2e tests
Co-authored-by: Sergey Kanzhelev <S.Kanzhelev@live.com>
2023-07-08 07:26:12 +09:00
Kubernetes Prow Robot
16e3980c08
Merge pull request #119158 from dims/skip-GracefulNodeShutdown-tests-on-older-systemd-versions
Skip GracefulNodeShutdown on older systemd versions
2023-07-07 14:13:04 -07:00
Davanum Srinivas
10dc1ca084
Skip GracefulNodeShutdown on older systemd versions
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-07-07 16:08:42 -04:00
Kubernetes Prow Robot
c17601fa18
Merge pull request #118529 from kerthcet/feat/record-failed-plugins
Record failed plugins in Reserver Plugin
2023-07-07 11:09:03 -07:00
Aldo Culquicondor
f7a1fb76f4
Only declare job as finished after removing all finalizers
Change-Id: Id4b01b0e6fabe24134e57e687356e0fc613cead4
2023-07-07 14:08:19 -04:00
Maciej Szulik
3f07fc3acc
Remove long/golang version information making short the default 2023-07-07 18:46:34 +02:00
Kubernetes Prow Robot
ddb2013363
Merge pull request #119103 from pohly/e2e-unexpected-args
e2e: detect unexpected command line arguments
2023-07-07 04:37:04 -07:00
kerthcet
c0eb0caf4a Support fine-gained rescheduling in ReservePlugin
Signed-off-by: kerthcet <kerthcet@gmail.com>
2023-07-07 13:30:29 +08:00
Kubernetes Prow Robot
b07a843cb5
Merge pull request #119046 from kerthcet/fix/handle-unschedule-plugins
Fix fitError in Permit plugin not handled perfectly
2023-07-06 21:01:03 -07:00
kerthcet
278a8376e1 Fix: fiterror in permit plugin not handled perfectly
We only added failed plulgins, but actually this will not work unless
we make the status with a fitError because we only copy the failured plugins
to podInfo if it is a fitError

Signed-off-by: kerthcet <kerthcet@gmail.com>
2023-07-07 10:35:59 +08:00
Kubernetes Prow Robot
d02d8ba635
Merge pull request #118862 from byako/batching-dra-calls
DRA controller: batch resource claims for Allocate
2023-07-06 11:33:03 -07:00
Kubernetes Prow Robot
6f9d1d38d8
Merge pull request #118817 from pohly/dra-delete-claims
DRA: improve handling of completed pods
2023-07-06 10:15:15 -07:00
Alexey Fomenko
b10cc642b5
DRA controller: batch resource claims for Allocate
Signed-off-by: Alexey Fomenko <alexey.fomenko@intel.com>
Co-authored-by: Patrick Ohly <patrick.ohly@intel.com>
2023-07-06 19:31:45 +03:00
Kubernetes Prow Robot
8c1bf4f461
Merge pull request #116930 from fatsheep9146/contextual-logging-cleanup
contextual logging cleanup
2023-07-06 07:39:03 -07:00
Kubernetes Prow Robot
d48fc2ad2d
Merge pull request #119035 from saschagrunert/critical-pod
Fix `should be able to create and delete a critical pod` test
2023-07-06 00:51:03 -07:00
Kubernetes Prow Robot
e5efa0a5ee
Merge pull request #117108 from pohly/test-integration-race-detection-component-base-logs
component-base/logs: improve handling of re-applying a configuration
2023-07-05 21:29:08 -07:00
Kubernetes Prow Robot
cd32adebd9
Merge pull request #118386 from Richabanker/enhance-storage-version
Add servedVersions info in StorageVersion API
2023-07-05 19:23:02 -07:00
Kubernetes Prow Robot
77ad8a516d
Merge pull request #119025 from ii/remove-csidriver-test
Remove conformance test for StorageV1CSIDriver Endpoints
2023-07-05 17:53:02 -07:00
Ziqi Zhao
dfc1838379 Migrated pkg/controller/volume|util|replicaset|nodeipam to contextual logging
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
2023-07-06 07:39:52 +08:00
Kubernetes Prow Robot
a88defe09a
Merge pull request #119107 from soltysh/drop_deprecated_api
Stop using deprecated API
2023-07-05 12:01:02 -07:00
Kubernetes Prow Robot
88e42040b1
Merge pull request #118981 from ffromani/e2e-podres-deflake
e2e: node: podresources: cooldown the rate limit
2023-07-05 12:00:50 -07:00
Kubernetes Prow Robot
80af36cfff
Merge pull request #119104 from pohly/e2e-remove-node-gcp
e2e node: remove unused test/e2e_node/gcp
2023-07-05 10:41:08 -07:00
Patrick Ohly
02efe09abe component-base/logs: improve handling of re-applying a configuration
Normal binaries should never have to do this. It's not safe when there are
already some goroutines running which might do logging. Therefore the new
default is to return an error when a binary accidentally re-applies.

A few unit ensure that there are no goroutines and have to call the functions
more then once. The new ResetForTest API gets used by those to enable changing the
logging settings more than once in the same process.

Integration tests use the same code as the normal binaries. To make reuse of
that code safe, component-base/logs can be configured to silently ignore any
additional calls. This addresses data races that were found when enabling -race
for integration tests. To catch cases where the integration test does want
to modify the config, the old and new config get compared and an error is
raised when it's not the same.

To avoid having to modify all integration tests which start test servers,
reconfiguring component-base/logs is done by the test server packages.
2023-07-05 19:08:54 +02:00
Kubernetes Prow Robot
ce7fd466aa
Merge pull request #118134 from pohly/e2e-pod-security-levels
e2e: support admissionapi.LevelRestricted in test/e2e/framework/pod
2023-07-05 08:39:09 -07:00
Maciej Szulik
9dcc57ede6
Stop using deprecated API 2023-07-05 16:42:55 +02:00
Sascha Grunert
5e1777be52
Update debian-base to bookworm
Rolling out the latest bookworm base image.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2023-07-05 16:13:03 +02:00
Patrick Ohly
a514f40131 dra resourceclaim controller: delete generated claims when pod is done
When a pod is done, but not getting removed yet for while, then a claim that
got generated for that pod can be deleted already. This then also triggers
deallocation.
2023-07-05 16:10:20 +02:00
Patrick Ohly
e8a0c42212 dra resourceclaim controller: remove reservation for completed pods
When a pod is known to never run (again), the reservation for it also can be
removed. This is relevant in particular for the job controller.
2023-07-05 16:10:20 +02:00
Patrick Ohly
7f5a02fc7e dra resourceclaim controller: enhance logging
Adding logging to event handlers makes it more obvious why (or why not) claims
and pods need to be processed.
2023-07-05 16:10:20 +02:00
Patrick Ohly
16e9cc42c1 e2e node: remove unused test/e2e_node/gcp
The test package was not included anywhere and thus just dead code that doesn't
need to be maintained anymore.
2023-07-05 14:31:32 +02:00
Patrick Ohly
932d0337b8 e2e: detect unexpected command line arguments
Invalid flags are detected by flag parsing, but optional arguments are just
passed through to the E2E suites. None of them support any, so rejecting them
with an error message is useful because it helps catch typos (like a missing
hyphen before a flag).
2023-07-05 13:34:09 +02:00
Kubernetes Prow Robot
a9a7a3730e
Merge pull request #118994 from pohly/test-integration-race-detection-grpc-logger
integration testing: configure gRPC logging during init
2023-07-05 02:58:55 -07:00
Kubernetes Prow Robot
00b8a0a95b
Merge pull request #118160 from minherz/master
Support JSONPath condition without value
2023-07-04 00:26:52 -07:00
roman
18f2e9055f Add OIDC integration tests 2023-07-04 08:04:53 +03:00
Patrick Ohly
6b01ece580 scheduler-perf: fix perfdash display problem
perfdash expects all data items to have the same set of labels.  It then
renders drop-down buttons for each label with all values found for each
label. Previously, data items that didn't have a label didn't match any label
filter in perfdash and couldn't get selected because perfdash doesn't have
"unset" in it's drop-down menus.

To avoid that, scheduler-perf now collects all labels and then adds missing
labels with "not applicable" as value:

    {
      "data": {
        "Average": 939.7071223010004,
        "Perc50": 927.7987421383649,
        "Perc90": 2166.153846153846,
        "Perc95": 2363.076923076923,
        "Perc99": 2520.6153846153848
      },
      "unit": "ms",
      "labels": {
        "Metric": "scheduler_pod_scheduling_duration_seconds",
        "Name": "SchedulingBasic/5000Nodes/namespace-2",
        "extension_point": "not applicable",
        "result": "not applicable"
      }
    },
    ...
    {
      "data": {
        "Average": 1.1172570650000004,
        "Perc50": 1.1418367346938776,
        "Perc90": 1.5500000000000003,
        "Perc95": 1.6410256410256412,
        "Perc99": 3.7333333333333334
      },
      "unit": "ms",
      "labels": {
        "Metric": "scheduler_framework_extension_point_duration_seconds",
        "Name": "SchedulingBasic/5000Nodes/namespace-2",
        "extension_point": "Score",
        "result": "not applicable"
      }
    },
2023-07-03 21:16:53 +02:00
Patrick Ohly
29e5771aa4 scheduler-perf: shorten "Name" label in metrics
Because the JSON file gets written at the end of the top-level benchmark, all
data items had `BenchmarkPerfScheduling/` as prefix in the `Name` label. This
is redundant and makes it harder to see the actual name. Now that common prefix
gets removed.
2023-07-03 21:15:16 +02:00
Kubernetes Prow Robot
8f79a3d91e
Merge pull request #118915 from astoycos/remove-netpol-leg
remove legacy NetworkPolicy tests
2023-07-03 09:17:04 -07:00
Patrick Ohly
c903c29c3b e2e: support admissionapi.LevelRestricted in test/e2e/framwork/pod
CreatePod and MakePod only accepted an `isPrivileged` boolean, which made it
impossible to write tests using those helpers which work in a default
framework.Framework, because the default there is LevelRestricted.

The simple boolean gets replaced with admissionapi.Level. Passing
LevelRestricted does the same as calling e2epod.MixinRestrictedPodSecurity.

Instead of explicitly passing a constant to these modified helpers, most tests
get updated to pass f.NamespacePodSecurityLevel. This has the advantage
that if that level gets lowered in the future, tests only need to be updated in
one place.

In some cases, helpers taking client+namespace+timeouts parameters get replaced
with passing the Framework instance to get access to
f.NamespacePodSecurityEnforceLevel. These helpers don't need separate
parameters because in practice all they ever used where the values from the
Framework instance.
2023-07-03 16:26:28 +02:00