Commit graph

3874 commits

Author SHA1 Message Date
Kubernetes Prow Robot
eaa04458b2
Merge pull request #138961 from soltysh/simplify_exec
Replace remote executor code with the DefaultExecutor from kubectl
2026-05-13 16:00:28 +05:30
Maciej Szulik
61e5542da9
Replace remote executor code with the DefaultExecutor from kubectl
Signed-off-by: Maciej Szulik <soltysh@gmail.com>
2026-05-11 16:59:31 +02:00
Maciej Szulik
8ecec5b156
Eliminate too many ExecWithOptions helpers
Signed-off-by: Maciej Szulik <soltysh@gmail.com>
2026-05-11 16:59:07 +02:00
Sotiris Salloumis
5486715fbf Move kubeletHealthCheck from e2enode to node
To reduce duplication of code and overcome import cycle
not allowed error during compile time, when used in non
e2e_node packages.
2026-05-05 20:39:07 +02:00
Patrick Ohly
cc391e25ba E2E framework: avoid duplicate FeatureGate tags
75448c416b added feature gate dependencies at the end of a test
name. However, if those tags were already part of the previous text, either
because they were explicitly added in the current node or in some parent node,
then redundant tags were added.

Now this special case is detected and such redundant tags do not get added
again.
2026-04-28 11:15:20 +02:00
Patrick Ohly
75448c416b e2e framework: document also feature gate dependencies
This shouldn't substantially change which tests run in jobs (an on-by-default
beta feature can only depend on other on-by-default features, for example), but
it makes the FeatureGate list in the test name more complete.

The additional feature gate names are treated like additional meta data and get
added at the end of the full test name.
2026-04-27 11:48:01 +02:00
Kubernetes Prow Robot
75d51c4407
Merge pull request #138258 from pohly/ktesting-cgo
ktesting dependencies
2026-04-27 06:48:46 +05:30
Kubernetes Prow Robot
fd557f3d2a
Merge pull request #134708 from pohly/e2e-unified-meta-labels
e2e framework: inject additional labels only once to leaf node
2026-04-25 02:50:46 +05:30
Patrick Ohly
84190acdaa ktesting: move format package
The format package is used by ktesting, both to reconfigure Gomega and to
format errors, therefore it has to be moved to staging together with ktesting,
if or when we get to that because those are desirable features.

Because format only has the YAML package as additional dependency and that
should be okay for all other repos (except for the YAML package itself, of
course), we can publish the format package as a sub-package of such a future
ktesting module.

Avoiding the dependency on apimachinery to detect unstructured.Unstructured is
a bit tricky, but doable by relaxing what we check for. The test/utils/format
package is kept to test ktesting/format with the actual packages that it cannot
depend on (apimachinery, api).
2026-04-24 21:54:19 +02:00
Patrick Ohly
67800794aa ktesting: create client-go/ktesting
The client-go variant of ktesting is a superset of the normal
ktesting, which makes it possible to get the full original
functionality simply by changing the import path.
2026-04-24 21:54:19 +02:00
Patrick Ohly
103b1086a5 WIP: ktesting: pass clients via WithValue
This enables passing the client-go clients and helpers via TContext.WithValue.

The advantage of this approach is that the implementation is small. The
downside is that all call sites need to be updated and need two imports. It's
also not discoverable from the TContext type that it may provide clients.

Only a few callers get updated to demonstrate the usage.
2026-04-24 21:54:19 +02:00
Kubernetes Prow Robot
b382ac866c
Merge pull request #137612 from bishal7679/fix/hpa-configurable-tolerance-e2e-deterministic-cpu-load
fix: [sig-autoscaling] flaky HPAConfigurableTolerance e2e should scale up but should not scale down
2026-03-21 23:28:17 +05:30
bishal7679
9488ac9218 wrap per-pod proxy call with gomega.Eventually for transient retries 2026-03-19 10:59:27 +05:30
Jefftree
b8a17e1ce8 sharding: implement UID-based sharding for list and watch (KEP-5866) 2026-03-17 16:44:15 -04:00
bishal7679
69332dec79 refactor: remove headless service 2026-03-17 10:37:04 +05:30
Davanum Srinivas
1ee1ff97fb
staging: extract CRI streaming modules with client-go compatibility
Extract streaming code into dedicated staging modules while keeping stable
compatibility APIs for external client-go consumers.

This commit:
- adds `k8s.io/cri-streaming` for CRI exec/attach/portforward server code
- adds `k8s.io/streaming` as the canonical home for shared transport
  primitives (`httpstream`, `spdy`, `wsstream`, runtime helpers)
- switches in-tree transport consumers to `k8s.io/streaming`
- removes in-tree kubelet CRI streaming package
- preserves NO_PROXY/no_proxy CIDR handling in extracted SPDY proxier logic
- adds deprecated `k8s.io/apimachinery/pkg/util/httpstream` compatibility
  wrappers (`httpstream`, `spdy`, `wsstream`) backed by `k8s.io/streaming`
- restores exported client-go SPDY/portforward API signatures to
  apimachinery `httpstream` types for downstream compatibility
- adds streaming-native client-go adapters/constructors so in-tree callers
  can use `k8s.io/streaming` without changing external compatibility APIs
- deduplicates SPDY-over-websocket dial negotiation shared by compat and
  streaming tunneling dialers
- logs dropped unknown stream types in `RemoveStreams` adapter fallbacks to
  improve compatibility-path debuggability
- adds integration coverage for the streaming-upgrader-to-client-go-compat
  adapter path against a real cri-streaming exec endpoint
- clarifies kubectl streaming import aliasing to avoid `httpstream` package
  ambiguity
- updates tests, import restrictions, publishing metadata, and vendor/module
  metadata for the new staging modules

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2026-03-12 09:59:55 -04:00
bishal7679
260c856fc2 fix: deterministic CPU load distribution for HPAConfigurableTolerance e2e test 2026-03-12 15:03:55 +05:30
Kubernetes Prow Robot
08b192cdd1
Merge pull request #137626 from pohly/dra-e2e-with-kubelet-version
E2E framework: introduce WithKubeletMinVersion helper
2026-03-12 13:55:37 +05:30
bishal7679
3a56126347 fix: remove GetReplicas multiplication and dead sendConsumeCPURequestPerPod function 2026-03-11 20:28:06 +05:30
Maciej Szulik
d11acb0d89
Re-use existing helper for port-forwarding in autoscaling utils
Signed-off-by: Maciej Szulik <soltysh@gmail.com>
2026-03-11 15:24:15 +01:00
Patrick Ohly
9d9f4ddd88 E2E framework: introduce WithKubeletMinVersion
This simplifies specifying the minimum required kubelet (a bit shorter overall,
harder to introduce typos because the string is shorter) and enables usage of
`--sem-ver-filter`.

Jobs that filter by label or text continue to work as before.

As a proof-of-concept, the DRA tests are labeled using the new helper
and are tested with canary jobs which use --sem-ver-filter. The normal
jobs which rely on the label still work.
2026-03-11 09:47:27 +01:00
bishal7679
4ddb7d8166 test: fix flaky HPAConfigurableTolerance e2e by deterministic per-pod CPU load
Signed-off-by: bishal7679 <bishalhnj127@gmail.com>
2026-03-11 13:33:48 +05:30
Kubernetes Prow Robot
0fbb89c81c
Merge pull request #137535 from danwinship/nodeip-e2e-cleanups
e2e cleanups related to node IPs
2026-03-10 02:59:19 +05:30
Dan Winship
6ebabf3198 Fix the semantics of e2essh.NodeSSHHosts on error
If it failed to find an IP for every node, it returned a partial list
along with an error. However, (a) this should never happen since every
scheduleable node should have at least one usable IP, and (b) it
didn't matter since all of its callers just treat any error as being
fatal anyway. So just remove the special case.
2026-03-07 10:52:48 -05:00
Dan Winship
0ffb815750 Drop e2enode.FirstAddress
which was no longer used anyway
2026-03-07 10:45:07 -05:00
Dan Winship
b68e2ac8a5 Drop e2enode.PickIP(), fix its one caller
This returned a randomly-selected IP from across all nodes, preferring
ExternalIP but falling back to an InternalIP. But it was only called
from one place, which was connecting from inside the cluster and thus
wanted an InternalIP anyway.
2026-03-07 10:45:07 -05:00
Dan Winship
6302e3a94f Inline a Service jig helper into a test
jig.GetEndpointNodesWithIP was only used by one test, and that test
didn't even want the data in the form jig.GetEndpointNodesWithIP
provided it in. So just inline the code and generate the data
correctly the first time, and remove GetEndpointNodesWithIP (along
with GetEndpointNodes, which was already unused).
2026-03-07 10:45:06 -05:00
Mads Jensen
1f2b70a043 Lint: Use modernize/rangeint in test/{e2e,e2e_node,images,soak} 2026-03-07 10:17:31 +01:00
Jordan Liggitt
45900a1deb
Fix vet error 2026-03-05 18:11:02 -05:00
Kubernetes Prow Robot
691a44c3b5
Merge pull request #137119 from danwinship/dual-stack-tests
dual stack test fixups
2026-02-25 19:43:47 +05:30
Dan Winship
a401451df8 Drop NodeKiller
This was supposed to have been removed shortly after it was added (the
functionality was moved to kubernetes/perf-tests, where it has since
been improved).
2026-02-21 08:30:04 -05:00
Kubernetes Prow Robot
8812ec563c
Merge pull request #134353 from skitt/drop-string-slice
Deprecate obsolete slice utility functions
2026-02-20 00:57:41 +05:30
Dan Winship
8c9b2153e1 Remove some more dead code 2026-02-19 09:10:02 -05:00
Dan Winship
db71bd462f Remove test/e2e/framework/ingress
Nothing uses this any more (all the code that used it was removed
along with the GCP provider).
2026-02-19 09:10:02 -05:00
Dan Winship
755a7261ee Fix some dual-stack tests to use svc.Spec.IPFamilies 2026-02-18 13:52:36 -05:00
atilsensalduz
7e3bd4cfa5 chore(test/autoscaling): replace RC with ReplicaSet and update deprecated API versions in HPA e2e
Signed-off-by: atilsensalduz <atil.sensalduz@gmail.com>
2026-02-17 14:01:02 +03:00
Kubernetes Prow Robot
c99adcec1a
Merge pull request #136799 from omerap12/external-metrics-e2e
Add e2e test for external metrics
2026-02-16 19:44:02 +05:30
Stephen Kitt
d42d1e3d1f
Deprecate obsolete slice utility functions
... and update users to use standard library functions.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2026-02-16 10:04:33 +01:00
Kubernetes Prow Robot
7b21ce7c9a
Merge pull request #136905 from bart0sh/PR222-e2e-fix-extended-resource-flake
Fix extended resource flake
2026-02-11 21:56:02 +05:30
Ed Bartosh
02485d02ea DRA: e2e: move util_sampledevice.go to e2e/node/framework
- Moved sample device plugin constants and helper code to the
test/e2e/node/framework, so that both deviceplugin and DRA tests can
use it without creating e2e -> e2e_node dependency.

- Moved SampleDevsAmount constant from the
test/e2e_node/device_plugin_test.go
2026-02-11 16:07:17 +02:00
Mads Jensen
7883039b31 Remove unneeded use of fmt.Sprintf in test/{integration,e2e} 2026-02-08 14:34:13 +01:00
Omer Aplatony
d712e0e99c Add e2e test for external metrics
Signed-off-by: Omer Aplatony <omerap12@gmail.com>
2026-02-08 08:58:18 +00:00
Kubernetes Prow Robot
e74193bcbf
Merge pull request #135917 from zylxjtu/registry
Add the fake registry server functionality to agnhost windows
2026-02-04 07:56:28 +05:30
Kubernetes Prow Robot
e2ce7dfbce
Merge pull request #135788 from BenTheElder/etcd-tag
remove build tags from e2e internal unit test with etcd
2026-02-03 14:16:28 +05:30
Benjamin Elder
2d8a26a79c remove build tags from test e2e internal unittests 2026-02-02 11:35:53 -08:00
zylxjtu
979f73bf7d Add the fake registry server functionality to agnhost windows
there are recent changes in k8s e2e test for image pull test to switch
to use fake registry server,
https://github.com/kubernetes/kubernetes/pull/133272
https://github.com/kubernetes/kubernetes/pull/134453

Unfortunately, this does not take into account of windows node. so the
corresonding test on windows node strat to break

The try to address this issue, by
(1): update the agnhost windows image to include the fake registery server
functionality as well

(2): update the (common) pull image test to include windows node, will require
(a): deploy the agnhost faker register server as a HPC pod
(b): update the comanndline/options for the windows container specific
2026-02-02 19:00:29 +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
Patrick Ohly
dd78c81057 E2E framework ssh: avoid log spam in runSSHCommand
Emitting "error dialing" on each retry spams the test log output even when the
tests succeed.

Using Eventually also has other advantages (better failure message, support for
Gingko progress reports when a test is stuck).
2026-01-22 12:00:09 +01:00
Sotiris Salloumis
d9c3ec29ad Move getNodeAllocatableAndAvailableValues to framework
To allow use of this good method from future tests using
e2enode test framework.
2026-01-21 19:41:08 +01:00
Patrick Ohly
0c9c7ce40d E2E framework: fix nil pointer crash in TContext
Not all framework instances have a default namespace. TContext
crashed for those.

(cherry picked from commit 80cc14831e)

This got merged in https://github.com/kubernetes/kubernetes/pull/136140,
then reverted in https://github.com/kubernetes/kubernetes/pull/136151 and was
not brought back in https://github.com/kubernetes/kubernetes/pull/136156.
2026-01-19 10:51:24 +01:00