You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the feature and why do you need it:
I'm using the client to retrieve custom objects generated by Argo workflows.
The functionality to get results in chunks is missing from the Python api, while is working correctly making the rest calls.
It's important to have the chunks pagination since the system based on argo is generating a fairly big amount of workflows.
Describe the solution you'd like to see:
Add the parameters limit and continue_token to the listing methods like the following:
from __future__ importprint_functionimporttimeimportkubernetes.clientfromkubernetes.client.restimportApiExceptionfrompprintimportpprint# Configure API key authorization: BearerTokenconfiguration=kubernetes.client.Configuration()
configuration.api_key['authorization'] ='YOUR_API_KEY'# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed# configuration.api_key_prefix['authorization'] = 'Bearer'# create an instance of the API classapi_instance=kubernetes.client.CustomObjectsApi(kubernetes.client.ApiClient(configuration))
group='group_example'# str | The custom resource's group nameversion='version_example'# str | The custom resource's versionplural='plural_example'# str | The custom resource's plural name. For TPRs this would be lowercase plural kind.limit=10try:
api_response_page_1=api_instance.list_cluster_custom_object(group, version, plural, limit=limit)
continue_token=api_response_page_1['metadata']['continue']
api_response_page_2=api_instance.list_cluster_custom_object(group, version, plural, limit=limit, continue_token=continue_token)
exceptApiExceptionase:
print("Exception when calling CustomObjectsApi->list_cluster_custom_object: %s\n"%e)
Thanks in advance
The text was updated successfully, but these errors were encountered:
The openapi spec that we use to generate the APIs for custom objects needs to be fixed.
It should have the same continue and limit parameters for LIST and DELETECOLLECTION paths as the openapi spec for native types
once the openapi spec is fixed, we can regenerate the client so the custom object APIs also have _continue and limit parameters as the native types (e.g. here)
@roycaihw: GitHub didn't allow me to assign the following users: scottilee.
Note that only kubernetes-client members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide
The openapi spec that we use to generate the APIs for custom objects needs to be fixed.
It should have the same continue and limit parameters for LIST and DELETECOLLECTION paths as the openapi spec for native types
once the openapi spec is fixed, we can regenerate the client so the custom object APIs also have _continue and limit parameters as the native types (e.g. here)
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.
What is the feature and why do you need it:
I'm using the client to retrieve custom objects generated by Argo workflows.
The functionality to get results in chunks is missing from the Python api, while is working correctly making the rest calls.
It's important to have the chunks pagination since the system based on argo is generating a fairly big amount of workflows.
Describe the solution you'd like to see:
Add the parameters
limit
andcontinue_token
to the listing methods like the following:Thanks in advance
The text was updated successfully, but these errors were encountered: