mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-05 04:55:22 +00:00
bug fix: only prioritize restoring replicasets.apps (#2157)
Signed-off-by: Steve Kriss <krisss@vmware.com>
This commit is contained in:
committed by
Carlisia Campos
parent
4907bea398
commit
be140985c5
1
changelogs/unreleased/2157-skriss
Normal file
1
changelogs/unreleased/2157-skriss
Normal file
@@ -0,0 +1 @@
|
||||
bug fix: only prioritize restoring `replicasets.apps`, not `replicasets.extensions`
|
||||
@@ -451,8 +451,7 @@ func (s *server) validateBackupStorageLocations() error {
|
||||
// - 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.
|
||||
// restored and be adopted by controllers.
|
||||
// - Custom Resource Definitions come before Custom Resource so that they can be
|
||||
// restored with their corresponding CRD.
|
||||
var defaultRestorePriorities = []string{
|
||||
@@ -465,10 +464,11 @@ var defaultRestorePriorities = []string{
|
||||
"serviceaccounts",
|
||||
"limitranges",
|
||||
"pods",
|
||||
// we fully qualify replicasets.apps because prior to Kubernetes 1.16, replicasets also
|
||||
// existed in the extensions API group, but we back up replicasets from "apps" so we want
|
||||
// to ensure that we prioritize restoring from "apps" too, since this is how they're stored
|
||||
// in the backup.
|
||||
"replicasets.apps",
|
||||
// TODO(sk): delete the following line once we no longer support Kubernetes
|
||||
// versions prior to v1.16.
|
||||
"replicasets.extensions",
|
||||
"customresourcedefinitions",
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user