Skip to content
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

Enable google api_endpoint_overrides for storage in velero-plugin-for-gcp #7731

Open
salla2 opened this issue Apr 23, 2024 · 5 comments
Open

Comments

@salla2
Copy link

salla2 commented Apr 23, 2024

Describe the problem/challenge you have

We have different storage endpoint for gcs bucket and we cannot set that today, usually using gcloud cli we can set this through
gcloud config set api_endpoint_overrides/storage https://storage-test1.p.googleapis.com/storage/v1/
and with sdk through below based on docs [https://cloud.google.com/storage/docs/request-endpoints#storage-set-client-endpoint-go]

Describe the solution you'd like

It would be great if I can pass api_endpoint_overrides/storage through BackupStorageLocation , something like additional key under bucket.
objectStorage: bucket: velero-backups prefix: private/stage/cluster api_endpoint_overrides/storage: https://storage-test1.p.googleapis.com/storage/v1/

Anything else you would like to add:

Environment:

  • Velero version (use velero version):
  • Kubernetes version (use kubectl version):
  • Kubernetes installer & version:
  • Cloud provider or hardware configuration:
  • OS (e.g. from /etc/os-release):

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.

  • 👍 for "The project would be better with this feature added"
  • 👎 for "This feature will not enhance the project in a meaningful way"
@blackpiglet
Copy link
Contributor

blackpiglet commented Apr 24, 2024

Does your environment try to connect to the GCP API in the on-premise infrastructure?
https://cloud.google.com/vpc/docs/configure-private-service-connect-apis

If the OSS API uses the specified DNS, the snapshot API may also need the same configuration.

@chrislinan
Copy link

I have the same request, We would like to use regional endpoints of the GCP service.
And I have a potential solution:

  1. add a new config in GCP BSL, such as "endpoint", example:
spec:
  accessMode: ReadWrite
  credential:
    key: key
    name: velero
  default: true
  endpoint: https://storage-test1.p.googleapis.com/storage/v1
  objectStorage:
    bucket: bucket_name
    prefix: prefix_example
  provider: gcp
  1. enhance the GCP plugin here: Use WithEndPoint for the clientOptions.

I can prepare the PR to implement this feature if that is acceptable.

@blackpiglet
Copy link
Contributor

Thanks for your interest in contribution. If a new configuration is needed, I prefer to add it in the BSL.spec.config.

@chrislinan
Copy link

OK, I will prepare a PR for this feature.

@chrislinan
Copy link

PR opened for this feature: vmware-tanzu/velero-plugin-for-gcp#184

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants