-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Document a way how to use TokenRequest for existing ServiceAccount #5133
Comments
Looks like we don't support this yet. We need to add support for this resource https://kubernetes.io/docs/reference/kubernetes-api/authentication-resources/token-request-v1/ |
What could be possible timeframe for adding this? Due to this we have to use other client just for this usecase. |
@pjastrzabek-roche : Hi, I plan to pick this up when I upgrade Kubernetes model to v1.27.0 #5056 . Hopefully, I will be able to start working on this next week. |
…n v1 model (fabric8io#5133) Add a model for type TokenRequest to kubernetes-model-admissionregistration in `io.fabric8.kubernetes.api.model.authentication` package Signed-off-by: Rohan Kumar <rohaan@redhat.com>
…ken for ServiceAccount (fabric8io#5133) + Add new DSL method tokenRequest() which will request apiserver for token for the given ServiceAccount. + Since this TokenRequest isn't any standard resource but subresource for ServiceAccount, add ServiceAccountResource in order to add new TokenRequestable interface for ServiceAccount Signed-off-by: Rohan Kumar <rohaan@redhat.com>
…n v1 model (#5133) Add a model for type TokenRequest to kubernetes-model-admissionregistration in `io.fabric8.kubernetes.api.model.authentication` package Signed-off-by: Rohan Kumar <rohaan@redhat.com>
…ken for ServiceAccount (fabric8io#5133) + Add new DSL method tokenRequest() which will request apiserver for token for the given ServiceAccount. + Since this TokenRequest isn't any standard resource but subresource for ServiceAccount, add ServiceAccountResource in order to add new TokenRequestable interface for ServiceAccount Signed-off-by: Rohan Kumar <rohaan@redhat.com>
@pjastrzabek-roche : I've created a PR adding DSL method |
Functional-wise this is what we need. LGTM! |
…ken for ServiceAccount (fabric8io#5133) + Add new DSL method tokenRequest() which will request apiserver for token for the given ServiceAccount. + Since this TokenRequest isn't any standard resource but subresource for ServiceAccount, add ServiceAccountResource in order to add new TokenRequestable interface for ServiceAccount Signed-off-by: Rohan Kumar <rohaan@redhat.com>
…ken for ServiceAccount (fabric8io#5133) + Add new DSL method tokenRequest() which will request apiserver for token for the given ServiceAccount. + Since this TokenRequest isn't any standard resource but subresource for ServiceAccount, add ServiceAccountResource in order to add new TokenRequestable interface for ServiceAccount Signed-off-by: Rohan Kumar <rohaan@redhat.com>
…ken for ServiceAccount (fabric8io#5133) + Add new DSL method tokenRequest() which will request apiserver for token for the given ServiceAccount. + Since this TokenRequest isn't any standard resource but subresource for ServiceAccount, add ServiceAccountResource in order to add new TokenRequestable interface for ServiceAccount Signed-off-by: Rohan Kumar <rohaan@redhat.com>
…ken for ServiceAccount (#5133) + Add new DSL method tokenRequest() which will request apiserver for token for the given ServiceAccount. + Since this TokenRequest isn't any standard resource but subresource for ServiceAccount, add ServiceAccountResource in order to add new TokenRequestable interface for ServiceAccount Signed-off-by: Rohan Kumar <rohaan@redhat.com>
Is your task related to a problem? Please describe
I am trying to create new expiring token for existing ServiceAccount, basically equivalent of
I see there is TokenRequestBuilder and TokenRequest but the latter do not extend HasMetadata thus I cannot use generic API for creation.
Is there any way to call this api?
Describe the solution you'd like
Having an API for easy token creation.
See something similar in go sdk
https://github.com/kubernetes/client-go/blob/686b396dc0681d7f140bd2ee6b3c3bdea56cab4d/kubernetes/typed/core/v1/serviceaccount.go#L214
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: