vmware-tanzu / velero

Backup and migrate Kubernetes applications and their persistent volumes
https://velero.io
Apache License 2.0
8.59k stars 1.39k forks source link

Use the aggregated discovery to discover the groups/resources #7526

Open ywk253100 opened 6 months ago

ywk253100 commented 6 months ago

Currently, Velero creates a discovery client when starting up, fetches the API groups every 5 minutes and caches them. When a backup is created, Velero iterates the cached groups and fetches the resource types for every group and then fetches the objects for every resource type.

Kubernetes introduces a new accept header Accept: application/json;as=APIGroupDiscoveryList;v=v2beta1;g=apidiscovery.k8s.io in APIs api/apis to support returning an aggregated discovery document for all groups/resources in one request. And Etag is also supported in the new API. Refer to the design.

With the new machinesm, we can refactor the discovery process to avoid useless interactions with API server and improve the performance for backing up Kuerbernetes resources.

Vote on this issue!

This is an invitation to the Velero community to vote on issues, you can see the project's top voted issues listed here.
Use the "reaction smiley face" up to the right of this comment to vote.

reasonerjt commented 6 months ago

This is beta on k8s v1.26+

github-actions[bot] commented 4 months ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days. If a Velero team member has requested log or more information, please provide the output of the shared commands.

kaovilai commented 4 months ago

unstale

github-actions[bot] commented 1 month ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days. If a Velero team member has requested log or more information, please provide the output of the shared commands.

kaovilai commented 1 month ago

unstale

ywk253100 commented 1 week ago

The aggregated discovery API is stable on Kubernetes v1.30