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
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
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
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