Skip to content

How do I create TokenRequest with kube-rs? #988

Answered by clux
pbzweihander asked this question in Q&A
Discussion options

You must be logged in to vote

TokenRequest is a subresource and needs to acted on an Api::<ServiceAccount> with the methods that exists for that.

Unfortunately, TokenRequest is actually one of those few ones that is missing its create_token_request method #127 (even though it's not particularly hard to add)

You might be able to use the general helpers like Api::patch_subresource with subresource_name="token" and (serverside apply parameters to be equivalent to create), but I think we should add the Api::create_token_request to subresource.rs ala https://github.com/kube-rs/kube-rs/pull/773/files - along with a generic Api::create_subresource

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@pbzweihander
Comment options

Answer selected by pbzweihander
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants