|
|
|
@ -26,7 +26,6 @@ import (
|
|
|
|
|
"github.com/pkg/errors"
|
|
|
|
|
"sigs.k8s.io/yaml"
|
|
|
|
|
|
|
|
|
|
"helm.sh/helm/v3/pkg/chartutil"
|
|
|
|
|
"helm.sh/helm/v3/pkg/release"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
@ -41,7 +40,6 @@ type Manifest struct {
|
|
|
|
|
type manifestFile struct {
|
|
|
|
|
entries map[string]string
|
|
|
|
|
path string
|
|
|
|
|
apis chartutil.VersionSet
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// result is an intermediate structure used during sorting.
|
|
|
|
@ -75,7 +73,7 @@ var events = map[string]release.HookEvent{
|
|
|
|
|
//
|
|
|
|
|
// Files that do not parse into the expected format are simply placed into a map and
|
|
|
|
|
// returned.
|
|
|
|
|
func SortManifests(files map[string]string, apis chartutil.VersionSet, ordering KindSortOrder) ([]*release.Hook, []Manifest, error) {
|
|
|
|
|
func SortManifests(files map[string]string, ordering KindSortOrder) ([]*release.Hook, []Manifest, error) {
|
|
|
|
|
result := &result{}
|
|
|
|
|
|
|
|
|
|
var sortedFilePaths []string
|
|
|
|
@ -100,7 +98,6 @@ func SortManifests(files map[string]string, apis chartutil.VersionSet, ordering
|
|
|
|
|
manifestFile := &manifestFile{
|
|
|
|
|
entries: SplitManifests(content),
|
|
|
|
|
path: filePath,
|
|
|
|
|
apis: apis,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if err := manifestFile.sort(result); err != nil {
|
|
|
|
|