Commit Graph

123354 Commits

Author SHA1 Message Date
Tomas Tormo
8d7c113434 Test that the DisruptionTarget condition is added at preemption 2024-06-17 16:59:52 +00:00
Lukasz Szaszkiewicz
efef32652a
apiserver/storage: factor PrepareContinueToken to a new function (#125548)
* apiserver/storage/continue: intro PrepareContinueToken

PrepareContinueToken prepares optional
parameters for retrieving additional results for a paginated request.

This function sets up parameters that a client can use to fetch the remaining results
from the server if they are available.

* apiserver/storage/etcd3: refactor to use PrepareContinueToken
2024-06-17 07:47:19 -07:00
HirazawaUi
f9693e0c0a Implement QueueingHintFn for pod deleted event 2024-06-17 22:42:04 +08:00
Kubernetes Prow Robot
fb7bbd2e5d
Merge pull request #125054 from bridgetkromhout/sig-cloud-provider-update
SIG Cloud Provider update
2024-06-17 05:08:01 -07:00
Kubernetes Prow Robot
274a907351
Merge pull request #124661 from gjtempleton/SIG-Autoscaling-Leads-Update
SIG Autoscaling - Update Leads
2024-06-17 05:07:52 -07:00
Kubernetes Prow Robot
159d4b837a
Merge pull request #124444 from claudiubelu/windows/fix-container-log-rotation
windows: Fixes following container log rotation
2024-06-17 03:32:19 -07:00
Stephen Kitt
08dfd59305
Run codegen
Signed-off-by: Stephen Kitt <skitt@redhat.com>
2024-06-17 11:20:50 +02:00
Stephen Kitt
3734f5bf9b
Generify client-go
This adds a generic implementation of a clientset, and uses it to
replace the template code in generated clientsets for the default
methods. The templates are preserved as-is (or as close as they can
be) for use in extensions, whether for resources or subresources.

Clientsets with no extensions are reduced to their main getter, their
interface, their specific struct, and their constructor. All method
implementations are provided by the generic implementation. The
dedicated interface is preserved so that each clientset can have its
own set of methods, and the dedicated struct is preserved to allow
extensions and expansions to be defined where necessary.

Instead of handling the variants (with/without namespace, list, apply)
with a complex sequence of if statements, build up an index into an
array containing the various declarations.

The namespaced/non-namespaced distinction matters in the code
templates, but not in the methods themselves, so drop all the
non-namespaced variants and pass in "" explicitly.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2024-06-17 11:20:50 +02:00
Patrick Ohly
d88a153086 scheduler_perf: add DRA structured parameters test with shared claims
Several pods sharing the same claim is not common, but can be useful and thus
should get tested.

Before, createPods and createAny operations were not able to do this because
each generated object was the same. What we need are different, predictable
names of the claims (from createAny) and different references to those in the
pods (from createPods). Now text/template processing with the index number of
the pod respectively claim as input is used to inject these varying fields. A
"div" function is needed to use the same claim in several different pods.

While at it, some existing test cases get cleaned up a bit (removal of
incorrect comments, adding comments for testing with queuing hints).
2024-06-17 10:13:22 +02:00
Kubernetes Prow Robot
c142814f6c
Merge pull request #125029 from neolit123/1.31-enable-v1beta4
kubeadm: enable the v1beta4 API
2024-06-17 01:12:22 -07:00
Lubomir I. Ivanov
09078d4810 kubeadM: allow conversion of TimeoutForControlPlane
v1beta3.ClusterConfiguration.APIServer.TimeoutForControlPlane
must be migrated to {Init|Join}Configuration.Timeouts.
.ControlPlaneComponentHealthCheck.

To achieve this sort of cross-Kind migration do the following:
- Use a temporary, thread-safe variable in timeoututils.go
- Make the order of GVKs in documentMapToInitConfiguration
deterministic.
2024-06-17 10:07:33 +03:00
Lubomir I. Ivanov
4af99cd676 kubeadm: deprecate v1beta3
Mark v1beta3 as deprecated by showing a warning when used
and write a note about it in the doc.go file.
2024-06-17 10:07:33 +03:00
Lubomir I. Ivanov
bc92a0dfe9 kubeadm: continue supporting extraArgs flags for v1beta4
Flags for kubeadm init such as --apiserver-extra-args prior
to v1beta4 used a map[string]string for pflag.Value storage. This no
longer works since v1beta4 extra args are a slice of Arg.

Add a new flag type argSlice and implement a solution for
parsing these flags.

At the same time deprecate these flags and show a warning
that users should use config.
2024-06-17 10:07:32 +03:00
Lubomir I. Ivanov
cc539cd600 kubeadm: more validation for Upgrade|ResetConfiguration
- Add unit tests for ValidateUpgrade|ResetConfiguration
- Add two more validation points in ValidateUpgradeConfiguration
2024-06-17 10:07:32 +03:00
Lubomir I. Ivanov
8a5f849c66 kubeadm: keep v1beta3 only in required code paths
Use v1beta4 everywhere and only use v1beta3
in a few required locations:
- kubeadm-config map handling
- unit and integration tests
2024-06-17 10:07:32 +03:00
Lubomir I. Ivanov
d0c656dc19 kubeadm: don't default ExtraEnvs to an empty slice
Instead of defaulting ExtraEnvs for CP components to an empty
slice when converting from/to v1beta3 keep it nil.

This allows for expecting a nil value in the internal
config, similarly to ExtraArgs.
2024-06-17 10:07:32 +03:00
Lubomir I. Ivanov
66c7fc5ab4 kubeadm: update migration logic from v1beta3 to 4
Treat v1beta4 as non experimental API when migrating.
Update unit tests.
2024-06-17 10:07:32 +03:00
Lubomir I. Ivanov
fb1fcd2d3b kubeadm: move v1beta4 to high priority in API scheme 2024-06-17 10:07:32 +03:00
Lubomir I. Ivanov
b9f7661ab8 kubeadm: add missing "kubeadm config print upgrade-defaults" 2024-06-17 10:07:32 +03:00
Lubomir I. Ivanov
6544d19796 kubeadm: update godoc and comments for v1beta4
- Include some more examples related to v1beta4 in the doc.go.
- Fix some typos in v1beta4 field comments.
- Add missing JSON tag for UpgradeConfiguration.Apply.SkipPhases.
2024-06-17 10:07:32 +03:00
Stephen Kitt
75bcc7d6df
Run codegen
Signed-off-by: Stephen Kitt <skitt@redhat.com>
2024-06-17 09:04:57 +02:00
Stephen Kitt
283aaaffc0
Add a non-subresource genclient:method example
Extension methods on the main resource are supported by client-gen,
but unused in k/k; to detect regressions in future changes to
client-gen, add a minimal example (this should be turned into a proper
test).

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2024-06-17 09:04:57 +02:00
Stephen Kitt
c982ce1891
Run codegen
Signed-off-by: Stephen Kitt <skitt@redhat.com>
2024-06-17 09:04:56 +02:00
Stephen Kitt
939345eb79
Fix "an declarative" typo
Signed-off-by: Stephen Kitt <skitt@redhat.com>
2024-06-17 09:04:56 +02:00
Stephen Kitt
55ea0a5535
Run codegen
Signed-off-by: Stephen Kitt <skitt@redhat.com>
2024-06-17 09:04:56 +02:00
Stephen Kitt
53356d5516
Add a Name getter in named ApplyConfigurations
This will be used when generifying client-go: applying
ApplyConfigurations requires extracting their name, which is currently
done by accessing the corresponding public field directly; but that
can't be done with interfaces, which is what have to be used with
generics.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2024-06-17 09:04:49 +02:00
Kensei Nakada
dd3af9a85b fix: skip isPodWorthRequeuing only when SchedulingGates gates the pod 2024-06-17 01:14:34 +00:00
Kubernetes Prow Robot
ef9965ebc6
Merge pull request #125528 from seans3/port-forward-beta
PortForward over Websockets Graduates to Beta
2024-06-16 13:59:32 -07:00
Kubernetes Prow Robot
debd99542f
Merge pull request #125478 from aroradaman/handle-index-error
e2e/framework/metrics: handle index out of bounds panic
2024-06-16 12:46:29 -07:00
Kubernetes Prow Robot
0fd6746b2a
Merge pull request #125518 from pohly/scheduler-perf-cleanup-fix
scheduler_perf: shut down apiserver clients before apiserver
2024-06-16 10:03:29 -07:00
Kubernetes Prow Robot
9de747cc01
Merge pull request #125434 from ffromani/e2e-node-annotate-pods
e2e: node: add feature to annotate pods with owning code
2024-06-16 04:27:28 -07:00
Sean Sullivan
3ae3b4ea55 Graduate PortForwardWebsockets to Beta 2024-06-15 16:09:23 -07:00
Daman Arora
9fd1a21693 e2e/framework/metrics: handle index out of bounds panic
Signed-off-by: Daman Arora <aroradaman@gmail.com>
2024-06-15 00:42:11 +05:30
Kubernetes Prow Robot
c3689b9f8b
Merge pull request #125509 from p0lyn0mial/upstream-improve-watchlist-reflector-e2e
e2e/apimachinery/watchlist: when comparing streamed data do not call the API directly instead use the added data.
2024-06-14 11:36:18 -07:00
Michal Wozniak
7a3d73d234 Remove redundant check in Job success policy code 2024-06-14 19:59:40 +02:00
Michal Wozniak
18a14bcff9 Remove unused parameter in Job controller function 2024-06-14 19:43:19 +02:00
Kubernetes Prow Robot
e6616033cb
Merge pull request #120844 from bzsuni/cleanup/sets/kubelet
[kubelet] Use a generic Set instead of a specified Set
2024-06-14 09:09:17 -07:00
DrAuYueng
52959abc95 Remove redundant nil check 2024-06-14 22:28:07 +08:00
Mykhailo Bobrovskyi
aa01f7058a Fix openapi-gen dependency. 2024-06-14 15:47:39 +03:00
Lukasz Szaszkiewicz
6cc90d76db e2e/apimachinery/watchlist: when comparing streamed data do not call the API directly instead use the added data. 2024-06-14 13:56:05 +02:00
Kubernetes Prow Robot
6ac60160c5
Merge pull request #124509 from p0lyn0mial/upstream-watch-list-code-gen
client-go: add support for API streaming
2024-06-14 04:54:54 -07:00
Francesco Romani
086a500d8f e2e: node: use test owner tracking
e2e_node test depend on very specific shared state (node state).
Pod leakages between tests oftentimes cause the test preconditions
to be silently corrupted, causing hard to debug CI failures.

Use the new facility to annotate pods with test owner (= the
test code which created the test) to help debug these failures.

For more context, please check the conversation in #123468

Signed-off-by: Francesco Romani <fromani@redhat.com>
2024-06-14 13:42:14 +02:00
Francesco Romani
7160ef4fbc e2e: node: add code to track the pod creator code
e2e_node test depend on very specific shared state (node state).
Pod leakages between tests oftentimes cause the test preconditions
to be silently corrupted, causing hard to debug CI failures.

We add the option to add an annotation to pods which records
the code line (source code:line) which triggered the pod creation,
so it becomes easier to track which test needs better cleanup.

The relevant e2e framework code is used in all the e2e suites,
so to minimize any unwanted consequences we make the feature
opt-in, planning to enable it initially (and likely only)
in the e2e_node tests.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2024-06-14 13:42:14 +02:00
Lukasz Szaszkiewicz
9871fcab39 ./hack/update-internal-modules.sh 2024-06-14 12:52:54 +02:00
Lukasz Szaszkiewicz
f62c80f965 make update 2024-06-14 12:52:54 +02:00
Lukasz Szaszkiewicz
5b76642909 e2e/apimachinery/watchlist: test if WatchList is requested by client-go's List method when WatchListClient is enabled 2024-06-14 12:52:50 +02:00
Kubernetes Prow Robot
eb6840928d
Merge pull request #124160 from Karthik-K-N/fix-buildconstraints
Add doc.go file without any buildconstraint to run tests on non linux platforms
2024-06-13 16:29:06 -07:00
Kubernetes Prow Robot
ba28796e77
Merge pull request #125218 from carlory/fix-125216
add apiGroup validation
2024-06-13 13:27:50 -07:00
Patrick Ohly
e0fce54d02 DRA: fix indexing of generated parameters
The claim parameter key didn't include the namespace of the claim. In the case
where two namespaces used the exact same parameter reference, the "too many
generated parameters" case got triggered incorrectly and lookup could have
returned an object from the wrong namespace.

Found while running the E2E tests in parallel:

              message: 'running PreFilter plugin "DynamicResources": multiple generated claim
                parameters for ConfigMap. dra-8794/parameters-3 found: [dra-4729/parameters-4
                dra-7328/parameters-4 dra-8794/parameters-4 dra-3402/parameters-4 dra-6156/parameters-4
                dra-1839/parameters-4 dra-7434/parameters-4 dra-6504/parameters-4]'
2024-06-13 17:27:04 +02:00
Lukasz Szaszkiewicz
dceabab838 client-gen: intro watchList 2024-06-13 17:13:30 +02:00