Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Support customizing “Accept” header #1428

@roycaihw

Description

@roycaihw

What is the feature and why do you need it:
From a conversation in slack. Kubernetes client-go has a metadata client that only retrieves object metadata from the API server. It helps in scenarios where the user only cares about object metadata and wants to reduce the client-side deserialization time. The easiest way to support this feature in the Python client is to do it in the dynamic client.

Describe the solution you'd like to see:
The dynamic client hard-codes the Accept header. We can have a new parameter to allow overwriting the value like how the metadata client does:

SetHeader("Accept", "application/vnd.kubernetes.protobuf;as=PartialObjectMetadata;g=meta.k8s.io;v=v1,application/json;as=PartialObjectMetadata;g=meta.k8s.io;v=v1,application/json").

The solution should be e2e tested.

Metadata

Metadata

Assignees

Labels

good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/featureCategorizes issue or PR as related to a new feature.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions