Velero: Velero public API (please take note)

Created on 19 Jun 2020  路  13Comments  路  Source: vmware-tanzu/velero

Please take note that what Velero intentionally exposes as a public APIs are the packages below:

https://github.com/vmware-tanzu/velero/tree/master/pkg/apis/velero/v1

https://github.com/vmware-tanzu/velero/tree/master/pkg/plugin

https://github.com/vmware-tanzu/velero/tree/master/pkg/install

https://github.com/vmware-tanzu/velero/tree/master/pkg/client

https://github.com/vmware-tanzu/velero/tree/master/pkg/generated

"github.com/vmware-tanzu/velero/pkg/builder"

We will be doing work to move code that we don't intend to be for public consumption into the internal directory structure so we don't expose packages unintentionally.

If you are relying on packages outside those listed above that are intentionally for public consumption, please let us know.

Breaking change Public Announcement Reviewed Q2 2021 kintech-debt

Most helpful comment

Hi @carlisia

We are using following packages:

All 13 comments

@betta1 @dymurray @vishnuitta Letting you know as you depend on Velero code.

i assume we will chat about this in the next 1-2 community meetings. thanks

cc @sseago @alaypatel07

i assume we will chat about this in the next 1-2 community meetings. thanks

@michmike Yeah, I think this will be an on-going community meeting agenda item.

thanks @nrb for the heads up.

cc @phuongatemc

Hi @carlisia

We are using following packages:

Outside of the public ones, we are using:

"github.com/vmware-tanzu/velero/pkg/builder"

using:
https://github.com/vmware-tanzu/velero/tree/master/pkg/discovery

Kots is using github.com/vmware-tanzu/velero/pkg/label for GetValidName.

Please take note that what Velero intentionally exposes as a public APIs are the packages below:

https://github.com/vmware-tanzu/velero/tree/master/pkg/apis/velero/v1

https://github.com/vmware-tanzu/velero/tree/master/pkg/plugin

https://github.com/vmware-tanzu/velero/tree/master/pkg/install

https://github.com/vmware-tanzu/velero/tree/master/pkg/client

https://github.com/vmware-tanzu/velero/tree/master/pkg/generated

"github.com/vmware-tanzu/velero/pkg/builder"

We will be doing work to move code that we don't intend to be for public consumption into the internal directory structure so we don't expose packages unintentionally.

If you are relying on packages outside those listed above that are intentionally for public consumption, please let us know.
I have a question about velero REST API, How should I pass parameters for backup a resource? such as "velero backup create nginx-backup --include-namespaces nginx" , What is the json parameters?

Dear Carlisia,
Recently 锛孖 am integrating the Velero into the kubersphere project, encountered some confusion about velero exposing API to pass json parameters. Whether have a document I can see the various REST API input and output parameters of velero?

Dear Carlisia,
Recently 锛孖 am integrating the Velero into the kubersphere project, encountered some confusion about velero exposing API to pass json parameters. Whether have a document I can see the various REST API input and output parameters of velero?

This issue is not the best place for this question. I'll answer it here but any further help you need please open a new issue.

Velero does not have a REST API. It is a CLI tool. You may use the Kubernetes REST api if that is useful to perform crude operations. The API being discussed in this issue is the API for Velero Go packages. Here's documentation for our specs:
https://velero.io/docs/v1.5/api-types/
https://github.com/vmware-tanzu/velero-plugin-for-aws/blob/main/backupstoragelocation.md
https://github.com/vmware-tanzu/velero-plugin-for-aws/blob/main/volumesnapshotlocation.md

Hope this helps.

https://github.com/vmware-tanzu/velero/blob/7727d535a4440ba8837c0cc8fade70cdd2749457/pkg/cmd/util/downloadrequest/

Following up from conversation on velero slack. I wonder if the community can benefit from downloadrequest being a public package. I could see a use where the Stream function is used by other tools as a programmatic interface to get the logs for a backup or restore.

Was this page helpful?
0 / 5 - 0 ratings