Merge pull request #971 from shubheksha/fix/594-restore-storageclasses-before-pv-pvc

Restore storageclasses before pvs and pvcs
pull/981/head
Steve Kriss 2018-10-23 08:14:42 -06:00 committed by GitHub
commit f3a57b5b8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -438,6 +438,7 @@ func (s *server) validateBackupStorageLocations() error {
} }
// - Namespaces go first because all namespaced resources depend on them. // - Namespaces go first because all namespaced resources depend on them.
// - Storage Classes are needed to create PVs and PVCs correctly.
// - PVs go before PVCs because PVCs depend on them. // - PVs go before PVCs because PVCs depend on them.
// - PVCs go before pods or controllers so they can be mounted as volumes. // - PVCs go before pods or controllers so they can be mounted as volumes.
// - Secrets and config maps go before pods or controllers so they can be mounted // - Secrets and config maps go before pods or controllers so they can be mounted
@ -450,6 +451,7 @@ func (s *server) validateBackupStorageLocations() error {
// restored with their corresponding CRD. // restored with their corresponding CRD.
var defaultRestorePriorities = []string{ var defaultRestorePriorities = []string{
"namespaces", "namespaces",
"storageclasses",
"persistentvolumes", "persistentvolumes",
"persistentvolumeclaims", "persistentvolumeclaims",
"secrets", "secrets",