add replicasets.apps to prioritized restore resources (#2120)

* add replicasets.apps to prioritized restore resources

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

* changelog

Signed-off-by: Steve Kriss <krisss@vmware.com>
This commit is contained in:
Steve Kriss
2019-12-11 13:32:33 -07:00
committed by Nolan Brubaker
parent bbaa0196d1
commit 96297ea437
2 changed files with 8 additions and 1 deletions

View File

@@ -450,6 +450,9 @@ func (s *server) validateBackupStorageLocations() error {
// - Limit ranges go before pods or controllers so pods can use them.
// - Pods go before controllers so they can be explicitly restored and potentially
// have restic restores run before controllers adopt the pods.
// - Replica sets go before deployments/other controllers so they can be explicitly
// restored and be adopted. Restore from both the 'apps' and 'extensions' API group,
// in that order, since they existed in both prior to v1.16.
// - Custom Resource Definitions come before Custom Resource so that they can be
// restored with their corresponding CRD.
var defaultRestorePriorities = []string{
@@ -462,7 +465,10 @@ var defaultRestorePriorities = []string{
"serviceaccounts",
"limitranges",
"pods",
"replicaset",
"replicasets.apps",
// TODO(sk): delete the following line once we no longer support Kubernetes
// versions prior to v1.16.
"replicasets.extensions",
"customresourcedefinitions",
}