Commit Graph

29282 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
f7ca45a969 Merge pull request #136530 from saschagrunert/fix-image-volume-symlink-test
Fix image volume subPath test symlink issue
2026-02-03 02:18:34 +05:30
Kubernetes Prow Robot
eba75de156 Merge pull request #136341 from Karthik-K-N/remove-deprecated-methods
Remove usage of deprecated functions from ktesting package
2026-02-02 19:28:31 +05:30
Patrick Ohly
47c3b10e8d DRA integration: increase timeout, II
When running with race detection enabled several tests have suffered from
timeouts recently, with no obvious commit which could be blamed for this.
Let's use a common constant and make it larger.
2026-02-02 09:04:57 +01:00
Kubernetes Prow Robot
de9ac07430 Merge pull request #128606 from pohly/ktesting-interrupt
ktesting: abort entire test suite on SIGINT + /dev/tty
2026-01-31 02:10:24 +05:30
Kubernetes Prow Robot
49fe2ecce1 Merge pull request #135719 from Argh4k/waiting-pod-integration-test
Put pods preempted in WaitOnPermit to backoff queue
2026-01-30 23:36:24 +05:30
Kubernetes Prow Robot
22e1ea92cd Merge pull request #136643 from ardaguclu/kubectl-kuberc-beta
Promote kubectl kuberc commands to beta
2026-01-30 22:20:32 +05:30
Patrick Ohly
36bcd43fca ktesting: abort entire test suite on SIGINT
When aborting an integration test with CTRL-C while it runs,
the current test fails and etcd exits. But additional tests were still being
started and the failed slowly because they couldn't connect to etcd.

It's better to fail additional tests in ktesting.Init when the test run has
already been interrupted.

While at it, also make it a bit more obvious that testing was interrupted by
logging it and update one comment about this and clean up the naming of
contexts in the code.

Example:

    $ go test -v ./test/integration/quota
    ...
    I1106 11:42:48.857162  147325 etcd.go:416] "Not using watch cache" resource="events.events.k8s.io"
    I1106 11:42:48.857204  147325 handler.go:286] Adding GroupVersion events.k8s.io v1 to ResourceManager
    W1106 11:42:48.857209  147325 genericapiserver.go:765] Skipping API events.k8s.io/v1beta1 because it has no resources.
    ^C

    INFO: canceling test context: received interrupt signal

    {"level":"warn","ts":"2024-11-06T11:42:48.984676+0100","caller":"embed/serve.go:160","msg":"stopping insecure grpc server due to error","error":"accept tcp 127.0.0.1:44177: use of closed network connection"}
    ...
    I1106 11:42:50.042430  147325 handler.go:142] kube-apiserver: GET "/apis/rbac.authorization.k8s.io/v1/clusterroles" satisfied by gorestful with webservice /apis/rbac.authorization.k8s.io/v1
        test_server.go:241: timed out waiting for the condition
    --- FAIL: TestQuota (11.45s)
    === RUN   TestQuotaLimitedResourceDenial
        quota_test.go:292: testing has been interrupted: received interrupt signal
    --- FAIL: TestQuotaLimitedResourceDenial (0.00s)
    === RUN   TestQuotaLimitService
        quota_test.go:418: testing has been interrupted: received interrupt signal
    --- FAIL: TestQuotaLimitService (0.00s)
    FAIL
2026-01-30 12:35:57 +01:00
Patrick Ohly
8946e86e3a ktesting: properly clean up
When cleaning up the progress channel properly (stop signal delivery, closing
the channel), the loop dumping progress reports no longer needs to check for
the separate shutdown context. Instead, it can distinguish between "signal
received" and "channel closed".

The signal context was getting cleanup by canceling it, but a channel is better
because it avoids the slightly misleading "received interrupt signal"
cancellation when the test was only shutting down.
2026-01-30 12:35:57 +01:00
Patrick Ohly
d0141640fe ktesting: print info and progress to /dev/tty
The "received interrupt signal" is useful also when running with "go test"
without -v because it shows that the shutdown has started.

But more important is that a progress report gets shown because that feature is
useful in particular when "go test" produces no output while it runs.
2026-01-30 12:35:57 +01:00
Kubernetes Prow Robot
3a477f2332 Merge pull request #135458 from Argh4k/master
Pass threshold to collected metrics in scheduler perf.
2026-01-30 15:11:44 +05:30
Maciej Wyrzuc
f1f3a08ba7 Put pods preempted in WaitOnPermit in backoff queue 2026-01-30 09:38:17 +00:00
Maciej Wyrzuc
264f403ffb Pass threshold to collected metrics in scheduler perf.
With this change, the metrics for which the threshold is defined, will have a "Threshold" data point that should be visible in perf dash.
2026-01-30 08:48:52 +00:00
Arda Güçlü
82826975c9 Add e2e tests for kubectl kuberc commands 2026-01-30 11:15:12 +03:00
Arda Güçlü
4e47d34a0d Promote kubectl kuberc commands to beta 2026-01-30 09:23:14 +03:00
Kubernetes Prow Robot
702e2a3800 Merge pull request #136622 from guettli/e2e-better-msg-when-no-address-found
e2e: Better error message, when no InternalIP was found.
2026-01-30 08:01:48 +05:30
Kubernetes Prow Robot
3760cdc64a Merge pull request #136482 from aaron-prindle/dv-feature-gate-ga
Graduate DeclarativeValidation feature gate to GA
2026-01-30 03:07:48 +05:30
Kubernetes Prow Robot
af6acb8016 Merge pull request #136624 from pohly/dra-integration-timeouts
DRA integration: increase timeout
2026-01-29 22:39:58 +05:30
Kubernetes Prow Robot
8d05750d56 Merge pull request #135262 from cmuuss/auditrulegroupwildcards
added wildcard * for GroupResources to allow filtering of noisy subgr…
2026-01-29 21:11:51 +05:30
Omer Aplatony
10f1b28712 test(hpa): add sample-external-metrics-server (#136251)
Signed-off-by: Omer Aplatony <omerap12@gmail.com>
2026-01-29 19:49:49 +05:30
Patrick Ohly
b96dd6d2f8 DRA integration: increase timeout
When running with race detection enabled several tests have suffered from
timeouts recently, with no obvious commit which could be blamed for this.
Let's use a common constant and make it larger.
2026-01-29 14:13:26 +01:00
Thomas Güttler
9072d47b75 e2e: Better error message, when no InternalIP was found.
Signed-off-by: Thomas Güttler <thomas.guettler@syself.com>
2026-01-29 13:46:33 +01:00
Karthik Bhat
e44e06c53f Remove usage of deprecated functions from ktesting package 2026-01-29 14:51:59 +05:30
Christian Muuß
ea3bfd9ea0 feat: Allow wildcard '*' for API groups in audit policy rules 2026-01-29 08:17:10 +00:00
Aaron Prindle
0cab277183 Graduate DeclarativeValidation feature gate to GA
This change graduates the 'DeclarativeValidation' feature gate to GA in v1.36.
The feature gate is now locked to 'true' by default.

Changes:
- Updated 'DeclarativeValidation' feature gate to GA in 'pkg/features/kube_features.go' and 'staging/src/k8s.io/apiserver/pkg/features/kube_features.go'.
- Updated feature gate documentation and versioned lists via 'hack/update-featuregates.sh'.
- Added feature gate emulation versioning to tests that explicitly disable 'DeclarativeValidation' to prevent panics now that the gate is locked to default.
2026-01-29 05:38:20 +00:00
Kubernetes Prow Robot
5245587ff7 Merge pull request #136596 from aramase/aramase/f/kep_5538_stable_impl
Mark CSIServiceAccountTokenSecrets feature gate as GA
2026-01-29 04:01:48 +05:30
Anish Ramasekar
d6d215821a Mark CSIServiceAccountTokenSecrets feature gate as GA
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>
2026-01-28 14:41:34 -06:00
Kubernetes Prow Robot
6dfae1df46 Merge pull request #136551 from kannon92/fix-pod-replacement-policy-review-nits
Use Log instead of Logf for job integration tests
2026-01-29 00:27:50 +05:30
Kubernetes Prow Robot
0d1b02490b Merge pull request #136590 from mkumatag/fix_version
Fix the semver for the nginx image
2026-01-28 20:40:03 +05:30
Kubernetes Prow Robot
091d147008 Merge pull request #136557 from pohly/ktesting-signal-cleanup
ktesting: progress reporting fix
2026-01-28 15:32:00 +05:30
Manjunath Kumatagi
b2049e9a91 Fix the semver for the nginx image
Signed-off-by: Manjunath Kumatagi <mkumatag@in.ibm.com>
2026-01-28 15:28:12 +05:30
Kubernetes Prow Robot
3dd404d7cd Merge pull request #136544 from aramase/aramase/c/rm_structured_authz_fg
Drop StructuredAuthorizationConfiguration feature gate
2026-01-27 21:43:52 +05:30
Kubernetes Prow Robot
ab78ad32d1 Merge pull request #136194 from bart0sh/PR216-add-signode-approvers-to-dra-owners
add SIG-Node approvers to DRA dirs
2026-01-27 20:15:52 +05:30
Davanum Srinivas
06bd2191ca Apparently some EC2 images we use do not have /proc/net/nf_conntrack
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2026-01-27 10:29:10 +00:00
Davanum Srinivas
65c981be7a test: cleanup from review
- Use netutils.IsIPv6(ip) instead of manual nil/To4 check
- Remove unnecessary ip.To16() call since IPv6 is already 16 bytes
- Remove ipFamily from grep pattern since IP format ensures correctness

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2026-01-27 09:31:04 +00:00
Patrick Ohly
65693b2d2a ktesting: fix setting up progress reporting
The recent change to support importing ktesting into an E2E suite
without progress reporting was flawed:
- If a Go unit test had a deadline (the default when invoked
  by `go test`!), the early return skipped initializing progress
  reporting.
- When it didn't, for example when invoking a test binary directly
  under stress, a test created goroutines which were kept running,
  which broke leak checking in e.g. an integration tests TestMain.

The revised approach uses reference counting: as long as some unit test is
running, the progress reporting with the required goroutines are active.
When the last one ends, they get cleaned up, which keeps the goleak
checker happy.
2026-01-27 10:13:43 +01:00
Patrick Ohly
d91be59690 ktesting: run time-sensitive unit tests as synctest
The TestCause tests were already unreliable in the CI. The others failed under
stress.

As synctest we have to be more careful how to construct and clean up the parent
context for TestCause (must happen inside bubble), but once that's handled we
can reliably measure the (fake) time and compare exactly against expected
results.
2026-01-27 09:18:10 +01:00
Sascha Grunert
59e3b9137e Fix image volume subPath test and add feature tag
Change /etc/os-release to /etc/passwd in subPath test to avoid
symlink issues with Alpine 3.21 (kitten:1.8).

Add Feature:ImageVolume tag to properly categorize tests for CI.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2026-01-27 08:43:06 +01:00
Davanum Srinivas
27c59678f0 test: Fix KubeProxy CLOSE_WAIT test for IPv6 environments
The /proc/net/nf_conntrack file uses fully expanded IPv6 addresses
with leading zeros in each 16-bit group. For example:
  fc00:f853:ccd:e793::3 -> fc00:f853:0ccd:e793:0000:0000:0000:0003

Add expandIPv6ForConntrack() helper function to expand IPv6 addresses
to the format used by /proc/net/nf_conntrack before using them in
the grep pattern.

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2026-01-27 00:35:25 +00:00
Kubernetes Prow Robot
028015267e Merge pull request #136116 from vinayakankugoyal/ga
KEP:2862 Graduate to STABLE.
2026-01-27 05:09:49 +05:30
Kevin Hannon
da76c98b4d Use Log instead of Logf for job integration where we don't have any varidatic arguments 2026-01-26 16:39:00 -05:00
Anish Ramasekar
a1478c7730 Drop StructuredAuthorizationConfiguration feature gate
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>
2026-01-26 11:35:39 -06:00
Carlos Panato
5e54532bf4 Bump images and versions to go 1.25.6 and distroless iptables
Signed-off-by: Carlos Panato <ctadeu@gmail.com>
2026-01-26 18:04:17 +01:00
Kubernetes Prow Robot
3d544b9142 Merge pull request #136474 from ShaanveerS/netpol-revive-135706
Netpol: reduce e2e pod churn with agnhost porter
2026-01-26 20:59:59 +05:30
Kubernetes Prow Robot
53b29a3a2c Merge pull request #136269 from pohly/dra-scheduler-double-allocation-fixes
DRA scheduler: double allocation fixes
2026-01-26 20:59:50 +05:30
Patrick Ohly
001ec49eb6 DRA integration: more pods per node, more parallelism
Long running tests like TestDRA/all/DeviceBindingConditions (42.50s)
should run in parallel with other tests, otherwise the overall runtime is too
high.

This then must allow more pods per node to avoid blocking scheduling.
2026-01-26 15:44:49 +01:00
Patrick Ohly
2198d96520 DRA integration: add "uses all resources" test
This corresponds to an E2E test which sometimes (but very rarely) flaked in the
CI.
2026-01-26 15:44:48 +01:00
Kubernetes Prow Robot
437184c055 Merge pull request #136292 from atombrella/feature/modernize_plusbuild
Remove obsolete `// +build` instruction.
2026-01-26 19:05:59 +05:30
Kubernetes Prow Robot
e0cd8e3897 Merge pull request #136529 from dims/fix-kube-proxy-conntrack-test
test: Read /proc/net/nf_conntrack instead of using conntrack binary
2026-01-26 17:35:52 +05:30
Davanum Srinivas
7f2c4535c3 test: Read /proc/net/nf_conntrack instead of using conntrack binary
The distroless-iptables image no longer includes the conntrack binary
as of v0.8.7 (removed in kubernetes/release#4223 since kube-proxy no
longer needs it after kubernetes#126847).

Update the KubeProxy CLOSE_WAIT timeout test to read /proc/net/nf_conntrack
directly instead of using the conntrack command. The file contains the
same connection tracking data and is accessible from the privileged
host-network pod.

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2026-01-26 07:42:07 +00:00
Mads Jensen
757647786d Remove redundant re-assignments in for-loops in test/{e2e,integration,utils}
The modernize forvar rule was applied. There are more details in this blog
post: https://go.dev/blog/loopvar-preview
2026-01-25 22:58:27 +01:00