Commit Graph

127357 Commits

Author SHA1 Message Date
Patrick Ohly
f9051901ce client-go certificate: context-aware APIs and logging
For NewManager, the Config struct gets changed (not extended!) so that the
caller can provide a logger instead of just a logging function. Breaking the
API was chosen because it avoids having to maintain two different log calls in
various places (one for printf-style logging, one for structured logging).

RequestCertificateWithContext is an extension. It enables getting rid of
context.TODO calls.

NewFileStoreWithLogger also is an extension.
2025-02-28 10:37:06 +01:00
Kubernetes Prow Robot
29101e9774
Merge pull request #128650 from skitt/kubeadm-generic-idempotency
kubeadm: generalise CreateOrUpdate etc.
2024-12-19 10:32:08 +01:00
Stephen Kitt
db4c509e71
kubeadm: generalise CreateOrUpdate etc.
This uses generics to generalise the various CreateOrUpdate,
CreateOrRetain etc. functions. Where appropriate, the context is added
as an initial argument to the new functions.

ConfigMapMutator isn't used anywhere else, so it's dropped in favour
of the private objectMutator added in this commit.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2024-12-19 09:19:29 +01:00
Kubernetes Prow Robot
e305c33988
Merge pull request #126387 from pohly/log-client-go-tools-cache-apis
client-go/tools/cache: add APIs with context parameter
2024-12-18 20:00:09 +01:00
Patrick Ohly
4638ba9716 client-go/tools/cache: add APIs with context parameter
The context is used for cancellation and to support contextual logging.

In most cases, alternative *WithContext APIs get added, except for
NewIntegerResourceVersionMutationCache where code searches indicate that the
API is not used downstream.

An API break around SharedInformer couldn't be avoided because the
alternative (keeping the interface unchanged and adding a second one with
the new method) would have been worse. controller-runtime needs to be updated
because it implements that interface in a test package. Downstream consumers of
controller-runtime will work unless they use those test package.

Converting Kubernetes to use the other new alternatives will follow. In the
meantime, usage of the new alternatives cannot be enforced via logcheck
yet (see https://github.com/kubernetes/kubernetes/issues/126379 for the
process).

Passing context through and checking it for cancellation is tricky for event
handlers. A better approach is to map the context cancellation to the normal
removal of an event handler via a helper goroutine. Thanks to the new
HandleErrorWithLogr and HandleCrashWithLogr, remembering the logger is
sufficient for handling problems at runtime.
2024-12-18 18:45:02 +01:00
Kubernetes Prow Robot
5cfad4f858
Merge pull request #128404 from mowangdk/test/add_integrate_test_of_node_OOS
Add non graceful shutdown integration test
2024-12-18 16:36:09 +01:00
Kubernetes Prow Robot
aab3eb6875
Merge pull request #129246 from chymy/patch-3
fix incorrect variable reference in handleUpdateEndpointSlice
2024-12-18 15:20:20 +01:00
Kubernetes Prow Robot
fc53d1b297
Merge pull request #128950 from googs1025/feature/kubectl/autoscalev2
feature(kubectl): use autoscalingv2 in kubectl autoscale
2024-12-18 15:20:09 +01:00
Kubernetes Prow Robot
4c466d8f98
Merge pull request #129095 from borg-land/cni-bucket-change
fetch cni plugins from GitHub releases
2024-12-18 13:40:08 +01:00
Kubernetes Prow Robot
9709d36dda
Merge pull request #129232 from DamianSawicki/bumpKubeDNS-1-24-0-fixed
Bump kubedns and nodelocaldns to 1.24.0 (fixed)
2024-12-18 12:22:08 +01:00
Kubernetes Prow Robot
4a0b0365ef
Merge pull request #129074 from siyuanfoundation/fgv
Add Validation to versioned feature specs.
2024-12-18 06:16:52 +01:00
Kubernetes Prow Robot
2a609cd6e2
Merge pull request #129257 from liggitt/coerce-labels-annotations
Coerce null label and annotation values to empty string
2024-12-18 01:54:52 +01:00
Siyuan Zhang
00dab9dffa Add Validation to versioned feature specs.
Co-authored-by: Jordan Liggitt <liggitt@google.com>
Co-authored-by: Siyuan Zhang <sizhang@google.com>

Signed-off-by: Siyuan Zhang <sizhang@google.com>
2024-12-17 15:59:02 -08:00
Kubernetes Prow Robot
a01337b17f
Merge pull request #129250 from pacoxu/kubeadm-owners-update
kubeadm: update owners for v1.33
2024-12-18 00:40:59 +01:00
Kubernetes Prow Robot
41ea061d2b
Merge pull request #128705 from aramase/aramase/c/node_int_test_todo_cleanup
cleanup todo comment in node restriction integration tests
2024-12-18 00:40:52 +01:00
Kubernetes Prow Robot
107be8fecc
Merge pull request #129205 from tosi3k/wc-configurable-retention
Configure watch cache history window based on request timeout
2024-12-17 20:50:58 +01:00
Kubernetes Prow Robot
bb24538ff5
Merge pull request #128923 from kannon92/drop-node-special-feature-node-e2e
[KEP-3041]: Drop NodeSpecialFeature and NodeAlphaFeature from e2e-node
2024-12-17 20:50:52 +01:00
Kubernetes Prow Robot
cc03c6058b
Merge pull request #129207 from Jefftree/remove-vap-alpha
Remove v1alpha1 admissionregistration APIs (ValidatingAdmissionPolicies & ValidatingAdmissionPolicyBindings)
2024-12-17 18:52:59 +01:00
Kubernetes Prow Robot
58aafb61d4
Merge pull request #129186 from liggitt/cleanup-authorization
Clean up v1alpha1 serving for authentication APIs
2024-12-17 18:52:52 +01:00
Jordan Liggitt
13b84453df
Coerce null label and annotation values to empty string 2024-12-17 11:32:09 -05:00
Kubernetes Prow Robot
3fb2a38cd2
Merge pull request #129252 from liggitt/path-warnings
Use OS-agnostic path separator in pod warnings check
2024-12-17 16:14:52 +01:00
Antoni Zawodny
4a2b7ee569 Configure watch cache history window based on request timeout 2024-12-17 15:06:00 +01:00
Jordan Liggitt
04426633c0
Use OS-agnostic path separator in pod warnings check 2024-12-17 08:36:06 -05:00
Paco Xu
fd8a61ae1b kubeadm: update owners for v1.33 2024-12-17 17:16:39 +08:00
changmin
19aef482fa
fix incorrect variable reference in handleUpdateEndpointSlice 2024-12-17 15:06:04 +08:00
Omer Aplatony
3ec97a445f
kubectl: add test coverage for cordon command (#129202)
* kubectl: add test coverage for cordon command

Signed-off-by: Omer Aplatony <omerap12@gmail.com>

* using cmp.Diff

Signed-off-by: Omer Aplatony <omerap12@gmail.com>

---------

Signed-off-by: Omer Aplatony <omerap12@gmail.com>
2024-12-17 06:30:51 +01:00
googs1025
a87dd67a3c feature(kubectl): use autoscalingv2 in kubectl autoscale 2024-12-17 08:34:59 +08:00
Kubernetes Prow Robot
f073d64829
Merge pull request #129241 from yongruilin/apidiff-comment
chore: Update apidiff.sh script description
2024-12-16 23:56:51 +01:00
yongruilin
e1ef9e40f5 chore: Update apidiff.sh script description 2024-12-16 13:44:48 -08:00
Kubernetes Prow Robot
d629d4adb3
Merge pull request #129227 from saschagrunert/unwanted-gogo
Add `github.com/golang/protobuf` to unwanted dependencies
2024-12-16 19:09:02 +01:00
Kubernetes Prow Robot
7f6220d7ed
Merge pull request #129153 from carlory/e2e-dra
dra e2e tests: add feature-gate label when these tests depend feature-gate
2024-12-16 19:08:51 +01:00
Kevin Hannon
6a608c3cdb drop NodeSpecialFeature and NodeAlphaFeature from e2e-node 2024-12-16 09:29:04 -05:00
Damian Sawicki
e67c24bdbb Bump kubedns and nodelocaldns to 1.24.0 (fixed)
In addition to the version bump, this removes the usage of the flag
logtostderr (see
https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/2845-deprecate-klog-specific-flags-in-k8s-components),
which was causing errors
https://github.com/kubernetes/kubernetes/issues/129230.

Signed-off-by: Damian Sawicki <dsawicki@google.com>
2024-12-16 12:43:07 +00:00
Kubernetes Prow Robot
16da2955d0
Merge pull request #129231 from aojea/revert-129175-bumpKubeDNS-1-24-0
Revert "Bump kubedns and nodelocaldns to 1.24.0"
2024-12-16 13:40:51 +01:00
Antonio Ojea
67a13f5355
Revert "Bump kubedns and nodelocaldns to 1.24.0" 2024-12-16 12:27:39 +01:00
Kubernetes Prow Robot
ec1e7fea17
Merge pull request #128759 from omerap12/PollUntilContextCancel-apiextensions-apiserver
chore: update deprecated polling methods in apiextensions-apiserver
2024-12-16 12:24:53 +01:00
Sascha Grunert
c3a3a54822
Add github.com/golang/protobuf to unwanted dependencies
Follow-up on https://github.com/kubernetes/kubernetes/pull/128659 to
avoid reintroducing the dependency again.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2024-12-16 09:57:18 +01:00
Kubernetes Prow Robot
5ba2b78eae
Merge pull request #129116 from saschagrunert/cri-tools-1.32
Update cri-tools to v1.32.0
2024-12-16 04:45:01 +01:00
Kubernetes Prow Robot
12aaa88671
Merge pull request #125334 from jbtk/provider-removal
Remove provider specific operations from the autoscaling tests and fix the ones that were previously failing.
2024-12-16 04:44:50 +01:00
Kubernetes Prow Robot
cb93d6ee69
Merge pull request #129212 from Jefftree/add-clientgo-readme
Add client-go README
2024-12-14 22:52:42 +01:00
Kubernetes Prow Robot
be1c99186f
Merge pull request #128819 from danwinship/tracker-cleanup
cleanups to proxy change trackers
2024-12-14 20:24:43 +01:00
Dan Winship
f5969adb14 Clean up NewServiceChangeTracker/NewEndpointsChangeTracker args
Remove the now-unused event recorders, and put the remaining args into
a sensible order, and consistent between the two.
2024-12-14 12:12:42 -05:00
Dan Winship
79d1c078bb Make change trackers just ignore the "wrong" IP family
Dual-stack clusters exist; ServiceChangeTracker does not need to log
messages (even at V(4)) when it sees dual-stack Services, and
EndpointsChangeTracker does not need to emit Events(!) when it sees
EndpointSlices of the wrong AddressType.

(Though in most cases the EndpointsChangeTracker Events would not get
emitted anyway, since the MetaProxier would ensure that only the v4
tracker saw v4 slices, and only the v6 tracker saw v6 slices.)

Also remove a nil check labeled "This should never happen" which, in
fact, we know *didn't* happen, since the function has already
dereferenced the value before it checking it against nil.
2024-12-14 12:12:35 -05:00
Dan Winship
2c348bf186 Use a constructor properly in change tracker unit tests
newFakeProxier was inlining the details of NewEndpointsChangeTracker
so it could override trackerStartTime, but it would be better and more
future-proof to just call NewEndpointsChangeTracker normally and then
edit that one field.

(Also remove an unused FakeProxier field.)
2024-12-14 12:12:31 -05:00
Omer Aplatony
7e578bdb6d lint
Signed-off-by: Omer Aplatony <omerap12@gmail.com>
2024-12-14 17:13:40 +02:00
Omer Aplatony
ed7f7ce92b fix race conditions in polling functions
Signed-off-by: Omer Aplatony <omerap12@gmail.com>
2024-12-14 16:35:42 +02:00
Kubernetes Prow Robot
21525f39e0
Merge pull request #129217 from tallclair/revert-129214-kubelet-state-perms
Revert "Change default filestore permissions to 0700"
2024-12-14 09:28:42 +01:00
Kubernetes Prow Robot
e818574885
Merge pull request #129131 from pacoxu/kubeadm-iptables-check
kubeadm: remove iptables/ip/tc/ethtool binary preflight check
2024-12-14 08:14:53 +01:00
Kubernetes Prow Robot
30ef6110a1
Merge pull request #128886 from npinaeva/kube-proxy-debug-log
kube-proxy,nftables: add debug logging for failed transactions.
2024-12-14 08:14:41 +01:00
Kubernetes Prow Robot
46f0b3fc13
Merge pull request #128920 from tallclair/ippr-defaults
[FG:InPlacePodVerticalScaling] Remove ResizePolicy defaulting
2024-12-14 03:04:25 +01:00