Commit Graph

120630 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
98601e2ec5
Merge pull request #122443 from sanposhiho/nit-comment
scheduler: update an old comment
2023-12-22 16:44:38 +01:00
Kubernetes Prow Robot
84d0b0506b
Merge pull request #122194 from aojea/e2enpd
Tag e2e NodeProblemDetector accordenly
2023-12-22 16:44:28 +01:00
Kubernetes Prow Robot
40c729c680
Merge pull request #122436 from pohly/log-warn-context
hack/tools: bump logtools to v0.8.0
2023-12-22 14:32:38 +01:00
Kubernetes Prow Robot
784c7cec63
Merge pull request #122050 from danwinship/proxy-change-tracker-cleanup-1
proxy service/endpoints change tracker cleanups
2023-12-22 14:32:28 +01:00
Antonio Ojea
86873d3335 NodeProblemDetector tags
Change-Id: I9b9848f468f9333b6169bdf5ffd850d762f639bb
2023-12-22 11:25:07 +00:00
Kubernetes Prow Robot
5104e65661
Merge pull request #122447 from ardaguclu/fix-debug-attach
Initialize default attach func regardless of the value of flag
2023-12-22 10:31:21 +01:00
carlory
f8f24cf8e7 ValidateVolumeAttributesClassUpdate also validates new vac 2023-12-22 15:52:04 +08:00
Arda Güçlü
acbbaddada Initialize default attach func regardless of the value of flag 2023-12-22 09:50:48 +03:00
Kubernetes Prow Robot
0f60241eae
Merge pull request #122441 from superbrothers/update-help-kubectl-delete-interactive
Update the help mesage of interactive flag in kubectl delete
2023-12-22 06:25:48 +01:00
Kensei Nakada
041efcd1d4 scheduler: update an old comment 2023-12-22 02:01:13 +00:00
Kubernetes Prow Robot
c8c845ae08
Merge pull request #122435 from aleksandra-malinowska/scheduler-first-fit-3
Scheduler first fit
2023-12-21 18:24:04 +01:00
Dan Winship
1c089afcf3 Fix a set type 2023-12-21 09:44:08 -05:00
Dan Winship
147114e648 Update some change tracker doc comments
In particular, fix the description of ServiceChangeTracker.Update's
return value, and point out that it's different from
EndpointsChangeTracker.EndpointSliceUpdate's (though fortunately, in a
way that doesn't matter for any existing code).
2023-12-21 09:44:08 -05:00
Dan Winship
a8a12be3d3 Rename cache's endpointSliceInfo/endpointInfo to endpointSliceData/endpointData
EndpointSliceCache was using the name "endpointInfo" to refer to two
different data types (most egregiously in addEndpoints(), which had a
variable named `endpoint` of type `*endpointInfo` and a variable named
`endpointInfo` of type `Endpoint`).

Continue using "endpointInfo" in places that refer to proxy.Endpoint /
BaseEndpointInfo, since that's consistent with other code, but rename
the local "cache of the Endpoints field of an EndpointSlice" type from
"endpointInfo" to "endpointData". Likewise, rename endpointSliceInfo
to endpointSliceData, for consistency.
2023-12-21 09:44:08 -05:00
Dan Winship
764cb0457f Move some code around in servicechangetracker.go/endpointschangetracker.go
Put the ServiceChangeTracker and EndpointsChangeTracker definitions at
the top of the files, and put the ServicePortMap and EndpointsMap
definitions before their methods.

(No code changes.)
2023-12-21 09:44:04 -05:00
Dan Winship
a73b275031 Split ServicePort/Endpoint from ServiceChangeTracker/EndpointsChangeTracker
Move the ServicePort/BaseServicePortInfo types to serviceport.go.
Move the Endpoint/BaseEndpointInfo types to endpoint.go.

To avoid confusion with the new filenames, rename service.go to
servicechangetracker.go and endpoints.go to endpointschangetracker.go.

(No code changes; this just moves some code from types.go and
services.go to serviceport.go, and some code from types.go and
endpoints.go to endpoint.go.)
2023-12-21 09:38:25 -05:00
Dan Winship
ede0dc1d07 Make newBaseServiceInfo a function rather than a method
(in preparation for moving it)
2023-12-21 09:38:25 -05:00
Dan Winship
0779042a6f Remove a useless "_" assignment to appease the linter
(This would become an error rather than a warning once we try to move
this code to another file.)

Also rename an "ok" variable to "exists" since that what it really
means.
2023-12-21 09:38:24 -05:00
Dan Winship
452fcc5fd6 Remove some dead code in service.go
ServicePortMap.merge had a giant comment explaining its return value,
but nothing ever used that return value.

ServicePort had an InternalTrafficPolicy() method, but nothing used it
(because it was redundant with InternalPolicyLocal().)
2023-12-21 09:38:24 -05:00
Patrick Ohly
51f3b705c6 hack/tools: bump logtools to v0.8.0
This adds support for marking functions and methods as "don't use in code which
supports contextual logging".
2023-12-21 15:12:40 +01:00
Kubernetes Prow Robot
bfcf8d3966
Merge pull request #122434 from pohly/dra-e2e-per-node-resources
dra e2e: unify per-node resource specification
2023-12-21 15:03:49 +01:00
Kubernetes Prow Robot
d5c6efa39e
Merge pull request #122423 from neolit123/1.30-add-test-for-hostaliases-with-hostnetwork
test/e2e: add kubelet test for hostAliases with hostNetwork=true
2023-12-21 13:50:55 +01:00
Kazuki Suda
90e68e3a02
Update the help mesage of interactive flag in kubectl delete 2023-12-21 21:46:31 +09:00
Aleksandra Malinowska
f89c744b7b Only run Prioritize() for extenders with prioritizeVerb configured 2023-12-21 13:42:27 +01:00
Aleksandra Malinowska
cd3f7a31e8 Add unit tests for no score plugin scenario 2023-12-21 13:42:21 +01:00
Aleksandra Malinowska
7abba24231 Fix existing unit test (add no op scoring plugin) 2023-12-21 13:30:01 +01:00
Aleksandra Malinowska
e19be41f58 Don't evaluate extra nodes if there's no score plugin defined 2023-12-21 13:29:46 +01:00
Patrick Ohly
4ede571f8b dra e2e: unify per-node resource specification
When using a builder pattern for the actual callback, some common
code can be moved into a single function.
2023-12-21 12:43:28 +01:00
Lubomir I. Ivanov
bc83cea0eb test/e2e: add kubelet test for hostAliases with hostNetwork=true
Support for this was added in 1.8 by PR 50646 but there
is no e2e test.
2023-12-21 13:41:19 +02:00
Kubernetes Prow Robot
0cabb55f7c
Merge pull request #122315 from fazledyn-or/Fix_Inappropriate_Logic
Fixed Inappropriate Logical Expression
2023-12-21 10:31:20 +01:00
Kubernetes Prow Robot
6eeb48cd7f
Merge pull request #122401 from jongwooo/hotfix/correct-typo-from-gingko-to-ginkgo
Correct typo from 'gingko' to 'ginkgo'
2023-12-21 06:42:10 +01:00
Kubernetes Prow Robot
0d530551bc
Merge pull request #122393 from mzaian/etcd-3511
etcd: Update to version 3.5.11
2023-12-21 06:41:55 +01:00
Kubernetes Prow Robot
c6f4ff6df8
Merge pull request #122385 from SataQiu/fix-global-flag-20231219
kubeadm: hide unwanted global klog flags
2023-12-21 05:30:53 +01:00
fazledyn-or
d317b01244 Fixed Inappropriate Logical Expression
The length of `finalInterceptors` will always be a
non-zero value. In that case, the comparison will
always return a True value, making the comparison
meaningless.

Signed-off-by: fazledyn-or <ataf@openrefactory.com>
2023-12-21 09:44:20 +06:00
Kubernetes Prow Robot
247ea2046d
Merge pull request #122204 from danwinship/proxy-pending-changes
Fix race condition in iptables partial sync handling
2023-12-20 19:22:17 +01:00
Kubernetes Prow Robot
8a4403a9e5
Merge pull request #122412 from MadhavJivrajani/bump-go-tools
[go1.22] .*: bump golang.org/x/tools to v0.16.1
2023-12-20 18:07:30 +01:00
Kubernetes Prow Robot
f68a965e5a
Merge pull request #122032 from carlory/remove-fg-APISelfSubjectReview
remove feature-gate APISelfSubjectReview in 1.30
2023-12-20 16:46:53 +01:00
Kubernetes Release Robot
4658f76945 CHANGELOG: Update directory for v1.26.12 release 2023-12-20 13:26:54 +00:00
Kubernetes Release Robot
c0e9fddfd9 CHANGELOG: Update directory for v1.28.5 release 2023-12-20 13:23:33 +00:00
Kubernetes Release Robot
38f4f9d8c4 CHANGELOG: Update directory for v1.27.9 release 2023-12-20 11:14:28 +00:00
Mohamed Omar Zaian
c8a2d5684d etcd: Update to version 3.5.11 2023-12-20 11:18:35 +01:00
Patrick Ohly
36cceff0a3 e2e: forbid usage of gomega.BeTrue/False
`BeTrue` without explanation in `Should` just prints "false is not true", which
isn't a useful failure message. Even with an explanation that message is still
printed, which is just noise. The new BeTrue/FalseBecause avoid that by
requiring that an explanation is provided and using that instead of "false is
not true".

In Kubernetes, we can enforce the usage of those better alternatives or the
if+Fail combination via forbidigo. Because we have existing code which still
needs to be updated, this can only be a hint for now.

Some examples found with this:

ERROR: test/e2e/apimachinery/protocol.go:75:20: use of `o.BeTrue` forbidden because "it does not produce a good failure message, use BeTrueBecause with an explicit printf-style failure message instead or plain Go: if ... { ginkgo.Fail(...) }" (forbidigo)
ERROR: 			o.Expect(ok).To(o.BeTrue())
ERROR: 			                ^

ERROR: test/e2e_node/unknown_pods_test.go:163:52: use of `gomega.BeTrue` forbidden because "it does not produce a good failure message, use BeTrueBecause with an explicit printf-style failure message instead or plain Go: if ... { ginkgo.Fail(...) }" (forbidigo)
ERROR: 			}, f.Timeouts.PodStart, f.Timeouts.Poll).Should(gomega.BeTrue())
ERROR: 			                                                ^

The solution might also be to write a custom matcher, but that is a bit hard to
explain in the forbidigo message.
2023-12-20 10:11:56 +01:00
Madhav Jivrajani
a8da4202c0 .*: bump golang.org/x/tools to v0.16.1
Bumping tools to include the fix for a nil pointer
deref error in go/types. See golang/go#64812
for more details.

This fix is needed for when we bump to go1.22.

Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>
2023-12-20 14:31:31 +05:30
Kubernetes Prow Robot
7897910469
Merge pull request #122395 from pohly/ginkgo-gomega-update
dependencies: gomega v1.30.0 + ginkgo v2.13.2
2023-12-20 09:43:17 +01:00
Patrick Ohly
b0d4a8cd6d dra scheduler: fix incorrect tracking of claim candidates for reallocation
When dealing with unschedulable pods, the intent was to deallocate only claims
which are allocated and use delayed allocation. That if check wasn't handled
correctly, causing also claims with immediate allocation to be considered as
candidates.

Found during code reading, probably has never occurred in practice yet.
2023-12-20 09:04:01 +01:00
Lubomir I. Ivanov
32fbb23f3b kubeadm: remove usage of the TryRunCommand() function
The function TryRunCommand() uses an exponential backoff,
which is good, but it's inconsistent and only used in a couple
of places.

Remove its usage in the token.go#UpdateOrCreateTokens()
and switch to using the standard function used in other places -
PollUntilContextTimeout().

Remove wait.go#TryRunCommand(), as there are no other usages.
2023-12-20 08:51:00 +02:00
Lubomir I. Ivanov
557118897d kubeadm: drop concurrency when waiting for kubelet /healthz
The function wait.go#WaitForKubeletAndFunc() has been used in
a number of places in kubeadm. It starts a go routine to wait for
the kubelet /healthz and in parallel starts another go routine
to wait for an custom function.

This logic is problematic. If kubeadm is waiting for the kubelet
in parallel with something that requires the kubelet, the right
solution would be to first wait for the kubelet in serial and only
then proceed with the other action. The parallelism here particularly
during "init" required a unwanted "initial timeout" of 40s, before
the kubelet waiting even starts. In most cases, this makes the kubelet
waiter to not even start, while the main point of waiting becomes
the "other action".

- Remove the function WaitForKubeletAndFunc() from the Waiter interface.
- Rename the function WaitForHealthyKubelet() to just WaitForKubelet()
to be consistent with the naming WaitForAPI().
- Update WaitForKubelet() to not use TryRunCommand() and instead
use PollUntilContextTimeout().
- Remove the "initial timeout" of 40s in WaitForKubelet().
- Make both WaitForKubelet() and WaitForAPI() use similar error
handling and output.
- Update all usage of WaitForKubelet() to be a serial call before
any other action, such as another wait* call.
- Make the default wait timeout for the kubelet
/healthz to be 1 minute (kubeadmconstants.DefaultKubeletTimeout).
- Apply updates to all implementations of the Waiter interface.
2023-12-20 08:51:00 +02:00
wen.rui
4a7592f8a4 Remove GA feature gate LegacyServiceAccountTokenTracking in 1.30 2023-12-20 13:41:10 +08:00
Kubernetes Prow Robot
0a54839370
Merge pull request #122387 from kerthcet/cleanup/change-error
More understandable error for scheduler configuration validation
2023-12-20 06:19:37 +01:00
Kubernetes Prow Robot
27c127403c
Merge pull request #122265 from SataQiu/kubeadm-etcd-1.30
kubeadm: add supported etcd version for v1.30
2023-12-20 06:19:30 +01:00