Merge pull request #1028 from wwitzel3/0.9-backports

0.9 backports
This commit is contained in:
Nolan Brubaker
2018-11-01 12:35:25 -04:00
committed by GitHub
2 changed files with 11 additions and 0 deletions

View File

@@ -18,6 +18,7 @@ package aws
import (
"io"
"sort"
"strconv"
"time"
@@ -181,6 +182,11 @@ func (o *objectStore) ListObjects(bucket, prefix string) ([]string, error) {
return nil, errors.WithStack(err)
}
// ensure that returned objects are in a consistent order so that the deletion logic deletes the objects before
// the pseudo-folder prefix object for s3 providers (such as Quobyte) that return the pseudo-folder as an object.
// See https://github.com/heptio/ark/pull/999
sort.Sort(sort.Reverse(sort.StringSlice(ret)))
return ret, nil
}

View File

@@ -364,6 +364,7 @@ const (
)
// - 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.
// - 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
@@ -372,8 +373,11 @@ const (
// - 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.
// - Custom Resource Definitions come before Custom Resource so that they can be
// restored with their corresponding CRD.
var defaultResourcePriorities = []string{
"namespaces",
"storageclasses",
"persistentvolumes",
"persistentvolumeclaims",
"secrets",
@@ -382,6 +386,7 @@ var defaultResourcePriorities = []string{
"limitranges",
"pods",
"replicaset",
"customresourcedefinitions",
}
func applyConfigDefaults(c *api.Config, logger logrus.FieldLogger) {