Commit Graph

128012 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
a499facee6
Merge pull request #128954 from sanposhiho/conflict-error
fix(e2e): retry on conflict when deleting extended resource
2024-12-07 07:08:00 +00:00
Kubernetes Prow Robot
bfe431b53e
Merge pull request #129103 from liggitt/drop-winreadlinkvolume
Drop use of winreadlinkvolume godebug option
2024-12-06 17:26:01 +00:00
Maciej Szulik
247555c2b7
test: deployment patch status test should check the modified fields
Signed-off-by: Maciej Szulik <soltysh@gmail.com>
2024-12-06 18:14:47 +01:00
Ryan Phillips
d1cc270f13 local-up-cluster: only wait for coredns if enabled 2024-12-06 09:13:34 -06:00
Lukasz Szaszkiewicz
bb2db379c7 test/e2e/apimachinery/watchlist: select only wellknown secrets
the test should list only well-known secrets, as some platforms might add additional secrets specific to their namespace.
2024-12-06 13:51:48 +01:00
Victor Franzi
8f48a82e6e
docs: -l/--selector example for set-based requirements
add an example of set-based requirement when using `-l/--selector` as it's a (less known) filtering capability: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#list-and-watch-filtering
2024-12-06 12:03:48 +01:00
carlory
060c653b53 scheduling e2e tests: add feature-gate label when these tests depend feature-gate 2024-12-06 17:22:43 +08:00
Jordan Liggitt
3046fe23d4
Drop use of winreadlinkvolume godebug option 2024-12-06 02:43:45 -05:00
huangyanfeng
04669c5d64 add warning for duplicate port name definition
Signed-off-by: huangyanfeng <huangyanfeng1992@gmail.com>
2024-12-06 06:20:17 +00:00
Henry Wu
5a8d77a2ae Add statusz endpoint for kube-controller-manager 2024-12-05 23:48:51 +00:00
Stephen Heywood
c5f0e63c62 Add Podresize endpoints to pending_eligible_endpoints.yaml 2024-12-06 08:39:14 +13:00
Kubernetes Release Robot
a27498ef42 CHANGELOG: Update directory for v1.32.0-rc.2 release 2024-12-05 18:08:47 +00:00
geyingqi
22c41caca9 Add integrate test to OOS node 2024-12-05 23:45:46 +08:00
upodroid
dce863e5e6 fetch cni plugins from GitHub releases 2024-12-05 13:31:35 +03:00
Kubernetes Prow Robot
1504f10e79
Merge pull request #129081 from stlaz/fg_remote_uid
featuregate UID in RequestHeader authenticator
2024-12-04 23:43:06 +00:00
Monis Khan
779d76176a
Update tests to handle RemoteRequestHeaderUID
Signed-off-by: Monis Khan <mok@microsoft.com>
2024-12-04 16:04:36 -05:00
Hemant Kumar
f0c5de0060 Fix volume expansion offline 2024-12-04 14:03:38 -05:00
Kubernetes Prow Robot
6fc64a261c
Merge pull request #129083 from liggitt/go1.23windows
Revert to go1.22 windows filesystem stdlib behavior
2024-12-04 18:33:02 +00:00
Francesco Romani
29d26297a1 e2e: node: fix misleading device plugin test
We have a e2e test which tries to ensure device plugin assignments to pods are kept
across node reboots. And this tests is permafailing since many weeks at
time of writing (xref: #128443).

Problem is: closer inspection reveals the test was well intentioned, but
puzzling:
The test runs a pod, then restarts the kubelet, then _expects the pod to
end up in admission failure_ and yet _ensure the device assignment is
kept_! https://github.com/kubernetes/kubernetes/blob/v1.32.0-rc.0/test/e2e_node/device_plugin_test.go#L97

A reader can legitmately wonder if this means the device will be kept busy forever?

This is not the case, luckily. The test however embodied the behavior at
time of the kubelet, in turn caused by #103979

Device manager used to record the last admitted pod and forcibly added
to the list of active pod. The retention logic had space for exactly one
pod, the last which attempted admission.

This retention prevented the cleanup code
(see: https://github.com/kubernetes/kubernetes/blob/v1.32.0-rc.0/pkg/kubelet/cm/devicemanager/manager.go#L549
compare to: https://github.com/kubernetes/kubernetes/blob/v1.31.0-rc.0/pkg/kubelet/cm/devicemanager/manager.go#L549)
to clear the registration, so the device was still (mis)reported
allocated to the failed pod.

This fact was in turn leveraged by the test in question:
the test uses the podresources API to learn about the device assignment,
and because of the chain of events above the pod failed admission yet
was still reported as owning the device.

What happened however was the next pod trying admission would have
replaced the previous pod in the device manager data, so the previous
pod was no longer forced to be added into the active list, so its
assignment were correctly cleared once the cleanup code runs;
And the cleanup code is run, among other things, every time device
manager is asked to allocated devices and every time podresources API
queries the device assignment

Later, in PR https://github.com/kubernetes/kubernetes/pull/120661
the forced retention logic was removed from all the resource managers,
thus also from device manager, and this is what caused the permafailure.

Because all of the above, it should be evident that the e2e test was
actually enforcing a very specific and not really work-as-intended
behavior, which was also overall quite puzzling for users.

The best we can do is to fix the test to record and ensure that
pods which did fail admission _do not_ retain device assignment.

Unfortunately, we _cannot_ guarantee the desirable property that
pod going running retain their device assignment across node reboots.

In the kubelet restart flow, all pods race to be admitted. There's no
order enforced between device plugin pods and application pods.
Unless an application pod is lucky enough to _lose_ the race with both
the device plugin (to go running before the app pod does) and _also_
with the kubelet (which needs to set devices healthy before the pod
tries admission).

Signed-off-by: Francesco Romani <fromani@redhat.com>
2024-12-04 17:06:27 +01:00
Jordan Liggitt
3878a3a6de
Revert to go1.22 windows filesystem stdlib behavior 2024-12-04 10:44:55 -05:00
Stanislav Láznička
a051b067cd
featuregate UID in RequestHeader authenticator 2024-12-04 16:26:28 +01:00
Kubernetes Release Robot
2b472fe469 CHANGELOG: Update directory for v1.32.0-rc.1 release 2024-12-03 19:07:38 +00:00
Kevin Hannon
a0b74011b2 add kubelet validation for containerLogMaxFiles 2024-12-03 11:03:05 -05:00
zhifei92
cb74323e07 refactor: Simplify the code logic. 2024-12-03 20:31:09 +08:00
carlory
617e5c79bb storage e2e tests: apply feature-gate label when these tests depend feature-gate 2024-12-03 18:25:41 +08:00
Jordan Liggitt
1fd76884b9
Isolate mock signer for externaljwt tests 2024-12-02 18:44:40 -05:00
Siyuan Zhang
b71763ef38 Remove unnecessary log msg.
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2024-12-02 08:57:51 -08:00
Patrick Ohly
0a02c74ca6 update-vanity-imports.sh: remove script
With the "// import ..." statements removed form all files, we no
longer need the update script which would add them back.
2024-12-02 17:00:41 +01:00
Patrick Ohly
8a908e0c0b remove import doc comments
The "// import <path>" comment has been superseded by Go modules.
We don't have to remove them, but doing so has some advantages:

- They are used inconsistently, which is confusing.
- We can then also remove the (currently broken) hack/update-vanity-imports.sh.
- Last but not least, it would be a first step towards avoiding the k8s.io domain.

This commit was generated with
   sed -i -e 's;^package \(.*\) // import.*;package \1;' $(git grep -l '^package.*// import' | grep -v 'vendor/')

Everything was included, except for
   package labels // import k8s.io/kubernetes/pkg/util/labels
because that package is marked as "read-only".
2024-12-02 16:59:34 +01:00
Nadia Pinaeva
326c84a151 [e2e, service] Add total timeout for affinity check curl command.
Not setting a total timeout for curl may result in hanging command if
the connection succeeded, but the data transfer did not.

Signed-off-by: Nadia Pinaeva <n.m.pinaeva@gmail.com>
2024-12-02 11:55:05 +01:00
Patrick Ohly
b330eeac2f prune-junit-xml: preserve system out + err text during test pruning
When stripping out log messages from the failure text, the original text gets
stored as <system-out>. That part then got lost when reducing tests. Instead of
dropping it, it needs to be joined from all failed tests. Same for
<system-err>, although that isn't used yet.
2024-12-02 11:17:57 +01:00
Patrick Ohly
e0e4af8a58 prune-junit-xml: smarter concatenation when pruning tests
Repeating the same "Failed" message text doesn't add any
information. Separating with a blank line is more readable.

Before:

    <failure message="Failed; Failed; Failed" type="">
       ...
       --- FAIL: TestFrontProxyConfig/WithoutUID (64.89s) ; === RUN TestFrontProxyConfig/WithUID

After:

    <failure message="Failed" type="">
       ...
       --- FAIL: TestFrontProxyConfig/WithoutUID (64.89s)

       === RUN TestFrontProxyConfig/WithUID
2024-12-02 11:17:57 +01:00
HirazawaUi
53e9f29d29 Fix kubelet e2e tests incorrect message 2024-12-01 22:45:29 +08:00
Kensei Nakada
8f4e425daf
chore: ignore dat files generated by scheduler-perf 2024-11-30 22:23:15 +09:00
Dr. Stefan Schimanski
0d18ae303b
apiextensions: add pkg/test with CEL unit test helpers
Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@gmail.com>
2024-11-29 16:30:39 +01:00
Penghao
9e99be7c2b Fix: typos for volume package 2024-11-29 17:11:00 +08:00
Antonio Ojea
e5ebbdc3c7 Ignore internal packages messages 2024-11-29 07:29:46 +00:00
Richa Banker
ebe5bab2cb Move common code to an httputil package 2024-11-28 21:50:39 -08:00
zhifei92
27608fa25d refactor(scheduler): Rename UpdatePodTolerations for code style consistency. 2024-11-29 13:13:09 +08:00
Kubernetes Prow Robot
810e9e212e
Merge pull request #129019 from cpanato/update-rules
Update publishing-bot rules to Go 1.22.9 for the active release branches
2024-11-28 19:22:57 +00:00
Antonio Ojea
f92bde1894 parallalize the apidiff dump 2024-11-28 18:20:07 +00:00
Antonio Ojea
affafd906d improve report on failures summarizing the modules with incompatible changes 2024-11-28 18:20:04 +00:00
Antonio Ojea
7de94d43ca handle the case when modules are added or removed
don't compare modules that didn't or doesn't exist
2024-11-28 18:19:18 +00:00
Antonio Ojea
52386915a8 use relative paths and modules that are not visible to golagn workspaces 2024-11-28 18:19:12 +00:00
Ed Bartosh
48ea6fc465 oom_watcher: fix testifylint failures
Fixed the following testifylint failures:

oom_watcher_linux_test.go:68:2: require-error: for error assertions use require (testifylint)
  assert.NoError(t, oomWatcher.Start(tCtx, node))
  ^
oom_watcher_linux_test.go:128:2: require-error: for error assertions use require (testifylint)
  assert.NoError(t, oomWatcher.Start(tCtx, node))
  ^
oom_watcher_linux_test.go:165:2: require-error: for error assertions use require (testifylint)
  assert.NoError(t, oomWatcher.Start(tCtx, node))
  ^
2024-11-28 17:47:02 +02:00
Ed Bartosh
f622be0333 kubelet: Migrate pkg/kubelet/oom to contextual logging 2024-11-28 17:47:02 +02:00
Antonio Ojea
e6fccc36d8 apidiff support internal go modules
The kubernetes repository contains some internal golang modules that are
not part of the golang global workspace. Because apidiff is currently
run from the root of the repository, it does not work against this
internal modules.

Instead of executing apidiff from the root we can just cd into the
passed path of the module to avoid this limitation.
2024-11-28 15:43:09 +00:00
cpanato
823cd76162
Update publishing-bot rules to Go 1.22.9 for the active release branches
Signed-off-by: cpanato <ctadeu@gmail.com>
2024-11-28 15:00:08 +01:00
LongKang Fan
79d62d8bb3 change current and desired 2024-11-28 09:37:55 +08:00
Ondrej Kokes
6f06cd6e05 Do not reload kubeconfig from disk
When `kubeadm init phase bootstrap-token` gets invoked, it reads
the kubeconfig from disk repeatedly. This is wasteful, but, more
importantly, it blocks the use of `/dev/stdin` and other sources
of data that cannot be read repeatedly.

This change introduces a new field that caches a parsed kubeconfig
and when a new clientset is requested, it is converted from
this pre-parsed kubeconfig, the code no longer reaches out to disk.
2024-11-27 16:44:51 +01:00