Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support customizing “Accept” header #1428

Closed
roycaihw opened this issue Apr 26, 2021 · 5 comments · Fixed by #1459
Closed

Support customizing “Accept” header #1428

roycaihw opened this issue Apr 26, 2021 · 5 comments · Fixed by #1459
Assignees
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature.

Comments

@roycaihw
Copy link
Member

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.

@roycaihw roycaihw added the kind/feature Categorizes issue or PR as related to a new feature. label Apr 26, 2021
@roycaihw
Copy link
Member Author

/help

cc @Yashks1994 @Priyankasaggu11929

@k8s-ci-robot
Copy link
Contributor

@roycaihw:
This request has been marked as needing help from a contributor.

Please ensure the request meets the requirements listed here.

If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-help command.

In response to this:

/help

cc @Yashks1994 @Priyankasaggu11929

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label Apr 26, 2021
@Yashks1994
Copy link
Contributor

/assign

@roycaihw roycaihw added the good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. label Apr 26, 2021
@Yashks1994
Copy link
Contributor

Opened a PR- kubernetes-client/python-base#236 to accept the header.

@roycaihw
Copy link
Member Author

roycaihw commented May 7, 2021

@Yashks1994 Could you run https://github.com/kubernetes-client/python/blob/master/devel/submodules.md#update-submodule to update the submodule, so that kubernetes-client/python-base#236 is included in the main repo?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
3 participants