Commit Graph

131178 Commits

Author SHA1 Message Date
Patrick Ohly
c8ca9249ac DRA integration: add upgrade/downgrade testing with local-up-cluster.sh
The test brings up the cluster and uses that power to run through
an upgrade/downgrade scenario. Version skew testing (running tests while the cluster
is partially up- or downgraded) could be added.

The new helper code for managing the cluster is written so that it could be
used both in an integration test and an E2E
test. https://github.com/kubernetes/kubernetes/pull/122481 could make that a
bit easier in an E2E test, but is not absolutely required.

In contrast to running on a normal cluster, pods need no privileges.
Instead, the caller has to make sure that the test itself can write
into system directories used by the cluster.
2025-07-15 12:54:40 +02:00
Patrick Ohly
60e9316c0c DRA E2E: refactor helper code
The helper code is useful for a separate Ginkgo suite for upgrade/downgrade
testing. We don't want to import test/e2e/dra there because that would also
define additional tests.
2025-07-15 12:54:40 +02:00
Patrick Ohly
2e3228e2ca DRA E2E: support deploying driver on localhost
If we know that the test binary shares the filesystem with the cluster (for
example, when using local-up-cluster.sh), then we can avoid the whole
complicated portproxy solution and work directly with the paths on the
host.

Only works with suitable permissions! /var/lib/kubelet/plugins,
/var/lib/kubelet/plugin_registry, and /var/run/cdi must be writable.

portproxy remains the default because it automatically gains sufficient
permissions also when combined with local-up-cluster.sh.
2025-07-15 12:52:27 +02:00
Patrick Ohly
e5f57d2cfa ktesting: add WithoutCancel
This closes a gap compared to the context package. It's useful when combined
with Ginkgo to keep something running beyond the end of the Ginkgo BeforeEach
or It node.
2025-07-15 12:52:27 +02:00
Patrick Ohly
e01603b2e3 ktesting: document side effect of SetDefaultVerbosity during init 2025-07-15 12:52:27 +02:00
Patrick Ohly
0b1bed1a1e ktesting: WithCancel does not cancel on test completion anymore
That WithCancel added a deferred cleanup which cancels on test termination was
unexpected. This automatic cancellation makes sense only for the initial root
TContext.
2025-07-15 12:52:27 +02:00
Patrick Ohly
f381d73724 DRA E2E: retry exec of hostpathplugin
We can recover from exec failing, the portproxy code already retries port
forwarding.
2025-07-15 12:52:27 +02:00
Patrick Ohly
c2080e7e45 DRA E2E: support using ktesting
This is a DRA-specific stop-gap solution for using the E2E framework together
with ktesting. Long-term this should better land in the E2E framework itself.
2025-07-15 12:52:27 +02:00
Patrick Ohly
906505281f ktesting: add step Begin/End
This allows declaring a code region as one step without having to use
an anonymous callback function, which has the advantage that variables
set during the step are visible afterwards.

In Python, this would be done as

    with ktesting.Step(tctx) as tcxt:
        // some code code inside step
    // code not in the same step

But Go has no such construct.

In contrast to WithStep, the start and end of the step are logged, including
timing information.
2025-07-15 12:52:27 +02:00
Patrick Ohly
b7c2d6aba5 ktesting: skip logging error when capturing it
Hiding the error in WithError is the right choice for example
when it is used inside ktesting.Eventually. Most callers probably want to deal
with the unexpected error themselves. For those who don't, WithErrorLogging
continues to log it.
2025-07-15 12:52:27 +02:00
Patrick Ohly
4977163860 DRA E2E: reduce port proxy verbosity
During upgrade/downgrade testing, errors are encountered while the apiserver is
down. This is normal and handled via retrying, so we don't need to be verbose.
2025-07-15 12:52:26 +02:00
Patrick Ohly
5721c927e6 DRA E2E: increase verbosity of resource claim controller
Can be done via -vmodule, albeit not precisely because other controllers
also have a controller.go file.
2025-07-15 12:52:26 +02:00
Patrick Ohly
1a284472f1 E2E framework: retry also on EOF errors
EOF occurs after restarting the API server and, despite a retry loop in
client-go/rest/request.go, sometimes is returned to the application.
2025-07-15 12:52:26 +02:00
Patrick Ohly
6a7b9589f6 E2E framework: support setting REST config
A special test (for example, one which manages its own cluster) could almost
construct a Framework instance because most fields are exported. The
`clientConfig` field isn't because REST configs often need to be deep-copied to
avoid accidentally updating some shared copy, so for this special case a
SetClientConfig is needed.
2025-07-15 12:52:26 +02:00
Kubernetes Prow Robot
e3b20c07d6 Merge pull request #132870 from pohly/dra-allocator
DRA: refactor claim allocator
2025-07-15 01:28:29 -07:00
Kubernetes Prow Robot
3d007ecdfa Merge pull request #132776 from neolit123/1.34-fix-unnamed-ports-in-manifests
kubeadm: use named ports in static pod manifests
2025-07-15 01:28:22 -07:00
Kubernetes Prow Robot
fe13474f61 Merge pull request #106225 from shawnhanx/certificates_cleaner
cleaner.go should use time.Until instead of t.Sub(time.Now())
2025-07-14 23:44:24 -07:00
Kubernetes Prow Robot
bdb7a01946 Merge pull request #132890 from atiratree/replicaset-conversion
add Replicaset -> ReplicationController conversion test
2025-07-14 22:32:29 -07:00
Kubernetes Prow Robot
48e04d0d6c Merge pull request #132871 from dims/bump-k8s.io/kube-openapi-to-latest-SHA-f3f2b991d03b
Bump k8s.io/kube-openapi to latest SHA (f3f2b991d03b) and sigs.k8s.io/structured-merge-diff/{v4 => v6}
2025-07-14 22:32:22 -07:00
Kubernetes Prow Robot
9f97857669 Merge pull request #132513 from xiaoweim/validation-cleanup-invalid
Cleanup: Remove field name from invalid field detail message
2025-07-14 21:04:28 -07:00
Kubernetes Prow Robot
c34c70b2db Merge pull request #131200 from ntnn/kcp3350-client-go
Update docs on workqueue to match implementation
2025-07-14 21:04:22 -07:00
Kubernetes Prow Robot
63da385748 Merge pull request #132934 from ylink-lfs/chore/residual_strptr_removal
chore: residual strPtr utility removal with ptr.To
2025-07-14 16:42:53 -07:00
Kubernetes Prow Robot
51f478ef10 Merge pull request #132906 from aroradaman/service-repairip-race-fix
service-ip-alloc: delay ip processing on service recreate
2025-07-14 16:42:45 -07:00
Kubernetes Prow Robot
3430e34d88 Merge pull request #132656 from liggitt/selector-authz
KEP-4601: Graduate selector authorization to stable
2025-07-14 16:42:38 -07:00
Kubernetes Prow Robot
3bab7bccd3 Merge pull request #132219 from BenTheElder/conformance-ordered
Promote OrderedNamespaceDeletion test to Conformance
2025-07-14 16:42:30 -07:00
Kubernetes Prow Robot
c2cd859eaf Merge pull request #131458 from BenTheElder/hostnetwork-docs
document hostnetwork <> port implications
2025-07-14 16:42:23 -07:00
Kubernetes Prow Robot
11f7fd5f44 Merge pull request #132932 from serathius/apf_use_size
Use object size to estimate list cost assigning 1 seat per 100KB
2025-07-14 15:34:29 -07:00
Kubernetes Prow Robot
8790d5b819 Merge pull request #132341 from dashpole/graduate_kubelet_tracing
Promote KubeletTracing featuregate to GA
2025-07-14 15:34:23 -07:00
xiaoweim
0d8fd61e64 address review comments 2025-07-14 21:10:37 +00:00
Jordan Liggitt
4f77a46186 Generated files 2025-07-14 16:19:52 -04:00
Jordan Liggitt
a04e7cf5eb KEP-4601: Graduate selector authorization to stable 2025-07-14 16:19:52 -04:00
Patrick Ohly
6f4be0d8c9 DRA allocator: skip unsupported test cases
Previously, they were not even started. Skipping them makes them visible in `go
test -v` output.

To simplify producing the list of unsupported features, conversion to a set
replaces the hand-written FeaturesAnd.
2025-07-14 21:07:45 +02:00
Kubernetes Prow Robot
4ffb58f6d7 Merge pull request #132931 from pohly/dra-e2e-device-plugin
DRA E2E: test mixture of extended resources + ResourceClaim
2025-07-14 12:06:30 -07:00
Kubernetes Prow Robot
bf0be9fb56 Merge pull request #132028 from ffromani/podresources-list-active-pods
podresources: list: use active pods
2025-07-14 12:06:24 -07:00
xiaoweim
740e568468 address review comments 2025-07-14 18:13:00 +00:00
xiaoweim
61542e7a98 Cleanup: Remove field name from invalid field detail message 2025-07-14 18:13:00 +00:00
Kubernetes Prow Robot
1127e02789 Merge pull request #132928 from p0lyn0mial/upstream-watchlist-reflector-table-unsupported
reflector: detects unsupported meta.Table gvks for watchlist
2025-07-14 10:22:23 -07:00
ylink-lfs
ad03cb8733 chore: residual strPtr utility removal with ptr.To 2025-07-15 00:31:20 +08:00
Patrick Ohly
af249fb2e9 DRA E2E: test mixture of extended resources + ResourceClaim
This shows that a device plugin and DRA driver can be used together on the same
node.
2025-07-14 18:13:27 +02:00
Kubernetes Prow Robot
bd6e6e80cb Merge pull request #132884 from serathius/watchcache-detect-inconsistency
Enable running cache inconsistency detection by default
2025-07-14 09:12:31 -07:00
Kubernetes Prow Robot
cb0b66a89f Merge pull request #132645 from serathius/kep-2340-ga
Graduate ConsistentListFromCache to GA
2025-07-14 09:12:24 -07:00
Marek Siarkowicz
85adda5e68 Use object size to estimate list cost assigning 1 sear per 100KB 2025-07-14 16:58:58 +02:00
Lukasz Szaszkiewicz
7d9eb2b3d0 test/apimachinery/watchlist: update tests that receive resources in Table format 2025-07-14 16:09:29 +02:00
Lukasz Szaszkiewicz
da7c55e0d2 reflector: detects unsupported meta.Table gvks for watchlist 2025-07-14 15:42:57 +02:00
Davanum Srinivas
ebc1ccc491 Bump k8s.io/kube-openapi to latest SHA (f3f2b991d03b)
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2025-07-14 07:24:48 -04:00
Lukasz Szaszkiewicz
8d1cbc83d8 endpoints/handlers/get: remove watchListEndpointRestrictions 2025-07-14 13:02:14 +02:00
Kubernetes Prow Robot
b266ac2c3e Merge pull request #132840 from ppmechlinski/increase-volume-binder-verbosity
Increase verbosity of frequently printed loglines in binder plugin
2025-07-14 03:44:30 -07:00
Kubernetes Prow Robot
01d50ae1c5 Merge pull request #132730 from onasser1/scheduling-queue-cleanup
Move unschedulablePods struct to a separate file
2025-07-14 03:44:23 -07:00
Kubernetes Prow Robot
111a2a0d2d Merge pull request #131850 from wongchar/odd-integer-cpu
cpumanager: uncorecache alignment for odd integer cpus
2025-07-14 00:32:23 -07:00
Kubernetes Prow Robot
30905afc24 Merge pull request #132920 from ylink-lfs/chore/maxptr_removal
chore: maxPtr utility removal with ptr.To
2025-07-13 22:24:22 -07:00