Commit Graph

27 Commits

Author SHA1 Message Date
Lukasz Szaszkiewicz
6708db95c9 client-go/dynamic: rm watchlist
Kubernetes-commit: 3038f3530d1b35d896826673acdae0bd55bd769c
2025-06-11 09:45:09 +02:00
Ben Luddy
8cb21671f4 Add CBOR feature gates.
For alpha, there is one apiserver feature gate and two client-go feature gates controlling
CBOR. They were initially wired to separate test-only feature gate instances in order to prevent
them from being configurable at runtime via command-line flags or environment variables (for
client-go feature gates outside of Kubernetes components). All of the integration tests required by
the KEP as alpha criteria have been implemented. This adds the feature gates to the usual feature
gate instances and removes the temporary code to support separate test-only feature gate instances.

Kubernetes-commit: 072dfcb416fd4e1ddab0a89ac4faf519e268bc96
2024-11-04 10:40:19 -05:00
Ben Luddy
cff56219d9 Support application/apply-patch+cbor in patch requests.
Kubernetes-commit: 37ed906a33211c7d578cab2d681941ebfd2f2f23
2024-10-22 16:08:24 -04:00
Ben Luddy
1cca19dc02 Add test-only client feature gates for CBOR.
As with the apiserver feature gate for CBOR as a serving and storage encoding, the client feature
gates for CBOR are being initially added through a test-only feature gate instance that is not wired
to environment variables or to command-line flags and is intended only to be enabled
programmatically from integration tests. The test-only instance will be removed as part of alpha
graduation and replaced by conventional client feature gating.

Kubernetes-commit: ea13190d8bd3a4bb3e82055b529aa7599ae5c6e1
2024-10-23 16:36:37 -04:00
Ben Luddy
ee51eaf9d0 Use content negotiation in the dynamic client.
Kubernetes-commit: 97958d96a2911c8b1df324868f4730b1c622c798
2024-02-15 17:47:19 -05:00
Ryan McKinley
fae3dcdbf6 avoid panic when subresource is a list
Kubernetes-commit: 2e3b937dcdb02cab74213a5608cc4dac39c6423e
2024-09-09 09:40:38 +03:00
Lukasz Szaszkiewicz
732dd289a0 dynamic client: add support for API streaming
Kubernetes-commit: d778356bc6a057ae41bee4577e568293a25fce9b
2024-07-11 13:49:29 +02:00
Lukasz Szaszkiewicz
5d84e91dbf client-go/dynamic: use CheckListFromCacheDataConsistencyIfRequested
Kubernetes-commit: 79370c6d676814758c60bbc1b71a882583be2214
2024-06-04 10:23:19 +02:00
Steve Kuznetsov
34e8a5d862 client-go: factor the dynamic client similarly to others
All other clients:

 - expose a New() method that takes a rest.Interface
 - expose their RESTClient()
 - return pointers to the type, not instances of an interface that the
   type implements

For code that is generic over all Kubernetes clients, and for general
developer experience, it's best to make sure that this client adheres to
these common practices.

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>

Kubernetes-commit: 74af6f1e7d9057bfcb64f4d875063c14041937e5
2022-09-28 08:57:22 -06:00
Antoine Pelisse
a4b84d86ec Validate segments with client-go/dynamic
Kubernetes-commit: 7d64440dd1edf2acb8e71ecd6726904962c6bd02
2022-08-30 16:32:10 -07:00
Kevin Delgado
4eab6be14c Add Apply and ApplyStatus methods to dynamic ResourceInterface
Kubernetes-commit: 581ac7f4465ed97ddc5c62f04376ac427e121601
2022-04-12 20:24:15 +00:00
Antonio Ojea
12956a0d53 expose NewForConfigAndClient for the dynamic client
Kubernetes-commit: b584195e5cc0a1094318ba886a9aecd2f675d59c
2021-10-19 15:58:58 +02:00
scott
61ae14a896 set the content-type Header when the dynamic client sends the request
Kubernetes-commit: 2ad09c6a87b9150598c6119d653acc983c5c7a11
2021-08-12 20:17:07 +08:00
Jordan Liggitt
1faf9e8d03 client-go dynamic context
Kubernetes-commit: 6fa54d715fbc992afb483e71d450d5dbd66990eb
2020-03-06 01:27:11 -05:00
Jordan Liggitt
2c6476911c client-go dynamic client: pass DeleteOptions by value
Kubernetes-commit: 161b7513f73185745f8c17db5a56b7229157f876
2020-03-06 10:20:27 -05:00
Mike Danese
b136e9eb2b refactor
Kubernetes-commit: d55d6175f8e2cfdab0b79aac72046a652c2eb515
2020-01-27 18:19:44 -08:00
Clayton Coleman
881cd219a8 dynamic: The dynamic client no longer needs a special cased watch
By correctly handling content type negotiation, we can avoid the
need for a special version of watch and use the same code path as
typed clients.

Kubernetes-commit: 3f94f80b0a79293e54d7080aaf7a64d7df8b1d4a
2019-11-03 15:10:12 -05:00
Levi Blackstone
5691acfeec Check for required name parameter in dynamic client
The Create, Delete, Get, Patch, Update and UpdateStatus
methods in the dynamic client all expect the name
parameter to be non-empty, but did not validate this
requirement, which could lead to a panic. Add explicit
checks to these methods.

Kubernetes-commit: a9cba032dedbed9d04828c917a79a8371305d058
2019-03-06 16:21:33 -07:00
Clayton Coleman
abaa46c115 Support Table and PartialObjectMetadata on watch
Clean up the code paths that lead to objects being transformed and output with negotiation.
Remove some duplicate code that was not consistent. Now, watch will respond correctly to
Table and PartialObjectMetadata requests. Add unit and integration tests.

When transforming responses to Tables, only the first watch event for a given type will
include the columns. Columns will not change unless the watch is restarted.

Add a volume attachment printer and tighten up table validation error cases.

Disable protobuf from table conversion because Tables don't have protobuf because they
use `interface{}`

Kubernetes-commit: 3230a0b4fd14a6166f8362d4732e199e8779c426
2018-11-28 23:50:12 -05:00
Antoine Pelisse
35efedd302 API Machinery, Kubectl and tests
Kubernetes-commit: 0e1d50e70fdc9ed838d75a7a1abbe5fa607d22a1
2019-01-16 21:14:42 -08:00
Antoine Pelisse
29424b90cb dry-run: Update DynamicClient to pass Create/Update options
Kubernetes-commit: 71970d6475f6570d933fa9f22be2ebc20a9ace6f
2018-08-01 10:35:43 -07:00
David Eads
875f881c7c add missing OrDie variant for dynamic client construction
Kubernetes-commit: 75e28b0dd48a3a2d90d1bbb8133114134c6d0528
2018-07-23 16:29:35 -04:00
David Eads
f6af22edb3 fix dynamic client name
Kubernetes-commit: fd044d152ee13a6cb812e4c3e7504ee8e24b5b8c
2018-05-09 12:58:12 -04:00
David Eads
77541e5cb7 add subresource support for the dynamic client
Kubernetes-commit: 82e32d2a3260807237a69bc40fb371db640d26fc
2018-05-09 12:52:12 -04:00
David Eads
7757aaeb14 make dynamic client slightly easier to use
Kubernetes-commit: 5ff923c7f931a34632df1f5a5400adbec33d49bf
2018-04-27 11:29:05 -04:00
xuzhonghu
2b0acf6f5a fix bug in dynamicResourceClient.UpdateStatus should encode
Kubernetes-commit: 9e8ce9535d9ce46791304e4ea3d1694e09b9ae9f
2018-04-27 14:07:11 +08:00
David Eads
2e1683e1a1 add easy to use dynamic client
Kubernetes-commit: 3632037e600d82a954c05ecd4f9cb6f1ca93d41c
2018-04-24 13:41:40 -04:00