Commit Graph

21002 Commits

Author SHA1 Message Date
Patrick Ohly
bde9b64cdf DRA: remove "source" indirection from v1 Pod API
This makes the API nicer:

    resourceClaims:
    - name: with-template
      resourceClaimTemplateName: test-inline-claim-template
    - name: with-claim
      resourceClaimName: test-shared-claim

Previously, this was:

    resourceClaims:
    - name: with-template
      source:
        resourceClaimTemplateName: test-inline-claim-template
    - name: with-claim
      source:
        resourceClaimName: test-shared-claim

A more long-term benefit is that other, future alternatives
might not make sense under the "source" umbrella.

This is a breaking change. It's justified because DRA is still
alpha and will have several other API breaks in 1.31.
2024-06-27 17:53:24 +02:00
Marek Siarkowicz
0c0e19b343 Move ConsistentListFromCache to Beta default 2024-06-20 10:56:51 +02:00
Marek Siarkowicz
4e51e9cff8 Explicitly disable ConsistentListFromCache in TestGetListNonRecursiveCacheBypass 2024-06-20 10:56:51 +02:00
Kubernetes Prow Robot
52e4fbdd85 Merge pull request #125574 from jpmcb/cobra-1.8.1
Upgrade spf13/cobra v1.8.1
2024-06-19 19:00:22 -07:00
Kubernetes Prow Robot
fc786fc6e8 Merge pull request #125552 from liggitt/fix-timeout-wiring
KEP-3221: Fix structured authorization webhook timeout wiring and detection
2024-06-19 19:00:16 -07:00
Jordan Liggitt
c50f68d6ee Fix structured authorization webhook timeout wiring 2024-06-19 15:36:36 -04:00
John McBride
5aaff7d060 feat: Upgrade to cobra v1.8.1
Signed-off-by: John McBride <jpmmcbride@gmail.com>
2024-06-19 12:14:50 -06:00
Kubernetes Prow Robot
33829b68b5 Merge pull request #121439 from skitt/generic-client-go
Use generics to share code in client-go implementations
2024-06-19 11:08:42 -07:00
Kubernetes Prow Robot
1e66d66d7c Merge pull request #125573 from dims/update-moby/term-to-a-released-tag-v0.5.0
Update moby/term to a released tag - v0.5.0
2024-06-19 10:06:47 -07:00
Kubernetes Prow Robot
ccbe92982d Merge pull request #125551 from p0lyn0mial/upstream-hack-for-test-that-request-watch-progress
storage/cacher/cacher_whitebox_test.go: deflake tests that require storage.RequestWatchProgress
2024-06-19 07:38:41 -07:00
Marek Siarkowicz
c207f967ac Fix TestGetListRecursivePrefix for all types of LIST 2024-06-19 13:19:02 +02:00
Marek Siarkowicz
3d3a73bd37 Fix TestWebhookConverterWithWatchCache when ResilientWatchCacheInitialization and ConsistentListFromCache are enabled 2024-06-19 12:06:24 +02:00
Lukasz Szaszkiewicz
47a61f03d4 storage/cacher/cacher_whitebox_test.go: deflake tests that require storage.RequestWatchProgress 2024-06-19 09:34:45 +02:00
Kubernetes Prow Robot
a81ea5d0af Merge pull request #125424 from benluddy/cbor-timetag-rfc3339
KEP-4222: Decode CBOR time tags to interface{} as RFC 3339 timestamps.
2024-06-18 19:06:47 -07:00
Kubernetes Prow Robot
01c9d26a97 Merge pull request #125051 from marquiz/devel/codegen-fix-grep
kube_codegen: smarter grepping of codegen tags
2024-06-18 19:06:40 -07:00
Davanum Srinivas
e457f5687a Update moby/term to a released tag - v0.5.0
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2024-06-18 19:58:55 -04:00
Kubernetes Prow Robot
3f9b79fc11 Merge pull request #125145 from xyz-li/fix_watch_namespace
apiserver: fix watch namespace
2024-06-18 10:39:44 -07:00
xyz-li
818fabe37b apiserver: fix watch namespace
For request like '/api/v1/watch/namespaces/*', don't set scope.namespace.
Because the func `addWatcher` add a watcher to allWatchers with the value `scope.namespace` not empty.
But the function `dispatchEvent` dispatch event with an empty namespace.

Signed-off-by: xyz-li <hui0787411@163.com>
2024-06-18 11:53:28 +08:00
Kubernetes Prow Robot
a3a49887ee Merge pull request #125540 from pohly/revert-binding-deprecation
api: revert deprecation annotation for v1 Binding
2024-06-17 20:21:53 -07:00
Kubernetes Prow Robot
09472b673d Merge pull request #125499 from mbobrovskyi/fix/openapi-gen-dependency
Add k8s.io/kube-openapi/cmd/openapi-gen dependency on code-generator go.mod
2024-06-17 17:56:46 -07:00
Patrick Ohly
5d0165d140 api: revert deprecation annotation for v1 Binding
https://github.com/kubernetes/kubernetes/pull/124898 added deprecation
annotations for existing types, including v1 Binding. That had the side effect
of also incorrectly marking the binding sub-resource as deprecated, which in
turn caused one warning in the kube-scheduler log output per scheduled pod.
2024-06-17 19:47:41 +02: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
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
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
Sean Sullivan
3ae3b4ea55 Graduate PortForwardWebsockets to Beta 2024-06-15 16:09:23 -07:00
Mykhailo Bobrovskyi
aa01f7058a Fix openapi-gen dependency. 2024-06-14 15:47:39 +03: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
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
dceabab838 client-gen: intro watchList 2024-06-13 17:13:30 +02:00
Kubernetes Prow Robot
b498eb9740 Merge pull request #125472 from karlkfi/karl-watch-comments
Add details to watch interface method comments
2024-06-13 03:11:52 -07:00
Kubernetes Prow Robot
08a8480558 Merge pull request #125391 from karlkfi/karl-reflector-watch-stop
Refactor Reflector ListAndWatch
2024-06-13 03:11:42 -07:00
Kubernetes Prow Robot
0a6ad55da9 Merge pull request #125384 from dims/remove-gce-specific-flag-registration
Remove GCE specific flag registration
2024-06-12 14:47:24 -07:00
Kubernetes Prow Robot
bfc26378a9 Merge pull request #125083 from azimjohn/master
Bump konnectivity-client to v0.30.3
2024-06-12 14:47:11 -07:00
Karl Isenberg
65fc1bb463 Refactor Reflector ListAndWatch
- Extract watchWithResync to simplify ListAndWatch
- Wrap watchHandler with two variants, one for WatchList and one for
  just Watch.
- Replace a bool pointer arg with a bool arg and bool return, to
  improve readability.
- Use errors.Is to satisfy the linter
- Use %w to wrap the store.Replace error, to allow unwrapping.
2024-06-12 13:14:55 -07:00
Karl Isenberg
1f35231a1d Add details to watch interface method comments
The watch.Interface design is hard to change, because it would break
most client-go users that perform watches. So instead of changing the
interface to be more user friendly, this change updates the method
comments to explain the different responsibilities of the consumer
(client user) and the producer (interface implementer).
2024-06-12 13:06:22 -07:00
Kubernetes Prow Robot
8db1402f3d Merge pull request #125435 from p0lyn0mial/upstream-rm-reflector-data-consistency-detector-test
client-go/reflector: remove reflector_data_consistency_detector_test.go
2024-06-12 11:09:18 -07:00
Kubernetes Prow Robot
813d3f35b4 Merge pull request #125440 from p0lyn0mial/upstream-client-go-watchlist-can-use-watchlist-for-list-rq
client-go/util/watchlist: intro CanUseWatchListForListRequest(
2024-06-12 10:04:30 -07:00
Kubernetes Prow Robot
6c556cb9c2 Merge pull request #125464 from akhilerm/drop-release-1.26
Drop publishing-bot rules for the release-1.26 branch
2024-06-12 07:44:56 -07:00
Kubernetes Prow Robot
cf0b457690 Merge pull request #125444 from babugeet/babugeet-patch-1
Added logic to check portnumber by name in sidecar container (init)
2024-06-12 07:44:42 -07:00
Mauri de Souza Meneguzzo
e59988d769 Fix flaking TestStoreListResourceVersion 2024-06-12 07:12:02 -03:00
Lukasz Szaszkiewicz
38fae9b799 client-go/util/watchlist: intro CanUseWatchListForListRequest 2024-06-12 12:05:16 +02:00
Akhil Mohan
95b3d2c869 Drop publishing-bot rules for the release-1.26 branch
Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
2024-06-12 15:03:40 +05:30