mirror of
https://github.com/helm/helm.git
synced 2026-05-28 04:35:48 -04:00
Drop unused field.
Signed-off-by: Marcin Owsiany <porridge@redhat.com>
This commit is contained in:
parent
833bbfa31a
commit
a6863a64ce
5 changed files with 6 additions and 12 deletions
|
|
@ -165,7 +165,7 @@ func (cfg *Configuration) renderResources(ch *chart.Chart, values chartutil.Valu
|
|||
// Sort hooks, manifests, and partials. Only hooks and manifests are returned,
|
||||
// as partials are not used after renderer.Render. Empty manifests are also
|
||||
// removed here.
|
||||
hs, manifests, err := releaseutil.SortManifests(files, caps.APIVersions, releaseutil.InstallOrder)
|
||||
hs, manifests, err := releaseutil.SortManifests(files, nil, releaseutil.InstallOrder)
|
||||
if err != nil {
|
||||
// By catching parse errors here, we can prevent bogus releases from going
|
||||
// to Kubernetes.
|
||||
|
|
|
|||
|
|
@ -196,13 +196,9 @@ func joinErrors(errs []error) string {
|
|||
// deleteRelease deletes the release and returns list of delete resources and manifests that were kept in the deletion process
|
||||
func (u *Uninstall) deleteRelease(rel *release.Release) (kube.ResourceList, string, []error) {
|
||||
var errs []error
|
||||
caps, err := u.cfg.getCapabilities()
|
||||
if err != nil {
|
||||
return nil, rel.Manifest, []error{errors.Wrap(err, "could not get apiVersions from Kubernetes")}
|
||||
}
|
||||
|
||||
manifests := releaseutil.SplitManifests(rel.Manifest)
|
||||
_, files, err := releaseutil.SortManifests(manifests, caps.APIVersions, releaseutil.UninstallOrder)
|
||||
_, files, err := releaseutil.SortManifests(manifests, nil, releaseutil.UninstallOrder)
|
||||
if err != nil {
|
||||
// We could instead just delete everything in no particular order.
|
||||
// FIXME: One way to delete at this point would be to try a label-based
|
||||
|
|
|
|||
|
|
@ -53,7 +53,8 @@ var (
|
|||
type Capabilities struct {
|
||||
// KubeVersion is the Kubernetes version.
|
||||
KubeVersion KubeVersion
|
||||
// APIversions are supported Kubernetes API versions.
|
||||
// APIVersions are supported Kubernetes API versions.
|
||||
// This field is unused.
|
||||
APIVersions VersionSet
|
||||
// HelmVersion is the build information for this helm version
|
||||
HelmVersion helmversion.BuildInfo
|
||||
|
|
|
|||
|
|
@ -41,7 +41,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 +74,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, _ chartutil.VersionSet, ordering KindSortOrder) ([]*release.Hook, []Manifest, error) {
|
||||
result := &result{}
|
||||
|
||||
var sortedFilePaths []string
|
||||
|
|
@ -100,7 +99,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 {
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ import (
|
|||
|
||||
"sigs.k8s.io/yaml"
|
||||
|
||||
"helm.sh/helm/v3/pkg/chartutil"
|
||||
"helm.sh/helm/v3/pkg/release"
|
||||
)
|
||||
|
||||
|
|
@ -139,7 +138,7 @@ metadata:
|
|||
manifests[o.path] = o.manifest
|
||||
}
|
||||
|
||||
hs, generic, err := SortManifests(manifests, chartutil.VersionSet{"v1", "v1beta1"}, InstallOrder)
|
||||
hs, generic, err := SortManifests(manifests, nil, InstallOrder)
|
||||
if err != nil {
|
||||
t.Fatalf("Unexpected error: %s", err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue