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

Add option for Azure cross subscription backups #1895

Merged
merged 8 commits into from
Oct 3, 2019
Merged

Add option for Azure cross subscription backups #1895

merged 8 commits into from
Oct 3, 2019

Conversation

boxcee
Copy link
Contributor

@boxcee boxcee commented Sep 20, 2019

Closes #1646

Moritz Schmitz von Hülst added 2 commits September 20, 2019 17:06
Signed-off-by: Moritz Schmitz von Hülst <[email protected]>
…king up to a different Azure Subscription than the cluster's resources.

Signed-off-by: Moritz Schmitz von Hülst <[email protected]>
@boxcee boxcee marked this pull request as ready for review September 23, 2019 11:57
@skriss
Copy link
Contributor

skriss commented Sep 23, 2019

Thanks for this @boxcee! I'll review and do some testing this week.

Copy link
Contributor

@skriss skriss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@boxcee thanks again for this PR! Have you been able to test this? I don't currently have an Azure cluster set up so trying to decide if I need to for testing or not.

Let's also document the subscriptionId config key at site/docs/master/api-types/backupstoragelocation.md, under the Azure section.

@boxcee
Copy link
Contributor Author

boxcee commented Sep 26, 2019

@skriss For testing, is there anything I should document? We have an Azure account and I will test this today.

Moritz Schmitz von Hülst added 4 commits September 26, 2019 11:29
…velero into allow-cross-subscription-backups
refactor regarding to comment, add more documentation
…velero into allow-cross-subscription-backups
@skriss
Copy link
Contributor

skriss commented Sep 26, 2019

@boxcee just some quick notes on exactly what scenario/steps you tested would be great - don't need anything long, just enough to get the idea. thanks!

Copy link
Contributor

@skriss skriss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code LGTM - just waiting for confirmation on testing

@skriss skriss requested review from nrb and carlisia September 26, 2019 18:55
Signed-off-by: Moritz Schmitz von Hülst <[email protected]>
@boxcee
Copy link
Contributor Author

boxcee commented Sep 27, 2019

Soooo, I did test this and it does work. But, please don't review just yet. During testing I realized that I also need to store snapshots in a different subscription.

I was testing this today but couldn't finish it. Will continue on Monday and update PR.

@boxcee boxcee requested a review from skriss September 27, 2019 14:45
@jweldonca
Copy link

jweldonca commented Sep 30, 2019

hey @boxcee, how do you test this succesfully?

I get the following error
An error occurred: some backup storage locations are invalid: error getting backup store for location "default": rpc error: code = Unknown desc = config has invalid keys [subscriptionId]; valid keys are [resourceGroup storageAccount bucket prefix]

@boxcee
Copy link
Contributor Author

boxcee commented Sep 30, 2019

@jweldonca I assume this error shows up in the controller?

By default the Makefile creates a new container when run with all-containers. I changed the repository to point to our company repository and docker pushed the images there.
Then I also modified the deployment (after installing with velero install) to point to the company repo.

Your problem is basically that you have built a new velero binary, but the images being deployed are still the master images.

For reference: https://github.com/heptio/velero/blob/2d845683a2ddf06b956433ff57e04b86890f4776/pkg/install/deployment.go#L96

Signed-off-by: Moritz Schmitz von Hülst <[email protected]>
@boxcee
Copy link
Contributor Author

boxcee commented Sep 30, 2019

@skriss Can confirm it does work cross-subscription now!

  1. Created a cluster in subscription A and configured it to create snapshots and backups in subscription B.
  2. Used the example nginx-app to create a backup.
  3. Deleted the cluster in subscription A.
  4. Re-created a cluster in subscription A and configured it as before to use subscription B for snapshots and backups.
  5. Then I ran the restore command from the example.
  6. Success!

@skriss
Copy link
Contributor

skriss commented Oct 2, 2019

👍 I didn't realize that cross-subscription volume snapshots were even possible - sounds great! I'll take another look at the code shortly.

Copy link
Contributor

@skriss skriss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. @carlisia - is it going to be an issue for you if we merge this Azure-specific PR into master now? If yes and you want to hold it until the separate plugin repo is created, then we'll want to help migrate the PR over there.

Copy link
Contributor

@carlisia carlisia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd be best to merge now wrt the plugins!

Great contribution, thank you!

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

Successfully merging this pull request may close these issues.

Azure: cross subscription backups
4 participants