Commit Graph

20895 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
e6d641651a Merge pull request #124692 from linxiulei/watchlist_opt
cacher: apply key for initial events
2024-06-04 04:22:20 -07:00
Eric Lin
d9c6c8aa50 cacher: apply key for initial events
For case of SendInitialEvents, a buffer of objects is created. That
process takes a significant amount of memory and CPU when the resource
is of a large volume. Many objects may be not relevant when key is provided.
This commit applies key when composing the buffer for SendInitialEvents.

Signed-off-by: Eric Lin <exlin@google.com>
2024-06-04 09:20:10 +00:00
Karl Isenberg
ab5aa4762f Improve Reflector unit tests
- Add tests to confirm that Stop is always called.
- Add TODOs to show were Stop is not currently being called
  (to fix in a future PR)
2024-06-03 12:15:38 -07:00
Lukasz Szaszkiewicz
a20abdb1f4 cacher: dispatchEvents is synced to watchCache.listResourceVersion
The internal informer populates the RV as soon as it conducts
The first successful sync with the underlying store.
The cache must wait until this first sync is completed to be deemed ready.
Since we cannot send a bookmark when the lastProcessedResourceVersion is 0,
we poll aggressively for the first list RV before entering the dispatch loop.
2024-06-03 10:26:50 +02:00
Kubernetes Prow Robot
a78542e357 Merge pull request #125209 from humblec/etcd-3.5.14
make use of etcd v3.5.14 in the builds.
2024-06-01 14:12:31 -07:00
Humble Chirammal
07ef65a834 make use of etcd v3.5.14 in the builds.
https://github.com/etcd-io/etcd/releases/tag/v3.5.14

This release has been built with GO 1.21.10

Signed-off-by: Humble Chirammal <humble.devassy@gmail.com>
2024-06-01 09:06:35 +05:30
Kubernetes Prow Robot
790dfdbe38 Merge pull request #125238 from munnerz/kep-4193-nodebinding-beta
KEP-4193: promote ServiceAccountTokenNodeBinding feature to beta
2024-05-31 12:27:18 -07:00
Kubernetes Prow Robot
723c269641 Merge pull request #124916 from TessaIO/test-improve-unit-tests-for-container-name-autocompletion
test: improve unit tests for container name autocompletion
2024-05-31 12:27:09 -07:00
James Munnelly
5481e630de KEP-4193: promote ServiceAccountTokenNodeBinding feature to beta 2024-05-31 12:16:03 +01:00
Kubernetes Prow Robot
39c6bc3136 Merge pull request #123919 from hakuna-matatah/apf
Annotate APF Wait Queue Latnecy  at the request level
2024-05-30 20:36:09 -07:00
Kubernetes Prow Robot
6938c29a38 Merge pull request #125225 from aojea/ipmode
fix loadbalancer status comparison
2024-05-30 18:34:57 -07:00
Antonio Ojea
f28b8fee7f fix loadbalancer status comparison
The loadbalancer status has added new fields during the latest releases,
but the helper function used by the service load balancer controller was
not updated with all the new fields, and for the new IPMode field it was
not taking into consideration that the field is a pointer.

Instead of checking fields one by one  use the DeepEqual function that
provides semantic equality for these types.
2024-05-30 22:49:40 +00:00
Kubernetes Prow Robot
f30a87d517 Merge pull request #122832 from benluddy/cbor-fuzz-native-to-unstructured-via
KEP-4222: Add roundtrip tests to Unstructured via CBOR and JSON.
2024-05-30 15:00:31 -07:00
Kubernetes Prow Robot
a0e3a70d53 Merge pull request #124671 from saschagrunert/logs-staging
Move `pkg/kubelet/kuberuntime/logs` to `k8s.io/cri-client` staging
2024-05-30 13:26:01 -07:00
Kubernetes Prow Robot
c811521331 Merge pull request #112104 from oldium/fix-windows-editor-launch
Fix editor launch with Windows cmd.exe when KUBE_EDITOR has spaces in path
2024-05-30 08:16:52 -07:00
Kubernetes Prow Robot
36f1d73c1f Merge pull request #123440 from Ritikaa96/kubectl-improve-get
Improving kubectl get output
2024-05-30 06:46:48 -07:00
Sascha Grunert
0c9949b6ec Move pkg/kubelet/kuberuntime/logs to k8s.io/cri-client staging
Particulary helpful to decouple cri-tools from k/k.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2024-05-30 15:13:22 +02:00
Ritikaa96
b9ec8b3c46 correcting description as per review
Signed-off-by: Ritikaa96 <ritika@india.nec.com>
2024-05-30 11:53:02 +05:30
Kubernetes Prow Robot
957c953867 Merge pull request #118148 from linxiulei/sched_readyz
Expose /readyz & /livez in kube-scheduler
2024-05-29 22:09:17 -07:00
Kubernetes Prow Robot
9a44f68916 Merge pull request #123974 from p0lyn0mial/upstream-client-go-features-testing
client-go/features/testing: intro SetFeatureGatesDuringTest
2024-05-29 17:01:25 -07:00
Shingo Omura
552fd7e850 KEP-3619: Fine-grained SupplementalGroups control (#117842)
* Add `Linux{Sandbox,Container}SecurityContext.SupplementalGroupsPolicy` and `ContainerStatus.user` in cri-api

* Add `PodSecurityContext.SupplementalGroupsPolicy`, `ContainerStatus.User` and its featuregate

* Implement DropDisabledPodFields for PodSecurityContext.SupplementalGroupsPolicy and ContainerStatus.User fields

* Implement kubelet so to wire between SecurityContext.SupplementalGroupsPolicy/ContainerStatus.User and cri-api in kubelet

* Clarify `SupplementalGroupsPolicy` is an OS depdendent field.

* Make `ContainerStatus.User` is initially attached user identity to the first process in the ContainerStatus

It is because, the process identity can be dynamic if the initially attached identity
has enough privilege calling setuid/setgid/setgroups syscalls in Linux.

* Rewording suggestion applied

* Add TODO comment for updating SupplementalGroupsPolicy default value in v1.34

* Added validations for SupplementalGroupsPolicy and ContainerUser

* No need featuregate check in validation when adding new field with no default value

* fix typo: identitiy -> identity
2024-05-29 15:40:29 -07:00
Ben Luddy
d7cccf3e79 Update indirect dependencies with ./hack/update-vendor.sh.
Implementing custom marshaling on several API types for CBOR makes the upstream CBOR library an
indirect dependency of several staging modules.
2024-05-29 17:50:21 -04:00
Ben Luddy
d2dfce59ff Implement cbor.Marshaler and cbor.Unmarshaler for resource.Quantity. 2024-05-29 17:48:10 -04:00
Ben Luddy
14367eee5a Implement cbor.Marshaler and cbor.Unmarshaler for metav1.MicroTime. 2024-05-29 17:48:10 -04:00
Ben Luddy
7b3129e015 Implement cbor.Marshaler and cbor.Unmarshaler for metav1.Time. 2024-05-29 17:48:09 -04:00
Ben Luddy
d93a9121b8 Implement cbor.Marshaler and cbor.Unmarshaler for IntOrString. 2024-05-29 17:48:09 -04:00
Kubernetes Prow Robot
1cfaa95cab Merge pull request #124898 from alexzielenski/apiserver/prerelease-ga-tags
Require prerelease lifecycle tags on GA types
2024-05-29 08:02:42 -07:00
Kubernetes Prow Robot
da02fdb2ae Merge pull request #123339 from skitt/canonical-json-patch
Update kustomize, use canonical json-patch v4 import
2024-05-29 08:02:24 -07:00
Patrick Ohly
080432c46a client-go record: avoid panic when watch creation failed
The previous attempt to fix this in
6aa779f4ed (diff-efa2cd1347df22ace5a516ea794152d00ef2a079db135c81787ed920ecb73658)
didn't address the root cause (or perhaps created it, not sure): the goroutine
must not be started if watch creation failed.

Instead, the error gets logged (as before) and an empty watch gets returned to
the caller (new). This is necessary because the function doesn't have an error
return value and changing that now would be disruptive. The empty watch is
valid and usable, so callers won't crash when they calls Stop.

This showed up recently in failed unit tests, probably because test
cancellation makes this error more likely:

   "Unable start event watcher (will not retry!)" err="broadcaster already
   stopped" logger="TestGarbageCollectorConstruction leaked goroutine"

The logger value and a preceding warning show that this occurs after test
completion.
2024-05-29 14:10:49 +02:00
Kubernetes Prow Robot
1d5589e491 Merge pull request #125159 from p0lyn0mial/upstream-add-data-consistency-checker-for-list-requests
client-go/util/consistencydetector: add CheckListFromCacheDataConsistencyIfRequested
2024-05-29 02:00:58 -07:00
Lukasz Szaszkiewicz
48014bd7bd client-go/util/consistencydetector: add CheckListFromCacheDataConsistencyIfRequested 2024-05-29 09:26:12 +02:00
Kubernetes Prow Robot
7ba244f50e Merge pull request #125131 from ah8ad3/auth-cani-approve
Add approve as a valid verb in can-i
2024-05-28 23:33:36 -07:00
Kubernetes Prow Robot
bc8ec4f9aa Merge pull request #125166 from p0lyn0mial/upstream-improve-check-data-consistency
client-go/util/consistencydetector: improve validation of list parameters (RV, ListOptions)
2024-05-28 13:58:53 -07:00
Kubernetes Prow Robot
1ff1207d22 Merge pull request #124017 from carlory/rm-ctrl-flags
kube-controller-manager removes deprecated command flags
2024-05-28 10:54:22 -07:00
Kubernetes Prow Robot
8991e825d5 Merge pull request #125052 from p0lyn0mial/upstream-client-go-env-var-set
client-go/features: add Set method to the envvar impl
2024-05-28 08:28:07 -07:00
Lukasz Szaszkiewicz
327ae9866b client-go/util/consistencydetector: improve validation of list parameters (RV, ListOptions) 2024-05-28 16:55:37 +02:00
Kubernetes Prow Robot
f4ea903712 Merge pull request #124635 from pohly/event-broadcaster-shutdown-fix
client-go/tools/record: fix and test Broadcaster shutdown + logging
2024-05-28 07:03:09 -07:00
Stephen Kitt
5300466a5c Use canonical json-patch v4 import
The canonical import for json-patch v4 is
gopkg.in/evanphx/json-patch.v4 (see
https://github.com/evanphx/json-patch/blob/master/README.md#get-it for
reference).

Using the v4-specific path should also reduce the risk of unwanted v5
upgrade attempts, because they won't be offered as automated upgrades
by dependency upgrade management tools, and they won't happen through
indirect dependencies (see
https://github.com/kubernetes/kubernetes/pull/120327 for context).

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2024-05-28 10:48:22 +02:00
Stephen Kitt
33c6f6bc65 Update kubectl kustomize to kyaml/v0.17.1, cmd/config/v0.14.1, api/v0.17.2, kustomize/v5.4.2
Signed-off-by: Stephen Kitt <skitt@redhat.com>
2024-05-28 10:48:12 +02:00
Kubernetes Prow Robot
1c84623028 Merge pull request #125045 from pohly/ginkgo-gomega-update
dependencies: ginkgo v2.19.0, gomega v1.33.1
2024-05-28 01:03:18 -07:00
Eric Lin
44c08fdbd5 Add /readyz for kube-scheduler
/readyz contains `sched-handler-sync`, `leaderElection` (when election is
enabled) and `shutdown` checks
2024-05-27 19:11:24 +00:00
Patrick Ohly
37e2dd6857 dependencies: ginkgo v2.19.0, gomega v1.33.1
Ginkgo v2.18.0 allows tweaking the output so that
it's easier to follow while a job runs in
Prow (https://github.com/onsi/ginkgo/issues/1347). Using this in
hack/ginkgo-e2e.sh will follow in a separate commit.

Gomega gets bumped to the latest release to keep it up-to-date.

Ginkgo v1.19.0 adds support for --label-filter with labels that represent
sets (like our Feature:<Foo>).
2024-05-27 15:25:50 +02:00
Kubernetes Prow Robot
9d5db28f5f Merge pull request #125146 from p0lyn0mial/upstream-client-go-consistency-detector-move-to-new-package
client-go: move data consistency detector to a new package
2024-05-27 06:24:08 -07:00
Lukasz Szaszkiewicz
a07654baa5 client-go/features: add Set method to envvar impl 2024-05-27 13:40:52 +02:00
Ritikaa96
6f4e60a6b7 adding suggested changes
Signed-off-by: Ritikaa96 <ritika@india.nec.com>
2024-05-27 17:07:31 +05:30
Ritikaa96
22186fafaf Improving kubectl get output
Adding namespace flag & examples
Signed-off-by: Ritikaa96 <ritika@india.nec.com>
2024-05-27 17:07:31 +05:30
Ritikaa96
23ac0be7ad correcting link to krew install
Signed-off-by: Ritikaa96 <ritika@india.nec.com>
2024-05-27 16:52:19 +05:30
Ritikaa96
3848c8b07a added name-only and examples in the kubectl plugin help
Signed-off-by: Ritikaa96 <ritika@india.nec.com>
2024-05-27 16:30:21 +05:30
Lukasz Szaszkiewicz
cb44f83b3d move checkWatchListDataConsistencyIfRequested back to client-go/tools/cache 2024-05-27 12:32:03 +02:00
Lukasz Szaszkiewicz
e421046f64 client-go/util/consistencydetector: make the detector public 2024-05-27 12:32:03 +02:00