-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
create backups from schedules using velero create backup #1734
create backups from schedules using velero create backup #1734
Conversation
…schedules Signed-off-by: Adnan Abdulhussein <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple questions, but I think I'd like to see some behavior documented either way.
FYI I think this should wait for v1.2, but just wanted to get something going. |
Signed-off-by: Adnan Abdulhussein <[email protected]>
Signed-off-by: Adnan Abdulhussein <[email protected]>
Signed-off-by: Adnan Abdulhussein <[email protected]>
Signed-off-by: Adnan Abdulhussein <[email protected]>
Signed-off-by: Adnan Abdulhussein <[email protected]>
Signed-off-by: Adnan Abdulhussein <[email protected]>
Signed-off-by: Adnan Abdulhussein <[email protected]>
Signed-off-by: Adnan Abdulhussein <[email protected]>
Signed-off-by: Adnan Abdulhussein <[email protected]>
Signed-off-by: Adnan Abdulhussein <[email protected]>
I updated the flag description and added a basic test for building backups, and some tests for building backups from schedules. I couldn't see a clear way to create a table-driven test here, feedback welcome! |
pkg/cmd/cli/backup/create_test.go
Outdated
@@ -0,0 +1,89 @@ | |||
/* | |||
Copyright 2017 the Velero contributors. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, the generator just takes the header from the main file, so I forgot to update it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I would like to automate this away someday.
two nits, otherwise LGTM. tests LGTM as-is -- IMHO when there are only a small number of cases, there's not that much benefit to using table-driven. Gets more useful when lots of scenarios. |
I think you need a |
Signed-off-by: Adnan Abdulhussein <[email protected]>
@@ -33,7 +33,7 @@ import ( | |||
"k8s.io/client-go/tools/cache" | |||
|
|||
api "github.com/heptio/velero/pkg/apis/velero/v1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@skriss looks like this used to have a duplicate package import too, should I update this to use velerov1api everywhere too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eh, let's get this one merged - we can update this next time we touch this file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
* upstream/master: (118 commits) restore: rename PV when remapping a namespace if PV exists in-cluster (vmware-tanzu#1779) when backing up PVCs with restic, explicitly specify --parent (vmware-tanzu#1807) Unit tests for restic restore (vmware-tanzu#1747) Upgrade kubernetes dependencies to 1.15.3 (vmware-tanzu#1808) create backups from schedules using velero create backup (vmware-tanzu#1734) remove calls to restic check before/after prune (vmware-tanzu#1794) Propose adding feature flags to velero restic backup and restore progress proposal (vmware-tanzu#1765) allow custom restic repo prefix to be specified in BSL config error if restic repo identifier can't be determined update nokogiri dep for website update links on website home page for latest release (vmware-tanzu#1789) Velero 1.1 blog post v1.1.0 changelog fix error formatting Revert "allow self signed certs with insecureSkipVerify (vmware-tanzu#1769)" allow self signed certs with insecureSkipVerify (vmware-tanzu#1769) v1.1.0 docs Add the prefix to BSL config map so that object stores can use it when initializing (vmware-tanzu#1767) add stable/velero to helm commands ...
* upstream/master: (118 commits) restore: rename PV when remapping a namespace if PV exists in-cluster (vmware-tanzu#1779) when backing up PVCs with restic, explicitly specify --parent (vmware-tanzu#1807) Unit tests for restic restore (vmware-tanzu#1747) Upgrade kubernetes dependencies to 1.15.3 (vmware-tanzu#1808) create backups from schedules using velero create backup (vmware-tanzu#1734) remove calls to restic check before/after prune (vmware-tanzu#1794) Propose adding feature flags to velero restic backup and restore progress proposal (vmware-tanzu#1765) allow custom restic repo prefix to be specified in BSL config error if restic repo identifier can't be determined update nokogiri dep for website update links on website home page for latest release (vmware-tanzu#1789) Velero 1.1 blog post v1.1.0 changelog fix error formatting Revert "allow self signed certs with insecureSkipVerify (vmware-tanzu#1769)" allow self signed certs with insecureSkipVerify (vmware-tanzu#1769) v1.1.0 docs Add the prefix to BSL config map so that object stores can use it when initializing (vmware-tanzu#1767) add stable/velero to helm commands ...
* upstream/master: (118 commits) restore: rename PV when remapping a namespace if PV exists in-cluster (vmware-tanzu#1779) when backing up PVCs with restic, explicitly specify --parent (vmware-tanzu#1807) Unit tests for restic restore (vmware-tanzu#1747) Upgrade kubernetes dependencies to 1.15.3 (vmware-tanzu#1808) create backups from schedules using velero create backup (vmware-tanzu#1734) remove calls to restic check before/after prune (vmware-tanzu#1794) Propose adding feature flags to velero restic backup and restore progress proposal (vmware-tanzu#1765) allow custom restic repo prefix to be specified in BSL config error if restic repo identifier can't be determined update nokogiri dep for website update links on website home page for latest release (vmware-tanzu#1789) Velero 1.1 blog post v1.1.0 changelog fix error formatting Revert "allow self signed certs with insecureSkipVerify (vmware-tanzu#1769)" allow self signed certs with insecureSkipVerify (vmware-tanzu#1769) v1.1.0 docs Add the prefix to BSL config map so that object stores can use it when initializing (vmware-tanzu#1767) add stable/velero to helm commands ...
* jesse/20190828_merge: (511 commits) fix(ci): Update arm32 target. feat(ci): Auto-build restic-restore-helper image in CI. restore: rename PV when remapping a namespace if PV exists in-cluster (vmware-tanzu#1779) when backing up PVCs with restic, explicitly specify --parent (vmware-tanzu#1807) Unit tests for restic restore (vmware-tanzu#1747) Upgrade kubernetes dependencies to 1.15.3 (vmware-tanzu#1808) create backups from schedules using velero create backup (vmware-tanzu#1734) remove calls to restic check before/after prune (vmware-tanzu#1794) Propose adding feature flags to velero restic backup and restore progress proposal (vmware-tanzu#1765) allow custom restic repo prefix to be specified in BSL config error if restic repo identifier can't be determined update nokogiri dep for website update links on website home page for latest release (vmware-tanzu#1789) Velero 1.1 blog post v1.1.0 changelog fix error formatting Revert "allow self signed certs with insecureSkipVerify (vmware-tanzu#1769)" allow self signed certs with insecureSkipVerify (vmware-tanzu#1769) v1.1.0 docs ...
Adds a flag
--from-schedule
to the velero create backup command to create a Backup from an existing Schedule.Signed-off-by: Adnan Abdulhussein [email protected]
closes #656