Commit Graph

11 Commits (4b91a97ff7ae3009ae11e93cc372f76030a9d687)

Author SHA1 Message Date
Scott Seago 970f17c1ef If includeClusterResources is nil/auto, pull in necessary CRDs (#1831)
Related issue: https://github.com/heptio/velero/issues/1830

This accomplishes everything
that's needed, although there might be room for improvement in avoiding
a GET call for matching CRDs for each resource backed up. An alternative
could be a single call to get all CRDs prior to iterating over resources
and passing this into the backupResource function.

Signed-off-by: Scott Seago <sseago@redhat.com>
2019-10-17 12:31:04 -06:00
Steve Kriss 4543258970 Update tests to use object builders in pkg/builder (#1707)
* add pkg/builder with BackupBuilder and ObjectMeta functional options

Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-07-31 07:46:48 -07:00
Steve Kriss 1bb167ef90 add restore item action to change PVC/PV storage class name (#1621)
* add restore item action to change PVC/PV storage class name

Signed-off-by: Steve Kriss <krisss@vmware.com>

* code review

Signed-off-by: Steve Kriss <krisss@vmware.com>

* change existing plugin names to lowercase/hyphenated

Signed-off-by: Steve Kriss <krisss@vmware.com>

* add validation for new storage class name

Signed-off-by: Steve Kriss <krisss@vmware.com>

* add test cases

Signed-off-by: Steve Kriss <krisss@vmware.com>

* changelog

Signed-off-by: Steve Kriss <krisss@vmware.com>

* fix imports

Signed-off-by: Steve Kriss <krisss@vmware.com>

* update plugin names to be more consistent

Signed-off-by: Steve Kriss <krisss@vmware.com>

* update unit tests to use pkg/test object constructors

Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-07-15 11:19:38 -07:00
Nolan Brubaker 63964fc6f9 Append "/mount" to directory for CSI volumes (#1615)
CSI volumes are mounted one level deeper than "native" kubernetes
volumes, and this needs to be appended for proper restic support.

Fixes #1313.

Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
2019-07-10 15:16:21 -07:00
Adnan Abdulhussein eec5cc687e validate pod volumes hostpath mount on restic server startup (#1616)
Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>
2019-07-03 14:20:31 -06:00
Steve Kriss 567802299b move PV/PVC setup helpers into pkg/test
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-07-03 08:50:11 -06:00
Steve Kriss 022099a62e Refactor pkg/restore tests (part 3) (#1611)
* add modifying restore item action tests

Signed-off-by: Steve Kriss <krisss@vmware.com>

* add restore item action additional items tests

Signed-off-by: Steve Kriss <krisss@vmware.com>

* migrate ShouldRestore test

Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-06-27 15:43:59 -07:00
Steve Kriss 81c2adc059 Refactor pkg/restore tests (part 2) (#1606)
* update TestPrioritizeResources to use real discovery helper

Signed-off-by: Steve Kriss <krisss@vmware.com>

* migrate invalid tarball contents tests

Signed-off-by: Steve Kriss <krisss@vmware.com>

* migrate item restore tests

Signed-off-by: Steve Kriss <krisss@vmware.com>

* migrate restore item action tests

Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-06-27 11:57:47 -07:00
Steve Kriss 1a339f06ac migrate restore resource filtering tests
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-06-24 15:53:15 -06:00
Adnan Abdulhussein b0bdaeea73 ensure correct backup item actions run with namespace selector (#1601)
* ensure correct backup item actions run with namespace selector

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>

* changelog

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>

* don't run backup item actions for namespace resources

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>

* simplify cluster-scope resources checks

Signed-off-by: Adnan Abdulhussein <aadnan@vmware.com>
2019-06-24 15:50:25 -06:00
Steve Kriss 0735ee7218 extract shared API test helpers to pkg/test
Signed-off-by: Steve Kriss <krisss@vmware.com>
2019-06-20 14:57:31 -06:00