From c86a8cbd53cacc6ef127d45122cfade0b50c0c0d Mon Sep 17 00:00:00 2001 From: Felipe Santos Date: Mon, 4 Jul 2022 18:43:29 -0300 Subject: [PATCH 01/68] perf(dep-up): do not update the same repo multiple times Signed-off-by: Felipe Santos --- pkg/downloader/manager.go | 18 +++++++++ pkg/downloader/manager_test.go | 69 ++++++++++++++++++++++++++++++++++ 2 files changed, 87 insertions(+) diff --git a/pkg/downloader/manager.go b/pkg/downloader/manager.go index a5b0af080..d0f101dab 100644 --- a/pkg/downloader/manager.go +++ b/pkg/downloader/manager.go @@ -659,9 +659,27 @@ func (m *Manager) UpdateRepositories() error { return nil } +// Filter out duplicate repos by URL, including those with trailing slashes. +func dedupeRepos(repos []*repo.Entry) []*repo.Entry { + seen := make(map[string]*repo.Entry) + for _, r := range repos { + // Normalize URL by removing trailing slashes. + r.URL = strings.TrimSuffix(r.URL, "/") + seen[r.URL] = r + } + var unique []*repo.Entry + for _, r := range seen { + unique = append(unique, r) + } + return unique +} + func (m *Manager) parallelRepoUpdate(repos []*repo.Entry) error { var wg sync.WaitGroup + + repos = dedupeRepos(repos) + for _, c := range repos { r, err := repo.NewChartRepository(c, m.Getters) if err != nil { diff --git a/pkg/downloader/manager_test.go b/pkg/downloader/manager_test.go index f7ab1a568..13c94e116 100644 --- a/pkg/downloader/manager_test.go +++ b/pkg/downloader/manager_test.go @@ -26,6 +26,7 @@ import ( "helm.sh/helm/v3/pkg/chart/loader" "helm.sh/helm/v3/pkg/chartutil" "helm.sh/helm/v3/pkg/getter" + "helm.sh/helm/v3/pkg/repo" "helm.sh/helm/v3/pkg/repo/repotest" ) @@ -572,3 +573,71 @@ func TestKey(t *testing.T) { } } } + +// Test dedupeRepos tests that the dedupeRepos function correctly deduplicates +func TestDedupeRepos(t *testing.T) { + tests := []struct { + name string + repos []*repo.Entry + want []*repo.Entry + }{ + { + name: "no duplicates", + repos: []*repo.Entry{ + { + URL: "https://example.com/charts", + }, + { + URL: "https://example.com/charts2", + }, + }, + want: []*repo.Entry{ + { + URL: "https://example.com/charts", + }, + { + URL: "https://example.com/charts2", + }, + }, + }, + { + name: "duplicates", + repos: []*repo.Entry{ + { + URL: "https://example.com/charts", + }, + { + URL: "https://example.com/charts", + }, + }, + want: []*repo.Entry{ + { + URL: "https://example.com/charts", + }, + }, + }, + { + name: "duplicates with trailing slash", + repos: []*repo.Entry{ + { + URL: "https://example.com/charts", + }, + { + URL: "https://example.com/charts/", + }, + }, + want: []*repo.Entry{ + { + URL: "https://example.com/charts", + }, + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + if got := dedupeRepos(tt.repos); !reflect.DeepEqual(got, tt.want) { + t.Errorf("received:\n%v\nwant:\n%v", got, tt.want) + } + }) + } +} From baf8bffc124c49bab69ad6f6462a66e951210fdf Mon Sep 17 00:00:00 2001 From: Evans Mungai Date: Mon, 25 Nov 2024 11:20:22 +0000 Subject: [PATCH 02/68] feat: Add flags to enable CPU and memory profiling Add capability to profile cli command using https://go.dev/blog/pprof Signed-off-by: Evans Mungai --- CONTRIBUTING.md | 14 +++++++- cmd/helm/profiling.go | 76 +++++++++++++++++++++++++++++++++++++++++++ cmd/helm/root.go | 23 +++++++++++++ 3 files changed, 112 insertions(+), 1 deletion(-) create mode 100644 cmd/helm/profiling.go diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0c2f88453..aa67b5aef 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -276,12 +276,24 @@ Like any good open source project, we use Pull Requests (PRs) to track code chan or explicitly request another OWNER do that for them. - If the owner of a PR is _not_ listed in `OWNERS`, any core maintainer may merge the PR. -#### Documentation PRs +### Documentation PRs Documentation PRs should be made on the docs repo: . Keeping Helm's documentation up to date is highly desirable, and is recommended for all user facing changes. Accurate and helpful documentation is critical for effectively communicating Helm's behavior to a wide audience. Small, ad-hoc changes/PRs to Helm which introduce user facing changes, which would benefit from documentation changes, should apply the `docs needed` label. Larger changes associated with a HIP should track docs via that HIP. The `docs needed` label doesn't block PRs, and maintainers/PR reviewers should apply discretion judging in whether the `docs needed` label should be applied. +### Testing PRs + +During development, you need to add automated tests where possible. There are a few `make test*` targets that you can use to execute your unit or integration tests. If your contribution requires profiling to check memory and/or CPU usage, you can use `--cpuprofile` and/or `--memprofile` global cli flags to run collect runtime profiling data for analysis. You can use Golang's [pprof](https://github.com/google/pprof/blob/main/doc/README.md) tool to inspect the profiling data. + +Example invocation that collects profiling data +``` +helm show all bitnami/nginx --memprofile mem.prof --cpuprofile cpu.prof + +# Visualize graphs. You need to have installed graphviz in you system +go tool pprof -http=":8000" cpu.prof +``` + ## The Triager Each week, one of the core maintainers will serve as the designated "triager" starting after the diff --git a/cmd/helm/profiling.go b/cmd/helm/profiling.go new file mode 100644 index 000000000..090532416 --- /dev/null +++ b/cmd/helm/profiling.go @@ -0,0 +1,76 @@ +// Profile CPU and memory usage of Helm commands + +package main + +import ( + "fmt" + "os" + "runtime" + "runtime/pprof" + "strings" + + "github.com/spf13/cobra" +) + +var ( + cpuProfileFile *os.File +) + +// startProfiling starts profiling CPU usage +func startProfiling(cpuprofile string) error { + if cpuprofile != "" { + var err error + cpuProfileFile, err = os.Create(cpuprofile) + if err != nil { + return fmt.Errorf("could not create CPU profile: %w", err) + } + if err := pprof.StartCPUProfile(cpuProfileFile); err != nil { + cpuProfileFile.Close() + cpuProfileFile = nil + return fmt.Errorf("could not start CPU profile: %w", err) + } + } + return nil +} + +// stopProfiling stops profiling CPU and memory usage and writes the results to +// the files specified by --cpuprofile and --memprofile flags respectively. +func stopProfiling(memprofile string) error { + errs := []string{} + + // Stop CPU profiling if it was started + if cpuProfileFile != nil { + pprof.StopCPUProfile() + err := cpuProfileFile.Close() + if err != nil { + errs = append(errs, err.Error()) + } + cpuProfileFile = nil + } + + if memprofile != "" { + f, err := os.Create(memprofile) + if err != nil { + errs = append(errs, err.Error()) + } + defer f.Close() + + runtime.GC() // get up-to-date statistics + if err := pprof.WriteHeapProfile(f); err != nil { + errs = append(errs, err.Error()) + } + } + + if len(errs) > 0 { + return fmt.Errorf("errors while stopping profiling: [%s]", strings.Join(errs, ", ")) + } + + return nil +} + +// addProfilingFlags adds the --cpuprofile and --memprofile flags to the given command. +func addProfilingFlags(cmd *cobra.Command) { + // Persistent flags to make available to subcommands + cmd.PersistentFlags().String("cpuprofile", "", "File path to write cpu profiling data") + cmd.PersistentFlags().String("memprofile", "", "File path to write memory profiling data") +} diff --git a/cmd/helm/root.go b/cmd/helm/root.go index 2ba8a882e..fa1e6c6d0 100644 --- a/cmd/helm/root.go +++ b/cmd/helm/root.go @@ -95,6 +95,26 @@ func newRootCmd(actionConfig *action.Configuration, out io.Writer, args []string Short: "The Helm package manager for Kubernetes.", Long: globalUsage, SilenceUsage: true, + PersistentPreRun: func(cmd *cobra.Command, args []string) { + cpuprof, err := cmd.Flags().GetString("cpuprofile") + if err != nil { + log.Printf("Warning: Failed to get cpuprofile flag: %v", err) + } + + if err := startProfiling(cpuprof); err != nil { + log.Printf("Warning: Failed to start profiling: %v", err) + } + }, + PersistentPostRun: func(cmd *cobra.Command, args []string) { + memprof, err := cmd.Flags().GetString("memprofile") + if err != nil { + log.Printf("Warning: Failed to get memprofile flag: %v", err) + } + + if err := stopProfiling(memprof); err != nil { + log.Printf("Warning: Failed to stop profiling: %v", err) + } + }, } flags := cmd.PersistentFlags() @@ -206,6 +226,9 @@ func newRootCmd(actionConfig *action.Configuration, out io.Writer, args []string // Check for expired repositories checkForExpiredRepos(settings.RepositoryConfig) + // CPU and memory profiling flags that are available to all commands + addProfilingFlags(cmd) + return cmd, nil } From af622e8887fc104e020df6ed8deb6464653b34b6 Mon Sep 17 00:00:00 2001 From: Evans Mungai Date: Mon, 25 Nov 2024 12:01:18 +0000 Subject: [PATCH 03/68] Additional review fixes from PR Signed-off-by: Evans Mungai --- CONTRIBUTING.md | 6 +++--- cmd/helm/profiling.go | 16 +++++++++++++++- cmd/helm/root.go | 4 ++-- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index aa67b5aef..796c661bc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -284,13 +284,13 @@ Small, ad-hoc changes/PRs to Helm which introduce user facing changes, which wou ### Testing PRs -During development, you need to add automated tests where possible. There are a few `make test*` targets that you can use to execute your unit or integration tests. If your contribution requires profiling to check memory and/or CPU usage, you can use `--cpuprofile` and/or `--memprofile` global cli flags to run collect runtime profiling data for analysis. You can use Golang's [pprof](https://github.com/google/pprof/blob/main/doc/README.md) tool to inspect the profiling data. +During development, you need to add automated tests where possible. There are a few `make test*` targets that you can use to execute your unit or integration tests. If your contribution requires profiling to check memory and/or CPU usage, you can use `--cpuprofile` and/or `--memprofile` global cli flags to collect runtime profiling data for analysis. You can use Golang's [pprof](https://github.com/google/pprof/blob/main/doc/README.md) tool to inspect the results. -Example invocation that collects profiling data +Example analysing collected profiling data ``` helm show all bitnami/nginx --memprofile mem.prof --cpuprofile cpu.prof -# Visualize graphs. You need to have installed graphviz in you system +# Visualize graphs. You need to have installed graphviz package in your system go tool pprof -http=":8000" cpu.prof ``` diff --git a/cmd/helm/profiling.go b/cmd/helm/profiling.go index 090532416..e1ca62853 100644 --- a/cmd/helm/profiling.go +++ b/cmd/helm/profiling.go @@ -1,4 +1,18 @@ -// Profile CPU and memory usage of Helm commands +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ package main diff --git a/cmd/helm/root.go b/cmd/helm/root.go index fa1e6c6d0..50cb87e37 100644 --- a/cmd/helm/root.go +++ b/cmd/helm/root.go @@ -95,7 +95,7 @@ func newRootCmd(actionConfig *action.Configuration, out io.Writer, args []string Short: "The Helm package manager for Kubernetes.", Long: globalUsage, SilenceUsage: true, - PersistentPreRun: func(cmd *cobra.Command, args []string) { + PersistentPreRun: func(cmd *cobra.Command, _ []string) { cpuprof, err := cmd.Flags().GetString("cpuprofile") if err != nil { log.Printf("Warning: Failed to get cpuprofile flag: %v", err) @@ -105,7 +105,7 @@ func newRootCmd(actionConfig *action.Configuration, out io.Writer, args []string log.Printf("Warning: Failed to start profiling: %v", err) } }, - PersistentPostRun: func(cmd *cobra.Command, args []string) { + PersistentPostRun: func(cmd *cobra.Command, _ []string) { memprof, err := cmd.Flags().GetString("memprofile") if err != nil { log.Printf("Warning: Failed to get memprofile flag: %v", err) From e6f829e6b61a2052adf35b35acef2543674f9a44 Mon Sep 17 00:00:00 2001 From: Evans Mungai Date: Wed, 11 Dec 2024 14:15:58 +0000 Subject: [PATCH 04/68] Update CONTRIBUTING.md Co-authored-by: Terry Howe Signed-off-by: Evans Mungai --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 796c661bc..fb875c2ea 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -282,7 +282,7 @@ Documentation PRs should be made on the docs repo: Date: Wed, 11 Dec 2024 14:20:54 +0000 Subject: [PATCH 05/68] Update CONTRIBUTING.md Signed-off-by: Evans Mungai --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fb875c2ea..7b4254592 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -284,7 +284,7 @@ Small, ad-hoc changes/PRs to Helm which introduce user facing changes, which wou ### Profiling PRs -During development, you need to add automated tests where possible. There are a few `make test*` targets that you can use to execute your unit or integration tests. If your contribution requires profiling to check memory and/or CPU usage, you can use `--cpuprofile` and/or `--memprofile` global cli flags to collect runtime profiling data for analysis. You can use Golang's [pprof](https://github.com/google/pprof/blob/main/doc/README.md) tool to inspect the results. +If your contribution requires profiling to check memory and/or CPU usage, you can use `--cpuprofile` and/or `--memprofile` global cli flags to collect runtime profiling data for analysis. You can use Golang's [pprof](https://github.com/google/pprof/blob/main/doc/README.md) tool to inspect the results. Example analysing collected profiling data ``` From d4175cfcff087420675451b177ef610a760802e4 Mon Sep 17 00:00:00 2001 From: Evans Mungai Date: Wed, 11 Dec 2024 15:17:30 +0000 Subject: [PATCH 06/68] Move pprof paths to HELM_PPROF env variable Signed-off-by: Evans Mungai --- CONTRIBUTING.md | 4 +- cmd/helm/profiling.go | 44 ++++++++++++++++++--- cmd/helm/profiling_test.go | 79 ++++++++++++++++++++++++++++++++++++++ cmd/helm/root.go | 14 +------ 4 files changed, 122 insertions(+), 19 deletions(-) create mode 100644 cmd/helm/profiling_test.go diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7b4254592..0a90054d9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -284,11 +284,11 @@ Small, ad-hoc changes/PRs to Helm which introduce user facing changes, which wou ### Profiling PRs -If your contribution requires profiling to check memory and/or CPU usage, you can use `--cpuprofile` and/or `--memprofile` global cli flags to collect runtime profiling data for analysis. You can use Golang's [pprof](https://github.com/google/pprof/blob/main/doc/README.md) tool to inspect the results. +If your contribution requires profiling to check memory and/or CPU usage, you can set `HELM_PPROF=cpu=/path/to/cpu.prof,mem=/path/to/mem.prof` environment variable to collect runtime profiling data for analysis. You can use Golang's [pprof](https://github.com/google/pprof/blob/main/doc/README.md) tool to inspect the results. Example analysing collected profiling data ``` -helm show all bitnami/nginx --memprofile mem.prof --cpuprofile cpu.prof +HELM_PPROF=cpu=/path/to/cpu.prof,mem=/path/to/mem.prof helm show all bitnami/nginx # Visualize graphs. You need to have installed graphviz package in your system go tool pprof -http=":8000" cpu.prof diff --git a/cmd/helm/profiling.go b/cmd/helm/profiling.go index e1ca62853..e231a3e0a 100644 --- a/cmd/helm/profiling.go +++ b/cmd/helm/profiling.go @@ -19,6 +19,8 @@ package main import ( "fmt" "os" + "path" + "path/filepath" "runtime" "runtime/pprof" "strings" @@ -28,11 +30,17 @@ import ( var ( cpuProfileFile *os.File + pprofPaths map[string]string ) +func init() { + pprofPaths = parsePProfPaths(os.Getenv("HELM_PPROF")) +} + // startProfiling starts profiling CPU usage -func startProfiling(cpuprofile string) error { - if cpuprofile != "" { +func startProfiling() error { + cpuprofile, ok := pprofPaths["cpu"] + if ok && cpuprofile != "" { var err error cpuProfileFile, err = os.Create(cpuprofile) if err != nil { @@ -48,8 +56,8 @@ func startProfiling(cpuprofile string) error { } // stopProfiling stops profiling CPU and memory usage and writes the results to -// the files specified by --cpuprofile and --memprofile flags respectively. -func stopProfiling(memprofile string) error { +// the files specified by HELM_PPROF=cpu=/path/to/cpu.prof,mem=/path/to/mem.prof +func stopProfiling() error { errs := []string{} // Stop CPU profiling if it was started @@ -62,7 +70,8 @@ func stopProfiling(memprofile string) error { cpuProfileFile = nil } - if memprofile != "" { + memprofile, ok := pprofPaths["mem"] + if ok && memprofile != "" { f, err := os.Create(memprofile) if err != nil { errs = append(errs, err.Error()) @@ -88,3 +97,28 @@ func addProfilingFlags(cmd *cobra.Command) { cmd.PersistentFlags().String("cpuprofile", "", "File path to write cpu profiling data") cmd.PersistentFlags().String("memprofile", "", "File path to write memory profiling data") } + +func parsePProfPaths(env string) map[string]string { + // Initial empty paths + m := map[string]string{} + for _, pprofs := range strings.Split(env, ",") { + // Is of the format mem=/path/to/memprof + tuple := strings.Split(pprofs, "=") + if len(tuple) != 2 { + continue + } + if tuple[0] != "cpu" && tuple[0] != "mem" { + continue + } + + s, err := filepath.Abs(path.Clean(tuple[1])) + if err != nil { + continue + } + if !strings.HasSuffix(s, string(filepath.Separator)) { + // Ensure its not a directory + m[tuple[0]] = s + } + } + return m +} diff --git a/cmd/helm/profiling_test.go b/cmd/helm/profiling_test.go new file mode 100644 index 000000000..65928edbb --- /dev/null +++ b/cmd/helm/profiling_test.go @@ -0,0 +1,79 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package main + +import ( + "os" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func Test_parsePProfPaths(t *testing.T) { + cwd, err := os.Getwd() + require.NoError(t, err) + + tests := []struct { + name string + env string + want map[string]string + }{ + { + name: "no env", + env: "", + want: map[string]string{}, + }, + { + name: "single path", + env: "cpu=cpu.pprof", + want: map[string]string{ + "cpu": cwd + "/cpu.pprof", + }, + }, + { + name: "mem and cpu paths", + env: "cpu=cpu.pprof,mem=mem.pprof", + want: map[string]string{ + "cpu": cwd + "/cpu.pprof", + "mem": cwd + "/mem.pprof", + }, + }, + { + name: "extra commas", + env: "cpu=cpu.pprof,mem=mem.pprof,", + want: map[string]string{ + "cpu": cwd + "/cpu.pprof", + "mem": cwd + "/mem.pprof", + }, + }, + { + name: "unknown keys", + env: "cpu=cpu.pprof,mem=mem.pprof,foo=bar", + want: map[string]string{ + "cpu": cwd + "/cpu.pprof", + "mem": cwd + "/mem.pprof", + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got := parsePProfPaths(tt.env) + assert.Equalf(t, tt.want, got, "parsePProfPaths() = %v, want %v", got, tt.want) + }) + } +} diff --git a/cmd/helm/root.go b/cmd/helm/root.go index 50cb87e37..5f739d248 100644 --- a/cmd/helm/root.go +++ b/cmd/helm/root.go @@ -96,22 +96,12 @@ func newRootCmd(actionConfig *action.Configuration, out io.Writer, args []string Long: globalUsage, SilenceUsage: true, PersistentPreRun: func(cmd *cobra.Command, _ []string) { - cpuprof, err := cmd.Flags().GetString("cpuprofile") - if err != nil { - log.Printf("Warning: Failed to get cpuprofile flag: %v", err) - } - - if err := startProfiling(cpuprof); err != nil { + if err := startProfiling(); err != nil { log.Printf("Warning: Failed to start profiling: %v", err) } }, PersistentPostRun: func(cmd *cobra.Command, _ []string) { - memprof, err := cmd.Flags().GetString("memprofile") - if err != nil { - log.Printf("Warning: Failed to get memprofile flag: %v", err) - } - - if err := stopProfiling(memprof); err != nil { + if err := stopProfiling(); err != nil { log.Printf("Warning: Failed to stop profiling: %v", err) } }, From 5b1eb784cb2a1a90ecf4710b3088d2312c3875d4 Mon Sep 17 00:00:00 2001 From: Evans Mungai Date: Wed, 11 Dec 2024 15:20:45 +0000 Subject: [PATCH 07/68] Fix linter warning Signed-off-by: Evans Mungai --- cmd/helm/root.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/helm/root.go b/cmd/helm/root.go index 5f739d248..edc6376ae 100644 --- a/cmd/helm/root.go +++ b/cmd/helm/root.go @@ -95,12 +95,12 @@ func newRootCmd(actionConfig *action.Configuration, out io.Writer, args []string Short: "The Helm package manager for Kubernetes.", Long: globalUsage, SilenceUsage: true, - PersistentPreRun: func(cmd *cobra.Command, _ []string) { + PersistentPreRun: func(_ *cobra.Command, _ []string) { if err := startProfiling(); err != nil { log.Printf("Warning: Failed to start profiling: %v", err) } }, - PersistentPostRun: func(cmd *cobra.Command, _ []string) { + PersistentPostRun: func(_ *cobra.Command, _ []string) { if err := stopProfiling(); err != nil { log.Printf("Warning: Failed to stop profiling: %v", err) } From 33aa8b53973b9a65e14ffbb6f5f9c99456fca0db Mon Sep 17 00:00:00 2001 From: Evans Mungai Date: Mon, 27 Jan 2025 13:30:08 +0000 Subject: [PATCH 08/68] Prefer environment variables to CLI flags Signed-off-by: Evans Mungai --- cmd/helm/profiling.go | 61 +++++++---------------------- cmd/helm/profiling_test.go | 79 -------------------------------------- cmd/helm/root.go | 3 -- 3 files changed, 14 insertions(+), 129 deletions(-) delete mode 100644 cmd/helm/profiling_test.go diff --git a/cmd/helm/profiling.go b/cmd/helm/profiling.go index e231a3e0a..e48441512 100644 --- a/cmd/helm/profiling.go +++ b/cmd/helm/profiling.go @@ -19,30 +19,29 @@ package main import ( "fmt" "os" - "path" - "path/filepath" "runtime" "runtime/pprof" "strings" - - "github.com/spf13/cobra" ) var ( cpuProfileFile *os.File - pprofPaths map[string]string + cpuProfilePath string + memProfilePath string ) func init() { - pprofPaths = parsePProfPaths(os.Getenv("HELM_PPROF")) + cpuProfilePath = os.Getenv("HELM_PPROF_CPU_PROFILE") + memProfilePath = os.Getenv("HELM_PPROF_MEM_PROFILE") } -// startProfiling starts profiling CPU usage +// startProfiling starts profiling CPU usage if HELM_PPROF_CPU_PROFILE is set +// to a file path. It returns an error if the file could not be created or +// CPU profiling could not be started. func startProfiling() error { - cpuprofile, ok := pprofPaths["cpu"] - if ok && cpuprofile != "" { + if cpuProfilePath != "" { var err error - cpuProfileFile, err = os.Create(cpuprofile) + cpuProfileFile, err = os.Create(cpuProfilePath) if err != nil { return fmt.Errorf("could not create CPU profile: %w", err) } @@ -55,8 +54,9 @@ func startProfiling() error { return nil } -// stopProfiling stops profiling CPU and memory usage and writes the results to -// the files specified by HELM_PPROF=cpu=/path/to/cpu.prof,mem=/path/to/mem.prof +// stopProfiling stops profiling CPU and memory usage. +// It writes memory profile to the file path specified in HELM_PPROF_MEM_PROFILE +// environment variable. func stopProfiling() error { errs := []string{} @@ -70,9 +70,8 @@ func stopProfiling() error { cpuProfileFile = nil } - memprofile, ok := pprofPaths["mem"] - if ok && memprofile != "" { - f, err := os.Create(memprofile) + if memProfilePath != "" { + f, err := os.Create(memProfilePath) if err != nil { errs = append(errs, err.Error()) } @@ -90,35 +89,3 @@ func stopProfiling() error { return nil } - -// addProfilingFlags adds the --cpuprofile and --memprofile flags to the given command. -func addProfilingFlags(cmd *cobra.Command) { - // Persistent flags to make available to subcommands - cmd.PersistentFlags().String("cpuprofile", "", "File path to write cpu profiling data") - cmd.PersistentFlags().String("memprofile", "", "File path to write memory profiling data") -} - -func parsePProfPaths(env string) map[string]string { - // Initial empty paths - m := map[string]string{} - for _, pprofs := range strings.Split(env, ",") { - // Is of the format mem=/path/to/memprof - tuple := strings.Split(pprofs, "=") - if len(tuple) != 2 { - continue - } - if tuple[0] != "cpu" && tuple[0] != "mem" { - continue - } - - s, err := filepath.Abs(path.Clean(tuple[1])) - if err != nil { - continue - } - if !strings.HasSuffix(s, string(filepath.Separator)) { - // Ensure its not a directory - m[tuple[0]] = s - } - } - return m -} diff --git a/cmd/helm/profiling_test.go b/cmd/helm/profiling_test.go deleted file mode 100644 index 65928edbb..000000000 --- a/cmd/helm/profiling_test.go +++ /dev/null @@ -1,79 +0,0 @@ -/* -Copyright The Helm Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package main - -import ( - "os" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func Test_parsePProfPaths(t *testing.T) { - cwd, err := os.Getwd() - require.NoError(t, err) - - tests := []struct { - name string - env string - want map[string]string - }{ - { - name: "no env", - env: "", - want: map[string]string{}, - }, - { - name: "single path", - env: "cpu=cpu.pprof", - want: map[string]string{ - "cpu": cwd + "/cpu.pprof", - }, - }, - { - name: "mem and cpu paths", - env: "cpu=cpu.pprof,mem=mem.pprof", - want: map[string]string{ - "cpu": cwd + "/cpu.pprof", - "mem": cwd + "/mem.pprof", - }, - }, - { - name: "extra commas", - env: "cpu=cpu.pprof,mem=mem.pprof,", - want: map[string]string{ - "cpu": cwd + "/cpu.pprof", - "mem": cwd + "/mem.pprof", - }, - }, - { - name: "unknown keys", - env: "cpu=cpu.pprof,mem=mem.pprof,foo=bar", - want: map[string]string{ - "cpu": cwd + "/cpu.pprof", - "mem": cwd + "/mem.pprof", - }, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - got := parsePProfPaths(tt.env) - assert.Equalf(t, tt.want, got, "parsePProfPaths() = %v, want %v", got, tt.want) - }) - } -} diff --git a/cmd/helm/root.go b/cmd/helm/root.go index edc6376ae..f8ed82a60 100644 --- a/cmd/helm/root.go +++ b/cmd/helm/root.go @@ -216,9 +216,6 @@ func newRootCmd(actionConfig *action.Configuration, out io.Writer, args []string // Check for expired repositories checkForExpiredRepos(settings.RepositoryConfig) - // CPU and memory profiling flags that are available to all commands - addProfilingFlags(cmd) - return cmd, nil } From 58748b06c79f37cb79a816324ef1ab878e303a5b Mon Sep 17 00:00:00 2001 From: Evans Mungai Date: Mon, 27 Jan 2025 13:37:28 +0000 Subject: [PATCH 09/68] Update CONTRIBUTING guide Signed-off-by: Evans Mungai --- CONTRIBUTING.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0a90054d9..bc225d218 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -284,14 +284,16 @@ Small, ad-hoc changes/PRs to Helm which introduce user facing changes, which wou ### Profiling PRs -If your contribution requires profiling to check memory and/or CPU usage, you can set `HELM_PPROF=cpu=/path/to/cpu.prof,mem=/path/to/mem.prof` environment variable to collect runtime profiling data for analysis. You can use Golang's [pprof](https://github.com/google/pprof/blob/main/doc/README.md) tool to inspect the results. +If your contribution requires profiling to check memory and/or CPU usage, you can set `HELM_PPROF_CPU_PROFILE=/path/to/cpu.prof HELM_PPROF_MEM_PROFILE=/path/to/mem.prof helm show all bitnami/nginx` environment variable to collect runtime profiling data for analysis. You can use Golang's [pprof](https://github.com/google/pprof/blob/main/doc/README.md) tool to inspect the results. Example analysing collected profiling data ``` -HELM_PPROF=cpu=/path/to/cpu.prof,mem=/path/to/mem.prof helm show all bitnami/nginx +HELM_PPROF_CPU_PROFILE=cpu.prof HELM_PPROF_MEM_PROFILE=mem.prof helm show all bitnami/nginx # Visualize graphs. You need to have installed graphviz package in your system go tool pprof -http=":8000" cpu.prof + +go tool pprof -http=":8001" mem.prof ``` ## The Triager From 274d43c10d1c62f921db1be9b57ce1a722196e9f Mon Sep 17 00:00:00 2001 From: Zhanwei Li Date: Sat, 8 Feb 2025 10:04:14 +0800 Subject: [PATCH 10/68] feat: Enhance JSON value parsing in Helm CLI - Add support for parsing full JSON objects with `--set-json` - Update documentation to clarify JSON value input formats - Improve test coverage for value parsing scenarios - Modify `MergeValues` to handle both key=value and JSON object formats Signed-off-by: Zhanwei Li --- cmd/helm/flags.go | 2 +- cmd/helm/install.go | 5 +- cmd/helm/upgrade.go | 2 +- pkg/cli/values/options.go | 16 +++++- pkg/cli/values/options_test.go | 96 +++++++++++++++++++++++++++++++++- 5 files changed, 115 insertions(+), 6 deletions(-) diff --git a/cmd/helm/flags.go b/cmd/helm/flags.go index 3d159babd..8d0f644d6 100644 --- a/cmd/helm/flags.go +++ b/cmd/helm/flags.go @@ -47,7 +47,7 @@ func addValueOptionsFlags(f *pflag.FlagSet, v *values.Options) { f.StringArrayVar(&v.Values, "set", []string{}, "set values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)") f.StringArrayVar(&v.StringValues, "set-string", []string{}, "set STRING values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)") f.StringArrayVar(&v.FileValues, "set-file", []string{}, "set values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2)") - f.StringArrayVar(&v.JSONValues, "set-json", []string{}, "set JSON values on the command line (can specify multiple or separate values with commas: key1=jsonval1,key2=jsonval2)") + f.StringArrayVar(&v.JSONValues, "set-json", []string{}, "set JSON values on the command line (can specify multiple or separate values with commas: key1=jsonval1,key2=jsonval2 or using json format: {\"key1\": jsonval1, \"key2\": \"jsonval2\"})") f.StringArrayVar(&v.LiteralValues, "set-literal", []string{}, "set a literal STRING value on the command line") } diff --git a/cmd/helm/install.go b/cmd/helm/install.go index ec651140c..fe09dfc53 100644 --- a/cmd/helm/install.go +++ b/cmd/helm/install.go @@ -52,7 +52,7 @@ or use the '--set' flag and pass configuration from the command line, to force a string value use '--set-string'. You can use '--set-file' to set individual values from a file when the value itself is too long for the command line or is dynamically generated. You can also use '--set-json' to set json values -(scalars/objects/arrays) from the command line. +(scalars/objects/arrays) from the command line. Additionally, you can use '--set-json' and passing json object as a string. $ helm install -f myvalues.yaml myredis ./redis @@ -72,6 +72,9 @@ or $ helm install --set-json 'master.sidecars=[{"name":"sidecar","image":"myImage","imagePullPolicy":"Always","ports":[{"name":"portname","containerPort":1234}]}]' myredis ./redis +or + + $ helm install --set-json '{"master":{"sidecars":[{"name":"sidecar","image":"myImage","imagePullPolicy":"Always","ports":[{"name":"portname","containerPort":1234}]}]}}' myredis ./redis You can specify the '--values'/'-f' flag multiple times. The priority will be given to the last (right-most) file specified. For example, if both myvalues.yaml and override.yaml diff --git a/cmd/helm/upgrade.go b/cmd/helm/upgrade.go index 7b4267894..6684f9ebf 100644 --- a/cmd/helm/upgrade.go +++ b/cmd/helm/upgrade.go @@ -53,7 +53,7 @@ or use the '--set' flag and pass configuration from the command line, to force s values, use '--set-string'. You can use '--set-file' to set individual values from a file when the value itself is too long for the command line or is dynamically generated. You can also use '--set-json' to set json values -(scalars/objects/arrays) from the command line. +(scalars/objects/arrays) from the command line. Additionally, you can use '--set-json' and passing json object as a string. You can specify the '--values'/'-f' flag multiple times. The priority will be given to the last (right-most) file specified. For example, if both myvalues.yaml and override.yaml diff --git a/pkg/cli/values/options.go b/pkg/cli/values/options.go index 24c47ecba..d7086e8c3 100644 --- a/pkg/cli/values/options.go +++ b/pkg/cli/values/options.go @@ -17,6 +17,7 @@ limitations under the License. package values import ( + "encoding/json" "io" "net/url" "os" @@ -62,8 +63,19 @@ func (opts *Options) MergeValues(p getter.Providers) (map[string]interface{}, er // User specified a value via --set-json for _, value := range opts.JSONValues { - if err := strvals.ParseJSON(value, base); err != nil { - return nil, errors.Errorf("failed parsing --set-json data %s", value) + trimmedValue := strings.TrimSpace(value) + if len(trimmedValue) > 0 && trimmedValue[0] == '{' { + // If value is JSON object format, parse it as map + var jsonMap map[string]interface{} + if err := json.Unmarshal([]byte(trimmedValue), &jsonMap); err != nil { + return nil, errors.Errorf("failed parsing --set-json data using JSON format: %s", value) + } + base = mergeMaps(base, jsonMap) + } else { + // Otherwise, parse it as key=value format + if err := strvals.ParseJSON(value, base); err != nil { + return nil, errors.Errorf("failed parsing --set-json data %s", value) + } } } diff --git a/pkg/cli/values/options_test.go b/pkg/cli/values/options_test.go index 9182e3cc8..5197a1b5e 100644 --- a/pkg/cli/values/options_test.go +++ b/pkg/cli/values/options_test.go @@ -23,7 +23,7 @@ import ( "helm.sh/helm/v4/pkg/getter" ) -func TestMergeValues(t *testing.T) { +func TestMergeMaps(t *testing.T) { nestedMap := map[string]interface{}{ "foo": "bar", "baz": map[string]string{ @@ -86,3 +86,97 @@ func TestReadFile(t *testing.T) { t.Errorf("Expected error when has special strings") } } + +func TestMergeValues(t *testing.T) { + tests := []struct { + name string + opts Options + expected map[string]interface{} + wantErr bool + }{ + { + name: "set-json object", + opts: Options{ + JSONValues: []string{`{"foo": {"bar": "baz"}}`}, + }, + expected: map[string]interface{}{ + "foo": map[string]interface{}{ + "bar": "baz", + }, + }, + }, + { + name: "set-json key=value", + opts: Options{ + JSONValues: []string{"foo.bar=[1,2,3]"}, + }, + expected: map[string]interface{}{ + "foo": map[string]interface{}{ + "bar": []interface{}{1.0, 2.0, 3.0}, + }, + }, + }, + { + name: "set regular value", + opts: Options{ + Values: []string{"foo=bar"}, + }, + expected: map[string]interface{}{ + "foo": "bar", + }, + }, + { + name: "set string value", + opts: Options{ + StringValues: []string{"foo=123"}, + }, + expected: map[string]interface{}{ + "foo": "123", + }, + }, + { + name: "set literal value", + opts: Options{ + LiteralValues: []string{"foo=true"}, + }, + expected: map[string]interface{}{ + "foo": "true", + }, + }, + { + name: "multiple options", + opts: Options{ + Values: []string{"a=foo"}, + StringValues: []string{"b=bar"}, + JSONValues: []string{`{"c": "foo1"}`}, + LiteralValues: []string{"d=bar1"}, + }, + expected: map[string]interface{}{ + "a": "foo", + "b": "bar", + "c": "foo1", + "d": "bar1", + }, + }, + { + name: "invalid json", + opts: Options{ + JSONValues: []string{`{invalid`}, + }, + wantErr: true, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got, err := tt.opts.MergeValues(getter.Providers{}) + if (err != nil) != tt.wantErr { + t.Errorf("MergeValues() error = %v, wantErr %v", err, tt.wantErr) + return + } + if !tt.wantErr && !reflect.DeepEqual(got, tt.expected) { + t.Errorf("MergeValues() = %v, want %v", got, tt.expected) + } + }) + } +} From 234d171da510c5e140f1ad494b2498448c9432db Mon Sep 17 00:00:00 2001 From: George Jenkins Date: Sat, 30 Nov 2024 23:46:18 -0800 Subject: [PATCH 11/68] Cleanup repotest Server constructors Signed-off-by: George Jenkins --- cmd/helm/dependency_build_test.go | 8 +- cmd/helm/dependency_update_test.go | 24 +-- cmd/helm/install_test.go | 16 +- cmd/helm/pull_test.go | 24 +-- cmd/helm/repo_add_test.go | 49 +++--- cmd/helm/repo_remove_test.go | 17 +- cmd/helm/repo_update_test.go | 32 ++-- cmd/helm/show_test.go | 8 +- pkg/downloader/chart_downloader_test.go | 33 ++-- pkg/downloader/manager_test.go | 39 ++--- pkg/repo/repotest/server.go | 222 +++++++++++------------- pkg/repo/repotest/server_test.go | 128 ++++++++++++-- pkg/repo/repotest/tlsconfig.go | 43 +++++ 13 files changed, 382 insertions(+), 261 deletions(-) create mode 100644 pkg/repo/repotest/tlsconfig.go diff --git a/cmd/helm/dependency_build_test.go b/cmd/helm/dependency_build_test.go index 189378ce5..1258db3f8 100644 --- a/cmd/helm/dependency_build_test.go +++ b/cmd/helm/dependency_build_test.go @@ -29,11 +29,11 @@ import ( ) func TestDependencyBuildCmd(t *testing.T) { - srv, err := repotest.NewTempServerWithCleanup(t, "testdata/testcharts/*.tgz") + srv := repotest.NewTempServer( + t, + repotest.WithChartSourceGlob("testdata/testcharts/*.tgz"), + ) defer srv.Stop() - if err != nil { - t.Fatal(err) - } rootDir := srv.Root() srv.LinkIndices() diff --git a/cmd/helm/dependency_update_test.go b/cmd/helm/dependency_update_test.go index 82a6b875d..7cf3e8e0a 100644 --- a/cmd/helm/dependency_update_test.go +++ b/cmd/helm/dependency_update_test.go @@ -32,10 +32,10 @@ import ( ) func TestDependencyUpdateCmd(t *testing.T) { - srv, err := repotest.NewTempServerWithCleanup(t, "testdata/testcharts/*.tgz") - if err != nil { - t.Fatal(err) - } + srv := repotest.NewTempServer( + t, + repotest.WithChartSourceGlob("testdata/testcharts/*.tgz"), + ) defer srv.Stop() t.Logf("Listening on directory %s", srv.Root()) @@ -151,10 +151,10 @@ func TestDependencyUpdateCmd_DoNotDeleteOldChartsOnError(t *testing.T) { defer resetEnv()() ensure.HelmHome(t) - srv, err := repotest.NewTempServerWithCleanup(t, "testdata/testcharts/*.tgz") - if err != nil { - t.Fatal(err) - } + srv := repotest.NewTempServer( + t, + repotest.WithChartSourceGlob("testdata/testcharts/*.tgz"), + ) defer srv.Stop() t.Logf("Listening on directory %s", srv.Root()) @@ -248,10 +248,10 @@ func TestDependencyUpdateCmd_WithRepoThatWasNotAdded(t *testing.T) { } func setupMockRepoServer(t *testing.T) *repotest.Server { - srv, err := repotest.NewTempServerWithCleanup(t, "testdata/testcharts/*.tgz") - if err != nil { - t.Fatal(err) - } + srv := repotest.NewTempServer( + t, + repotest.WithChartSourceGlob("testdata/testcharts/*.tgz"), + ) t.Logf("Listening on directory %s", srv.Root()) diff --git a/cmd/helm/install_test.go b/cmd/helm/install_test.go index e7b6e1dff..be8480423 100644 --- a/cmd/helm/install_test.go +++ b/cmd/helm/install_test.go @@ -27,19 +27,13 @@ import ( ) func TestInstall(t *testing.T) { - srv, err := repotest.NewTempServerWithCleanup(t, "testdata/testcharts/*.tgz*") - if err != nil { - t.Fatal(err) - } + srv := repotest.NewTempServer( + t, + repotest.WithChartSourceGlob("testdata/testcharts/*.tgz*"), + repotest.WithMiddleware(repotest.BasicAuthMiddleware(t)), + ) defer srv.Stop() - srv.WithMiddleware(http.HandlerFunc(func(_ http.ResponseWriter, r *http.Request) { - username, password, ok := r.BasicAuth() - if !ok || username != "username" || password != "password" { - t.Errorf("Expected request to use basic auth and for username == 'username' and password == 'password', got '%v', '%s', '%s'", ok, username, password) - } - })) - srv2 := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { http.FileServer(http.Dir(srv.Root())).ServeHTTP(w, r) })) diff --git a/cmd/helm/pull_test.go b/cmd/helm/pull_test.go index 160e95c76..1110a6bdf 100644 --- a/cmd/helm/pull_test.go +++ b/cmd/helm/pull_test.go @@ -28,10 +28,10 @@ import ( ) func TestPullCmd(t *testing.T) { - srv, err := repotest.NewTempServerWithCleanup(t, "testdata/testcharts/*.tgz*") - if err != nil { - t.Fatal(err) - } + srv := repotest.NewTempServer( + t, + repotest.WithChartSourceGlob("testdata/testcharts/*.tgz*"), + ) defer srv.Stop() ociSrv, err := repotest.NewOCIServer(t, srv.Root()) @@ -257,19 +257,13 @@ func TestPullCmd(t *testing.T) { } func TestPullWithCredentialsCmd(t *testing.T) { - srv, err := repotest.NewTempServerWithCleanup(t, "testdata/testcharts/*.tgz*") - if err != nil { - t.Fatal(err) - } + srv := repotest.NewTempServer( + t, + repotest.WithChartSourceGlob("testdata/testcharts/*.tgz*"), + repotest.WithMiddleware(repotest.BasicAuthMiddleware(t)), + ) defer srv.Stop() - srv.WithMiddleware(http.HandlerFunc(func(_ http.ResponseWriter, r *http.Request) { - username, password, ok := r.BasicAuth() - if !ok || username != "username" || password != "password" { - t.Errorf("Expected request to use basic auth and for username == 'username' and password == 'password', got '%v', '%s', '%s'", ok, username, password) - } - })) - srv2 := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { http.FileServer(http.Dir(srv.Root())).ServeHTTP(w, r) })) diff --git a/cmd/helm/repo_add_test.go b/cmd/helm/repo_add_test.go index 15ad835e6..35911d5ae 100644 --- a/cmd/helm/repo_add_test.go +++ b/cmd/helm/repo_add_test.go @@ -34,22 +34,21 @@ import ( ) func TestRepoAddCmd(t *testing.T) { - srv, err := repotest.NewTempServerWithCleanup(t, "testdata/testserver/*.*") - if err != nil { - t.Fatal(err) - } + srv := repotest.NewTempServer( + t, + repotest.WithChartSourceGlob("testdata/testserver/*.*"), + ) defer srv.Stop() // A second test server is setup to verify URL changing - srv2, err := repotest.NewTempServerWithCleanup(t, "testdata/testserver/*.*") - if err != nil { - t.Fatal(err) - } + srv2 := repotest.NewTempServer( + t, + repotest.WithChartSourceGlob("testdata/testserver/*.*"), + ) defer srv2.Stop() tmpdir := filepath.Join(t.TempDir(), "path-component.yaml/data") - err = os.MkdirAll(tmpdir, 0777) - if err != nil { + if err := os.MkdirAll(tmpdir, 0777); err != nil { t.Fatal(err) } repoFile := filepath.Join(tmpdir, "repositories.yaml") @@ -81,10 +80,10 @@ func TestRepoAddCmd(t *testing.T) { } func TestRepoAdd(t *testing.T) { - ts, err := repotest.NewTempServerWithCleanup(t, "testdata/testserver/*.*") - if err != nil { - t.Fatal(err) - } + ts := repotest.NewTempServer( + t, + repotest.WithChartSourceGlob("testdata/testserver/*.*"), + ) defer ts.Stop() rootDir := t.TempDir() @@ -134,10 +133,10 @@ func TestRepoAdd(t *testing.T) { } func TestRepoAddCheckLegalName(t *testing.T) { - ts, err := repotest.NewTempServerWithCleanup(t, "testdata/testserver/*.*") - if err != nil { - t.Fatal(err) - } + ts := repotest.NewTempServer( + t, + repotest.WithChartSourceGlob("testdata/testserver/*.*"), + ) defer ts.Stop() defer resetEnv()() @@ -190,10 +189,10 @@ func TestRepoAddConcurrentHiddenFile(t *testing.T) { } func repoAddConcurrent(t *testing.T, testName, repoFile string) { - ts, err := repotest.NewTempServerWithCleanup(t, "testdata/testserver/*.*") - if err != nil { - t.Fatal(err) - } + ts := repotest.NewTempServer( + t, + repotest.WithChartSourceGlob("testdata/testserver/*.*"), + ) defer ts.Stop() var wg sync.WaitGroup @@ -240,7 +239,11 @@ func TestRepoAddFileCompletion(t *testing.T) { } func TestRepoAddWithPasswordFromStdin(t *testing.T) { - srv := repotest.NewTempServerWithCleanupAndBasicAuth(t, "testdata/testserver/*.*") + srv := repotest.NewTempServer( + t, + repotest.WithChartSourceGlob("testdata/testserver/*.*"), + repotest.WithMiddleware(repotest.BasicAuthMiddleware(t)), + ) defer srv.Stop() defer resetEnv()() diff --git a/cmd/helm/repo_remove_test.go b/cmd/helm/repo_remove_test.go index dcfbd99f8..7e6609671 100644 --- a/cmd/helm/repo_remove_test.go +++ b/cmd/helm/repo_remove_test.go @@ -30,10 +30,10 @@ import ( ) func TestRepoRemove(t *testing.T) { - ts, err := repotest.NewTempServerWithCleanup(t, "testdata/testserver/*.*") - if err != nil { - t.Fatal(err) - } + ts := repotest.NewTempServer( + t, + repotest.WithChartSourceGlob("testdata/testserver/*.*"), + ) defer ts.Stop() rootDir := t.TempDir() @@ -162,10 +162,11 @@ func testCacheFiles(t *testing.T, cacheIndexFile string, cacheChartsFile string, } func TestRepoRemoveCompletion(t *testing.T) { - ts, err := repotest.NewTempServerWithCleanup(t, "testdata/testserver/*.*") - if err != nil { - t.Fatal(err) - } + ts := repotest.NewTempServer( + t, + repotest.WithChartSourceGlob("testdata/testserver/*.*"), + ) + defer ts.Stop() rootDir := t.TempDir() diff --git a/cmd/helm/repo_update_test.go b/cmd/helm/repo_update_test.go index 13369c7cc..7e379da91 100644 --- a/cmd/helm/repo_update_test.go +++ b/cmd/helm/repo_update_test.go @@ -106,10 +106,11 @@ func TestUpdateCustomCacheCmd(t *testing.T) { cachePath := filepath.Join(rootDir, "updcustomcache") os.Mkdir(cachePath, os.ModePerm) - ts, err := repotest.NewTempServerWithCleanup(t, "testdata/testserver/*.*") - if err != nil { - t.Fatal(err) - } + ts := repotest.NewTempServer( + t, + repotest.WithChartSourceGlob("testdata/testserver/*.*"), + ) + defer ts.Stop() o := &repoUpdateOptions{ @@ -130,10 +131,9 @@ func TestUpdateCharts(t *testing.T) { defer resetEnv()() ensure.HelmHome(t) - ts, err := repotest.NewTempServerWithCleanup(t, "testdata/testserver/*.*") - if err != nil { - t.Fatal(err) - } + ts := repotest.NewTempServer(t, + repotest.WithChartSourceGlob("testdata/testserver/*.*"), + ) defer ts.Stop() r, err := repo.NewChartRepository(&repo.Entry{ @@ -165,10 +165,10 @@ func TestUpdateChartsFail(t *testing.T) { defer resetEnv()() ensure.HelmHome(t) - ts, err := repotest.NewTempServerWithCleanup(t, "testdata/testserver/*.*") - if err != nil { - t.Fatal(err) - } + ts := repotest.NewTempServer( + t, + repotest.WithChartSourceGlob("testdata/testserver/*.*"), + ) defer ts.Stop() var invalidURL = ts.URL() + "55" @@ -198,10 +198,10 @@ func TestUpdateChartsFailWithError(t *testing.T) { defer resetEnv()() ensure.HelmHome(t) - ts, err := repotest.NewTempServerWithCleanup(t, "testdata/testserver/*.*") - if err != nil { - t.Fatal(err) - } + ts := repotest.NewTempServer( + t, + repotest.WithChartSourceGlob("testdata/testserver/*.*"), + ) defer ts.Stop() var invalidURL = ts.URL() + "55" diff --git a/cmd/helm/show_test.go b/cmd/helm/show_test.go index 098335f09..0598095b5 100644 --- a/cmd/helm/show_test.go +++ b/cmd/helm/show_test.go @@ -26,10 +26,10 @@ import ( ) func TestShowPreReleaseChart(t *testing.T) { - srv, err := repotest.NewTempServerWithCleanup(t, "testdata/testcharts/*.tgz*") - if err != nil { - t.Fatal(err) - } + srv := repotest.NewTempServer( + t, + repotest.WithChartSourceGlob("testdata/testcharts/*.tgz*"), + ) defer srv.Stop() if err := srv.LinkIndices(); err != nil { diff --git a/pkg/downloader/chart_downloader_test.go b/pkg/downloader/chart_downloader_test.go index 1d28e3c22..26dcc58ff 100644 --- a/pkg/downloader/chart_downloader_test.go +++ b/pkg/downloader/chart_downloader_test.go @@ -175,7 +175,11 @@ func TestIsTar(t *testing.T) { } func TestDownloadTo(t *testing.T) { - srv := repotest.NewTempServerWithCleanupAndBasicAuth(t, "testdata/*.tgz*") + srv := repotest.NewTempServer( + t, + repotest.WithChartSourceGlob("testdata/*.tgz*"), + repotest.WithMiddleware(repotest.BasicAuthMiddleware(t)), + ) defer srv.Stop() if err := srv.CreateIndex(); err != nil { t.Fatal(err) @@ -222,12 +226,11 @@ func TestDownloadTo(t *testing.T) { func TestDownloadTo_TLS(t *testing.T) { // Set up mock server w/ tls enabled - srv, err := repotest.NewTempServerWithCleanup(t, "testdata/*.tgz*") - srv.Stop() - if err != nil { - t.Fatal(err) - } - srv.StartTLS() + srv := repotest.NewTempServer( + t, + repotest.WithChartSourceGlob("testdata/*.tgz*"), + repotest.WithTLSConfig(repotest.MakeTestTLSConfig(t, "../../testdata")), + ) defer srv.Stop() if err := srv.CreateIndex(); err != nil { t.Fatal(err) @@ -249,7 +252,13 @@ func TestDownloadTo_TLS(t *testing.T) { RepositoryConfig: repoConfig, RepositoryCache: repoCache, }), - Options: []getter.Option{}, + Options: []getter.Option{ + getter.WithTLSClientConfig( + "", + "", + filepath.Join("../../testdata/rootca.crt"), + ), + }, } cname := "test/signtest" dest := srv.Root() @@ -278,10 +287,10 @@ func TestDownloadTo_VerifyLater(t *testing.T) { dest := t.TempDir() // Set up a fake repo - srv, err := repotest.NewTempServerWithCleanup(t, "testdata/*.tgz*") - if err != nil { - t.Fatal(err) - } + srv := repotest.NewTempServer( + t, + repotest.WithChartSourceGlob("testdata/*.tgz*"), + ) defer srv.Stop() if err := srv.LinkIndices(); err != nil { t.Fatal(err) diff --git a/pkg/downloader/manager_test.go b/pkg/downloader/manager_test.go index ae4e693ba..b721c6a0d 100644 --- a/pkg/downloader/manager_test.go +++ b/pkg/downloader/manager_test.go @@ -292,10 +292,10 @@ version: 0.1.0` func TestUpdateBeforeBuild(t *testing.T) { // Set up a fake repo - srv, err := repotest.NewTempServerWithCleanup(t, "testdata/*.tgz*") - if err != nil { - t.Fatal(err) - } + srv := repotest.NewTempServer( + t, + repotest.WithChartSourceGlob("testdata/*.tgz*"), + ) defer srv.Stop() if err := srv.LinkIndices(); err != nil { t.Fatal(err) @@ -347,13 +347,11 @@ func TestUpdateBeforeBuild(t *testing.T) { } // Update before Build. see issue: https://github.com/helm/helm/issues/7101 - err = m.Update() - if err != nil { + if err := m.Update(); err != nil { t.Fatal(err) } - err = m.Build() - if err != nil { + if err := m.Build(); err != nil { t.Fatal(err) } } @@ -363,10 +361,10 @@ func TestUpdateBeforeBuild(t *testing.T) { // to be fetched. func TestUpdateWithNoRepo(t *testing.T) { // Set up a fake repo - srv, err := repotest.NewTempServerWithCleanup(t, "testdata/*.tgz*") - if err != nil { - t.Fatal(err) - } + srv := repotest.NewTempServer( + t, + repotest.WithChartSourceGlob("testdata/*.tgz*"), + ) defer srv.Stop() if err := srv.LinkIndices(); err != nil { t.Fatal(err) @@ -422,8 +420,7 @@ func TestUpdateWithNoRepo(t *testing.T) { } // Test the update - err = m.Update() - if err != nil { + if err := m.Update(); err != nil { t.Fatal(err) } } @@ -436,10 +433,10 @@ func TestUpdateWithNoRepo(t *testing.T) { // If each of these main fields (name, version, repository) is not supplied by dep param, default value will be used. func checkBuildWithOptionalFields(t *testing.T, chartName string, dep chart.Dependency) { // Set up a fake repo - srv, err := repotest.NewTempServerWithCleanup(t, "testdata/*.tgz*") - if err != nil { - t.Fatal(err) - } + srv := repotest.NewTempServer( + t, + repotest.WithChartSourceGlob("testdata/*.tgz*"), + ) defer srv.Stop() if err := srv.LinkIndices(); err != nil { t.Fatal(err) @@ -487,14 +484,12 @@ func checkBuildWithOptionalFields(t *testing.T, chartName string, dep chart.Depe } // First build will update dependencies and create Chart.lock file. - err = m.Build() - if err != nil { + if err := m.Build(); err != nil { t.Fatal(err) } // Second build should be passed. See PR #6655. - err = m.Build() - if err != nil { + if err := m.Build(); err != nil { t.Fatal(err) } } diff --git a/pkg/repo/repotest/server.go b/pkg/repo/repotest/server.go index c7b674d04..0155c54d8 100644 --- a/pkg/repo/repotest/server.go +++ b/pkg/repo/repotest/server.go @@ -17,6 +17,7 @@ package repotest import ( "context" + "crypto/tls" "fmt" "net/http" "net/http/httptest" @@ -33,7 +34,6 @@ import ( "golang.org/x/crypto/bcrypt" "sigs.k8s.io/yaml" - "helm.sh/helm/v4/internal/tlsutil" "helm.sh/helm/v4/pkg/chart" "helm.sh/helm/v4/pkg/chart/loader" "helm.sh/helm/v4/pkg/chartutil" @@ -41,34 +41,103 @@ import ( "helm.sh/helm/v4/pkg/repo" ) -// NewTempServerWithCleanup creates a server inside of a temp dir. +func BasicAuthMiddleware(t *testing.T) http.HandlerFunc { + return http.HandlerFunc(func(_ http.ResponseWriter, r *http.Request) { + username, password, ok := r.BasicAuth() + if !ok || username != "username" || password != "password" { + t.Errorf("Expected request to use basic auth and for username == 'username' and password == 'password', got '%v', '%s', '%s'", ok, username, password) + } + }) +} + +type ServerOption func(*testing.T, *Server) + +func WithTLSConfig(tlsConfig *tls.Config) ServerOption { + return func(_ *testing.T, server *Server) { + server.tlsConfig = tlsConfig + } +} + +func WithMiddleware(middleware http.HandlerFunc) ServerOption { + return func(_ *testing.T, server *Server) { + server.middleware = middleware + } +} + +func WithChartSourceGlob(glob string) ServerOption { + return func(_ *testing.T, server *Server) { + server.chartSourceGlob = glob + } +} + +// Server is an implementation of a repository server for testing. +type Server struct { + docroot string + srv *httptest.Server + middleware http.HandlerFunc + tlsConfig *tls.Config + chartSourceGlob string +} + +// NewTempServer creates a server inside of a temp dir. // // If the passed in string is not "", it will be treated as a shell glob, and files // will be copied from that path to the server's docroot. // -// The caller is responsible for stopping the server. +// The server is started automatically. The caller is responsible for stopping +// the server. +// // The temp dir will be removed by testing package automatically when test finished. -func NewTempServerWithCleanup(t *testing.T, glob string) (*Server, error) { - srv, err := NewTempServer(glob) +func NewTempServer(t *testing.T, options ...ServerOption) *Server { + + docrootTempDir, err := os.MkdirTemp("", "helm-repotest-") + if err != nil { + t.Fatal(err) + } + + srv := newServer(t, docrootTempDir, options...) + t.Cleanup(func() { os.RemoveAll(srv.docroot) }) - return srv, err + + if srv.chartSourceGlob != "" { + if _, err := srv.CopyCharts(srv.chartSourceGlob); err != nil { + t.Fatal(err) + } + } + + return srv } -// Set up a fake repo with basic auth enabled -func NewTempServerWithCleanupAndBasicAuth(t *testing.T, glob string) *Server { - srv, err := NewTempServerWithCleanup(t, glob) - srv.Stop() +// Create the server, but don't yet start it +func newServer(t *testing.T, docroot string, options ...ServerOption) *Server { + absdocroot, err := filepath.Abs(docroot) if err != nil { t.Fatal(err) } - srv.WithMiddleware(http.HandlerFunc(func(_ http.ResponseWriter, r *http.Request) { - username, password, ok := r.BasicAuth() - if !ok || username != "username" || password != "password" { - t.Errorf("Expected request to use basic auth and for username == 'username' and password == 'password', got '%v', '%s', '%s'", ok, username, password) + + s := &Server{ + docroot: absdocroot, + } + + for _, option := range options { + option(t, s) + } + + s.srv = httptest.NewUnstartedServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if s.middleware != nil { + s.middleware.ServeHTTP(w, r) } + http.FileServer(http.Dir(s.Root())).ServeHTTP(w, r) })) - srv.Start() - return srv + + s.start() + + // Add the testing repository as the only repo. Server must be started for the server's URL to be valid + if err := setTestingRepository(s.URL(), filepath.Join(s.docroot, "repositories.yaml")); err != nil { + t.Fatal(err) + } + + return s } type OCIServer struct { @@ -239,69 +308,6 @@ func (srv *OCIServer) Run(t *testing.T, opts ...OCIServerOpt) { result.Chart.Digest, result.Chart.Size) } -// NewTempServer creates a server inside of a temp dir. -// -// If the passed in string is not "", it will be treated as a shell glob, and files -// will be copied from that path to the server's docroot. -// -// The caller is responsible for destroying the temp directory as well as stopping -// the server. -// -// Deprecated: use NewTempServerWithCleanup -func NewTempServer(glob string) (*Server, error) { - tdir, err := os.MkdirTemp("", "helm-repotest-") - if err != nil { - return nil, err - } - srv := NewServer(tdir) - - if glob != "" { - if _, err := srv.CopyCharts(glob); err != nil { - srv.Stop() - return srv, err - } - } - - return srv, nil -} - -// NewServer creates a repository server for testing. -// -// docroot should be a temp dir managed by the caller. -// -// This will start the server, serving files off of the docroot. -// -// Use CopyCharts to move charts into the repository and then index them -// for service. -func NewServer(docroot string) *Server { - root, err := filepath.Abs(docroot) - if err != nil { - panic(err) - } - srv := &Server{ - docroot: root, - } - srv.Start() - // Add the testing repository as the only repo. - if err := setTestingRepository(srv.URL(), filepath.Join(root, "repositories.yaml")); err != nil { - panic(err) - } - return srv -} - -// Server is an implementation of a repository server for testing. -type Server struct { - docroot string - srv *httptest.Server - middleware http.HandlerFunc -} - -// WithMiddleware injects middleware in front of the server. This can be used to inject -// additional functionality like layering in an authentication frontend. -func (s *Server) WithMiddleware(middleware http.HandlerFunc) { - s.middleware = middleware -} - // Root gets the docroot for the server. func (s *Server) Root() string { return s.docroot @@ -348,50 +354,12 @@ func (s *Server) CreateIndex() error { return os.WriteFile(ifile, d, 0644) } -func (s *Server) Start() { - s.srv = httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - if s.middleware != nil { - s.middleware.ServeHTTP(w, r) - } - http.FileServer(http.Dir(s.docroot)).ServeHTTP(w, r) - })) -} - -func (s *Server) StartTLS() { - cd := "../../testdata" - ca, pub, priv := filepath.Join(cd, "rootca.crt"), filepath.Join(cd, "crt.pem"), filepath.Join(cd, "key.pem") - insecure := false - - s.srv = httptest.NewUnstartedServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - if s.middleware != nil { - s.middleware.ServeHTTP(w, r) - } - http.FileServer(http.Dir(s.Root())).ServeHTTP(w, r) - })) - tlsConf, err := tlsutil.NewTLSConfig( - tlsutil.WithInsecureSkipVerify(insecure), - tlsutil.WithCertKeyPairFiles(pub, priv), - tlsutil.WithCAFile(ca), - ) - if err != nil { - panic(err) - } - tlsConf.ServerName = "helm.sh" - s.srv.TLS = tlsConf - s.srv.StartTLS() - - // Set up repositories config with ca file - repoConfig := filepath.Join(s.Root(), "repositories.yaml") - - r := repo.NewFile() - r.Add(&repo.Entry{ - Name: "test", - URL: s.URL(), - CAFile: filepath.Join("../../testdata", "rootca.crt"), - }) - - if err := r.WriteFile(repoConfig, 0600); err != nil { - panic(err) +func (s *Server) start() { + if s.tlsConfig != nil { + s.srv.TLS = s.tlsConfig + s.srv.StartTLS() + } else { + s.srv.Start() } } @@ -411,6 +379,10 @@ func (s *Server) URL() string { return s.srv.URL } +func (s *Server) Client() *http.Client { + return s.srv.Client() +} + // LinkIndices links the index created with CreateIndex and makes a symbolic link to the cache index. // // This makes it possible to simulate a local cache of a repository. @@ -422,6 +394,10 @@ func (s *Server) LinkIndices() error { // setTestingRepository sets up a testing repository.yaml with only the given URL. func setTestingRepository(url, fname string) error { + if url == "" { + panic("no url") + } + r := repo.NewFile() r.Add(&repo.Entry{ Name: "test", diff --git a/pkg/repo/repotest/server_test.go b/pkg/repo/repotest/server_test.go index 6d15925db..cf68e5110 100644 --- a/pkg/repo/repotest/server_test.go +++ b/pkg/repo/repotest/server_test.go @@ -19,6 +19,7 @@ import ( "io" "net/http" "path/filepath" + "strings" "testing" "sigs.k8s.io/yaml" @@ -34,7 +35,7 @@ func TestServer(t *testing.T) { rootDir := t.TempDir() - srv := NewServer(rootDir) + srv := newServer(t, rootDir) defer srv.Stop() c, err := srv.CopyCharts("testdata/*.tgz") @@ -99,18 +100,123 @@ func TestServer(t *testing.T) { func TestNewTempServer(t *testing.T) { ensure.HelmHome(t) - srv, err := NewTempServerWithCleanup(t, "testdata/examplechart-0.1.0.tgz") - if err != nil { - t.Fatal(err) + type testCase struct { + options []ServerOption } - defer srv.Stop() - res, err := http.Head(srv.URL() + "/examplechart-0.1.0.tgz") - res.Body.Close() - if err != nil { - t.Error(err) + testCases := map[string]testCase{ + "plainhttp": { + options: []ServerOption{ + WithChartSourceGlob("testdata/examplechart-0.1.0.tgz"), + }, + }, + "tls": { + options: []ServerOption{ + WithChartSourceGlob("testdata/examplechart-0.1.0.tgz"), + WithTLSConfig(MakeTestTLSConfig(t, "../../../testdata")), + }, + }, + } + + for name, tc := range testCases { + t.Run(name, func(t *testing.T) { + srv := NewTempServer( + t, + tc.options..., + ) + defer srv.Stop() + + if srv.srv.URL == "" { + t.Fatal("unstarted server") + } + + client := srv.Client() + + { + res, err := client.Head(srv.URL() + "/repositories.yaml") + if err != nil { + t.Error(err) + } + + res.Body.Close() + + if res.StatusCode != 200 { + t.Errorf("Expected 200, got %d", res.StatusCode) + } + + } + + { + res, err := client.Head(srv.URL() + "/examplechart-0.1.0.tgz") + if err != nil { + t.Error(err) + } + res.Body.Close() + + if res.StatusCode != 200 { + t.Errorf("Expected 200, got %d", res.StatusCode) + } + } + + res, err := client.Get(srv.URL() + "/examplechart-0.1.0.tgz") + res.Body.Close() + if err != nil { + t.Fatal(err) + } + + if res.ContentLength < 500 { + t.Errorf("Expected at least 500 bytes of data, got %d", res.ContentLength) + } + + res, err = client.Get(srv.URL() + "/index.yaml") + if err != nil { + t.Fatal(err) + } + + data, err := io.ReadAll(res.Body) + res.Body.Close() + if err != nil { + t.Fatal(err) + } + + m := repo.NewIndexFile() + if err := yaml.Unmarshal(data, m); err != nil { + t.Fatal(err) + } + + if l := len(m.Entries); l != 1 { + t.Fatalf("Expected 1 entry, got %d", l) + } + + expect := "examplechart" + if !m.Has(expect, "0.1.0") { + t.Errorf("missing %q", expect) + } + + res, err = client.Get(srv.URL() + "/index.yaml-nosuchthing") + res.Body.Close() + if err != nil { + t.Fatal(err) + } + if res.StatusCode != 404 { + t.Fatalf("Expected 404, got %d", res.StatusCode) + } + }) } - if res.StatusCode != 200 { - t.Errorf("Expected 200, got %d", res.StatusCode) + +} + +func TestNewTempServer_TLS(t *testing.T) { + ensure.HelmHome(t) + + srv := NewTempServer( + t, + WithChartSourceGlob("testdata/examplechart-0.1.0.tgz"), + WithTLSConfig(MakeTestTLSConfig(t, "../../../testdata")), + ) + defer srv.Stop() + + if !strings.HasPrefix(srv.URL(), "https://") { + t.Fatal("non-TLS server") } } diff --git a/pkg/repo/repotest/tlsconfig.go b/pkg/repo/repotest/tlsconfig.go new file mode 100644 index 000000000..3914a4d3f --- /dev/null +++ b/pkg/repo/repotest/tlsconfig.go @@ -0,0 +1,43 @@ +/* +Copyright The Helm Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package repotest + +import ( + "crypto/tls" + "path/filepath" + "testing" + + "helm.sh/helm/v4/internal/tlsutil" + + "github.com/stretchr/testify/require" +) + +func MakeTestTLSConfig(t *testing.T, path string) *tls.Config { + ca, pub, priv := filepath.Join(path, "rootca.crt"), filepath.Join(path, "crt.pem"), filepath.Join(path, "key.pem") + + insecure := false + tlsConf, err := tlsutil.NewTLSConfig( + tlsutil.WithInsecureSkipVerify(insecure), + tlsutil.WithCertKeyPairFiles(pub, priv), + tlsutil.WithCAFile(ca), + ) + //require.Nil(t, err, err.Error()) + require.Nil(t, err) + + tlsConf.ServerName = "helm.sh" + + return tlsConf +} From 37020c32fa3bb7660fd61453165b9da9ee62a491 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Sun, 9 Feb 2025 11:11:00 +0800 Subject: [PATCH 12/68] Update pkg/cli/values/options.go Co-authored-by: George Jenkins Signed-off-by: Jonathan --- pkg/cli/values/options.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/cli/values/options.go b/pkg/cli/values/options.go index d7086e8c3..09af69f8b 100644 --- a/pkg/cli/values/options.go +++ b/pkg/cli/values/options.go @@ -68,7 +68,7 @@ func (opts *Options) MergeValues(p getter.Providers) (map[string]interface{}, er // If value is JSON object format, parse it as map var jsonMap map[string]interface{} if err := json.Unmarshal([]byte(trimmedValue), &jsonMap); err != nil { - return nil, errors.Errorf("failed parsing --set-json data using JSON format: %s", value) + return nil, errors.Errorf("failed parsing --set-json data JSON: %s", value) } base = mergeMaps(base, jsonMap) } else { From 8b8cc948224875091d0939216c0bdcc337a58602 Mon Sep 17 00:00:00 2001 From: wangjingcun Date: Tue, 11 Feb 2025 23:20:27 +0800 Subject: [PATCH 13/68] Use a more direct and less error-prone return value Signed-off-by: wangjingcun --- pkg/cli/values/options.go | 2 +- pkg/kube/roundtripper.go | 8 ++++---- pkg/plugin/installer/vcs_installer.go | 2 +- pkg/provenance/sign_test.go | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pkg/cli/values/options.go b/pkg/cli/values/options.go index 24c47ecba..0710d5b86 100644 --- a/pkg/cli/values/options.go +++ b/pkg/cli/values/options.go @@ -143,5 +143,5 @@ func readFile(filePath string, p getter.Providers) ([]byte, error) { if err != nil { return nil, err } - return data.Bytes(), err + return data.Bytes(), nil } diff --git a/pkg/kube/roundtripper.go b/pkg/kube/roundtripper.go index fdb103529..551d3009b 100644 --- a/pkg/kube/roundtripper.go +++ b/pkg/kube/roundtripper.go @@ -49,7 +49,7 @@ func (rt *RetryingRoundTripper) roundTrip(req *http.Request, retry int, prevResp b, err := io.ReadAll(resp.Body) resp.Body.Close() if err != nil { - return resp, rtErr + return resp, err } var ke kubernetesError @@ -58,10 +58,10 @@ func (rt *RetryingRoundTripper) roundTrip(req *http.Request, retry int, prevResp r.Seek(0, io.SeekStart) resp.Body = io.NopCloser(r) if err != nil { - return resp, rtErr + return resp, nil } if ke.Code < 500 { - return resp, rtErr + return resp, nil } // Matches messages like "etcdserver: leader changed" if strings.HasSuffix(ke.Message, "etcdserver: leader changed") { @@ -71,7 +71,7 @@ func (rt *RetryingRoundTripper) roundTrip(req *http.Request, retry int, prevResp if strings.HasSuffix(ke.Message, "raft proposal dropped") { return rt.roundTrip(req, retry-1, resp) } - return resp, rtErr + return resp, nil } type kubernetesError struct { diff --git a/pkg/plugin/installer/vcs_installer.go b/pkg/plugin/installer/vcs_installer.go index 8153550b2..3967e46cd 100644 --- a/pkg/plugin/installer/vcs_installer.go +++ b/pkg/plugin/installer/vcs_installer.go @@ -63,7 +63,7 @@ func NewVCSInstaller(source, version string) (*VCSInstaller, error) { Version: version, base: newBase(source), } - return i, err + return i, nil } // Install clones a remote repository and installs into the plugin directory. diff --git a/pkg/provenance/sign_test.go b/pkg/provenance/sign_test.go index bf6848368..69a6dad5b 100644 --- a/pkg/provenance/sign_test.go +++ b/pkg/provenance/sign_test.go @@ -34,7 +34,7 @@ const ( // phrase. Use `gpg --export-secret-keys helm-test` to export the secret. testKeyfile = "testdata/helm-test-key.secret" - // testPasswordKeyFile is a keyfile with a password. + // testPasswordKeyfile is a keyfile with a password. testPasswordKeyfile = "testdata/helm-password-key.secret" // testPubfile is the public key file. From 8eb615d37604294611d2fe4a3f39aa433d6fb7e9 Mon Sep 17 00:00:00 2001 From: Eimhin Laverty Date: Thu, 13 Feb 2025 17:23:43 +0100 Subject: [PATCH 14/68] Update version option description with more accurate info Signed-off-by: Eimhin Laverty --- scripts/get-helm-3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/get-helm-3 b/scripts/get-helm-3 index 5f19bd3fa..3aa44daee 100755 --- a/scripts/get-helm-3 +++ b/scripts/get-helm-3 @@ -279,7 +279,7 @@ testVersion() { help () { echo "Accepted cli arguments are:" echo -e "\t[--help|-h ] ->> prints this help" - echo -e "\t[--version|-v ] . When not defined it fetches the latest release from GitHub" + echo -e "\t[--version|-v ] . When not defined it fetches the latest release tag from the Helm CDN" echo -e "\te.g. --version v3.0.0 or -v canary" echo -e "\t[--no-sudo] ->> install without sudo" } From 5b940c026d717aa553cf590a1c4032e01c231fad Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 13 Feb 2025 22:01:53 +0000 Subject: [PATCH 15/68] build(deps): bump the k8s-io group with 7 updates Bumps the k8s-io group with 7 updates: | Package | From | To | | --- | --- | --- | | [k8s.io/api](https://github.com/kubernetes/api) | `0.32.1` | `0.32.2` | | [k8s.io/apiextensions-apiserver](https://github.com/kubernetes/apiextensions-apiserver) | `0.32.1` | `0.32.2` | | [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) | `0.32.1` | `0.32.2` | | [k8s.io/apiserver](https://github.com/kubernetes/apiserver) | `0.32.1` | `0.32.2` | | [k8s.io/cli-runtime](https://github.com/kubernetes/cli-runtime) | `0.32.1` | `0.32.2` | | [k8s.io/client-go](https://github.com/kubernetes/client-go) | `0.32.1` | `0.32.2` | | [k8s.io/kubectl](https://github.com/kubernetes/kubectl) | `0.32.1` | `0.32.2` | Updates `k8s.io/api` from 0.32.1 to 0.32.2 - [Commits](https://github.com/kubernetes/api/compare/v0.32.1...v0.32.2) Updates `k8s.io/apiextensions-apiserver` from 0.32.1 to 0.32.2 - [Release notes](https://github.com/kubernetes/apiextensions-apiserver/releases) - [Commits](https://github.com/kubernetes/apiextensions-apiserver/compare/v0.32.1...v0.32.2) Updates `k8s.io/apimachinery` from 0.32.1 to 0.32.2 - [Commits](https://github.com/kubernetes/apimachinery/compare/v0.32.1...v0.32.2) Updates `k8s.io/apiserver` from 0.32.1 to 0.32.2 - [Commits](https://github.com/kubernetes/apiserver/compare/v0.32.1...v0.32.2) Updates `k8s.io/cli-runtime` from 0.32.1 to 0.32.2 - [Commits](https://github.com/kubernetes/cli-runtime/compare/v0.32.1...v0.32.2) Updates `k8s.io/client-go` from 0.32.1 to 0.32.2 - [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md) - [Commits](https://github.com/kubernetes/client-go/compare/v0.32.1...v0.32.2) Updates `k8s.io/kubectl` from 0.32.1 to 0.32.2 - [Commits](https://github.com/kubernetes/kubectl/compare/v0.32.1...v0.32.2) --- updated-dependencies: - dependency-name: k8s.io/api dependency-type: direct:production update-type: version-update:semver-patch dependency-group: k8s-io - dependency-name: k8s.io/apiextensions-apiserver dependency-type: direct:production update-type: version-update:semver-patch dependency-group: k8s-io - dependency-name: k8s.io/apimachinery dependency-type: direct:production update-type: version-update:semver-patch dependency-group: k8s-io - dependency-name: k8s.io/apiserver dependency-type: direct:production update-type: version-update:semver-patch dependency-group: k8s-io - dependency-name: k8s.io/cli-runtime dependency-type: direct:production update-type: version-update:semver-patch dependency-group: k8s-io - dependency-name: k8s.io/client-go dependency-type: direct:production update-type: version-update:semver-patch dependency-group: k8s-io - dependency-name: k8s.io/kubectl dependency-type: direct:production update-type: version-update:semver-patch dependency-group: k8s-io ... Signed-off-by: dependabot[bot] --- go.mod | 16 ++++++++-------- go.sum | 32 ++++++++++++++++---------------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/go.mod b/go.mod index d4bb5755d..f3a8265b6 100644 --- a/go.mod +++ b/go.mod @@ -36,14 +36,14 @@ require ( golang.org/x/crypto v0.33.0 golang.org/x/term v0.29.0 golang.org/x/text v0.22.0 - k8s.io/api v0.32.1 - k8s.io/apiextensions-apiserver v0.32.1 - k8s.io/apimachinery v0.32.1 - k8s.io/apiserver v0.32.1 - k8s.io/cli-runtime v0.32.1 - k8s.io/client-go v0.32.1 + k8s.io/api v0.32.2 + k8s.io/apiextensions-apiserver v0.32.2 + k8s.io/apimachinery v0.32.2 + k8s.io/apiserver v0.32.2 + k8s.io/cli-runtime v0.32.2 + k8s.io/client-go v0.32.2 k8s.io/klog/v2 v2.130.1 - k8s.io/kubectl v0.32.1 + k8s.io/kubectl v0.32.2 oras.land/oras-go/v2 v2.5.0 sigs.k8s.io/yaml v1.4.0 ) @@ -174,7 +174,7 @@ require ( gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/component-base v0.32.1 // indirect + k8s.io/component-base v0.32.2 // indirect k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f // indirect k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 // indirect sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect diff --git a/go.sum b/go.sum index 4eaeeaf3a..25a825e86 100644 --- a/go.sum +++ b/go.sum @@ -519,26 +519,26 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/api v0.32.1 h1:f562zw9cy+GvXzXf0CKlVQ7yHJVYzLfL6JAS4kOAaOc= -k8s.io/api v0.32.1/go.mod h1:/Yi/BqkuueW1BgpoePYBRdDYfjPF5sgTr5+YqDZra5k= -k8s.io/apiextensions-apiserver v0.32.1 h1:hjkALhRUeCariC8DiVmb5jj0VjIc1N0DREP32+6UXZw= -k8s.io/apiextensions-apiserver v0.32.1/go.mod h1:sxWIGuGiYov7Io1fAS2X06NjMIk5CbRHc2StSmbaQto= -k8s.io/apimachinery v0.32.1 h1:683ENpaCBjma4CYqsmZyhEzrGz6cjn1MY/X2jB2hkZs= -k8s.io/apimachinery v0.32.1/go.mod h1:GpHVgxoKlTxClKcteaeuF1Ul/lDVb74KpZcxcmLDElE= -k8s.io/apiserver v0.32.1 h1:oo0OozRos66WFq87Zc5tclUX2r0mymoVHRq8JmR7Aak= -k8s.io/apiserver v0.32.1/go.mod h1:UcB9tWjBY7aryeI5zAgzVJB/6k7E97bkr1RgqDz0jPw= -k8s.io/cli-runtime v0.32.1 h1:19nwZPlYGJPUDbhAxDIS2/oydCikvKMHsxroKNGA2mM= -k8s.io/cli-runtime v0.32.1/go.mod h1:NJPbeadVFnV2E7B7vF+FvU09mpwYlZCu8PqjzfuOnkY= -k8s.io/client-go v0.32.1 h1:otM0AxdhdBIaQh7l1Q0jQpmo7WOFIk5FFa4bg6YMdUU= -k8s.io/client-go v0.32.1/go.mod h1:aTTKZY7MdxUaJ/KiUs8D+GssR9zJZi77ZqtzcGXIiDg= -k8s.io/component-base v0.32.1 h1:/5IfJ0dHIKBWysGV0yKTFfacZ5yNV1sulPh3ilJjRZk= -k8s.io/component-base v0.32.1/go.mod h1:j1iMMHi/sqAHeG5z+O9BFNCF698a1u0186zkjMZQ28w= +k8s.io/api v0.32.2 h1:bZrMLEkgizC24G9eViHGOPbW+aRo9duEISRIJKfdJuw= +k8s.io/api v0.32.2/go.mod h1:hKlhk4x1sJyYnHENsrdCWw31FEmCijNGPJO5WzHiJ6Y= +k8s.io/apiextensions-apiserver v0.32.2 h1:2YMk285jWMk2188V2AERy5yDwBYrjgWYggscghPCvV4= +k8s.io/apiextensions-apiserver v0.32.2/go.mod h1:GPwf8sph7YlJT3H6aKUWtd0E+oyShk/YHWQHf/OOgCA= +k8s.io/apimachinery v0.32.2 h1:yoQBR9ZGkA6Rgmhbp/yuT9/g+4lxtsGYwW6dR6BDPLQ= +k8s.io/apimachinery v0.32.2/go.mod h1:GpHVgxoKlTxClKcteaeuF1Ul/lDVb74KpZcxcmLDElE= +k8s.io/apiserver v0.32.2 h1:WzyxAu4mvLkQxwD9hGa4ZfExo3yZZaYzoYvvVDlM6vw= +k8s.io/apiserver v0.32.2/go.mod h1:PEwREHiHNU2oFdte7BjzA1ZyjWjuckORLIK/wLV5goM= +k8s.io/cli-runtime v0.32.2 h1:aKQR4foh9qeyckKRkNXUccP9moxzffyndZAvr+IXMks= +k8s.io/cli-runtime v0.32.2/go.mod h1:a/JpeMztz3xDa7GCyyShcwe55p8pbcCVQxvqZnIwXN8= +k8s.io/client-go v0.32.2 h1:4dYCD4Nz+9RApM2b/3BtVvBHw54QjMFUl1OLcJG5yOA= +k8s.io/client-go v0.32.2/go.mod h1:fpZ4oJXclZ3r2nDOv+Ux3XcJutfrwjKTCHz2H3sww94= +k8s.io/component-base v0.32.2 h1:1aUL5Vdmu7qNo4ZsE+569PV5zFatM9hl+lb3dEea2zU= +k8s.io/component-base v0.32.2/go.mod h1:PXJ61Vx9Lg+P5mS8TLd7bCIr+eMJRQTyXe8KvkrvJq0= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f h1:GA7//TjRY9yWGy1poLzYYJJ4JRdzg3+O6e8I+e+8T5Y= k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f/go.mod h1:R/HEjbvWI0qdfb8viZUeVZm0X6IZnxAydC7YU42CMw4= -k8s.io/kubectl v0.32.1 h1:/btLtXLQUU1rWx8AEvX9jrb9LaI6yeezt3sFALhB8M8= -k8s.io/kubectl v0.32.1/go.mod h1:sezNuyWi1STk4ZNPVRIFfgjqMI6XMf+oCVLjZen/pFQ= +k8s.io/kubectl v0.32.2 h1:TAkag6+XfSBgkqK9I7ZvwtF0WVtUAvK8ZqTt+5zi1Us= +k8s.io/kubectl v0.32.2/go.mod h1:+h/NQFSPxiDZYX/WZaWw9fwYezGLISP0ud8nQKg+3g8= k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 h1:M3sRQVHv7vB20Xc2ybTt7ODCeFj6JSWYFzOFnYeS6Ro= k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= oras.land/oras-go/v2 v2.5.0 h1:o8Me9kLY74Vp5uw07QXPiitjsw7qNXi8Twd+19Zf02c= From 165654426d9edeaadc5352e54e2ac4c72f408c1d Mon Sep 17 00:00:00 2001 From: Evans Mungai Date: Mon, 17 Feb 2025 10:27:11 +0000 Subject: [PATCH 16/68] chore: update profiling doc in CONTRIBUTING.md Signed-off-by: Evans Mungai --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bc225d218..8ab93403d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -284,7 +284,7 @@ Small, ad-hoc changes/PRs to Helm which introduce user facing changes, which wou ### Profiling PRs -If your contribution requires profiling to check memory and/or CPU usage, you can set `HELM_PPROF_CPU_PROFILE=/path/to/cpu.prof HELM_PPROF_MEM_PROFILE=/path/to/mem.prof helm show all bitnami/nginx` environment variable to collect runtime profiling data for analysis. You can use Golang's [pprof](https://github.com/google/pprof/blob/main/doc/README.md) tool to inspect the results. +If your contribution requires profiling to check memory and/or CPU usage, you can set `HELM_PPROF_CPU_PROFILE=/path/to/cpu.prof` and/or `HELM_PPROF_MEM_PROFILE=/path/to/mem.prof` environment variables to collect runtime profiling data for analysis. You can use Golang's [pprof](https://github.com/google/pprof/blob/main/doc/README.md) tool to inspect the results. Example analysing collected profiling data ``` From fdf448497137d8c9358d5ccc481e535cfbc6523b Mon Sep 17 00:00:00 2001 From: Evans Mungai Date: Mon, 17 Feb 2025 18:31:17 +0000 Subject: [PATCH 17/68] Update cmd/helm/profiling.go Co-authored-by: George Jenkins Signed-off-by: Evans Mungai --- cmd/helm/profiling.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/helm/profiling.go b/cmd/helm/profiling.go index e48441512..9bcdb850e 100644 --- a/cmd/helm/profiling.go +++ b/cmd/helm/profiling.go @@ -83,8 +83,8 @@ func stopProfiling() error { } } - if len(errs) > 0 { - return fmt.Errorf("errors while stopping profiling: [%s]", strings.Join(errs, ", ")) + if err := errors.Join(errs...); err != nil { + return fmt.Errorf("error(s) while stopping profiling: %w", err) } return nil From 62576db2fcabd40bb9801f81a0de9e8fcc36d154 Mon Sep 17 00:00:00 2001 From: Evans Mungai Date: Mon, 17 Feb 2025 18:36:04 +0000 Subject: [PATCH 18/68] chore: use []error instead of []string Signed-off-by: Evans Mungai --- cmd/helm/profiling.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/helm/profiling.go b/cmd/helm/profiling.go index 9bcdb850e..950ad15da 100644 --- a/cmd/helm/profiling.go +++ b/cmd/helm/profiling.go @@ -17,11 +17,11 @@ limitations under the License. package main import ( + "errors" "fmt" "os" "runtime" "runtime/pprof" - "strings" ) var ( @@ -58,14 +58,14 @@ func startProfiling() error { // It writes memory profile to the file path specified in HELM_PPROF_MEM_PROFILE // environment variable. func stopProfiling() error { - errs := []string{} + errs := []error{} // Stop CPU profiling if it was started if cpuProfileFile != nil { pprof.StopCPUProfile() err := cpuProfileFile.Close() if err != nil { - errs = append(errs, err.Error()) + errs = append(errs, err) } cpuProfileFile = nil } @@ -73,13 +73,13 @@ func stopProfiling() error { if memProfilePath != "" { f, err := os.Create(memProfilePath) if err != nil { - errs = append(errs, err.Error()) + errs = append(errs, err) } defer f.Close() runtime.GC() // get up-to-date statistics if err := pprof.WriteHeapProfile(f); err != nil { - errs = append(errs, err.Error()) + errs = append(errs, err) } } From 50be8ae64b7756597f72d451b0ffd5951b82ee61 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Feb 2025 21:08:38 +0000 Subject: [PATCH 19/68] build(deps): bump golangci/golangci-lint-action from 6.3.2 to 6.5.0 Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 6.3.2 to 6.5.0. - [Release notes](https://github.com/golangci/golangci-lint-action/releases) - [Commits](https://github.com/golangci/golangci-lint-action/compare/051d91933864810ecd5e2ea2cfd98f6a5bca5347...2226d7cb06a077cd73e56eedd38eecad18e5d837) --- updated-dependencies: - dependency-name: golangci/golangci-lint-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/golangci-lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 914af6a0a..5971ada24 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -21,6 +21,6 @@ jobs: go-version: '1.23' check-latest: true - name: golangci-lint - uses: golangci/golangci-lint-action@051d91933864810ecd5e2ea2cfd98f6a5bca5347 #pin@6.3.2 + uses: golangci/golangci-lint-action@2226d7cb06a077cd73e56eedd38eecad18e5d837 #pin@6.5.0 with: version: v1.62 From 001d2978b6dc4df0a3d0a4b5c76f8f34b9e1beca Mon Sep 17 00:00:00 2001 From: hugehope Date: Tue, 18 Feb 2025 15:20:46 +0800 Subject: [PATCH 20/68] refactor: using slices.Contains to simplify the code Signed-off-by: hugehope --- pkg/action/release_testing.go | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/pkg/action/release_testing.go b/pkg/action/release_testing.go index 2539a7f65..1568b0683 100644 --- a/pkg/action/release_testing.go +++ b/pkg/action/release_testing.go @@ -20,6 +20,7 @@ import ( "context" "fmt" "io" + "slices" "sort" "time" @@ -75,7 +76,7 @@ func (r *ReleaseTesting) Run(name string) (*release.Release, error) { executingHooks := []*release.Hook{} if len(r.Filters[ExcludeNameFilter]) != 0 { for _, h := range rel.Hooks { - if contains(r.Filters[ExcludeNameFilter], h.Name) { + if slices.Contains(r.Filters[ExcludeNameFilter], h.Name) { skippedHooks = append(skippedHooks, h) } else { executingHooks = append(executingHooks, h) @@ -86,7 +87,7 @@ func (r *ReleaseTesting) Run(name string) (*release.Release, error) { if len(r.Filters[IncludeNameFilter]) != 0 { executingHooks = nil for _, h := range rel.Hooks { - if contains(r.Filters[IncludeNameFilter], h.Name) { + if slices.Contains(r.Filters[IncludeNameFilter], h.Name) { executingHooks = append(executingHooks, h) } else { skippedHooks = append(skippedHooks, h) @@ -119,10 +120,10 @@ func (r *ReleaseTesting) GetPodLogs(out io.Writer, rel *release.Release) error { for _, h := range hooksByWight { for _, e := range h.Events { if e == release.HookTest { - if contains(r.Filters[ExcludeNameFilter], h.Name) { + if slices.Contains(r.Filters[ExcludeNameFilter], h.Name) { continue } - if len(r.Filters[IncludeNameFilter]) > 0 && !contains(r.Filters[IncludeNameFilter], h.Name) { + if len(r.Filters[IncludeNameFilter]) > 0 && !slices.Contains(r.Filters[IncludeNameFilter], h.Name) { continue } req := client.CoreV1().Pods(r.Namespace).GetLogs(h.Name, &v1.PodLogOptions{}) @@ -142,12 +143,3 @@ func (r *ReleaseTesting) GetPodLogs(out io.Writer, rel *release.Release) error { } return nil } - -func contains(arr []string, value string) bool { - for _, item := range arr { - if item == value { - return true - } - } - return false -} From b689ff203e76cf009f931dcec49910c6054c06b3 Mon Sep 17 00:00:00 2001 From: Matt Farina Date: Wed, 19 Feb 2025 14:58:10 -0500 Subject: [PATCH 21/68] Moving to SetOut and SetErr for Cobra SetOutput is deprecated. This causes it to fail linting. Signed-off-by: Matt Farina --- cmd/helm/require/args_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/helm/require/args_test.go b/cmd/helm/require/args_test.go index 5a84a42d0..cd5850650 100644 --- a/cmd/helm/require/args_test.go +++ b/cmd/helm/require/args_test.go @@ -71,7 +71,8 @@ func runTestCases(t *testing.T, testCases []testCase) { Args: tc.validateFunc, } cmd.SetArgs(tc.args) - cmd.SetOutput(io.Discard) + cmd.SetOut(io.Discard) + cmd.SetErr(io.Discard) err := cmd.Execute() if tc.wantError == "" { From 3d2c914a6d38000c8d9f68efdf7538adab567d4f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 19 Feb 2025 20:12:17 +0000 Subject: [PATCH 22/68] build(deps): bump github.com/spf13/cobra from 1.8.1 to 1.9.1 Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.8.1 to 1.9.1. - [Release notes](https://github.com/spf13/cobra/releases) - [Commits](https://github.com/spf13/cobra/compare/v1.8.1...v1.9.1) --- updated-dependencies: - dependency-name: github.com/spf13/cobra dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 4 ++-- go.sum | 9 ++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index f3a8265b6..c84140350 100644 --- a/go.mod +++ b/go.mod @@ -29,7 +29,7 @@ require ( github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5 github.com/pkg/errors v0.9.1 github.com/rubenv/sql-migrate v1.7.1 - github.com/spf13/cobra v1.8.1 + github.com/spf13/cobra v1.9.1 github.com/spf13/pflag v1.0.6 github.com/stretchr/testify v1.10.0 github.com/xeipuuv/gojsonschema v1.2.0 @@ -63,7 +63,7 @@ require ( github.com/containerd/log v0.1.0 // indirect github.com/containerd/platforms v0.2.1 // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect - github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect + github.com/cpuguy83/go-md2man/v2 v2.0.6 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect github.com/distribution/reference v0.6.0 // indirect diff --git a/go.sum b/go.sum index 25a825e86..995e14598 100644 --- a/go.sum +++ b/go.sum @@ -58,8 +58,8 @@ github.com/containerd/platforms v0.2.1 h1:zvwtM3rz2YHPQsF2CHYM8+KtB5dvhISiXh5ZpS github.com/containerd/platforms v0.2.1/go.mod h1:XHCb+2/hzowdiut9rkudds9bE5yJ7npe7dG/wG+uFPw= github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4= -github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.6 h1:XJtiaUW6dEEqVuZiMTn1ldk455QWwEIsMIJlo5vtkx0= +github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= @@ -313,9 +313,8 @@ github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spf13/cast v1.7.0 h1:ntdiHjuueXFgm5nzDRdOS4yfT43P5Fnud6DH50rz/7w= github.com/spf13/cast v1.7.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= -github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= -github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= -github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/cobra v1.9.1 h1:CXSaggrXdbHK9CF+8ywj8Amf7PBRmPCOJugH954Nnlo= +github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0= github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o= github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= From 0d36cb664a30826ad3f1b811e5ad942144e85336 Mon Sep 17 00:00:00 2001 From: lubingtan Date: Fri, 24 Jan 2025 16:21:02 +0800 Subject: [PATCH 23/68] feat: support multi-document values files Signed-off-by: lubingtan --- pkg/cli/values/options.go | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/pkg/cli/values/options.go b/pkg/cli/values/options.go index add2f72d5..e1f1988c8 100644 --- a/pkg/cli/values/options.go +++ b/pkg/cli/values/options.go @@ -17,6 +17,7 @@ limitations under the License. package values import ( + "bytes" "encoding/json" "io" "net/url" @@ -24,7 +25,7 @@ import ( "strings" "github.com/pkg/errors" - "sigs.k8s.io/yaml" + utilyaml "k8s.io/apimachinery/pkg/util/yaml" "helm.sh/helm/v4/pkg/getter" "helm.sh/helm/v4/pkg/strvals" @@ -47,18 +48,23 @@ func (opts *Options) MergeValues(p getter.Providers) (map[string]interface{}, er // User specified a values files via -f/--values for _, filePath := range opts.ValueFiles { - currentMap := map[string]interface{}{} - - bytes, err := readFile(filePath, p) + raw, err := readFile(filePath, p) if err != nil { return nil, err } - if err := yaml.Unmarshal(bytes, ¤tMap); err != nil { - return nil, errors.Wrapf(err, "failed to parse %s", filePath) + decoder := utilyaml.NewYAMLOrJSONDecoder(bytes.NewReader(raw), 4096) + for { + currentMap := map[string]interface{}{} + if err := decoder.Decode(¤tMap); err != nil { + if err == io.EOF { + break + } + return nil, errors.Wrapf(err, "failed to parse %s", filePath) + } + // Merge with the previous map + base = mergeMaps(base, currentMap) } - // Merge with the previous map - base = mergeMaps(base, currentMap) } // User specified a value via --set-json From 92087f6e33d6a5d8333e6afda7d68a4d15a2cec9 Mon Sep 17 00:00:00 2001 From: lubingtan Date: Mon, 3 Feb 2025 20:53:07 +0800 Subject: [PATCH 24/68] feat: support multi-document values files for default chart values Signed-off-by: lubingtan --- pkg/chart/loader/load.go | 53 ++++++++++++++-- pkg/chart/loader/load_test.go | 113 +++++++++++++++++++++++++++++++++ pkg/cli/values/options.go | 41 ++---------- pkg/cli/values/options_test.go | 55 ---------------- 4 files changed, 168 insertions(+), 94 deletions(-) diff --git a/pkg/chart/loader/load.go b/pkg/chart/loader/load.go index 7645ba96c..c40a1aaf5 100644 --- a/pkg/chart/loader/load.go +++ b/pkg/chart/loader/load.go @@ -17,14 +17,17 @@ limitations under the License. package loader import ( + "bufio" "bytes" "encoding/json" + "io" "log" "os" "path/filepath" "strings" "github.com/pkg/errors" + utilyaml "k8s.io/apimachinery/pkg/util/yaml" "sigs.k8s.io/yaml" "helm.sh/helm/v4/pkg/chart" @@ -104,13 +107,11 @@ func LoadFiles(files []*BufferedFile) (*chart.Chart, error) { return c, errors.Wrap(err, "cannot load Chart.lock") } case f.Name == "values.yaml": - c.Values = make(map[string]interface{}) - if err := yaml.Unmarshal(f.Data, &c.Values, func(d *json.Decoder) *json.Decoder { - d.UseNumber() - return d - }); err != nil { + values, err := LoadValues(f.Data) + if err != nil { return c, errors.Wrap(err, "cannot load values.yaml") } + c.Values = values case f.Name == "values.schema.json": c.Schema = f.Data @@ -205,3 +206,45 @@ func LoadFiles(files []*BufferedFile) (*chart.Chart, error) { return c, nil } + +func LoadValues(data []byte) (map[string]interface{}, error) { + values := map[string]interface{}{} + reader := utilyaml.NewYAMLReader(bufio.NewReader(bytes.NewReader(data))) + for { + currentMap := map[string]interface{}{} + raw, err := reader.Read() + if err != nil { + if err == io.EOF { + break + } + return nil, errors.Wrap(err, "error reading yaml document") + } + if err := yaml.Unmarshal(raw, ¤tMap, func(d *json.Decoder) *json.Decoder { + d.UseNumber() + return d + }); err != nil { + return nil, errors.Wrap(err, "cannot unmarshal yaml document") + } + values = MergeMaps(values, currentMap) + } + return values, nil +} + +func MergeMaps(a, b map[string]interface{}) map[string]interface{} { + out := make(map[string]interface{}, len(a)) + for k, v := range a { + out[k] = v + } + for k, v := range b { + if v, ok := v.(map[string]interface{}); ok { + if bv, ok := out[k]; ok { + if bv, ok := bv.(map[string]interface{}); ok { + out[k] = MergeMaps(bv, v) + continue + } + } + } + out[k] = v + } + return out +} diff --git a/pkg/chart/loader/load_test.go b/pkg/chart/loader/load_test.go index 25e000835..92ffa002b 100644 --- a/pkg/chart/loader/load_test.go +++ b/pkg/chart/loader/load_test.go @@ -24,6 +24,7 @@ import ( "log" "os" "path/filepath" + "reflect" "runtime" "strings" "testing" @@ -488,6 +489,118 @@ func TestLoadInvalidArchive(t *testing.T) { } } +func TestLoadValues(t *testing.T) { + testDatas := []struct { + name string + data []byte + expctedValues map[string]interface{} + }{ + { + name: "It should load values correctly", + data: []byte(` +foo: + image: foo:v1 +bar: + version: v2 +`), + expctedValues: map[string]interface{}{ + "foo": map[string]interface{}{ + "image": "foo:v1", + }, + "bar": map[string]interface{}{ + "version": "v2", + }, + }, + }, + { + name: "It should load values correctly with multiple documents in one file", + data: []byte(` +foo: + image: foo:v1 +bar: + version: v2 +--- +foo: + image: foo:v2 +`), + expctedValues: map[string]interface{}{ + "foo": map[string]interface{}{ + "image": "foo:v2", + }, + "bar": map[string]interface{}{ + "version": "v2", + }, + }, + }, + } + for _, testData := range testDatas { + t.Run(testData.name, func(tt *testing.T) { + values, err := LoadValues(testData.data) + if err != nil { + tt.Fatal(err) + } + if !reflect.DeepEqual(values, testData.expctedValues) { + tt.Errorf("Expected values: %v, got %v", testData.expctedValues, values) + } + }) + } +} + +func TestMergeValues(t *testing.T) { + nestedMap := map[string]interface{}{ + "foo": "bar", + "baz": map[string]string{ + "cool": "stuff", + }, + } + anotherNestedMap := map[string]interface{}{ + "foo": "bar", + "baz": map[string]string{ + "cool": "things", + "awesome": "stuff", + }, + } + flatMap := map[string]interface{}{ + "foo": "bar", + "baz": "stuff", + } + anotherFlatMap := map[string]interface{}{ + "testing": "fun", + } + + testMap := MergeMaps(flatMap, nestedMap) + equal := reflect.DeepEqual(testMap, nestedMap) + if !equal { + t.Errorf("Expected a nested map to overwrite a flat value. Expected: %v, got %v", nestedMap, testMap) + } + + testMap = MergeMaps(nestedMap, flatMap) + equal = reflect.DeepEqual(testMap, flatMap) + if !equal { + t.Errorf("Expected a flat value to overwrite a map. Expected: %v, got %v", flatMap, testMap) + } + + testMap = MergeMaps(nestedMap, anotherNestedMap) + equal = reflect.DeepEqual(testMap, anotherNestedMap) + if !equal { + t.Errorf("Expected a nested map to overwrite another nested map. Expected: %v, got %v", anotherNestedMap, testMap) + } + + testMap = MergeMaps(anotherFlatMap, anotherNestedMap) + expectedMap := map[string]interface{}{ + "testing": "fun", + "foo": "bar", + "baz": map[string]string{ + "cool": "things", + "awesome": "stuff", + }, + } + equal = reflect.DeepEqual(testMap, expectedMap) + if !equal { + t.Errorf("Expected a map with different keys to merge properly with another map. Expected: %v, got %v", expectedMap, testMap) + } +} + func verifyChart(t *testing.T, c *chart.Chart) { t.Helper() if c.Name() == "" { diff --git a/pkg/cli/values/options.go b/pkg/cli/values/options.go index e1f1988c8..70390f12a 100644 --- a/pkg/cli/values/options.go +++ b/pkg/cli/values/options.go @@ -17,7 +17,6 @@ limitations under the License. package values import ( - "bytes" "encoding/json" "io" "net/url" @@ -25,8 +24,8 @@ import ( "strings" "github.com/pkg/errors" - utilyaml "k8s.io/apimachinery/pkg/util/yaml" + "helm.sh/helm/v4/pkg/chart/loader" "helm.sh/helm/v4/pkg/getter" "helm.sh/helm/v4/pkg/strvals" ) @@ -48,23 +47,16 @@ func (opts *Options) MergeValues(p getter.Providers) (map[string]interface{}, er // User specified a values files via -f/--values for _, filePath := range opts.ValueFiles { - raw, err := readFile(filePath, p) + bytes, err := readFile(filePath, p) if err != nil { return nil, err } - - decoder := utilyaml.NewYAMLOrJSONDecoder(bytes.NewReader(raw), 4096) - for { - currentMap := map[string]interface{}{} - if err := decoder.Decode(¤tMap); err != nil { - if err == io.EOF { - break - } - return nil, errors.Wrapf(err, "failed to parse %s", filePath) - } - // Merge with the previous map - base = mergeMaps(base, currentMap) + currentMap, err := loader.LoadValues(bytes) + if err != nil { + return nil, errors.Wrapf(err, "failed to parse %s", filePath) } + // Merge with the previous map + base = loader.MergeMaps(base, currentMap) } // User specified a value via --set-json @@ -123,25 +115,6 @@ func (opts *Options) MergeValues(p getter.Providers) (map[string]interface{}, er return base, nil } -func mergeMaps(a, b map[string]interface{}) map[string]interface{} { - out := make(map[string]interface{}, len(a)) - for k, v := range a { - out[k] = v - } - for k, v := range b { - if v, ok := v.(map[string]interface{}); ok { - if bv, ok := out[k]; ok { - if bv, ok := bv.(map[string]interface{}); ok { - out[k] = mergeMaps(bv, v) - continue - } - } - } - out[k] = v - } - return out -} - // readFile load a file from stdin, the local directory, or a remote file with a url. func readFile(filePath string, p getter.Providers) ([]byte, error) { if strings.TrimSpace(filePath) == "-" { diff --git a/pkg/cli/values/options_test.go b/pkg/cli/values/options_test.go index 5197a1b5e..c3bb0af33 100644 --- a/pkg/cli/values/options_test.go +++ b/pkg/cli/values/options_test.go @@ -23,61 +23,6 @@ import ( "helm.sh/helm/v4/pkg/getter" ) -func TestMergeMaps(t *testing.T) { - nestedMap := map[string]interface{}{ - "foo": "bar", - "baz": map[string]string{ - "cool": "stuff", - }, - } - anotherNestedMap := map[string]interface{}{ - "foo": "bar", - "baz": map[string]string{ - "cool": "things", - "awesome": "stuff", - }, - } - flatMap := map[string]interface{}{ - "foo": "bar", - "baz": "stuff", - } - anotherFlatMap := map[string]interface{}{ - "testing": "fun", - } - - testMap := mergeMaps(flatMap, nestedMap) - equal := reflect.DeepEqual(testMap, nestedMap) - if !equal { - t.Errorf("Expected a nested map to overwrite a flat value. Expected: %v, got %v", nestedMap, testMap) - } - - testMap = mergeMaps(nestedMap, flatMap) - equal = reflect.DeepEqual(testMap, flatMap) - if !equal { - t.Errorf("Expected a flat value to overwrite a map. Expected: %v, got %v", flatMap, testMap) - } - - testMap = mergeMaps(nestedMap, anotherNestedMap) - equal = reflect.DeepEqual(testMap, anotherNestedMap) - if !equal { - t.Errorf("Expected a nested map to overwrite another nested map. Expected: %v, got %v", anotherNestedMap, testMap) - } - - testMap = mergeMaps(anotherFlatMap, anotherNestedMap) - expectedMap := map[string]interface{}{ - "testing": "fun", - "foo": "bar", - "baz": map[string]string{ - "cool": "things", - "awesome": "stuff", - }, - } - equal = reflect.DeepEqual(testMap, expectedMap) - if !equal { - t.Errorf("Expected a map with different keys to merge properly with another map. Expected: %v, got %v", expectedMap, testMap) - } -} - func TestReadFile(t *testing.T) { var p getter.Providers filePath := "%a.txt" From 3d84e00ce756f34f8d3cf41c1489548696edd8a7 Mon Sep 17 00:00:00 2001 From: lubingtan Date: Sun, 9 Feb 2025 16:16:08 +0800 Subject: [PATCH 25/68] fix: use Reader interface as the input of LoadValues and enhance UT of LoadValues Signed-off-by: lubingtan --- pkg/chart/loader/load.go | 7 ++++--- pkg/chart/loader/load_test.go | 19 ++++++++----------- pkg/cli/values/options.go | 5 +++-- 3 files changed, 15 insertions(+), 16 deletions(-) diff --git a/pkg/chart/loader/load.go b/pkg/chart/loader/load.go index c40a1aaf5..84a040c0f 100644 --- a/pkg/chart/loader/load.go +++ b/pkg/chart/loader/load.go @@ -107,7 +107,7 @@ func LoadFiles(files []*BufferedFile) (*chart.Chart, error) { return c, errors.Wrap(err, "cannot load Chart.lock") } case f.Name == "values.yaml": - values, err := LoadValues(f.Data) + values, err := LoadValues(bytes.NewReader(f.Data)) if err != nil { return c, errors.Wrap(err, "cannot load values.yaml") } @@ -207,9 +207,10 @@ func LoadFiles(files []*BufferedFile) (*chart.Chart, error) { return c, nil } -func LoadValues(data []byte) (map[string]interface{}, error) { +// LoadValues loads chat values from a reader. +func LoadValues(data io.Reader) (map[string]interface{}, error) { values := map[string]interface{}{} - reader := utilyaml.NewYAMLReader(bufio.NewReader(bytes.NewReader(data))) + reader := utilyaml.NewYAMLReader(bufio.NewReader(data)) for { currentMap := map[string]interface{}{} raw, err := reader.Read() diff --git a/pkg/chart/loader/load_test.go b/pkg/chart/loader/load_test.go index 92ffa002b..e34124829 100644 --- a/pkg/chart/loader/load_test.go +++ b/pkg/chart/loader/load_test.go @@ -490,13 +490,11 @@ func TestLoadInvalidArchive(t *testing.T) { } func TestLoadValues(t *testing.T) { - testDatas := []struct { - name string + testCases := map[string]struct { data []byte expctedValues map[string]interface{} }{ - { - name: "It should load values correctly", + "It should load values correctly": { data: []byte(` foo: image: foo:v1 @@ -512,8 +510,7 @@ bar: }, }, }, - { - name: "It should load values correctly with multiple documents in one file", + "It should load values correctly with multiple documents in one file": { data: []byte(` foo: image: foo:v1 @@ -533,14 +530,14 @@ foo: }, }, } - for _, testData := range testDatas { - t.Run(testData.name, func(tt *testing.T) { - values, err := LoadValues(testData.data) + for testName, testCase := range testCases { + t.Run(testName, func(tt *testing.T) { + values, err := LoadValues(bytes.NewReader(testCase.data)) if err != nil { tt.Fatal(err) } - if !reflect.DeepEqual(values, testData.expctedValues) { - tt.Errorf("Expected values: %v, got %v", testData.expctedValues, values) + if !reflect.DeepEqual(values, testCase.expctedValues) { + tt.Errorf("Expected values: %v, got %v", testCase.expctedValues, values) } }) } diff --git a/pkg/cli/values/options.go b/pkg/cli/values/options.go index 70390f12a..54dd288bc 100644 --- a/pkg/cli/values/options.go +++ b/pkg/cli/values/options.go @@ -17,6 +17,7 @@ limitations under the License. package values import ( + "bytes" "encoding/json" "io" "net/url" @@ -47,11 +48,11 @@ func (opts *Options) MergeValues(p getter.Providers) (map[string]interface{}, er // User specified a values files via -f/--values for _, filePath := range opts.ValueFiles { - bytes, err := readFile(filePath, p) + raw, err := readFile(filePath, p) if err != nil { return nil, err } - currentMap, err := loader.LoadValues(bytes) + currentMap, err := loader.LoadValues(bytes.NewReader(raw)) if err != nil { return nil, errors.Wrapf(err, "failed to parse %s", filePath) } From fb7221bc9aa8f7747d7f31bffa1181886b7de6ec Mon Sep 17 00:00:00 2001 From: lubingtan Date: Sun, 9 Feb 2025 22:13:26 +0800 Subject: [PATCH 26/68] fix: add doc for func MergeMaps Signed-off-by: lubingtan --- pkg/chart/loader/load.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/chart/loader/load.go b/pkg/chart/loader/load.go index 84a040c0f..c957c398d 100644 --- a/pkg/chart/loader/load.go +++ b/pkg/chart/loader/load.go @@ -231,6 +231,8 @@ func LoadValues(data io.Reader) (map[string]interface{}, error) { return values, nil } +// MergeMaps merges two maps. If a key exists in both maps, the value from b will be used. +// If the value is a map, the maps will be merged recursively. func MergeMaps(a, b map[string]interface{}) map[string]interface{} { out := make(map[string]interface{}, len(a)) for k, v := range a { From 91cd72d0e47cd5a45871037894927c62956b0f98 Mon Sep 17 00:00:00 2001 From: lubingtan Date: Mon, 10 Feb 2025 08:25:23 +0800 Subject: [PATCH 27/68] fix: improve LoadValues function documentation Signed-off-by: lubingtan --- pkg/chart/loader/load.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/chart/loader/load.go b/pkg/chart/loader/load.go index c957c398d..e32094ef5 100644 --- a/pkg/chart/loader/load.go +++ b/pkg/chart/loader/load.go @@ -207,7 +207,10 @@ func LoadFiles(files []*BufferedFile) (*chart.Chart, error) { return c, nil } -// LoadValues loads chat values from a reader. +// LoadValues loads values from a reader. +// +// The reader is expected to contain one or more YAML documents, the values of which are merged. +// And the values can be either a chart's default values or a user-supplied values. func LoadValues(data io.Reader) (map[string]interface{}, error) { values := map[string]interface{}{} reader := utilyaml.NewYAMLReader(bufio.NewReader(data)) From ef5614364bb174df3126fbb7d0d89b39c2af5c8f Mon Sep 17 00:00:00 2001 From: lubingtan Date: Thu, 20 Feb 2025 08:13:54 +0800 Subject: [PATCH 28/68] fix: replace mergeMaps call with loader.MergeMaps in MergeValues function Signed-off-by: lubingtan --- pkg/cli/values/options.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/cli/values/options.go b/pkg/cli/values/options.go index 54dd288bc..2c3706b84 100644 --- a/pkg/cli/values/options.go +++ b/pkg/cli/values/options.go @@ -69,7 +69,7 @@ func (opts *Options) MergeValues(p getter.Providers) (map[string]interface{}, er if err := json.Unmarshal([]byte(trimmedValue), &jsonMap); err != nil { return nil, errors.Errorf("failed parsing --set-json data JSON: %s", value) } - base = mergeMaps(base, jsonMap) + base = loader.MergeMaps(base, jsonMap) } else { // Otherwise, parse it as key=value format if err := strvals.ParseJSON(value, base); err != nil { From 8207fafe130feb0540c53acb6c0cb95f242d6e3c Mon Sep 17 00:00:00 2001 From: Robert Sirchia Date: Thu, 20 Feb 2025 12:13:59 -0500 Subject: [PATCH 29/68] fixing error handling from a previous PR Signed-off-by: Robert Sirchia --- pkg/kube/roundtripper.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/kube/roundtripper.go b/pkg/kube/roundtripper.go index 551d3009b..52cb5bad2 100644 --- a/pkg/kube/roundtripper.go +++ b/pkg/kube/roundtripper.go @@ -58,7 +58,7 @@ func (rt *RetryingRoundTripper) roundTrip(req *http.Request, retry int, prevResp r.Seek(0, io.SeekStart) resp.Body = io.NopCloser(r) if err != nil { - return resp, nil + return resp, err } if ke.Code < 500 { return resp, nil From bb6314adefd2020cf8adb45a3109e1957446b741 Mon Sep 17 00:00:00 2001 From: Felipe Santos Date: Thu, 20 Feb 2025 14:42:48 -0300 Subject: [PATCH 30/68] Do not reassign repos variable Signed-off-by: Felipe Santos --- pkg/downloader/manager.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/downloader/manager.go b/pkg/downloader/manager.go index 2e284ab73..dfff0ddd4 100644 --- a/pkg/downloader/manager.go +++ b/pkg/downloader/manager.go @@ -678,9 +678,9 @@ func (m *Manager) parallelRepoUpdate(repos []*repo.Entry) error { var wg sync.WaitGroup - repos = dedupeRepos(repos) + localRepos := dedupeRepos(repos) - for _, c := range repos { + for _, c := range localRepos { r, err := repo.NewChartRepository(c, m.Getters) if err != nil { return err From 281ccb083543beeac21b9b72be9a07dbdd18f21f Mon Sep 17 00:00:00 2001 From: Felipe Santos Date: Thu, 20 Feb 2025 15:33:52 -0300 Subject: [PATCH 31/68] Do not store the normalized chart url Signed-off-by: Felipe Santos --- pkg/downloader/manager.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/downloader/manager.go b/pkg/downloader/manager.go index dfff0ddd4..c430eddaf 100644 --- a/pkg/downloader/manager.go +++ b/pkg/downloader/manager.go @@ -664,8 +664,8 @@ func dedupeRepos(repos []*repo.Entry) []*repo.Entry { seen := make(map[string]*repo.Entry) for _, r := range repos { // Normalize URL by removing trailing slashes. - r.URL = strings.TrimSuffix(r.URL, "/") - seen[r.URL] = r + seenUrl := strings.TrimRight(r.URL, "/") + seen[seenUrl] = r } var unique []*repo.Entry for _, r := range seen { From ecb5a2c9dd3f6363c7b153e7b3527db4444ff54f Mon Sep 17 00:00:00 2001 From: Felipe Santos Date: Thu, 20 Feb 2025 15:45:57 -0300 Subject: [PATCH 32/68] Fix variable name for linter And restore trimSuffix instead of trimRight, which was a mistake. Signed-off-by: Felipe Santos --- pkg/downloader/manager.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/downloader/manager.go b/pkg/downloader/manager.go index c430eddaf..52f7d5a92 100644 --- a/pkg/downloader/manager.go +++ b/pkg/downloader/manager.go @@ -664,8 +664,8 @@ func dedupeRepos(repos []*repo.Entry) []*repo.Entry { seen := make(map[string]*repo.Entry) for _, r := range repos { // Normalize URL by removing trailing slashes. - seenUrl := strings.TrimRight(r.URL, "/") - seen[seenUrl] = r + seenURL := strings.TrimSuffix(r.URL, "/") + seen[seenURL] = r } var unique []*repo.Entry for _, r := range seen { From b1fd2391679258afeb06bf6ad540c51eeb18f4ea Mon Sep 17 00:00:00 2001 From: Felipe Santos Date: Thu, 20 Feb 2025 16:58:55 -0300 Subject: [PATCH 33/68] Fix tests failing after removing repo normalization Signed-off-by: Felipe Santos --- pkg/downloader/manager_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/downloader/manager_test.go b/pkg/downloader/manager_test.go index 6a963f603..1c45ee011 100644 --- a/pkg/downloader/manager_test.go +++ b/pkg/downloader/manager_test.go @@ -649,7 +649,8 @@ func TestDedupeRepos(t *testing.T) { }, want: []*repo.Entry{ { - URL: "https://example.com/charts", + // the last one wins + URL: "https://example.com/charts/", }, }, }, From cde407b7d10a2ba2b2ba72466d90ce25fd953ee5 Mon Sep 17 00:00:00 2001 From: Chris Berry Date: Fri, 7 Jan 2022 13:37:19 +0000 Subject: [PATCH 34/68] Add hook annotations to output pod logs to client on success and fail Signed-off-by: Chris Berry --- pkg/action/action_test.go | 15 ++- pkg/action/hooks.go | 88 +++++++++++- pkg/action/hooks_test.go | 208 +++++++++++++++++++++++++++++ pkg/action/install_test.go | 4 + pkg/kube/client.go | 50 ++++++- pkg/kube/client_test.go | 35 +++++ pkg/kube/fake/printer.go | 20 ++- pkg/kube/interface.go | 7 + pkg/release/hook.go | 16 +++ pkg/releaseutil/manifest_sorter.go | 36 +++-- 10 files changed, 452 insertions(+), 27 deletions(-) create mode 100644 pkg/action/hooks_test.go diff --git a/pkg/action/action_test.go b/pkg/action/action_test.go index 71ea83789..47cff6ec1 100644 --- a/pkg/action/action_test.go +++ b/pkg/action/action_test.go @@ -111,6 +111,14 @@ type chartOptions struct { type chartOption func(*chartOptions) func buildChart(opts ...chartOption) *chart.Chart { + defaultTemplates := []*chart.File{ + {Name: "templates/hello", Data: []byte("hello: world")}, + {Name: "templates/hooks", Data: []byte(manifestWithHook)}, + } + return buildChartWithTemplates(defaultTemplates, opts...) +} + +func buildChartWithTemplates(templates []*chart.File, opts ...chartOption) *chart.Chart { c := &chartOptions{ Chart: &chart.Chart{ // TODO: This should be more complete. @@ -119,18 +127,13 @@ func buildChart(opts ...chartOption) *chart.Chart { Name: "hello", Version: "0.1.0", }, - // This adds a basic template and hooks. - Templates: []*chart.File{ - {Name: "templates/hello", Data: []byte("hello: world")}, - {Name: "templates/hooks", Data: []byte(manifestWithHook)}, - }, + Templates: templates, }, } for _, opt := range opts { opt(c) } - return c.Chart } diff --git a/pkg/action/hooks.go b/pkg/action/hooks.go index ecca1d997..95d843ce0 100644 --- a/pkg/action/hooks.go +++ b/pkg/action/hooks.go @@ -17,12 +17,19 @@ package action import ( "bytes" + "fmt" + "log" "sort" "time" + "helm.sh/helm/v4/pkg/kube" + + "helm.sh/helm/v4/pkg/chartutil" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "github.com/pkg/errors" - "helm.sh/helm/v4/pkg/kube" "helm.sh/helm/v4/pkg/release" helmtime "helm.sh/helm/v4/pkg/time" ) @@ -44,7 +51,7 @@ func (cfg *Configuration) execHook(rl *release.Release, hook release.HookEvent, for _, h := range executingHooks { // Set default delete policy to before-hook-creation - if len(h.DeletePolicies) == 0 { + if h.DeletePolicies == nil || len(h.DeletePolicies) == 0 { // TODO(jlegrone): Only apply before-hook-creation delete policy to run to completion // resources. For all other resource types update in place if a // resource with the same name already exists and is owned by the @@ -87,10 +94,18 @@ func (cfg *Configuration) execHook(rl *release.Release, hook release.HookEvent, // Mark hook as succeeded or failed if err != nil { h.LastRun.Phase = release.HookPhaseFailed + // If a hook is failed, check the annotation of the hook to determine if we should copy the logs client side + if errOutputting := cfg.outputLogsByPolicy(h, rl.Namespace, release.HookOutputOnFailed); errOutputting != nil { + // We log the error here as we want to propagate the hook failure upwards to the release object. + log.Printf("error outputting logs for hook failure: %v", errOutputting) + } // If a hook is failed, check the annotation of the hook to determine whether the hook should be deleted // under failed condition. If so, then clear the corresponding resource object in the hook - if err := cfg.deleteHookByPolicy(h, release.HookFailed, timeout); err != nil { - return err + if errDeleting := cfg.deleteHookByPolicy(h, release.HookFailed, timeout); err != nil { + // We log the error here as we want to propagate the hook failure upwards to the release object. + // This is a change in behaviour as the edge case previously would lose the hook error and only + // raise the delete hook error. + log.Printf("error the hook resource on hook failure: %v", errDeleting) } return err } @@ -98,9 +113,13 @@ func (cfg *Configuration) execHook(rl *release.Release, hook release.HookEvent, } // If all hooks are successful, check the annotation of each hook to determine whether the hook should be deleted - // under succeeded condition. If so, then clear the corresponding resource object in each hook + // or output should be logged under succeeded condition. If so, then clear the corresponding resource object in each hook for i := len(executingHooks) - 1; i >= 0; i-- { h := executingHooks[i] + if err := cfg.outputLogsByPolicy(h, rl.Namespace, release.HookOutputOnSucceeded); err != nil { + // We log here as we still want to attempt hook resource deletion even if output logging fails. + log.Printf("error outputting logs for hook failure: %v", err) + } if err := cfg.deleteHookByPolicy(h, release.HookSucceeded, timeout); err != nil { return err } @@ -158,3 +177,62 @@ func hookHasDeletePolicy(h *release.Hook, policy release.HookDeletePolicy) bool } return false } + +// outputLogsByPolicy outputs a pods logs if the hook policy instructs it to +func (cfg *Configuration) outputLogsByPolicy(h *release.Hook, releaseNamespace string, policy release.HookOutputLogPolicy) error { + if hookHasOutputLogPolicy(h, policy) { + namespace, err := cfg.deriveNamespace(h, releaseNamespace) + if err != nil { + return err + } + switch h.Kind { + case "Job": + return cfg.outputContainerLogsForListOptions(namespace, metav1.ListOptions{LabelSelector: fmt.Sprintf("job-name=%s", h.Name)}) + case "Pod": + return cfg.outputContainerLogsForListOptions(namespace, metav1.ListOptions{FieldSelector: fmt.Sprintf("metadata.name=%s", h.Name)}) + default: + return nil + } + } + return nil +} + +func (cfg *Configuration) outputContainerLogsForListOptions(namespace string, listOptions metav1.ListOptions) error { + //TODO Helm 4: Remove this check when GetPodList and OutputContainerLogsForPodList are moved from InterfaceExt to Interface + if kubeClient, ok := cfg.KubeClient.(kube.InterfaceExt); ok { + podList, err := kubeClient.GetPodList(namespace, listOptions) + if err != nil { + return err + } + err = kubeClient.OutputContainerLogsForPodList(podList, namespace, log.Writer()) + return err + } + return nil +} + +func (cfg *Configuration) deriveNamespace(h *release.Hook, namespace string) (string, error) { + values, err := chartutil.ReadValues([]byte(h.Manifest)) + if err != nil { + return "", errors.Wrapf(err, "unable to parse kubernetes manifest for output logs hook %s", h.Path) + } + value, err := values.PathValue("metadata.namespace") + switch err.(type) { + case nil: + return value.(string), nil + case chartutil.ErrNoValue: + return namespace, nil + default: + return "", errors.Wrapf(err, "unable to parse path of metadata.namespace in yaml for output logs hook %s", h.Path) + } +} + +// hookHasOutputLogPolicy determines whether the defined hook output log policy matches the hook output log policies +// supported by helm. +func hookHasOutputLogPolicy(h *release.Hook, policy release.HookOutputLogPolicy) bool { + for _, v := range h.OutputLogPolicies { + if policy == v { + return true + } + } + return false +} diff --git a/pkg/action/hooks_test.go b/pkg/action/hooks_test.go new file mode 100644 index 000000000..25a28f60f --- /dev/null +++ b/pkg/action/hooks_test.go @@ -0,0 +1,208 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package action + +import ( + "bytes" + "fmt" + "io/ioutil" + "testing" + + "github.com/stretchr/testify/assert" + + "helm.sh/helm/v3/pkg/chart" + kubefake "helm.sh/helm/v3/pkg/kube/fake" + "helm.sh/helm/v3/pkg/release" +) + +func podManifestWithOutputLogs(hookDefinitions []release.HookOutputLogPolicy) string { + hookDefinitionString := convertHooksToCommaSeparated(hookDefinitions) + return fmt.Sprintf(`kind: Pod +metadata: + name: finding-sharky, + annotations: + "helm.sh/hook": pre-install + "helm.sh/hook-output-log-policy": %s +spec: + containers: + - name: sharky-test + image: fake-image + cmd: fake-command`, hookDefinitionString) +} + +func podManifestWithOutputLogWithNamespace(hookDefinitions []release.HookOutputLogPolicy) string { + hookDefinitionString := convertHooksToCommaSeparated(hookDefinitions) + return fmt.Sprintf(`kind: Pod +metadata: + name: finding-george + namespace: sneaky-namespace + annotations: + "helm.sh/hook": pre-install + "helm.sh/hook-output-log-policy": %s +spec: + containers: + - name: george-test + image: fake-image + cmd: fake-command`, hookDefinitionString) +} + +func jobManifestWithOutputLog(hookDefinitions []release.HookOutputLogPolicy) string { + hookDefinitionString := convertHooksToCommaSeparated(hookDefinitions) + return fmt.Sprintf(`kind: Job +apiVersion: batch/v1 +metadata: + name: losing-religion + annotations: + "helm.sh/hook": pre-install + "helm.sh/hook-output-log-policy": %s +spec: + completions: 1 + parallelism: 1 + activeDeadlineSeconds: 30 + template: + spec: + containers: + - name: religion-container + image: religion-image + cmd: religion-command`, hookDefinitionString) +} + +func jobManifestWithOutputLogWithNamespace(hookDefinitions []release.HookOutputLogPolicy) string { + hookDefinitionString := convertHooksToCommaSeparated(hookDefinitions) + return fmt.Sprintf(`kind: Job +apiVersion: batch/v1 +metadata: + name: losing-religion + namespace: rem-namespace + annotations: + "helm.sh/hook": pre-install + "helm.sh/hook-output-log-policy": %s +spec: + completions: 1 + parallelism: 1 + activeDeadlineSeconds: 30 + template: + spec: + containers: + - name: religion-container + image: religion-image + cmd: religion-command`, hookDefinitionString) +} + +func convertHooksToCommaSeparated(hookDefinitions []release.HookOutputLogPolicy) string { + var commaSeparated string + for i, policy := range hookDefinitions { + if i+1 == len(hookDefinitions) { + commaSeparated += policy.String() + } else { + commaSeparated += policy.String() + "," + } + } + return commaSeparated +} + +func TestInstallRelease_HookOutputLogsOnFailure(t *testing.T) { + // Should output on failure with expected namespace if hook-failed is set + runInstallForHooksWithFailure(t, podManifestWithOutputLogs([]release.HookOutputLogPolicy{release.HookOutputOnFailed}), "spaced", true) + runInstallForHooksWithFailure(t, podManifestWithOutputLogWithNamespace([]release.HookOutputLogPolicy{release.HookOutputOnFailed}), "sneaky-namespace", true) + runInstallForHooksWithFailure(t, jobManifestWithOutputLog([]release.HookOutputLogPolicy{release.HookOutputOnFailed}), "spaced", true) + runInstallForHooksWithFailure(t, jobManifestWithOutputLogWithNamespace([]release.HookOutputLogPolicy{release.HookOutputOnFailed}), "rem-namespace", true) + + // Should not output on failure with expected namespace if hook-succeed is set + runInstallForHooksWithFailure(t, podManifestWithOutputLogs([]release.HookOutputLogPolicy{release.HookOutputOnSucceeded}), "", false) + runInstallForHooksWithFailure(t, podManifestWithOutputLogWithNamespace([]release.HookOutputLogPolicy{release.HookOutputOnSucceeded}), "", false) + runInstallForHooksWithFailure(t, jobManifestWithOutputLog([]release.HookOutputLogPolicy{release.HookOutputOnSucceeded}), "", false) + runInstallForHooksWithFailure(t, jobManifestWithOutputLogWithNamespace([]release.HookOutputLogPolicy{release.HookOutputOnSucceeded}), "", false) +} + +func TestInstallRelease_HookOutputLogsOnSuccess(t *testing.T) { + // Should output on success with expected namespace if hook-succeeded is set + runInstallForHooksWithSuccess(t, podManifestWithOutputLogs([]release.HookOutputLogPolicy{release.HookOutputOnSucceeded}), "spaced", true) + runInstallForHooksWithSuccess(t, podManifestWithOutputLogWithNamespace([]release.HookOutputLogPolicy{release.HookOutputOnSucceeded}), "sneaky-namespace", true) + runInstallForHooksWithSuccess(t, jobManifestWithOutputLog([]release.HookOutputLogPolicy{release.HookOutputOnSucceeded}), "spaced", true) + runInstallForHooksWithSuccess(t, jobManifestWithOutputLogWithNamespace([]release.HookOutputLogPolicy{release.HookOutputOnSucceeded}), "rem-namespace", true) + + // Should not output on success if hook-failed is set + runInstallForHooksWithSuccess(t, podManifestWithOutputLogs([]release.HookOutputLogPolicy{release.HookOutputOnFailed}), "", false) + runInstallForHooksWithSuccess(t, podManifestWithOutputLogWithNamespace([]release.HookOutputLogPolicy{release.HookOutputOnFailed}), "", false) + runInstallForHooksWithSuccess(t, jobManifestWithOutputLog([]release.HookOutputLogPolicy{release.HookOutputOnFailed}), "", false) + runInstallForHooksWithSuccess(t, jobManifestWithOutputLogWithNamespace([]release.HookOutputLogPolicy{release.HookOutputOnFailed}), "", false) +} + +func TestInstallRelease_HooksOutputLogsOnSuccessAndFailure(t *testing.T) { + // Should output on success with expected namespace if hook-succeeded and hook-failed is set + runInstallForHooksWithSuccess(t, podManifestWithOutputLogs([]release.HookOutputLogPolicy{release.HookOutputOnSucceeded, release.HookOutputOnFailed}), "spaced", true) + runInstallForHooksWithSuccess(t, podManifestWithOutputLogWithNamespace([]release.HookOutputLogPolicy{release.HookOutputOnSucceeded, release.HookOutputOnFailed}), "sneaky-namespace", true) + runInstallForHooksWithSuccess(t, jobManifestWithOutputLog([]release.HookOutputLogPolicy{release.HookOutputOnSucceeded, release.HookOutputOnFailed}), "spaced", true) + runInstallForHooksWithSuccess(t, jobManifestWithOutputLogWithNamespace([]release.HookOutputLogPolicy{release.HookOutputOnSucceeded, release.HookOutputOnFailed}), "rem-namespace", true) + + // Should output on failure if hook-succeeded and hook-failed is set + runInstallForHooksWithFailure(t, podManifestWithOutputLogs([]release.HookOutputLogPolicy{release.HookOutputOnSucceeded, release.HookOutputOnFailed}), "spaced", true) + runInstallForHooksWithFailure(t, podManifestWithOutputLogWithNamespace([]release.HookOutputLogPolicy{release.HookOutputOnSucceeded, release.HookOutputOnFailed}), "sneaky-namespace", true) + runInstallForHooksWithFailure(t, jobManifestWithOutputLog([]release.HookOutputLogPolicy{release.HookOutputOnSucceeded, release.HookOutputOnFailed}), "spaced", true) + runInstallForHooksWithFailure(t, jobManifestWithOutputLogWithNamespace([]release.HookOutputLogPolicy{release.HookOutputOnSucceeded, release.HookOutputOnFailed}), "rem-namespace", true) +} + +func runInstallForHooksWithSuccess(t *testing.T, manifest, expectedNamespace string, shouldOutput bool) { + var expectedOutput string + if shouldOutput { + expectedOutput = fmt.Sprintf("attempted to output logs for namespace: %s", expectedNamespace) + } + is := assert.New(t) + instAction := installAction(t) + instAction.ReleaseName = "failed-hooks" + outBuffer := &bytes.Buffer{} + instAction.cfg.KubeClient = &kubefake.PrintingKubeClient{Out: ioutil.Discard, LogOutput: outBuffer} + + templates := []*chart.File{ + {Name: "templates/hello", Data: []byte("hello: world")}, + {Name: "templates/hooks", Data: []byte(manifest)}, + } + vals := map[string]interface{}{} + + res, err := instAction.Run(buildChartWithTemplates(templates), vals) + is.NoError(err) + is.Equal(expectedOutput, outBuffer.String()) + is.Equal(release.StatusDeployed, res.Info.Status) +} + +func runInstallForHooksWithFailure(t *testing.T, manifest, expectedNamespace string, shouldOutput bool) { + var expectedOutput string + if shouldOutput { + expectedOutput = fmt.Sprintf("attempted to output logs for namespace: %s", expectedNamespace) + } + is := assert.New(t) + instAction := installAction(t) + instAction.ReleaseName = "failed-hooks" + failingClient := instAction.cfg.KubeClient.(*kubefake.FailingKubeClient) + failingClient.WatchUntilReadyError = fmt.Errorf("failed watch") + instAction.cfg.KubeClient = failingClient + outBuffer := &bytes.Buffer{} + failingClient.PrintingKubeClient = kubefake.PrintingKubeClient{Out: ioutil.Discard, LogOutput: outBuffer} + + templates := []*chart.File{ + {Name: "templates/hello", Data: []byte("hello: world")}, + {Name: "templates/hooks", Data: []byte(manifest)}, + } + vals := map[string]interface{}{} + + res, err := instAction.Run(buildChartWithTemplates(templates), vals) + is.Error(err) + is.Contains(res.Info.Description, "failed pre-install") + is.Equal(expectedOutput, outBuffer.String()) + is.Equal(release.StatusFailed, res.Info.Status) +} diff --git a/pkg/action/install_test.go b/pkg/action/install_test.go index 9f738f0bc..a1eadf693 100644 --- a/pkg/action/install_test.go +++ b/pkg/action/install_test.go @@ -17,6 +17,7 @@ limitations under the License. package action import ( + "bytes" "context" "fmt" "io" @@ -354,11 +355,14 @@ func TestInstallRelease_FailedHooks(t *testing.T) { failer := instAction.cfg.KubeClient.(*kubefake.FailingKubeClient) failer.WatchUntilReadyError = fmt.Errorf("Failed watch") instAction.cfg.KubeClient = failer + outBuffer := &bytes.Buffer{} + failer.PrintingKubeClient = kubefake.PrintingKubeClient{Out: ioutil.Discard, LogOutput: outBuffer} vals := map[string]interface{}{} res, err := instAction.Run(buildChart(), vals) is.Error(err) is.Contains(res.Info.Description, "failed post-install") + is.Equal("", outBuffer.String()) is.Equal(release.StatusFailed, res.Info.Status) } diff --git a/pkg/kube/client.go b/pkg/kube/client.go index 0b84f5219..bf7e77c5a 100644 --- a/pkg/kube/client.go +++ b/pkg/kube/client.go @@ -29,6 +29,8 @@ import ( "sync" "time" + "k8s.io/client-go/rest" + jsonpatch "github.com/evanphx/json-patch" "github.com/pkg/errors" batch "k8s.io/api/batch/v1" @@ -83,7 +85,7 @@ type Client struct { // Namespace allows to bypass the kubeconfig file for the choice of the namespace Namespace string - kubeClient *kubernetes.Clientset + kubeClient kubernetes.Interface } func init() { @@ -111,7 +113,7 @@ func New(getter genericclioptions.RESTClientGetter) *Client { var nopLogger = func(_ string, _ ...interface{}) {} // getKubeClient get or create a new KubernetesClientSet -func (c *Client) getKubeClient() (*kubernetes.Clientset, error) { +func (c *Client) getKubeClient() (kubernetes.Interface, error) { var err error if c.kubeClient == nil { c.kubeClient, err = c.Factory.KubernetesClientSet() @@ -131,7 +133,7 @@ func (c *Client) IsReachable() error { if err != nil { return errors.Wrap(err, "Kubernetes cluster unreachable") } - if _, err := client.ServerVersion(); err != nil { + if _, err := client.Discovery().ServerVersion(); err != nil { return errors.Wrap(err, "Kubernetes cluster unreachable") } return nil @@ -812,6 +814,48 @@ func (c *Client) waitForPodSuccess(obj runtime.Object, name string) (bool, error return false, nil } +// GetPodList uses the kubernetes interface to get the list of pods filtered by listOptions +func (c *Client) GetPodList(namespace string, listOptions metav1.ListOptions) (*v1.PodList, error) { + podList, err := c.kubeClient.CoreV1().Pods(namespace).List(context.Background(), listOptions) + if err != nil { + return nil, fmt.Errorf("failed to get pod list with options: %+v with error: %v", listOptions, err) + } + return podList, nil +} + +// OutputContainerLogsForPodList is a helper that outputs logs for a list of pods +func (c *Client) OutputContainerLogsForPodList(podList *v1.PodList, namespace string, writer io.Writer) error { + for _, pod := range podList.Items { + for _, container := range pod.Spec.Containers { + options := &v1.PodLogOptions{ + Container: container.Name, + } + request := c.kubeClient.CoreV1().Pods(namespace).GetLogs(pod.Name, options) + err2 := copyRequestStreamToWriter(request, pod.Name, container.Name, writer) + if err2 != nil { + return err2 + } + } + } + return nil +} + +func copyRequestStreamToWriter(request *rest.Request, podName, containerName string, writer io.Writer) error { + readCloser, err := request.Stream(context.Background()) + if err != nil { + return errors.Errorf("Failed to stream pod logs for pod: %s, container: %s", podName, containerName) + } + defer readCloser.Close() + _, err = io.Copy(writer, readCloser) + if err != nil { + return errors.Errorf("Failed to copy IO from logs for pod: %s, container: %s", podName, containerName) + } + if err != nil { + return errors.Errorf("Failed to close reader for pod: %s, container: %s", podName, containerName) + } + return nil +} + // scrubValidationError removes kubectl info from the message. func scrubValidationError(err error) error { if err == nil { diff --git a/pkg/kube/client_test.go b/pkg/kube/client_test.go index f2d6bcb59..d9bd72783 100644 --- a/pkg/kube/client_test.go +++ b/pkg/kube/client_test.go @@ -24,10 +24,13 @@ import ( "testing" "time" + "github.com/stretchr/testify/assert" + v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/cli-runtime/pkg/resource" + k8sfake "k8s.io/client-go/kubernetes/fake" "k8s.io/client-go/kubernetes/scheme" "k8s.io/client-go/rest/fake" cmdtesting "k8s.io/kubectl/pkg/cmd/testing" @@ -682,6 +685,38 @@ func TestReal(t *testing.T) { } } +func TestGetPodList(t *testing.T) { + + namespace := "some-namespace" + names := []string{"dave", "jimmy"} + var responsePodList v1.PodList + for _, name := range names { + responsePodList.Items = append(responsePodList.Items, newPodWithStatus(name, v1.PodStatus{}, namespace)) + } + + kubeClient := k8sfake.NewSimpleClientset(&responsePodList) + c := Client{Namespace: namespace, kubeClient: kubeClient} + + podList, err := c.GetPodList(namespace, metav1.ListOptions{}) + clientAssertions := assert.New(t) + clientAssertions.NoError(err) + clientAssertions.Equal(&responsePodList, podList) + +} + +func TestOutputContainerLogsForPodList(t *testing.T) { + namespace := "some-namespace" + somePodList := newPodList("jimmy", "three", "structs") + + kubeClient := k8sfake.NewSimpleClientset(&somePodList) + c := Client{Namespace: namespace, kubeClient: kubeClient} + outBuffer := &bytes.Buffer{} + err := c.OutputContainerLogsForPodList(&somePodList, namespace, outBuffer) + clientAssertions := assert.New(t) + clientAssertions.NoError(err) + clientAssertions.Equal("fake logsfake logsfake logs", outBuffer.String()) +} + const testServiceManifest = ` kind: Service apiVersion: v1 diff --git a/pkg/kube/fake/printer.go b/pkg/kube/fake/printer.go index 0b957d725..4b9a6d523 100644 --- a/pkg/kube/fake/printer.go +++ b/pkg/kube/fake/printer.go @@ -17,6 +17,7 @@ limitations under the License. package fake import ( + "fmt" "io" "strings" "time" @@ -31,7 +32,8 @@ import ( // PrintingKubeClient implements KubeClient, but simply prints the reader to // the given output. type PrintingKubeClient struct { - Out io.Writer + Out io.Writer + LogOutput io.Writer } // IsReachable checks if the cluster is reachable @@ -110,6 +112,22 @@ func (p *PrintingKubeClient) BuildTable(_ io.Reader, _ bool) (kube.ResourceList, return []*resource.Info{}, nil } +// WaitAndGetCompletedPodPhase implements KubeClient WaitAndGetCompletedPodPhase. +func (p *PrintingKubeClient) WaitAndGetCompletedPodPhase(_ string, _ time.Duration) (v1.PodPhase, error) { + return v1.PodSucceeded, nil +} + +// GetPodList implements KubeClient GetPodList. +func (p *PrintingKubeClient) GetPodList(_ string, _ metav1.ListOptions) (*v1.PodList, error) { + return &v1.PodList{}, nil +} + +// OutputContainerLogsForPodList implements KubeClient OutputContainerLogsForPodList. +func (p *PrintingKubeClient) OutputContainerLogsForPodList(_ *v1.PodList, someNamespace string, _ io.Writer) error { + _, err := io.Copy(p.LogOutput, strings.NewReader(fmt.Sprintf("attempted to output logs for namespace: %s", someNamespace))) + return err +} + // DeleteWithPropagationPolicy implements KubeClient delete. // // It only prints out the content to be deleted. diff --git a/pkg/kube/interface.go b/pkg/kube/interface.go index 7dc7ad8bc..4d295f560 100644 --- a/pkg/kube/interface.go +++ b/pkg/kube/interface.go @@ -20,6 +20,7 @@ import ( "io" "time" + v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" ) @@ -73,6 +74,12 @@ type Interface interface { type InterfaceExt interface { // WaitForDelete wait up to the given timeout for the specified resources to be deleted. WaitForDelete(resources ResourceList, timeout time.Duration) error + + // GetPodList list all pods that match the specified listOptions + GetPodList(namespace string, listOptions metav1.ListOptions) (*v1.PodList, error) + + // OutputContainerLogsForPodList output the logs for a pod list + OutputContainerLogsForPodList(podList *v1.PodList, namespace string, writer io.Writer) error } // InterfaceDeletionPropagation is introduced to avoid breaking backwards compatibility for Interface implementers. diff --git a/pkg/release/hook.go b/pkg/release/hook.go index e2cdc0eb8..5ff61fdaa 100644 --- a/pkg/release/hook.go +++ b/pkg/release/hook.go @@ -50,6 +50,17 @@ const ( func (x HookDeletePolicy) String() string { return string(x) } +// HookOutputLogPolicy specifies the hook output log policy +type HookOutputLogPolicy string + +// Hook output log policy types +const ( + HookOutputOnSucceeded HookOutputLogPolicy = "hook-succeeded" + HookOutputOnFailed HookOutputLogPolicy = "hook-failed" +) + +func (x HookOutputLogPolicy) String() string { return string(x) } + // HookAnnotation is the label name for a hook const HookAnnotation = "helm.sh/hook" @@ -59,6 +70,9 @@ const HookWeightAnnotation = "helm.sh/hook-weight" // HookDeleteAnnotation is the label name for the delete policy for a hook const HookDeleteAnnotation = "helm.sh/hook-delete-policy" +// HookOutputLogAnnotation is the label name for the output log policy for a hook +const HookOutputLogAnnotation = "helm.sh/hook-output-log-policy" + // Hook defines a hook object. type Hook struct { Name string `json:"name,omitempty"` @@ -76,6 +90,8 @@ type Hook struct { Weight int `json:"weight,omitempty"` // DeletePolicies are the policies that indicate when to delete the hook DeletePolicies []HookDeletePolicy `json:"delete_policies,omitempty"` + // OutputLogPolicies defines whether we should copy hook logs back to main process + OutputLogPolicies []HookOutputLogPolicy `json:"output_log_policies,omitempty"` } // A HookExecution records the result for the last execution of a hook for a given release. diff --git a/pkg/releaseutil/manifest_sorter.go b/pkg/releaseutil/manifest_sorter.go index b2db2ff9f..4aaae2d8c 100644 --- a/pkg/releaseutil/manifest_sorter.go +++ b/pkg/releaseutil/manifest_sorter.go @@ -123,11 +123,18 @@ func SortManifests(files map[string]string, _ chartutil.VersionSet, ordering Kin // // To determine the policy to delete the hook, it looks for a YAML structure like this: // -// kind: SomeKind -// apiVersion: v1 -// metadata: -// annotations: -// helm.sh/hook-delete-policy: hook-succeeded +// kind: SomeKind +// apiVersion: v1 +// metadata: +// annotations: +// helm.sh/hook-delete-policy: hook-succeeded +// To determine the policy to output logs of the hook (for Pod and Job only), it looks for a YAML structure like this: +// +// kind: Pod +// apiVersion: v1 +// metadata: +// annotations: +// helm.sh/hook-output-log-policy: hook-succeeded,hook-failed func (file *manifestFile) sort(result *result) error { // Go through manifests in order found in file (function `SplitManifests` creates integer-sortable keys) var sortedEntryKeys []string @@ -166,13 +173,14 @@ func (file *manifestFile) sort(result *result) error { hw := calculateHookWeight(entry) h := &release.Hook{ - Name: entry.Metadata.Name, - Kind: entry.Kind, - Path: file.path, - Manifest: m, - Events: []release.HookEvent{}, - Weight: hw, - DeletePolicies: []release.HookDeletePolicy{}, + Name: entry.Metadata.Name, + Kind: entry.Kind, + Path: file.path, + Manifest: m, + Events: []release.HookEvent{}, + Weight: hw, + DeletePolicies: []release.HookDeletePolicy{}, + OutputLogPolicies: []release.HookOutputLogPolicy{}, } isUnknownHook := false @@ -196,6 +204,10 @@ func (file *manifestFile) sort(result *result) error { operateAnnotationValues(entry, release.HookDeleteAnnotation, func(value string) { h.DeletePolicies = append(h.DeletePolicies, release.HookDeletePolicy(value)) }) + + operateAnnotationValues(entry, release.HookOutputLogAnnotation, func(value string) { + h.OutputLogPolicies = append(h.OutputLogPolicies, release.HookOutputLogPolicy(value)) + }) } return nil From 3964f84ac86a190b8e163554a056f67f09555cfe Mon Sep 17 00:00:00 2001 From: Chris Date: Wed, 3 May 2023 10:35:25 +0100 Subject: [PATCH 35/68] Tidy up imports Signed-off-by: Chris --- pkg/action/hooks_test.go | 6 +++--- pkg/action/install_test.go | 2 +- pkg/kube/client.go | 2 -- pkg/kube/fake/printer.go | 1 + 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/pkg/action/hooks_test.go b/pkg/action/hooks_test.go index 25a28f60f..76de9e505 100644 --- a/pkg/action/hooks_test.go +++ b/pkg/action/hooks_test.go @@ -19,7 +19,7 @@ package action import ( "bytes" "fmt" - "io/ioutil" + "io" "testing" "github.com/stretchr/testify/assert" @@ -166,7 +166,7 @@ func runInstallForHooksWithSuccess(t *testing.T, manifest, expectedNamespace str instAction := installAction(t) instAction.ReleaseName = "failed-hooks" outBuffer := &bytes.Buffer{} - instAction.cfg.KubeClient = &kubefake.PrintingKubeClient{Out: ioutil.Discard, LogOutput: outBuffer} + instAction.cfg.KubeClient = &kubefake.PrintingKubeClient{Out: io.Discard, LogOutput: outBuffer} templates := []*chart.File{ {Name: "templates/hello", Data: []byte("hello: world")}, @@ -192,7 +192,7 @@ func runInstallForHooksWithFailure(t *testing.T, manifest, expectedNamespace str failingClient.WatchUntilReadyError = fmt.Errorf("failed watch") instAction.cfg.KubeClient = failingClient outBuffer := &bytes.Buffer{} - failingClient.PrintingKubeClient = kubefake.PrintingKubeClient{Out: ioutil.Discard, LogOutput: outBuffer} + failingClient.PrintingKubeClient = kubefake.PrintingKubeClient{Out: io.Discard, LogOutput: outBuffer} templates := []*chart.File{ {Name: "templates/hello", Data: []byte("hello: world")}, diff --git a/pkg/action/install_test.go b/pkg/action/install_test.go index a1eadf693..f78fa40d2 100644 --- a/pkg/action/install_test.go +++ b/pkg/action/install_test.go @@ -356,7 +356,7 @@ func TestInstallRelease_FailedHooks(t *testing.T) { failer.WatchUntilReadyError = fmt.Errorf("Failed watch") instAction.cfg.KubeClient = failer outBuffer := &bytes.Buffer{} - failer.PrintingKubeClient = kubefake.PrintingKubeClient{Out: ioutil.Discard, LogOutput: outBuffer} + failer.PrintingKubeClient = kubefake.PrintingKubeClient{Out: io.Discard, LogOutput: outBuffer} vals := map[string]interface{}{} res, err := instAction.Run(buildChart(), vals) diff --git a/pkg/kube/client.go b/pkg/kube/client.go index bf7e77c5a..361111fed 100644 --- a/pkg/kube/client.go +++ b/pkg/kube/client.go @@ -29,8 +29,6 @@ import ( "sync" "time" - "k8s.io/client-go/rest" - jsonpatch "github.com/evanphx/json-patch" "github.com/pkg/errors" batch "k8s.io/api/batch/v1" diff --git a/pkg/kube/fake/printer.go b/pkg/kube/fake/printer.go index 4b9a6d523..65515812e 100644 --- a/pkg/kube/fake/printer.go +++ b/pkg/kube/fake/printer.go @@ -22,6 +22,7 @@ import ( "strings" "time" + v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/cli-runtime/pkg/resource" From a55a4770691fb7d98b2db8c8f66e20159396053d Mon Sep 17 00:00:00 2001 From: Chris Berry Date: Wed, 28 Aug 2024 21:14:17 +0100 Subject: [PATCH 36/68] Fix lint Signed-off-by: Chris Berry --- pkg/action/hooks.go | 6 +++--- pkg/releaseutil/manifest_sorter.go | 21 +++++++++++---------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/pkg/action/hooks.go b/pkg/action/hooks.go index 95d843ce0..b1e8e1d66 100644 --- a/pkg/action/hooks.go +++ b/pkg/action/hooks.go @@ -51,7 +51,7 @@ func (cfg *Configuration) execHook(rl *release.Release, hook release.HookEvent, for _, h := range executingHooks { // Set default delete policy to before-hook-creation - if h.DeletePolicies == nil || len(h.DeletePolicies) == 0 { + if len(h.DeletePolicies) == 0 { // TODO(jlegrone): Only apply before-hook-creation delete policy to run to completion // resources. For all other resource types update in place if a // resource with the same name already exists and is owned by the @@ -157,7 +157,7 @@ func (cfg *Configuration) deleteHookByPolicy(h *release.Hook, policy release.Hoo return errors.New(joinErrors(errs)) } - //wait for resources until they are deleted to avoid conflicts + // wait for resources until they are deleted to avoid conflicts if kubeClient, ok := cfg.KubeClient.(kube.InterfaceExt); ok { if err := kubeClient.WaitForDelete(resources, timeout); err != nil { return err @@ -198,7 +198,7 @@ func (cfg *Configuration) outputLogsByPolicy(h *release.Hook, releaseNamespace s } func (cfg *Configuration) outputContainerLogsForListOptions(namespace string, listOptions metav1.ListOptions) error { - //TODO Helm 4: Remove this check when GetPodList and OutputContainerLogsForPodList are moved from InterfaceExt to Interface + // TODO Helm 4: Remove this check when GetPodList and OutputContainerLogsForPodList are moved from InterfaceExt to Interface if kubeClient, ok := cfg.KubeClient.(kube.InterfaceExt); ok { podList, err := kubeClient.GetPodList(namespace, listOptions) if err != nil { diff --git a/pkg/releaseutil/manifest_sorter.go b/pkg/releaseutil/manifest_sorter.go index 4aaae2d8c..844ce161b 100644 --- a/pkg/releaseutil/manifest_sorter.go +++ b/pkg/releaseutil/manifest_sorter.go @@ -123,18 +123,19 @@ func SortManifests(files map[string]string, _ chartutil.VersionSet, ordering Kin // // To determine the policy to delete the hook, it looks for a YAML structure like this: // -// kind: SomeKind -// apiVersion: v1 -// metadata: -// annotations: -// helm.sh/hook-delete-policy: hook-succeeded +// kind: SomeKind +// apiVersion: v1 +// metadata: +// annotations: +// helm.sh/hook-delete-policy: hook-succeeded +// // To determine the policy to output logs of the hook (for Pod and Job only), it looks for a YAML structure like this: // -// kind: Pod -// apiVersion: v1 -// metadata: -// annotations: -// helm.sh/hook-output-log-policy: hook-succeeded,hook-failed +// kind: Pod +// apiVersion: v1 +// metadata: +// annotations: +// helm.sh/hook-output-log-policy: hook-succeeded,hook-failed func (file *manifestFile) sort(result *result) error { // Go through manifests in order found in file (function `SplitManifests` creates integer-sortable keys) var sortedEntryKeys []string From 3d4e679d9faad8167aeb99f4d02eed2ed99723de Mon Sep 17 00:00:00 2001 From: Chris Berry Date: Tue, 14 Jan 2025 10:49:28 +0000 Subject: [PATCH 37/68] Update based on review comments Signed-off-by: Chris Berry --- pkg/action/hooks.go | 2 +- pkg/action/hooks_test.go | 6 +++--- pkg/kube/interface.go | 10 ++++++++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/pkg/action/hooks.go b/pkg/action/hooks.go index b1e8e1d66..021a563c3 100644 --- a/pkg/action/hooks.go +++ b/pkg/action/hooks.go @@ -199,7 +199,7 @@ func (cfg *Configuration) outputLogsByPolicy(h *release.Hook, releaseNamespace s func (cfg *Configuration) outputContainerLogsForListOptions(namespace string, listOptions metav1.ListOptions) error { // TODO Helm 4: Remove this check when GetPodList and OutputContainerLogsForPodList are moved from InterfaceExt to Interface - if kubeClient, ok := cfg.KubeClient.(kube.InterfaceExt); ok { + if kubeClient, ok := cfg.KubeClient.(kube.InterfaceLogs); ok { podList, err := kubeClient.GetPodList(namespace, listOptions) if err != nil { return err diff --git a/pkg/action/hooks_test.go b/pkg/action/hooks_test.go index 76de9e505..0f4a9be34 100644 --- a/pkg/action/hooks_test.go +++ b/pkg/action/hooks_test.go @@ -24,9 +24,9 @@ import ( "github.com/stretchr/testify/assert" - "helm.sh/helm/v3/pkg/chart" - kubefake "helm.sh/helm/v3/pkg/kube/fake" - "helm.sh/helm/v3/pkg/release" + "helm.sh/helm/v4/pkg/chart" + kubefake "helm.sh/helm/v4/pkg/kube/fake" + "helm.sh/helm/v4/pkg/release" ) func podManifestWithOutputLogs(hookDefinitions []release.HookOutputLogPolicy) string { diff --git a/pkg/kube/interface.go b/pkg/kube/interface.go index 4d295f560..f701690e3 100644 --- a/pkg/kube/interface.go +++ b/pkg/kube/interface.go @@ -68,13 +68,18 @@ type Interface interface { IsReachable() error } -// InterfaceExt is introduced to avoid breaking backwards compatibility for Interface implementers. +// InterfaceExt was introduced to avoid breaking backwards compatibility for Interface implementers. // // TODO Helm 4: Remove InterfaceExt and integrate its method(s) into the Interface. type InterfaceExt interface { // WaitForDelete wait up to the given timeout for the specified resources to be deleted. WaitForDelete(resources ResourceList, timeout time.Duration) error +} +// InterfaceLogs was introduced to avoid breaking backwards compatibility for Interface implementers. +// +// TODO Helm 4: Remove InterfaceLogs and integrate its method(s) into the Interface. +type InterfaceLogs interface { // GetPodList list all pods that match the specified listOptions GetPodList(namespace string, listOptions metav1.ListOptions) (*v1.PodList, error) @@ -86,7 +91,7 @@ type InterfaceExt interface { // // TODO Helm 4: Remove InterfaceDeletionPropagation and integrate its method(s) into the Interface. type InterfaceDeletionPropagation interface { - // Delete destroys one or more resources. The deletion propagation is handled as per the given deletion propagation value. + // DeleteWithPropagationPolicy destroys one or more resources. The deletion propagation is handled as per the given deletion propagation value. DeleteWithPropagationPolicy(resources ResourceList, policy metav1.DeletionPropagation) (*Result, []error) } @@ -114,5 +119,6 @@ type InterfaceResources interface { var _ Interface = (*Client)(nil) var _ InterfaceExt = (*Client)(nil) +var _ InterfaceLogs = (*Client)(nil) var _ InterfaceDeletionPropagation = (*Client)(nil) var _ InterfaceResources = (*Client)(nil) From 243cb2e21f38767314e2dcd5b827b5aa4adc94fb Mon Sep 17 00:00:00 2001 From: Chris Berry Date: Tue, 14 Jan 2025 11:09:40 +0000 Subject: [PATCH 38/68] Update based on review comments Signed-off-by: Chris Berry --- pkg/action/hooks.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/action/hooks.go b/pkg/action/hooks.go index 021a563c3..539f8e7c1 100644 --- a/pkg/action/hooks.go +++ b/pkg/action/hooks.go @@ -198,7 +198,7 @@ func (cfg *Configuration) outputLogsByPolicy(h *release.Hook, releaseNamespace s } func (cfg *Configuration) outputContainerLogsForListOptions(namespace string, listOptions metav1.ListOptions) error { - // TODO Helm 4: Remove this check when GetPodList and OutputContainerLogsForPodList are moved from InterfaceExt to Interface + // TODO Helm 4: Remove this check when GetPodList and OutputContainerLogsForPodList are moved from InterfaceLogs to Interface if kubeClient, ok := cfg.KubeClient.(kube.InterfaceLogs); ok { podList, err := kubeClient.GetPodList(namespace, listOptions) if err != nil { From f729b9ade059579ee53182bafcb399a8b7d86f5a Mon Sep 17 00:00:00 2001 From: Scott Rigby Date: Thu, 20 Feb 2025 12:36:11 -0500 Subject: [PATCH 39/68] add short circuit return Co-authored-by: George Jenkins Signed-off-by: Scott Rigby --- pkg/action/hooks.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/action/hooks.go b/pkg/action/hooks.go index 539f8e7c1..310e6d372 100644 --- a/pkg/action/hooks.go +++ b/pkg/action/hooks.go @@ -180,7 +180,9 @@ func hookHasDeletePolicy(h *release.Hook, policy release.HookDeletePolicy) bool // outputLogsByPolicy outputs a pods logs if the hook policy instructs it to func (cfg *Configuration) outputLogsByPolicy(h *release.Hook, releaseNamespace string, policy release.HookOutputLogPolicy) error { - if hookHasOutputLogPolicy(h, policy) { + if !hookHasOutputLogPolicy(h, policy) { + return nil + } namespace, err := cfg.deriveNamespace(h, releaseNamespace) if err != nil { return err From 3796c1f4a171d33b6622e118ae812435574fdadb Mon Sep 17 00:00:00 2001 From: Scott Rigby Date: Thu, 20 Feb 2025 12:37:41 -0500 Subject: [PATCH 40/68] remove comments about previous functionality Signed-off-by: Scott Rigby --- pkg/action/hooks.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkg/action/hooks.go b/pkg/action/hooks.go index 310e6d372..370aa9a67 100644 --- a/pkg/action/hooks.go +++ b/pkg/action/hooks.go @@ -103,8 +103,6 @@ func (cfg *Configuration) execHook(rl *release.Release, hook release.HookEvent, // under failed condition. If so, then clear the corresponding resource object in the hook if errDeleting := cfg.deleteHookByPolicy(h, release.HookFailed, timeout); err != nil { // We log the error here as we want to propagate the hook failure upwards to the release object. - // This is a change in behaviour as the edge case previously would lose the hook error and only - // raise the delete hook error. log.Printf("error the hook resource on hook failure: %v", errDeleting) } return err From e8a76bc3eb2a9e1ce9a246164d9d555031eb055e Mon Sep 17 00:00:00 2001 From: Scott Rigby Date: Thu, 20 Feb 2025 13:34:09 -0500 Subject: [PATCH 41/68] fix err check Co-authored-by: George Jenkins Signed-off-by: Scott Rigby --- pkg/action/hooks.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/action/hooks.go b/pkg/action/hooks.go index 370aa9a67..ebe8be6ba 100644 --- a/pkg/action/hooks.go +++ b/pkg/action/hooks.go @@ -101,7 +101,7 @@ func (cfg *Configuration) execHook(rl *release.Release, hook release.HookEvent, } // If a hook is failed, check the annotation of the hook to determine whether the hook should be deleted // under failed condition. If so, then clear the corresponding resource object in the hook - if errDeleting := cfg.deleteHookByPolicy(h, release.HookFailed, timeout); err != nil { + if errDeleting := cfg.deleteHookByPolicy(h, release.HookFailed, timeout); errDeleting != nil { // We log the error here as we want to propagate the hook failure upwards to the release object. log.Printf("error the hook resource on hook failure: %v", errDeleting) } From 52ac92fb690bb6c4f8d09900330608b88f745ab2 Mon Sep 17 00:00:00 2001 From: Scott Rigby Date: Thu, 20 Feb 2025 13:34:54 -0500 Subject: [PATCH 42/68] clarify fix error message Signed-off-by: Scott Rigby --- pkg/action/hooks.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/action/hooks.go b/pkg/action/hooks.go index ebe8be6ba..dadcb27f6 100644 --- a/pkg/action/hooks.go +++ b/pkg/action/hooks.go @@ -103,7 +103,7 @@ func (cfg *Configuration) execHook(rl *release.Release, hook release.HookEvent, // under failed condition. If so, then clear the corresponding resource object in the hook if errDeleting := cfg.deleteHookByPolicy(h, release.HookFailed, timeout); errDeleting != nil { // We log the error here as we want to propagate the hook failure upwards to the release object. - log.Printf("error the hook resource on hook failure: %v", errDeleting) + log.Printf("error deleting the hook resource on hook failure: %v", errDeleting) } return err } From 6d30fa59904f1936613e0882d3e3c2608351da0b Mon Sep 17 00:00:00 2001 From: Chris Berry Date: Fri, 21 Feb 2025 12:33:12 +0000 Subject: [PATCH 43/68] Add HookOutputFunc and generic yaml unmarshaller Signed-off-by: Chris Berry --- pkg/action/action.go | 13 ++++++++- pkg/action/hooks.go | 57 ++++++++++++++++++---------------------- pkg/kube/client.go | 4 +-- pkg/kube/client_test.go | 3 ++- pkg/kube/fake/printer.go | 2 +- pkg/kube/interface.go | 2 +- 6 files changed, 43 insertions(+), 38 deletions(-) diff --git a/pkg/action/action.go b/pkg/action/action.go index 8418a4c27..0d81a63cb 100644 --- a/pkg/action/action.go +++ b/pkg/action/action.go @@ -19,6 +19,8 @@ package action import ( "bytes" "fmt" + "io" + "log" "os" "path" "path/filepath" @@ -95,6 +97,9 @@ type Configuration struct { Capabilities *chartutil.Capabilities Log func(string, ...interface{}) + + // HookOutputFunc Called with container name and returns and expects writer that will receive the log output + HookOutputFunc func(namespace, pod, container string) io.Writer } // renderResources renders the templates in a chart @@ -122,7 +127,7 @@ func (cfg *Configuration) renderResources(ch *chart.Chart, values chartutil.Valu var err2 error // A `helm template` should not talk to the remote cluster. However, commands with the flag - //`--dry-run` with the value of `false`, `none`, or `server` should try to interact with the cluster. + // `--dry-run` with the value of `false`, `none`, or `server` should try to interact with the cluster. // It may break in interesting and exotic ways because other data (e.g. discovery) is mocked. if interactWithRemote && cfg.RESTClientGetter != nil { restConfig, err := cfg.RESTClientGetter.ToRESTConfig() @@ -422,6 +427,12 @@ func (cfg *Configuration) Init(getter genericclioptions.RESTClientGetter, namesp cfg.KubeClient = kc cfg.Releases = store cfg.Log = log + cfg.HookOutputFunc = defaultHookOutputWriter return nil } + +// defaultHookOutputWriter will write the Hook logs to log.Writer(). +func defaultHookOutputWriter(_, _, _ string) io.Writer { + return log.Writer() +} diff --git a/pkg/action/hooks.go b/pkg/action/hooks.go index dadcb27f6..b6c505807 100644 --- a/pkg/action/hooks.go +++ b/pkg/action/hooks.go @@ -19,16 +19,16 @@ import ( "bytes" "fmt" "log" + "slices" "sort" "time" "helm.sh/helm/v4/pkg/kube" - "helm.sh/helm/v4/pkg/chartutil" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/pkg/errors" + "gopkg.in/yaml.v3" "helm.sh/helm/v4/pkg/release" helmtime "helm.sh/helm/v4/pkg/time" @@ -179,22 +179,20 @@ func hookHasDeletePolicy(h *release.Hook, policy release.HookDeletePolicy) bool // outputLogsByPolicy outputs a pods logs if the hook policy instructs it to func (cfg *Configuration) outputLogsByPolicy(h *release.Hook, releaseNamespace string, policy release.HookOutputLogPolicy) error { if !hookHasOutputLogPolicy(h, policy) { - return nil + return nil } - namespace, err := cfg.deriveNamespace(h, releaseNamespace) - if err != nil { - return err - } - switch h.Kind { - case "Job": - return cfg.outputContainerLogsForListOptions(namespace, metav1.ListOptions{LabelSelector: fmt.Sprintf("job-name=%s", h.Name)}) - case "Pod": - return cfg.outputContainerLogsForListOptions(namespace, metav1.ListOptions{FieldSelector: fmt.Sprintf("metadata.name=%s", h.Name)}) - default: - return nil - } + namespace, err := cfg.deriveNamespace(h, releaseNamespace) + if err != nil { + return err + } + switch h.Kind { + case "Job": + return cfg.outputContainerLogsForListOptions(namespace, metav1.ListOptions{LabelSelector: fmt.Sprintf("job-name=%s", h.Name)}) + case "Pod": + return cfg.outputContainerLogsForListOptions(namespace, metav1.ListOptions{FieldSelector: fmt.Sprintf("metadata.name=%s", h.Name)}) + default: + return nil } - return nil } func (cfg *Configuration) outputContainerLogsForListOptions(namespace string, listOptions metav1.ListOptions) error { @@ -204,35 +202,30 @@ func (cfg *Configuration) outputContainerLogsForListOptions(namespace string, li if err != nil { return err } - err = kubeClient.OutputContainerLogsForPodList(podList, namespace, log.Writer()) + err = kubeClient.OutputContainerLogsForPodList(podList, namespace, cfg.HookOutputFunc) return err } return nil } func (cfg *Configuration) deriveNamespace(h *release.Hook, namespace string) (string, error) { - values, err := chartutil.ReadValues([]byte(h.Manifest)) + tmp := struct { + Metadata struct { + Namespace string + } + }{} + err := yaml.Unmarshal([]byte(h.Manifest), &tmp) if err != nil { - return "", errors.Wrapf(err, "unable to parse kubernetes manifest for output logs hook %s", h.Path) + return "", errors.Wrapf(err, "unable to parse metadata.namespace from kubernetes manifest for output logs hook %s", h.Path) } - value, err := values.PathValue("metadata.namespace") - switch err.(type) { - case nil: - return value.(string), nil - case chartutil.ErrNoValue: + if tmp.Metadata.Namespace == "" { return namespace, nil - default: - return "", errors.Wrapf(err, "unable to parse path of metadata.namespace in yaml for output logs hook %s", h.Path) } + return tmp.Metadata.Namespace, nil } // hookHasOutputLogPolicy determines whether the defined hook output log policy matches the hook output log policies // supported by helm. func hookHasOutputLogPolicy(h *release.Hook, policy release.HookOutputLogPolicy) bool { - for _, v := range h.OutputLogPolicies { - if policy == v { - return true - } - } - return false + return slices.Contains(h.OutputLogPolicies, policy) } diff --git a/pkg/kube/client.go b/pkg/kube/client.go index 361111fed..fd111c647 100644 --- a/pkg/kube/client.go +++ b/pkg/kube/client.go @@ -822,14 +822,14 @@ func (c *Client) GetPodList(namespace string, listOptions metav1.ListOptions) (* } // OutputContainerLogsForPodList is a helper that outputs logs for a list of pods -func (c *Client) OutputContainerLogsForPodList(podList *v1.PodList, namespace string, writer io.Writer) error { +func (c *Client) OutputContainerLogsForPodList(podList *v1.PodList, namespace string, writerFunc func(namespace, pod, container string) io.Writer) error { for _, pod := range podList.Items { for _, container := range pod.Spec.Containers { options := &v1.PodLogOptions{ Container: container.Name, } request := c.kubeClient.CoreV1().Pods(namespace).GetLogs(pod.Name, options) - err2 := copyRequestStreamToWriter(request, pod.Name, container.Name, writer) + err2 := copyRequestStreamToWriter(request, pod.Name, container.Name, writerFunc(namespace, pod.Name, container.Name)) if err2 != nil { return err2 } diff --git a/pkg/kube/client_test.go b/pkg/kube/client_test.go index d9bd72783..ff1335f0f 100644 --- a/pkg/kube/client_test.go +++ b/pkg/kube/client_test.go @@ -711,7 +711,8 @@ func TestOutputContainerLogsForPodList(t *testing.T) { kubeClient := k8sfake.NewSimpleClientset(&somePodList) c := Client{Namespace: namespace, kubeClient: kubeClient} outBuffer := &bytes.Buffer{} - err := c.OutputContainerLogsForPodList(&somePodList, namespace, outBuffer) + outBufferFunc := func(_, _, _ string) io.Writer { return outBuffer } + err := c.OutputContainerLogsForPodList(&somePodList, namespace, outBufferFunc) clientAssertions := assert.New(t) clientAssertions.NoError(err) clientAssertions.Equal("fake logsfake logsfake logs", outBuffer.String()) diff --git a/pkg/kube/fake/printer.go b/pkg/kube/fake/printer.go index 65515812e..dcce9a3be 100644 --- a/pkg/kube/fake/printer.go +++ b/pkg/kube/fake/printer.go @@ -124,7 +124,7 @@ func (p *PrintingKubeClient) GetPodList(_ string, _ metav1.ListOptions) (*v1.Pod } // OutputContainerLogsForPodList implements KubeClient OutputContainerLogsForPodList. -func (p *PrintingKubeClient) OutputContainerLogsForPodList(_ *v1.PodList, someNamespace string, _ io.Writer) error { +func (p *PrintingKubeClient) OutputContainerLogsForPodList(_ *v1.PodList, someNamespace string, _ func(namespace, pod, container string) io.Writer) error { _, err := io.Copy(p.LogOutput, strings.NewReader(fmt.Sprintf("attempted to output logs for namespace: %s", someNamespace))) return err } diff --git a/pkg/kube/interface.go b/pkg/kube/interface.go index f701690e3..c9776cacd 100644 --- a/pkg/kube/interface.go +++ b/pkg/kube/interface.go @@ -84,7 +84,7 @@ type InterfaceLogs interface { GetPodList(namespace string, listOptions metav1.ListOptions) (*v1.PodList, error) // OutputContainerLogsForPodList output the logs for a pod list - OutputContainerLogsForPodList(podList *v1.PodList, namespace string, writer io.Writer) error + OutputContainerLogsForPodList(podList *v1.PodList, namespace string, writerFunc func(namespace, pod, container string) io.Writer) error } // InterfaceDeletionPropagation is introduced to avoid breaking backwards compatibility for Interface implementers. From 9791767baa9d3e4d460c25e921f06172b2cec53f Mon Sep 17 00:00:00 2001 From: Chris Berry Date: Fri, 21 Feb 2025 16:16:26 +0000 Subject: [PATCH 44/68] Refactor based on review comment Signed-off-by: Chris Berry --- cmd/helm/helm.go | 7 ++++++- cmd/helm/list.go | 2 +- pkg/action/action.go | 19 ++++++++++--------- pkg/action/action_test.go | 2 +- 4 files changed, 18 insertions(+), 12 deletions(-) diff --git a/cmd/helm/helm.go b/cmd/helm/helm.go index aa981740f..3d5c17030 100644 --- a/cmd/helm/helm.go +++ b/cmd/helm/helm.go @@ -57,6 +57,11 @@ func warning(format string, v ...interface{}) { fmt.Fprintf(os.Stderr, format, v...) } +// hookOutputWriter provides the writer for writing hook logs. +func hookOutputWriter(_, _, _ string) io.Writer { + return log.Writer() +} + func main() { // Setting the name of the app for managedFields in the Kubernetes client. // It is set here to the full name of "helm" so that renaming of helm to @@ -74,7 +79,7 @@ func main() { // run when each command's execute method is called cobra.OnInitialize(func() { helmDriver := os.Getenv("HELM_DRIVER") - if err := actionConfig.Init(settings.RESTClientGetter(), settings.Namespace(), helmDriver, debug); err != nil { + if err := actionConfig.Init(settings.RESTClientGetter(), settings.Namespace(), helmDriver, debug, hookOutputWriter); err != nil { log.Fatal(err) } if helmDriver == "memory" { diff --git a/cmd/helm/list.go b/cmd/helm/list.go index 67da22cdf..f9bf336d4 100644 --- a/cmd/helm/list.go +++ b/cmd/helm/list.go @@ -71,7 +71,7 @@ func newListCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { ValidArgsFunction: noMoreArgsCompFunc, RunE: func(cmd *cobra.Command, _ []string) error { if client.AllNamespaces { - if err := cfg.Init(settings.RESTClientGetter(), "", os.Getenv("HELM_DRIVER"), debug); err != nil { + if err := cfg.Init(settings.RESTClientGetter(), "", os.Getenv("HELM_DRIVER"), debug, nil); err != nil { return err } } diff --git a/pkg/action/action.go b/pkg/action/action.go index 0d81a63cb..dfb263269 100644 --- a/pkg/action/action.go +++ b/pkg/action/action.go @@ -20,7 +20,6 @@ import ( "bytes" "fmt" "io" - "log" "os" "path" "path/filepath" @@ -98,7 +97,7 @@ type Configuration struct { Log func(string, ...interface{}) - // HookOutputFunc Called with container name and returns and expects writer that will receive the log output + // HookOutputFunc called with container name and returns and expects writer that will receive the log output. HookOutputFunc func(namespace, pod, container string) io.Writer } @@ -247,6 +246,9 @@ type RESTClientGetter interface { // DebugLog sets the logger that writes debug strings type DebugLog func(format string, v ...interface{}) +// HookOutputFunc returns the io.Writer for outputting hook logs. +type HookOutputFunc func(namespace, pod, container string) io.Writer + // capabilities builds a Capabilities from discovery information. func (cfg *Configuration) getCapabilities() (*chartutil.Capabilities, error) { if cfg.Capabilities != nil { @@ -375,7 +377,7 @@ func (cfg *Configuration) recordRelease(r *release.Release) { } // Init initializes the action configuration -func (cfg *Configuration) Init(getter genericclioptions.RESTClientGetter, namespace, helmDriver string, log DebugLog) error { +func (cfg *Configuration) Init(getter genericclioptions.RESTClientGetter, namespace, helmDriver string, log DebugLog, outputFunc HookOutputFunc) error { kc := kube.New(getter) kc.Log = log @@ -427,12 +429,11 @@ func (cfg *Configuration) Init(getter genericclioptions.RESTClientGetter, namesp cfg.KubeClient = kc cfg.Releases = store cfg.Log = log - cfg.HookOutputFunc = defaultHookOutputWriter + if outputFunc != nil { + cfg.HookOutputFunc = outputFunc + } else { + cfg.HookOutputFunc = func(_, _, _ string) io.Writer { return io.Discard } + } return nil } - -// defaultHookOutputWriter will write the Hook logs to log.Writer(). -func defaultHookOutputWriter(_, _, _ string) io.Writer { - return log.Writer() -} diff --git a/pkg/action/action_test.go b/pkg/action/action_test.go index 47cff6ec1..2d1516edb 100644 --- a/pkg/action/action_test.go +++ b/pkg/action/action_test.go @@ -334,7 +334,7 @@ func TestConfiguration_Init(t *testing.T) { t.Run(tt.name, func(t *testing.T) { cfg := &Configuration{} - actualErr := cfg.Init(nil, "default", tt.helmDriver, nil) + actualErr := cfg.Init(nil, "default", tt.helmDriver, nil, nil) if tt.expectErr { assert.Error(t, actualErr) assert.Contains(t, actualErr.Error(), tt.errMsg) From e5bc21c56b5b384acf77dbc3589694d03477cb27 Mon Sep 17 00:00:00 2001 From: Chris Berry Date: Fri, 21 Feb 2025 16:33:31 +0000 Subject: [PATCH 45/68] Refactor based on review comment Signed-off-by: Chris Berry --- cmd/helm/helm.go | 3 ++- cmd/helm/list.go | 2 +- pkg/action/action.go | 16 +++++++--------- pkg/action/action_test.go | 2 +- 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/cmd/helm/helm.go b/cmd/helm/helm.go index 3d5c17030..c8de18796 100644 --- a/cmd/helm/helm.go +++ b/cmd/helm/helm.go @@ -79,12 +79,13 @@ func main() { // run when each command's execute method is called cobra.OnInitialize(func() { helmDriver := os.Getenv("HELM_DRIVER") - if err := actionConfig.Init(settings.RESTClientGetter(), settings.Namespace(), helmDriver, debug, hookOutputWriter); err != nil { + if err := actionConfig.Init(settings.RESTClientGetter(), settings.Namespace(), helmDriver, debug); err != nil { log.Fatal(err) } if helmDriver == "memory" { loadReleasesInMemory(actionConfig) } + actionConfig.SetHookOutputFunc(hookOutputWriter) }) if err := cmd.Execute(); err != nil { diff --git a/cmd/helm/list.go b/cmd/helm/list.go index f9bf336d4..67da22cdf 100644 --- a/cmd/helm/list.go +++ b/cmd/helm/list.go @@ -71,7 +71,7 @@ func newListCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { ValidArgsFunction: noMoreArgsCompFunc, RunE: func(cmd *cobra.Command, _ []string) error { if client.AllNamespaces { - if err := cfg.Init(settings.RESTClientGetter(), "", os.Getenv("HELM_DRIVER"), debug, nil); err != nil { + if err := cfg.Init(settings.RESTClientGetter(), "", os.Getenv("HELM_DRIVER"), debug); err != nil { return err } } diff --git a/pkg/action/action.go b/pkg/action/action.go index dfb263269..745f02138 100644 --- a/pkg/action/action.go +++ b/pkg/action/action.go @@ -246,9 +246,6 @@ type RESTClientGetter interface { // DebugLog sets the logger that writes debug strings type DebugLog func(format string, v ...interface{}) -// HookOutputFunc returns the io.Writer for outputting hook logs. -type HookOutputFunc func(namespace, pod, container string) io.Writer - // capabilities builds a Capabilities from discovery information. func (cfg *Configuration) getCapabilities() (*chartutil.Capabilities, error) { if cfg.Capabilities != nil { @@ -377,7 +374,7 @@ func (cfg *Configuration) recordRelease(r *release.Release) { } // Init initializes the action configuration -func (cfg *Configuration) Init(getter genericclioptions.RESTClientGetter, namespace, helmDriver string, log DebugLog, outputFunc HookOutputFunc) error { +func (cfg *Configuration) Init(getter genericclioptions.RESTClientGetter, namespace, helmDriver string, log DebugLog) error { kc := kube.New(getter) kc.Log = log @@ -429,11 +426,12 @@ func (cfg *Configuration) Init(getter genericclioptions.RESTClientGetter, namesp cfg.KubeClient = kc cfg.Releases = store cfg.Log = log - if outputFunc != nil { - cfg.HookOutputFunc = outputFunc - } else { - cfg.HookOutputFunc = func(_, _, _ string) io.Writer { return io.Discard } - } + cfg.HookOutputFunc = func(_, _, _ string) io.Writer { return io.Discard } return nil } + +// SetHookOutputFunc sets the HookOutputFunc on the Configuration. +func (cfg *Configuration) SetHookOutputFunc(hookOutputFunc func(_, _, _ string) io.Writer) { + cfg.HookOutputFunc = hookOutputFunc +} diff --git a/pkg/action/action_test.go b/pkg/action/action_test.go index 2d1516edb..47cff6ec1 100644 --- a/pkg/action/action_test.go +++ b/pkg/action/action_test.go @@ -334,7 +334,7 @@ func TestConfiguration_Init(t *testing.T) { t.Run(tt.name, func(t *testing.T) { cfg := &Configuration{} - actualErr := cfg.Init(nil, "default", tt.helmDriver, nil, nil) + actualErr := cfg.Init(nil, "default", tt.helmDriver, nil) if tt.expectErr { assert.Error(t, actualErr) assert.Contains(t, actualErr.Error(), tt.errMsg) From 5c0deec32792d32c052883b73ee03be3381cabab Mon Sep 17 00:00:00 2001 From: Matt Farina Date: Fri, 21 Feb 2025 15:25:55 -0500 Subject: [PATCH 46/68] Moving chartutil to chart/util chartutil was originally created to operate on protobufs which are no longer part of Helm. The util package makes more sense to be part of the chart package. This change is part of the HIP 20 to create v3 charts and explicitly call out v2 charts. The changes for this are in smaller bite size changes. Signed-off-by: Matt Farina --- Makefile | 4 ++-- cmd/helm/create.go | 2 +- cmd/helm/create_test.go | 2 +- cmd/helm/dependency_build_test.go | 2 +- cmd/helm/dependency_update_test.go | 2 +- cmd/helm/helm_test.go | 2 +- cmd/helm/lint.go | 2 +- cmd/helm/status.go | 2 +- cmd/helm/template.go | 2 +- cmd/helm/upgrade_test.go | 2 +- pkg/action/action.go | 2 +- pkg/action/action_test.go | 2 +- pkg/action/dependency_test.go | 2 +- pkg/action/get_values.go | 2 +- pkg/action/history.go | 2 +- pkg/action/install.go | 2 +- pkg/action/install_test.go | 2 +- pkg/action/lint.go | 2 +- pkg/action/package.go | 2 +- pkg/action/pull.go | 2 +- pkg/action/release_testing.go | 2 +- pkg/action/rollback.go | 2 +- pkg/action/show.go | 2 +- pkg/action/uninstall.go | 2 +- pkg/action/upgrade.go | 2 +- pkg/{chartutil => chart/util}/capabilities.go | 2 +- pkg/{chartutil => chart/util}/capabilities_test.go | 2 +- pkg/{chartutil => chart/util}/chartfile.go | 2 +- pkg/{chartutil => chart/util}/chartfile_test.go | 2 +- pkg/{chartutil => chart/util}/coalesce.go | 2 +- pkg/{chartutil => chart/util}/coalesce_test.go | 2 +- pkg/{chartutil => chart/util}/compatible.go | 2 +- pkg/{chartutil => chart/util}/compatible_test.go | 2 +- pkg/{chartutil => chart/util}/create.go | 2 +- pkg/{chartutil => chart/util}/create_test.go | 2 +- pkg/{chartutil => chart/util}/dependencies.go | 2 +- pkg/{chartutil => chart/util}/dependencies_test.go | 2 +- pkg/{chartutil => chart/util}/doc.go | 4 ++-- pkg/{chartutil => chart/util}/errors.go | 2 +- pkg/{chartutil => chart/util}/errors_test.go | 2 +- pkg/{chartutil => chart/util}/expand.go | 2 +- pkg/{chartutil => chart/util}/expand_test.go | 2 +- pkg/{chartutil => chart/util}/jsonschema.go | 2 +- pkg/{chartutil => chart/util}/jsonschema_test.go | 2 +- pkg/{chartutil => chart/util}/save.go | 2 +- pkg/{chartutil => chart/util}/save_test.go | 2 +- .../util}/testdata/chartfiletest.yaml | 0 .../util}/testdata/coleridge.yaml | 0 .../testdata/dependent-chart-alias/.helmignore | 0 .../util}/testdata/dependent-chart-alias/Chart.lock | 0 .../util}/testdata/dependent-chart-alias/Chart.yaml | 0 .../testdata/dependent-chart-alias/INSTALL.txt | 0 .../util}/testdata/dependent-chart-alias/LICENSE | 0 .../util}/testdata/dependent-chart-alias/README.md | 0 .../dependent-chart-alias/charts/_ignore_me | 0 .../dependent-chart-alias/charts/alpine/Chart.yaml | 0 .../dependent-chart-alias/charts/alpine/README.md | 0 .../charts/alpine/charts/mast1/Chart.yaml | 0 .../charts/alpine/charts/mast1/values.yaml | 0 .../charts/alpine/charts/mast2-0.1.0.tgz | Bin .../charts/alpine/templates/alpine-pod.yaml | 0 .../dependent-chart-alias/charts/alpine/values.yaml | 0 .../dependent-chart-alias/charts/mariner-4.3.2.tgz | Bin .../testdata/dependent-chart-alias/docs/README.md | 0 .../util}/testdata/dependent-chart-alias/icon.svg | 0 .../testdata/dependent-chart-alias/ignore/me.txt | 0 .../dependent-chart-alias/templates/template.tpl | 0 .../testdata/dependent-chart-alias/values.yaml | 0 .../testdata/dependent-chart-helmignore/.helmignore | 0 .../testdata/dependent-chart-helmignore/Chart.yaml | 0 .../dependent-chart-helmignore/charts/.ignore_me | 0 .../dependent-chart-helmignore/charts/_ignore_me | 0 .../charts/alpine/Chart.yaml | 0 .../charts/alpine/README.md | 0 .../charts/alpine/charts/mast1/Chart.yaml | 0 .../charts/alpine/charts/mast1/values.yaml | 0 .../charts/alpine/charts/mast2-0.1.0.tgz | Bin .../charts/alpine/templates/alpine-pod.yaml | 0 .../charts/alpine/values.yaml | 0 .../templates/template.tpl | 0 .../testdata/dependent-chart-helmignore/values.yaml | 0 .../.helmignore | 0 .../dependent-chart-no-requirements-yaml/Chart.yaml | 0 .../INSTALL.txt | 0 .../dependent-chart-no-requirements-yaml/LICENSE | 0 .../dependent-chart-no-requirements-yaml/README.md | 0 .../charts/_ignore_me | 0 .../charts/alpine/Chart.yaml | 0 .../charts/alpine/README.md | 0 .../charts/alpine/charts/mast1/Chart.yaml | 0 .../charts/alpine/charts/mast1/values.yaml | 0 .../charts/alpine/charts/mast2-0.1.0.tgz | Bin .../charts/alpine/templates/alpine-pod.yaml | 0 .../charts/alpine/values.yaml | 0 .../charts/mariner-4.3.2.tgz | Bin .../docs/README.md | 0 .../dependent-chart-no-requirements-yaml/icon.svg | 0 .../ignore/me.txt | 0 .../templates/template.tpl | 0 .../values.yaml | 0 .../.helmignore | 0 .../Chart.yaml | 0 .../INSTALL.txt | 0 .../LICENSE | 0 .../README.md | 0 .../charts/_ignore_me | 0 .../charts/alpine/Chart.yaml | 0 .../charts/alpine/README.md | 0 .../charts/alpine/charts/mast1/Chart.yaml | 0 .../charts/alpine/charts/mast1/values.yaml | 0 .../charts/alpine/charts/mast2-0.1.0.tgz | Bin .../charts/alpine/templates/alpine-pod.yaml | 0 .../charts/alpine/values.yaml | 0 .../charts/mariner-4.3.2.tgz | Bin .../docs/README.md | 0 .../icon.svg | 0 .../ignore/me.txt | 0 .../templates/template.tpl | 0 .../values.yaml | 0 .../.helmignore | 0 .../Chart.yaml | 0 .../INSTALL.txt | 0 .../LICENSE | 0 .../README.md | 0 .../charts/_ignore_me | 0 .../charts/alpine/Chart.yaml | 0 .../charts/alpine/README.md | 0 .../charts/alpine/charts/mast1/Chart.yaml | 0 .../charts/alpine/charts/mast1/values.yaml | 0 .../charts/alpine/charts/mast2-0.1.0.tgz | Bin .../charts/alpine/templates/alpine-pod.yaml | 0 .../charts/alpine/values.yaml | 0 .../charts/mariner-4.3.2.tgz | Bin .../docs/README.md | 0 .../icon.svg | 0 .../ignore/me.txt | 0 .../templates/template.tpl | 0 .../values.yaml | 0 .../util}/testdata/frobnitz-1.2.3.tgz | Bin .../util}/testdata/frobnitz/.helmignore | 0 .../util}/testdata/frobnitz/Chart.lock | 0 .../util}/testdata/frobnitz/Chart.yaml | 0 .../util}/testdata/frobnitz/INSTALL.txt | 0 .../util}/testdata/frobnitz/LICENSE | 0 .../util}/testdata/frobnitz/README.md | 0 .../util}/testdata/frobnitz/charts/_ignore_me | 0 .../testdata/frobnitz/charts/alpine/Chart.yaml | 0 .../util}/testdata/frobnitz/charts/alpine/README.md | 0 .../frobnitz/charts/alpine/charts/mast1/Chart.yaml | 0 .../frobnitz/charts/alpine/charts/mast1/values.yaml | 0 .../frobnitz/charts/alpine/charts/mast2-0.1.0.tgz | Bin .../charts/alpine/templates/alpine-pod.yaml | 0 .../testdata/frobnitz/charts/alpine/values.yaml | 0 .../testdata/frobnitz/charts/mariner/Chart.yaml | 0 .../charts/mariner/charts/albatross/Chart.yaml | 0 .../charts/mariner/charts/albatross/values.yaml | 0 .../charts/mariner/templates/placeholder.tpl | 0 .../testdata/frobnitz/charts/mariner/values.yaml | 0 .../util}/testdata/frobnitz/docs/README.md | 0 .../util}/testdata/frobnitz/icon.svg | 0 .../util}/testdata/frobnitz/ignore/me.txt | 0 .../util}/testdata/frobnitz/templates/template.tpl | 0 .../util}/testdata/frobnitz/values.yaml | 0 .../util}/testdata/frobnitz_backslash-1.2.3.tgz | Bin pkg/{chartutil => chart/util}/testdata/genfrob.sh | 0 .../parent-chart/Chart.lock | 0 .../parent-chart/Chart.yaml | 0 .../parent-chart/charts/dev-v0.1.0.tgz | Bin .../parent-chart/charts/prod-v0.1.0.tgz | Bin .../parent-chart/envs/dev/Chart.yaml | 0 .../parent-chart/envs/dev/values.yaml | 0 .../parent-chart/envs/prod/Chart.yaml | 0 .../parent-chart/envs/prod/values.yaml | 0 .../parent-chart/templates/autoscaler.yaml | 0 .../parent-chart/values.yaml | 0 .../util}/testdata/joonix/Chart.yaml | 0 .../util}/testdata/joonix/charts/.gitkeep | 0 .../util}/testdata/subpop/Chart.yaml | 0 .../util}/testdata/subpop/README.md | 0 .../testdata/subpop/charts/subchart1/Chart.yaml | 0 .../charts/subchart1/charts/subchartA/Chart.yaml | 0 .../charts/subchartA/templates/service.yaml | 0 .../charts/subchart1/charts/subchartA/values.yaml | 0 .../charts/subchart1/charts/subchartB/Chart.yaml | 0 .../charts/subchartB/templates/service.yaml | 0 .../charts/subchart1/charts/subchartB/values.yaml | 0 .../testdata/subpop/charts/subchart1/crds/crdA.yaml | 0 .../subpop/charts/subchart1/templates/NOTES.txt | 0 .../subpop/charts/subchart1/templates/service.yaml | 0 .../charts/subchart1/templates/subdir/role.yaml | 0 .../subchart1/templates/subdir/rolebinding.yaml | 0 .../subchart1/templates/subdir/serviceaccount.yaml | 0 .../testdata/subpop/charts/subchart1/values.yaml | 0 .../testdata/subpop/charts/subchart2/Chart.yaml | 0 .../charts/subchart2/charts/subchartB/Chart.yaml | 0 .../charts/subchartB/templates/service.yaml | 0 .../charts/subchart2/charts/subchartB/values.yaml | 0 .../charts/subchart2/charts/subchartC/Chart.yaml | 0 .../charts/subchartC/templates/service.yaml | 0 .../charts/subchart2/charts/subchartC/values.yaml | 0 .../subpop/charts/subchart2/templates/service.yaml | 0 .../testdata/subpop/charts/subchart2/values.yaml | 0 .../util}/testdata/subpop/noreqs/Chart.yaml | 0 .../testdata/subpop/noreqs/templates/service.yaml | 0 .../util}/testdata/subpop/noreqs/values.yaml | 0 .../util}/testdata/subpop/values.yaml | 0 .../util}/testdata/test-values-invalid.schema.json | 0 .../util}/testdata/test-values-negative.yaml | 0 .../util}/testdata/test-values.schema.json | 0 .../util}/testdata/test-values.yaml | 0 .../testdata/three-level-dependent-chart/README.md | 0 .../three-level-dependent-chart/umbrella/Chart.yaml | 0 .../umbrella/charts/app1/Chart.yaml | 0 .../umbrella/charts/app1/charts/library/Chart.yaml | 0 .../app1/charts/library/templates/service.yaml | 0 .../umbrella/charts/app1/charts/library/values.yaml | 0 .../umbrella/charts/app1/templates/service.yaml | 0 .../umbrella/charts/app1/values.yaml | 0 .../umbrella/charts/app2/Chart.yaml | 0 .../umbrella/charts/app2/charts/library/Chart.yaml | 0 .../app2/charts/library/templates/service.yaml | 0 .../umbrella/charts/app2/charts/library/values.yaml | 0 .../umbrella/charts/app2/templates/service.yaml | 0 .../umbrella/charts/app2/values.yaml | 0 .../umbrella/charts/app3/Chart.yaml | 0 .../umbrella/charts/app3/charts/library/Chart.yaml | 0 .../app3/charts/library/templates/service.yaml | 0 .../umbrella/charts/app3/charts/library/values.yaml | 0 .../umbrella/charts/app3/templates/service.yaml | 0 .../umbrella/charts/app3/values.yaml | 0 .../umbrella/charts/app4/Chart.yaml | 0 .../umbrella/charts/app4/charts/library/Chart.yaml | 0 .../app4/charts/library/templates/service.yaml | 0 .../umbrella/charts/app4/charts/library/values.yaml | 0 .../umbrella/charts/app4/templates/service.yaml | 0 .../umbrella/charts/app4/values.yaml | 0 .../umbrella/values.yaml | 0 pkg/{chartutil => chart/util}/validate_name.go | 2 +- pkg/{chartutil => chart/util}/validate_name_test.go | 2 +- pkg/{chartutil => chart/util}/values.go | 2 +- pkg/{chartutil => chart/util}/values_test.go | 2 +- pkg/downloader/manager.go | 2 +- pkg/downloader/manager_test.go | 2 +- pkg/engine/engine.go | 2 +- pkg/engine/engine_test.go | 2 +- pkg/lint/lint.go | 2 +- pkg/lint/lint_test.go | 2 +- pkg/lint/rules/chartfile.go | 2 +- pkg/lint/rules/chartfile_test.go | 2 +- pkg/lint/rules/dependencies_test.go | 2 +- pkg/lint/rules/deprecations.go | 2 +- pkg/lint/rules/template.go | 2 +- pkg/lint/rules/template_test.go | 2 +- pkg/lint/rules/values.go | 2 +- pkg/releaseutil/manifest_sorter.go | 2 +- pkg/repo/repotest/server.go | 2 +- 256 files changed, 67 insertions(+), 67 deletions(-) rename pkg/{chartutil => chart/util}/capabilities.go (99%) rename pkg/{chartutil => chart/util}/capabilities_test.go (99%) rename pkg/{chartutil => chart/util}/chartfile.go (99%) rename pkg/{chartutil => chart/util}/chartfile_test.go (99%) rename pkg/{chartutil => chart/util}/coalesce.go (99%) rename pkg/{chartutil => chart/util}/coalesce_test.go (99%) rename pkg/{chartutil => chart/util}/compatible.go (98%) rename pkg/{chartutil => chart/util}/compatible_test.go (98%) rename pkg/{chartutil => chart/util}/create.go (99%) rename pkg/{chartutil => chart/util}/create_test.go (99%) rename pkg/{chartutil => chart/util}/dependencies.go (99%) rename pkg/{chartutil => chart/util}/dependencies_test.go (99%) rename pkg/{chartutil => chart/util}/doc.go (92%) rename pkg/{chartutil => chart/util}/errors.go (98%) rename pkg/{chartutil => chart/util}/errors_test.go (97%) rename pkg/{chartutil => chart/util}/expand.go (99%) rename pkg/{chartutil => chart/util}/expand_test.go (99%) rename pkg/{chartutil => chart/util}/jsonschema.go (99%) rename pkg/{chartutil => chart/util}/jsonschema_test.go (99%) rename pkg/{chartutil => chart/util}/save.go (99%) rename pkg/{chartutil => chart/util}/save_test.go (99%) rename pkg/{chartutil => chart/util}/testdata/chartfiletest.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/coleridge.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-alias/.helmignore (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-alias/Chart.lock (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-alias/Chart.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-alias/INSTALL.txt (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-alias/LICENSE (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-alias/README.md (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-alias/charts/_ignore_me (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-alias/charts/alpine/Chart.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-alias/charts/alpine/README.md (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-alias/charts/alpine/charts/mast1/Chart.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-alias/charts/alpine/charts/mast1/values.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-alias/charts/alpine/charts/mast2-0.1.0.tgz (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-alias/charts/alpine/templates/alpine-pod.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-alias/charts/alpine/values.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-alias/charts/mariner-4.3.2.tgz (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-alias/docs/README.md (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-alias/icon.svg (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-alias/ignore/me.txt (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-alias/templates/template.tpl (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-alias/values.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-helmignore/.helmignore (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-helmignore/Chart.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-helmignore/charts/.ignore_me (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-helmignore/charts/_ignore_me (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-helmignore/charts/alpine/Chart.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-helmignore/charts/alpine/README.md (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-helmignore/charts/alpine/charts/mast1/Chart.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-helmignore/charts/alpine/charts/mast1/values.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-helmignore/charts/alpine/charts/mast2-0.1.0.tgz (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-helmignore/charts/alpine/templates/alpine-pod.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-helmignore/charts/alpine/values.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-helmignore/templates/template.tpl (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-helmignore/values.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-no-requirements-yaml/.helmignore (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-no-requirements-yaml/Chart.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-no-requirements-yaml/INSTALL.txt (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-no-requirements-yaml/LICENSE (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-no-requirements-yaml/README.md (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-no-requirements-yaml/charts/_ignore_me (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-no-requirements-yaml/charts/alpine/Chart.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-no-requirements-yaml/charts/alpine/README.md (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-no-requirements-yaml/charts/alpine/charts/mast1/Chart.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-no-requirements-yaml/charts/alpine/charts/mast1/values.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-no-requirements-yaml/charts/alpine/charts/mast2-0.1.0.tgz (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-no-requirements-yaml/charts/alpine/templates/alpine-pod.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-no-requirements-yaml/charts/alpine/values.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-no-requirements-yaml/charts/mariner-4.3.2.tgz (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-no-requirements-yaml/docs/README.md (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-no-requirements-yaml/icon.svg (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-no-requirements-yaml/ignore/me.txt (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-no-requirements-yaml/templates/template.tpl (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-no-requirements-yaml/values.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-with-all-in-requirements-yaml/.helmignore (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-with-all-in-requirements-yaml/Chart.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-with-all-in-requirements-yaml/INSTALL.txt (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-with-all-in-requirements-yaml/LICENSE (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-with-all-in-requirements-yaml/README.md (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-with-all-in-requirements-yaml/charts/_ignore_me (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/Chart.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/README.md (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/charts/mast1/Chart.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/charts/mast1/values.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/charts/mast2-0.1.0.tgz (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/templates/alpine-pod.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/values.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-with-all-in-requirements-yaml/charts/mariner-4.3.2.tgz (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-with-all-in-requirements-yaml/docs/README.md (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-with-all-in-requirements-yaml/icon.svg (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-with-all-in-requirements-yaml/ignore/me.txt (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-with-all-in-requirements-yaml/templates/template.tpl (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-with-all-in-requirements-yaml/values.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-with-mixed-requirements-yaml/.helmignore (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-with-mixed-requirements-yaml/Chart.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-with-mixed-requirements-yaml/INSTALL.txt (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-with-mixed-requirements-yaml/LICENSE (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-with-mixed-requirements-yaml/README.md (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-with-mixed-requirements-yaml/charts/_ignore_me (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/Chart.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/README.md (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/charts/mast1/Chart.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/charts/mast1/values.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/charts/mast2-0.1.0.tgz (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/templates/alpine-pod.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/values.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-with-mixed-requirements-yaml/charts/mariner-4.3.2.tgz (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-with-mixed-requirements-yaml/docs/README.md (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-with-mixed-requirements-yaml/icon.svg (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-with-mixed-requirements-yaml/ignore/me.txt (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-with-mixed-requirements-yaml/templates/template.tpl (100%) rename pkg/{chartutil => chart/util}/testdata/dependent-chart-with-mixed-requirements-yaml/values.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/frobnitz-1.2.3.tgz (100%) rename pkg/{chartutil => chart/util}/testdata/frobnitz/.helmignore (100%) rename pkg/{chartutil => chart/util}/testdata/frobnitz/Chart.lock (100%) rename pkg/{chartutil => chart/util}/testdata/frobnitz/Chart.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/frobnitz/INSTALL.txt (100%) rename pkg/{chartutil => chart/util}/testdata/frobnitz/LICENSE (100%) rename pkg/{chartutil => chart/util}/testdata/frobnitz/README.md (100%) rename pkg/{chartutil => chart/util}/testdata/frobnitz/charts/_ignore_me (100%) rename pkg/{chartutil => chart/util}/testdata/frobnitz/charts/alpine/Chart.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/frobnitz/charts/alpine/README.md (100%) rename pkg/{chartutil => chart/util}/testdata/frobnitz/charts/alpine/charts/mast1/Chart.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/frobnitz/charts/alpine/charts/mast1/values.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/frobnitz/charts/alpine/charts/mast2-0.1.0.tgz (100%) rename pkg/{chartutil => chart/util}/testdata/frobnitz/charts/alpine/templates/alpine-pod.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/frobnitz/charts/alpine/values.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/frobnitz/charts/mariner/Chart.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/frobnitz/charts/mariner/charts/albatross/Chart.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/frobnitz/charts/mariner/charts/albatross/values.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/frobnitz/charts/mariner/templates/placeholder.tpl (100%) rename pkg/{chartutil => chart/util}/testdata/frobnitz/charts/mariner/values.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/frobnitz/docs/README.md (100%) rename pkg/{chartutil => chart/util}/testdata/frobnitz/icon.svg (100%) rename pkg/{chartutil => chart/util}/testdata/frobnitz/ignore/me.txt (100%) rename pkg/{chartutil => chart/util}/testdata/frobnitz/templates/template.tpl (100%) rename pkg/{chartutil => chart/util}/testdata/frobnitz/values.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/frobnitz_backslash-1.2.3.tgz (100%) rename pkg/{chartutil => chart/util}/testdata/genfrob.sh (100%) rename pkg/{chartutil => chart/util}/testdata/import-values-from-enabled-subchart/parent-chart/Chart.lock (100%) rename pkg/{chartutil => chart/util}/testdata/import-values-from-enabled-subchart/parent-chart/Chart.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/import-values-from-enabled-subchart/parent-chart/charts/dev-v0.1.0.tgz (100%) rename pkg/{chartutil => chart/util}/testdata/import-values-from-enabled-subchart/parent-chart/charts/prod-v0.1.0.tgz (100%) rename pkg/{chartutil => chart/util}/testdata/import-values-from-enabled-subchart/parent-chart/envs/dev/Chart.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/import-values-from-enabled-subchart/parent-chart/envs/dev/values.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/import-values-from-enabled-subchart/parent-chart/envs/prod/Chart.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/import-values-from-enabled-subchart/parent-chart/envs/prod/values.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/import-values-from-enabled-subchart/parent-chart/templates/autoscaler.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/import-values-from-enabled-subchart/parent-chart/values.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/joonix/Chart.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/joonix/charts/.gitkeep (100%) rename pkg/{chartutil => chart/util}/testdata/subpop/Chart.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/subpop/README.md (100%) rename pkg/{chartutil => chart/util}/testdata/subpop/charts/subchart1/Chart.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/subpop/charts/subchart1/charts/subchartA/Chart.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/subpop/charts/subchart1/charts/subchartA/templates/service.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/subpop/charts/subchart1/charts/subchartA/values.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/subpop/charts/subchart1/charts/subchartB/Chart.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/subpop/charts/subchart1/charts/subchartB/templates/service.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/subpop/charts/subchart1/charts/subchartB/values.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/subpop/charts/subchart1/crds/crdA.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/subpop/charts/subchart1/templates/NOTES.txt (100%) rename pkg/{chartutil => chart/util}/testdata/subpop/charts/subchart1/templates/service.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/subpop/charts/subchart1/templates/subdir/role.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/subpop/charts/subchart1/templates/subdir/rolebinding.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/subpop/charts/subchart1/templates/subdir/serviceaccount.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/subpop/charts/subchart1/values.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/subpop/charts/subchart2/Chart.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/subpop/charts/subchart2/charts/subchartB/Chart.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/subpop/charts/subchart2/charts/subchartB/templates/service.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/subpop/charts/subchart2/charts/subchartB/values.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/subpop/charts/subchart2/charts/subchartC/Chart.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/subpop/charts/subchart2/charts/subchartC/templates/service.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/subpop/charts/subchart2/charts/subchartC/values.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/subpop/charts/subchart2/templates/service.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/subpop/charts/subchart2/values.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/subpop/noreqs/Chart.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/subpop/noreqs/templates/service.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/subpop/noreqs/values.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/subpop/values.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/test-values-invalid.schema.json (100%) rename pkg/{chartutil => chart/util}/testdata/test-values-negative.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/test-values.schema.json (100%) rename pkg/{chartutil => chart/util}/testdata/test-values.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/three-level-dependent-chart/README.md (100%) rename pkg/{chartutil => chart/util}/testdata/three-level-dependent-chart/umbrella/Chart.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/three-level-dependent-chart/umbrella/charts/app1/Chart.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/three-level-dependent-chart/umbrella/charts/app1/charts/library/Chart.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/three-level-dependent-chart/umbrella/charts/app1/charts/library/templates/service.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/three-level-dependent-chart/umbrella/charts/app1/charts/library/values.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/three-level-dependent-chart/umbrella/charts/app1/templates/service.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/three-level-dependent-chart/umbrella/charts/app1/values.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/three-level-dependent-chart/umbrella/charts/app2/Chart.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/three-level-dependent-chart/umbrella/charts/app2/charts/library/Chart.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/three-level-dependent-chart/umbrella/charts/app2/charts/library/templates/service.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/three-level-dependent-chart/umbrella/charts/app2/charts/library/values.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/three-level-dependent-chart/umbrella/charts/app2/templates/service.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/three-level-dependent-chart/umbrella/charts/app2/values.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/three-level-dependent-chart/umbrella/charts/app3/Chart.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/three-level-dependent-chart/umbrella/charts/app3/charts/library/Chart.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/three-level-dependent-chart/umbrella/charts/app3/charts/library/templates/service.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/three-level-dependent-chart/umbrella/charts/app3/charts/library/values.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/three-level-dependent-chart/umbrella/charts/app3/templates/service.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/three-level-dependent-chart/umbrella/charts/app3/values.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/three-level-dependent-chart/umbrella/charts/app4/Chart.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/three-level-dependent-chart/umbrella/charts/app4/charts/library/Chart.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/three-level-dependent-chart/umbrella/charts/app4/charts/library/templates/service.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/three-level-dependent-chart/umbrella/charts/app4/charts/library/values.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/three-level-dependent-chart/umbrella/charts/app4/templates/service.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/three-level-dependent-chart/umbrella/charts/app4/values.yaml (100%) rename pkg/{chartutil => chart/util}/testdata/three-level-dependent-chart/umbrella/values.yaml (100%) rename pkg/{chartutil => chart/util}/validate_name.go (99%) rename pkg/{chartutil => chart/util}/validate_name_test.go (99%) rename pkg/{chartutil => chart/util}/values.go (99%) rename pkg/{chartutil => chart/util}/values_test.go (99%) diff --git a/Makefile b/Makefile index f1fcbfb08..d2c82b033 100644 --- a/Makefile +++ b/Makefile @@ -65,8 +65,8 @@ K8S_MODULES_MINOR_VER=$(word 2,$(K8S_MODULES_VER)) LDFLAGS += -X helm.sh/helm/v4/pkg/lint/rules.k8sVersionMajor=$(K8S_MODULES_MAJOR_VER) LDFLAGS += -X helm.sh/helm/v4/pkg/lint/rules.k8sVersionMinor=$(K8S_MODULES_MINOR_VER) -LDFLAGS += -X helm.sh/helm/v4/pkg/chartutil.k8sVersionMajor=$(K8S_MODULES_MAJOR_VER) -LDFLAGS += -X helm.sh/helm/v4/pkg/chartutil.k8sVersionMinor=$(K8S_MODULES_MINOR_VER) +LDFLAGS += -X helm.sh/helm/v4/pkg/chart/util.k8sVersionMajor=$(K8S_MODULES_MAJOR_VER) +LDFLAGS += -X helm.sh/helm/v4/pkg/chart/util.k8sVersionMinor=$(K8S_MODULES_MINOR_VER) .PHONY: all all: build diff --git a/cmd/helm/create.go b/cmd/helm/create.go index 29beca303..a18f2c915 100644 --- a/cmd/helm/create.go +++ b/cmd/helm/create.go @@ -25,7 +25,7 @@ import ( "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/chart" - "helm.sh/helm/v4/pkg/chartutil" + chartutil "helm.sh/helm/v4/pkg/chart/util" "helm.sh/helm/v4/pkg/helmpath" ) diff --git a/cmd/helm/create_test.go b/cmd/helm/create_test.go index 88d9c315a..76fce804c 100644 --- a/cmd/helm/create_test.go +++ b/cmd/helm/create_test.go @@ -25,7 +25,7 @@ import ( "helm.sh/helm/v4/internal/test/ensure" "helm.sh/helm/v4/pkg/chart" "helm.sh/helm/v4/pkg/chart/loader" - "helm.sh/helm/v4/pkg/chartutil" + chartutil "helm.sh/helm/v4/pkg/chart/util" "helm.sh/helm/v4/pkg/helmpath" ) diff --git a/cmd/helm/dependency_build_test.go b/cmd/helm/dependency_build_test.go index 1258db3f8..76c01d911 100644 --- a/cmd/helm/dependency_build_test.go +++ b/cmd/helm/dependency_build_test.go @@ -22,7 +22,7 @@ import ( "strings" "testing" - "helm.sh/helm/v4/pkg/chartutil" + chartutil "helm.sh/helm/v4/pkg/chart/util" "helm.sh/helm/v4/pkg/provenance" "helm.sh/helm/v4/pkg/repo" "helm.sh/helm/v4/pkg/repo/repotest" diff --git a/cmd/helm/dependency_update_test.go b/cmd/helm/dependency_update_test.go index 7cf3e8e0a..0732ba7b5 100644 --- a/cmd/helm/dependency_update_test.go +++ b/cmd/helm/dependency_update_test.go @@ -24,7 +24,7 @@ import ( "helm.sh/helm/v4/internal/test/ensure" "helm.sh/helm/v4/pkg/chart" - "helm.sh/helm/v4/pkg/chartutil" + chartutil "helm.sh/helm/v4/pkg/chart/util" "helm.sh/helm/v4/pkg/helmpath" "helm.sh/helm/v4/pkg/provenance" "helm.sh/helm/v4/pkg/repo" diff --git a/cmd/helm/helm_test.go b/cmd/helm/helm_test.go index a20928b37..e7a05aecf 100644 --- a/cmd/helm/helm_test.go +++ b/cmd/helm/helm_test.go @@ -30,7 +30,7 @@ import ( "helm.sh/helm/v4/internal/test" "helm.sh/helm/v4/pkg/action" - "helm.sh/helm/v4/pkg/chartutil" + chartutil "helm.sh/helm/v4/pkg/chart/util" "helm.sh/helm/v4/pkg/cli" kubefake "helm.sh/helm/v4/pkg/kube/fake" "helm.sh/helm/v4/pkg/release" diff --git a/cmd/helm/lint.go b/cmd/helm/lint.go index 9a3f7a2fc..3e37922b2 100644 --- a/cmd/helm/lint.go +++ b/cmd/helm/lint.go @@ -27,7 +27,7 @@ import ( "github.com/spf13/cobra" "helm.sh/helm/v4/pkg/action" - "helm.sh/helm/v4/pkg/chartutil" + chartutil "helm.sh/helm/v4/pkg/chart/util" "helm.sh/helm/v4/pkg/cli/values" "helm.sh/helm/v4/pkg/getter" "helm.sh/helm/v4/pkg/lint/support" diff --git a/cmd/helm/status.go b/cmd/helm/status.go index c56ff1f29..fd3e4ce14 100644 --- a/cmd/helm/status.go +++ b/cmd/helm/status.go @@ -30,7 +30,7 @@ import ( "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" - "helm.sh/helm/v4/pkg/chartutil" + chartutil "helm.sh/helm/v4/pkg/chart/util" "helm.sh/helm/v4/pkg/cli/output" "helm.sh/helm/v4/pkg/release" ) diff --git a/cmd/helm/template.go b/cmd/helm/template.go index 8cd91df32..1a6265eba 100644 --- a/cmd/helm/template.go +++ b/cmd/helm/template.go @@ -34,7 +34,7 @@ import ( "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" - "helm.sh/helm/v4/pkg/chartutil" + chartutil "helm.sh/helm/v4/pkg/chart/util" "helm.sh/helm/v4/pkg/cli/values" "helm.sh/helm/v4/pkg/releaseutil" ) diff --git a/cmd/helm/upgrade_test.go b/cmd/helm/upgrade_test.go index e3d41d7fa..f97a4a26b 100644 --- a/cmd/helm/upgrade_test.go +++ b/cmd/helm/upgrade_test.go @@ -26,7 +26,7 @@ import ( "helm.sh/helm/v4/pkg/chart" "helm.sh/helm/v4/pkg/chart/loader" - "helm.sh/helm/v4/pkg/chartutil" + chartutil "helm.sh/helm/v4/pkg/chart/util" "helm.sh/helm/v4/pkg/release" ) diff --git a/pkg/action/action.go b/pkg/action/action.go index 8418a4c27..fef4a91f5 100644 --- a/pkg/action/action.go +++ b/pkg/action/action.go @@ -33,7 +33,7 @@ import ( "k8s.io/client-go/rest" "helm.sh/helm/v4/pkg/chart" - "helm.sh/helm/v4/pkg/chartutil" + chartutil "helm.sh/helm/v4/pkg/chart/util" "helm.sh/helm/v4/pkg/engine" "helm.sh/helm/v4/pkg/kube" "helm.sh/helm/v4/pkg/postrender" diff --git a/pkg/action/action_test.go b/pkg/action/action_test.go index 71ea83789..8545b1edc 100644 --- a/pkg/action/action_test.go +++ b/pkg/action/action_test.go @@ -25,7 +25,7 @@ import ( fakeclientset "k8s.io/client-go/kubernetes/fake" "helm.sh/helm/v4/pkg/chart" - "helm.sh/helm/v4/pkg/chartutil" + chartutil "helm.sh/helm/v4/pkg/chart/util" kubefake "helm.sh/helm/v4/pkg/kube/fake" "helm.sh/helm/v4/pkg/registry" "helm.sh/helm/v4/pkg/release" diff --git a/pkg/action/dependency_test.go b/pkg/action/dependency_test.go index aee8c240f..38f2668ae 100644 --- a/pkg/action/dependency_test.go +++ b/pkg/action/dependency_test.go @@ -26,7 +26,7 @@ import ( "helm.sh/helm/v4/internal/test" "helm.sh/helm/v4/pkg/chart" - "helm.sh/helm/v4/pkg/chartutil" + chartutil "helm.sh/helm/v4/pkg/chart/util" ) func TestList(t *testing.T) { diff --git a/pkg/action/get_values.go b/pkg/action/get_values.go index aa399f76c..21253b7aa 100644 --- a/pkg/action/get_values.go +++ b/pkg/action/get_values.go @@ -17,7 +17,7 @@ limitations under the License. package action import ( - "helm.sh/helm/v4/pkg/chartutil" + chartutil "helm.sh/helm/v4/pkg/chart/util" ) // GetValues is the action for checking a given release's values. diff --git a/pkg/action/history.go b/pkg/action/history.go index 5f514a14a..1c5cfa86f 100644 --- a/pkg/action/history.go +++ b/pkg/action/history.go @@ -19,7 +19,7 @@ package action import ( "github.com/pkg/errors" - "helm.sh/helm/v4/pkg/chartutil" + chartutil "helm.sh/helm/v4/pkg/chart/util" "helm.sh/helm/v4/pkg/release" ) diff --git a/pkg/action/install.go b/pkg/action/install.go index ef3f0fdc7..6ad77a509 100644 --- a/pkg/action/install.go +++ b/pkg/action/install.go @@ -40,7 +40,7 @@ import ( "sigs.k8s.io/yaml" "helm.sh/helm/v4/pkg/chart" - "helm.sh/helm/v4/pkg/chartutil" + chartutil "helm.sh/helm/v4/pkg/chart/util" "helm.sh/helm/v4/pkg/cli" "helm.sh/helm/v4/pkg/downloader" "helm.sh/helm/v4/pkg/getter" diff --git a/pkg/action/install_test.go b/pkg/action/install_test.go index 9f738f0bc..171622e46 100644 --- a/pkg/action/install_test.go +++ b/pkg/action/install_test.go @@ -33,7 +33,7 @@ import ( "helm.sh/helm/v4/internal/test" "helm.sh/helm/v4/pkg/chart" - "helm.sh/helm/v4/pkg/chartutil" + chartutil "helm.sh/helm/v4/pkg/chart/util" kubefake "helm.sh/helm/v4/pkg/kube/fake" "helm.sh/helm/v4/pkg/release" "helm.sh/helm/v4/pkg/storage/driver" diff --git a/pkg/action/lint.go b/pkg/action/lint.go index 06fc48612..a6fd7c71c 100644 --- a/pkg/action/lint.go +++ b/pkg/action/lint.go @@ -23,7 +23,7 @@ import ( "github.com/pkg/errors" - "helm.sh/helm/v4/pkg/chartutil" + chartutil "helm.sh/helm/v4/pkg/chart/util" "helm.sh/helm/v4/pkg/lint" "helm.sh/helm/v4/pkg/lint/support" ) diff --git a/pkg/action/package.go b/pkg/action/package.go index 2e792a65c..8343ba109 100644 --- a/pkg/action/package.go +++ b/pkg/action/package.go @@ -27,7 +27,7 @@ import ( "golang.org/x/term" "helm.sh/helm/v4/pkg/chart/loader" - "helm.sh/helm/v4/pkg/chartutil" + chartutil "helm.sh/helm/v4/pkg/chart/util" "helm.sh/helm/v4/pkg/provenance" ) diff --git a/pkg/action/pull.go b/pkg/action/pull.go index 7fc1a9fdb..fa85fe242 100644 --- a/pkg/action/pull.go +++ b/pkg/action/pull.go @@ -24,7 +24,7 @@ import ( "github.com/pkg/errors" - "helm.sh/helm/v4/pkg/chartutil" + chartutil "helm.sh/helm/v4/pkg/chart/util" "helm.sh/helm/v4/pkg/cli" "helm.sh/helm/v4/pkg/downloader" "helm.sh/helm/v4/pkg/getter" diff --git a/pkg/action/release_testing.go b/pkg/action/release_testing.go index 1568b0683..a2c68ad64 100644 --- a/pkg/action/release_testing.go +++ b/pkg/action/release_testing.go @@ -27,7 +27,7 @@ import ( "github.com/pkg/errors" v1 "k8s.io/api/core/v1" - "helm.sh/helm/v4/pkg/chartutil" + chartutil "helm.sh/helm/v4/pkg/chart/util" "helm.sh/helm/v4/pkg/release" ) diff --git a/pkg/action/rollback.go b/pkg/action/rollback.go index 12dee35ce..961ef8377 100644 --- a/pkg/action/rollback.go +++ b/pkg/action/rollback.go @@ -24,7 +24,7 @@ import ( "github.com/pkg/errors" - "helm.sh/helm/v4/pkg/chartutil" + chartutil "helm.sh/helm/v4/pkg/chart/util" "helm.sh/helm/v4/pkg/release" helmtime "helm.sh/helm/v4/pkg/time" ) diff --git a/pkg/action/show.go b/pkg/action/show.go index 1aa9bf1d0..3b2722eef 100644 --- a/pkg/action/show.go +++ b/pkg/action/show.go @@ -27,7 +27,7 @@ import ( "helm.sh/helm/v4/pkg/chart" "helm.sh/helm/v4/pkg/chart/loader" - "helm.sh/helm/v4/pkg/chartutil" + chartutil "helm.sh/helm/v4/pkg/chart/util" "helm.sh/helm/v4/pkg/registry" ) diff --git a/pkg/action/uninstall.go b/pkg/action/uninstall.go index dda7d6978..b786c37f7 100644 --- a/pkg/action/uninstall.go +++ b/pkg/action/uninstall.go @@ -24,7 +24,7 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "helm.sh/helm/v4/pkg/chartutil" + chartutil "helm.sh/helm/v4/pkg/chart/util" "helm.sh/helm/v4/pkg/kube" "helm.sh/helm/v4/pkg/release" "helm.sh/helm/v4/pkg/releaseutil" diff --git a/pkg/action/upgrade.go b/pkg/action/upgrade.go index f3e9a33bc..c5397c984 100644 --- a/pkg/action/upgrade.go +++ b/pkg/action/upgrade.go @@ -29,7 +29,7 @@ import ( "k8s.io/cli-runtime/pkg/resource" "helm.sh/helm/v4/pkg/chart" - "helm.sh/helm/v4/pkg/chartutil" + chartutil "helm.sh/helm/v4/pkg/chart/util" "helm.sh/helm/v4/pkg/kube" "helm.sh/helm/v4/pkg/postrender" "helm.sh/helm/v4/pkg/registry" diff --git a/pkg/chartutil/capabilities.go b/pkg/chart/util/capabilities.go similarity index 99% rename from pkg/chartutil/capabilities.go rename to pkg/chart/util/capabilities.go index 6c1ebf24c..d4b420b2f 100644 --- a/pkg/chartutil/capabilities.go +++ b/pkg/chart/util/capabilities.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package chartutil +package util import ( "fmt" diff --git a/pkg/chartutil/capabilities_test.go b/pkg/chart/util/capabilities_test.go similarity index 99% rename from pkg/chartutil/capabilities_test.go rename to pkg/chart/util/capabilities_test.go index 502b0c7d5..aa9be9db8 100644 --- a/pkg/chartutil/capabilities_test.go +++ b/pkg/chart/util/capabilities_test.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package chartutil +package util import ( "testing" diff --git a/pkg/chartutil/chartfile.go b/pkg/chart/util/chartfile.go similarity index 99% rename from pkg/chartutil/chartfile.go rename to pkg/chart/util/chartfile.go index 596011ba3..acab80d0a 100644 --- a/pkg/chartutil/chartfile.go +++ b/pkg/chart/util/chartfile.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package chartutil +package util import ( "os" diff --git a/pkg/chartutil/chartfile_test.go b/pkg/chart/util/chartfile_test.go similarity index 99% rename from pkg/chartutil/chartfile_test.go rename to pkg/chart/util/chartfile_test.go index 595aee517..6eb599680 100644 --- a/pkg/chartutil/chartfile_test.go +++ b/pkg/chart/util/chartfile_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package chartutil +package util import ( "testing" diff --git a/pkg/chartutil/coalesce.go b/pkg/chart/util/coalesce.go similarity index 99% rename from pkg/chartutil/coalesce.go rename to pkg/chart/util/coalesce.go index a46936cc6..9ab5c1015 100644 --- a/pkg/chartutil/coalesce.go +++ b/pkg/chart/util/coalesce.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package chartutil +package util import ( "fmt" diff --git a/pkg/chartutil/coalesce_test.go b/pkg/chart/util/coalesce_test.go similarity index 99% rename from pkg/chartutil/coalesce_test.go rename to pkg/chart/util/coalesce_test.go index e207274d7..5a8dfe94a 100644 --- a/pkg/chartutil/coalesce_test.go +++ b/pkg/chart/util/coalesce_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package chartutil +package util import ( "encoding/json" diff --git a/pkg/chartutil/compatible.go b/pkg/chart/util/compatible.go similarity index 98% rename from pkg/chartutil/compatible.go rename to pkg/chart/util/compatible.go index f4656c913..d384d2d45 100644 --- a/pkg/chartutil/compatible.go +++ b/pkg/chart/util/compatible.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package chartutil +package util import "github.com/Masterminds/semver/v3" diff --git a/pkg/chartutil/compatible_test.go b/pkg/chart/util/compatible_test.go similarity index 98% rename from pkg/chartutil/compatible_test.go rename to pkg/chart/util/compatible_test.go index df7be6161..e17d33e35 100644 --- a/pkg/chartutil/compatible_test.go +++ b/pkg/chart/util/compatible_test.go @@ -15,7 +15,7 @@ limitations under the License. */ // Package version represents the current version of the project. -package chartutil +package util import "testing" diff --git a/pkg/chartutil/create.go b/pkg/chart/util/create.go similarity index 99% rename from pkg/chartutil/create.go rename to pkg/chart/util/create.go index 4f59b9f83..dfb5099f2 100644 --- a/pkg/chartutil/create.go +++ b/pkg/chart/util/create.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package chartutil +package util import ( "fmt" diff --git a/pkg/chartutil/create_test.go b/pkg/chart/util/create_test.go similarity index 99% rename from pkg/chartutil/create_test.go rename to pkg/chart/util/create_test.go index 8f8122f6f..e67ce3e1f 100644 --- a/pkg/chartutil/create_test.go +++ b/pkg/chart/util/create_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package chartutil +package util import ( "bytes" diff --git a/pkg/chartutil/dependencies.go b/pkg/chart/util/dependencies.go similarity index 99% rename from pkg/chartutil/dependencies.go rename to pkg/chart/util/dependencies.go index f0ba166d9..fb9052d71 100644 --- a/pkg/chartutil/dependencies.go +++ b/pkg/chart/util/dependencies.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package chartutil +package util import ( "log" diff --git a/pkg/chartutil/dependencies_test.go b/pkg/chart/util/dependencies_test.go similarity index 99% rename from pkg/chartutil/dependencies_test.go rename to pkg/chart/util/dependencies_test.go index ac8e4d76e..10fca265e 100644 --- a/pkg/chartutil/dependencies_test.go +++ b/pkg/chart/util/dependencies_test.go @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ -package chartutil +package util import ( "encoding/json" diff --git a/pkg/chartutil/doc.go b/pkg/chart/util/doc.go similarity index 92% rename from pkg/chartutil/doc.go rename to pkg/chart/util/doc.go index 6c0b1582b..587fcaeb1 100644 --- a/pkg/chartutil/doc.go +++ b/pkg/chart/util/doc.go @@ -15,7 +15,7 @@ limitations under the License. */ /* -Package chartutil contains tools for working with charts. +package util contains tools for working with charts. Charts are described in the chart package (pkg/chart). This package provides utilities for serializing and deserializing charts. @@ -42,4 +42,4 @@ into a Chart. When creating charts in memory, use the 'helm.sh/helm/pkg/chart' package directly. */ -package chartutil // import "helm.sh/helm/v4/pkg/chartutil" +package util // import chartutil "helm.sh/helm/v4/pkg/chart/util" diff --git a/pkg/chartutil/errors.go b/pkg/chart/util/errors.go similarity index 98% rename from pkg/chartutil/errors.go rename to pkg/chart/util/errors.go index 0a4046d2e..a175b9758 100644 --- a/pkg/chartutil/errors.go +++ b/pkg/chart/util/errors.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package chartutil +package util import ( "fmt" diff --git a/pkg/chartutil/errors_test.go b/pkg/chart/util/errors_test.go similarity index 97% rename from pkg/chartutil/errors_test.go rename to pkg/chart/util/errors_test.go index 3f63e3733..b8ae86384 100644 --- a/pkg/chartutil/errors_test.go +++ b/pkg/chart/util/errors_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package chartutil +package util import ( "testing" diff --git a/pkg/chartutil/expand.go b/pkg/chart/util/expand.go similarity index 99% rename from pkg/chartutil/expand.go rename to pkg/chart/util/expand.go index a9943252d..4b83bf584 100644 --- a/pkg/chartutil/expand.go +++ b/pkg/chart/util/expand.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package chartutil +package util import ( "io" diff --git a/pkg/chartutil/expand_test.go b/pkg/chart/util/expand_test.go similarity index 99% rename from pkg/chartutil/expand_test.go rename to pkg/chart/util/expand_test.go index b46ace01f..280995f7e 100644 --- a/pkg/chartutil/expand_test.go +++ b/pkg/chart/util/expand_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package chartutil +package util import ( "os" diff --git a/pkg/chartutil/jsonschema.go b/pkg/chart/util/jsonschema.go similarity index 99% rename from pkg/chartutil/jsonschema.go rename to pkg/chart/util/jsonschema.go index f1c8dcdf4..616c6d444 100644 --- a/pkg/chartutil/jsonschema.go +++ b/pkg/chart/util/jsonschema.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package chartutil +package util import ( "bytes" diff --git a/pkg/chartutil/jsonschema_test.go b/pkg/chart/util/jsonschema_test.go similarity index 99% rename from pkg/chartutil/jsonschema_test.go rename to pkg/chart/util/jsonschema_test.go index 098cf70db..c5600044a 100644 --- a/pkg/chartutil/jsonschema_test.go +++ b/pkg/chart/util/jsonschema_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package chartutil +package util import ( "os" diff --git a/pkg/chartutil/save.go b/pkg/chart/util/save.go similarity index 99% rename from pkg/chartutil/save.go rename to pkg/chart/util/save.go index 0dddad912..635ff7944 100644 --- a/pkg/chartutil/save.go +++ b/pkg/chart/util/save.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package chartutil +package util import ( "archive/tar" diff --git a/pkg/chartutil/save_test.go b/pkg/chart/util/save_test.go similarity index 99% rename from pkg/chartutil/save_test.go rename to pkg/chart/util/save_test.go index 3789b6617..a7338c8d7 100644 --- a/pkg/chartutil/save_test.go +++ b/pkg/chart/util/save_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package chartutil +package util import ( "archive/tar" diff --git a/pkg/chartutil/testdata/chartfiletest.yaml b/pkg/chart/util/testdata/chartfiletest.yaml similarity index 100% rename from pkg/chartutil/testdata/chartfiletest.yaml rename to pkg/chart/util/testdata/chartfiletest.yaml diff --git a/pkg/chartutil/testdata/coleridge.yaml b/pkg/chart/util/testdata/coleridge.yaml similarity index 100% rename from pkg/chartutil/testdata/coleridge.yaml rename to pkg/chart/util/testdata/coleridge.yaml diff --git a/pkg/chartutil/testdata/dependent-chart-alias/.helmignore b/pkg/chart/util/testdata/dependent-chart-alias/.helmignore similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-alias/.helmignore rename to pkg/chart/util/testdata/dependent-chart-alias/.helmignore diff --git a/pkg/chartutil/testdata/dependent-chart-alias/Chart.lock b/pkg/chart/util/testdata/dependent-chart-alias/Chart.lock similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-alias/Chart.lock rename to pkg/chart/util/testdata/dependent-chart-alias/Chart.lock diff --git a/pkg/chartutil/testdata/dependent-chart-alias/Chart.yaml b/pkg/chart/util/testdata/dependent-chart-alias/Chart.yaml similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-alias/Chart.yaml rename to pkg/chart/util/testdata/dependent-chart-alias/Chart.yaml diff --git a/pkg/chartutil/testdata/dependent-chart-alias/INSTALL.txt b/pkg/chart/util/testdata/dependent-chart-alias/INSTALL.txt similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-alias/INSTALL.txt rename to pkg/chart/util/testdata/dependent-chart-alias/INSTALL.txt diff --git a/pkg/chartutil/testdata/dependent-chart-alias/LICENSE b/pkg/chart/util/testdata/dependent-chart-alias/LICENSE similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-alias/LICENSE rename to pkg/chart/util/testdata/dependent-chart-alias/LICENSE diff --git a/pkg/chartutil/testdata/dependent-chart-alias/README.md b/pkg/chart/util/testdata/dependent-chart-alias/README.md similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-alias/README.md rename to pkg/chart/util/testdata/dependent-chart-alias/README.md diff --git a/pkg/chartutil/testdata/dependent-chart-alias/charts/_ignore_me b/pkg/chart/util/testdata/dependent-chart-alias/charts/_ignore_me similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-alias/charts/_ignore_me rename to pkg/chart/util/testdata/dependent-chart-alias/charts/_ignore_me diff --git a/pkg/chartutil/testdata/dependent-chart-alias/charts/alpine/Chart.yaml b/pkg/chart/util/testdata/dependent-chart-alias/charts/alpine/Chart.yaml similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-alias/charts/alpine/Chart.yaml rename to pkg/chart/util/testdata/dependent-chart-alias/charts/alpine/Chart.yaml diff --git a/pkg/chartutil/testdata/dependent-chart-alias/charts/alpine/README.md b/pkg/chart/util/testdata/dependent-chart-alias/charts/alpine/README.md similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-alias/charts/alpine/README.md rename to pkg/chart/util/testdata/dependent-chart-alias/charts/alpine/README.md diff --git a/pkg/chartutil/testdata/dependent-chart-alias/charts/alpine/charts/mast1/Chart.yaml b/pkg/chart/util/testdata/dependent-chart-alias/charts/alpine/charts/mast1/Chart.yaml similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-alias/charts/alpine/charts/mast1/Chart.yaml rename to pkg/chart/util/testdata/dependent-chart-alias/charts/alpine/charts/mast1/Chart.yaml diff --git a/pkg/chartutil/testdata/dependent-chart-alias/charts/alpine/charts/mast1/values.yaml b/pkg/chart/util/testdata/dependent-chart-alias/charts/alpine/charts/mast1/values.yaml similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-alias/charts/alpine/charts/mast1/values.yaml rename to pkg/chart/util/testdata/dependent-chart-alias/charts/alpine/charts/mast1/values.yaml diff --git a/pkg/chartutil/testdata/dependent-chart-alias/charts/alpine/charts/mast2-0.1.0.tgz b/pkg/chart/util/testdata/dependent-chart-alias/charts/alpine/charts/mast2-0.1.0.tgz similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-alias/charts/alpine/charts/mast2-0.1.0.tgz rename to pkg/chart/util/testdata/dependent-chart-alias/charts/alpine/charts/mast2-0.1.0.tgz diff --git a/pkg/chartutil/testdata/dependent-chart-alias/charts/alpine/templates/alpine-pod.yaml b/pkg/chart/util/testdata/dependent-chart-alias/charts/alpine/templates/alpine-pod.yaml similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-alias/charts/alpine/templates/alpine-pod.yaml rename to pkg/chart/util/testdata/dependent-chart-alias/charts/alpine/templates/alpine-pod.yaml diff --git a/pkg/chartutil/testdata/dependent-chart-alias/charts/alpine/values.yaml b/pkg/chart/util/testdata/dependent-chart-alias/charts/alpine/values.yaml similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-alias/charts/alpine/values.yaml rename to pkg/chart/util/testdata/dependent-chart-alias/charts/alpine/values.yaml diff --git a/pkg/chartutil/testdata/dependent-chart-alias/charts/mariner-4.3.2.tgz b/pkg/chart/util/testdata/dependent-chart-alias/charts/mariner-4.3.2.tgz similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-alias/charts/mariner-4.3.2.tgz rename to pkg/chart/util/testdata/dependent-chart-alias/charts/mariner-4.3.2.tgz diff --git a/pkg/chartutil/testdata/dependent-chart-alias/docs/README.md b/pkg/chart/util/testdata/dependent-chart-alias/docs/README.md similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-alias/docs/README.md rename to pkg/chart/util/testdata/dependent-chart-alias/docs/README.md diff --git a/pkg/chartutil/testdata/dependent-chart-alias/icon.svg b/pkg/chart/util/testdata/dependent-chart-alias/icon.svg similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-alias/icon.svg rename to pkg/chart/util/testdata/dependent-chart-alias/icon.svg diff --git a/pkg/chartutil/testdata/dependent-chart-alias/ignore/me.txt b/pkg/chart/util/testdata/dependent-chart-alias/ignore/me.txt similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-alias/ignore/me.txt rename to pkg/chart/util/testdata/dependent-chart-alias/ignore/me.txt diff --git a/pkg/chartutil/testdata/dependent-chart-alias/templates/template.tpl b/pkg/chart/util/testdata/dependent-chart-alias/templates/template.tpl similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-alias/templates/template.tpl rename to pkg/chart/util/testdata/dependent-chart-alias/templates/template.tpl diff --git a/pkg/chartutil/testdata/dependent-chart-alias/values.yaml b/pkg/chart/util/testdata/dependent-chart-alias/values.yaml similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-alias/values.yaml rename to pkg/chart/util/testdata/dependent-chart-alias/values.yaml diff --git a/pkg/chartutil/testdata/dependent-chart-helmignore/.helmignore b/pkg/chart/util/testdata/dependent-chart-helmignore/.helmignore similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-helmignore/.helmignore rename to pkg/chart/util/testdata/dependent-chart-helmignore/.helmignore diff --git a/pkg/chartutil/testdata/dependent-chart-helmignore/Chart.yaml b/pkg/chart/util/testdata/dependent-chart-helmignore/Chart.yaml similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-helmignore/Chart.yaml rename to pkg/chart/util/testdata/dependent-chart-helmignore/Chart.yaml diff --git a/pkg/chartutil/testdata/dependent-chart-helmignore/charts/.ignore_me b/pkg/chart/util/testdata/dependent-chart-helmignore/charts/.ignore_me similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-helmignore/charts/.ignore_me rename to pkg/chart/util/testdata/dependent-chart-helmignore/charts/.ignore_me diff --git a/pkg/chartutil/testdata/dependent-chart-helmignore/charts/_ignore_me b/pkg/chart/util/testdata/dependent-chart-helmignore/charts/_ignore_me similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-helmignore/charts/_ignore_me rename to pkg/chart/util/testdata/dependent-chart-helmignore/charts/_ignore_me diff --git a/pkg/chartutil/testdata/dependent-chart-helmignore/charts/alpine/Chart.yaml b/pkg/chart/util/testdata/dependent-chart-helmignore/charts/alpine/Chart.yaml similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-helmignore/charts/alpine/Chart.yaml rename to pkg/chart/util/testdata/dependent-chart-helmignore/charts/alpine/Chart.yaml diff --git a/pkg/chartutil/testdata/dependent-chart-helmignore/charts/alpine/README.md b/pkg/chart/util/testdata/dependent-chart-helmignore/charts/alpine/README.md similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-helmignore/charts/alpine/README.md rename to pkg/chart/util/testdata/dependent-chart-helmignore/charts/alpine/README.md diff --git a/pkg/chartutil/testdata/dependent-chart-helmignore/charts/alpine/charts/mast1/Chart.yaml b/pkg/chart/util/testdata/dependent-chart-helmignore/charts/alpine/charts/mast1/Chart.yaml similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-helmignore/charts/alpine/charts/mast1/Chart.yaml rename to pkg/chart/util/testdata/dependent-chart-helmignore/charts/alpine/charts/mast1/Chart.yaml diff --git a/pkg/chartutil/testdata/dependent-chart-helmignore/charts/alpine/charts/mast1/values.yaml b/pkg/chart/util/testdata/dependent-chart-helmignore/charts/alpine/charts/mast1/values.yaml similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-helmignore/charts/alpine/charts/mast1/values.yaml rename to pkg/chart/util/testdata/dependent-chart-helmignore/charts/alpine/charts/mast1/values.yaml diff --git a/pkg/chartutil/testdata/dependent-chart-helmignore/charts/alpine/charts/mast2-0.1.0.tgz b/pkg/chart/util/testdata/dependent-chart-helmignore/charts/alpine/charts/mast2-0.1.0.tgz similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-helmignore/charts/alpine/charts/mast2-0.1.0.tgz rename to pkg/chart/util/testdata/dependent-chart-helmignore/charts/alpine/charts/mast2-0.1.0.tgz diff --git a/pkg/chartutil/testdata/dependent-chart-helmignore/charts/alpine/templates/alpine-pod.yaml b/pkg/chart/util/testdata/dependent-chart-helmignore/charts/alpine/templates/alpine-pod.yaml similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-helmignore/charts/alpine/templates/alpine-pod.yaml rename to pkg/chart/util/testdata/dependent-chart-helmignore/charts/alpine/templates/alpine-pod.yaml diff --git a/pkg/chartutil/testdata/dependent-chart-helmignore/charts/alpine/values.yaml b/pkg/chart/util/testdata/dependent-chart-helmignore/charts/alpine/values.yaml similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-helmignore/charts/alpine/values.yaml rename to pkg/chart/util/testdata/dependent-chart-helmignore/charts/alpine/values.yaml diff --git a/pkg/chartutil/testdata/dependent-chart-helmignore/templates/template.tpl b/pkg/chart/util/testdata/dependent-chart-helmignore/templates/template.tpl similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-helmignore/templates/template.tpl rename to pkg/chart/util/testdata/dependent-chart-helmignore/templates/template.tpl diff --git a/pkg/chartutil/testdata/dependent-chart-helmignore/values.yaml b/pkg/chart/util/testdata/dependent-chart-helmignore/values.yaml similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-helmignore/values.yaml rename to pkg/chart/util/testdata/dependent-chart-helmignore/values.yaml diff --git a/pkg/chartutil/testdata/dependent-chart-no-requirements-yaml/.helmignore b/pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/.helmignore similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-no-requirements-yaml/.helmignore rename to pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/.helmignore diff --git a/pkg/chartutil/testdata/dependent-chart-no-requirements-yaml/Chart.yaml b/pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/Chart.yaml similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-no-requirements-yaml/Chart.yaml rename to pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/Chart.yaml diff --git a/pkg/chartutil/testdata/dependent-chart-no-requirements-yaml/INSTALL.txt b/pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/INSTALL.txt similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-no-requirements-yaml/INSTALL.txt rename to pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/INSTALL.txt diff --git a/pkg/chartutil/testdata/dependent-chart-no-requirements-yaml/LICENSE b/pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/LICENSE similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-no-requirements-yaml/LICENSE rename to pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/LICENSE diff --git a/pkg/chartutil/testdata/dependent-chart-no-requirements-yaml/README.md b/pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/README.md similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-no-requirements-yaml/README.md rename to pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/README.md diff --git a/pkg/chartutil/testdata/dependent-chart-no-requirements-yaml/charts/_ignore_me b/pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/charts/_ignore_me similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-no-requirements-yaml/charts/_ignore_me rename to pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/charts/_ignore_me diff --git a/pkg/chartutil/testdata/dependent-chart-no-requirements-yaml/charts/alpine/Chart.yaml b/pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/charts/alpine/Chart.yaml similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-no-requirements-yaml/charts/alpine/Chart.yaml rename to pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/charts/alpine/Chart.yaml diff --git a/pkg/chartutil/testdata/dependent-chart-no-requirements-yaml/charts/alpine/README.md b/pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/charts/alpine/README.md similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-no-requirements-yaml/charts/alpine/README.md rename to pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/charts/alpine/README.md diff --git a/pkg/chartutil/testdata/dependent-chart-no-requirements-yaml/charts/alpine/charts/mast1/Chart.yaml b/pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/charts/alpine/charts/mast1/Chart.yaml similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-no-requirements-yaml/charts/alpine/charts/mast1/Chart.yaml rename to pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/charts/alpine/charts/mast1/Chart.yaml diff --git a/pkg/chartutil/testdata/dependent-chart-no-requirements-yaml/charts/alpine/charts/mast1/values.yaml b/pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/charts/alpine/charts/mast1/values.yaml similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-no-requirements-yaml/charts/alpine/charts/mast1/values.yaml rename to pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/charts/alpine/charts/mast1/values.yaml diff --git a/pkg/chartutil/testdata/dependent-chart-no-requirements-yaml/charts/alpine/charts/mast2-0.1.0.tgz b/pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/charts/alpine/charts/mast2-0.1.0.tgz similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-no-requirements-yaml/charts/alpine/charts/mast2-0.1.0.tgz rename to pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/charts/alpine/charts/mast2-0.1.0.tgz diff --git a/pkg/chartutil/testdata/dependent-chart-no-requirements-yaml/charts/alpine/templates/alpine-pod.yaml b/pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/charts/alpine/templates/alpine-pod.yaml similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-no-requirements-yaml/charts/alpine/templates/alpine-pod.yaml rename to pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/charts/alpine/templates/alpine-pod.yaml diff --git a/pkg/chartutil/testdata/dependent-chart-no-requirements-yaml/charts/alpine/values.yaml b/pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/charts/alpine/values.yaml similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-no-requirements-yaml/charts/alpine/values.yaml rename to pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/charts/alpine/values.yaml diff --git a/pkg/chartutil/testdata/dependent-chart-no-requirements-yaml/charts/mariner-4.3.2.tgz b/pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/charts/mariner-4.3.2.tgz similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-no-requirements-yaml/charts/mariner-4.3.2.tgz rename to pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/charts/mariner-4.3.2.tgz diff --git a/pkg/chartutil/testdata/dependent-chart-no-requirements-yaml/docs/README.md b/pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/docs/README.md similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-no-requirements-yaml/docs/README.md rename to pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/docs/README.md diff --git a/pkg/chartutil/testdata/dependent-chart-no-requirements-yaml/icon.svg b/pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/icon.svg similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-no-requirements-yaml/icon.svg rename to pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/icon.svg diff --git a/pkg/chartutil/testdata/dependent-chart-no-requirements-yaml/ignore/me.txt b/pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/ignore/me.txt similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-no-requirements-yaml/ignore/me.txt rename to pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/ignore/me.txt diff --git a/pkg/chartutil/testdata/dependent-chart-no-requirements-yaml/templates/template.tpl b/pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/templates/template.tpl similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-no-requirements-yaml/templates/template.tpl rename to pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/templates/template.tpl diff --git a/pkg/chartutil/testdata/dependent-chart-no-requirements-yaml/values.yaml b/pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/values.yaml similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-no-requirements-yaml/values.yaml rename to pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/values.yaml diff --git a/pkg/chartutil/testdata/dependent-chart-with-all-in-requirements-yaml/.helmignore b/pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/.helmignore similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-with-all-in-requirements-yaml/.helmignore rename to pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/.helmignore diff --git a/pkg/chartutil/testdata/dependent-chart-with-all-in-requirements-yaml/Chart.yaml b/pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/Chart.yaml similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-with-all-in-requirements-yaml/Chart.yaml rename to pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/Chart.yaml diff --git a/pkg/chartutil/testdata/dependent-chart-with-all-in-requirements-yaml/INSTALL.txt b/pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/INSTALL.txt similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-with-all-in-requirements-yaml/INSTALL.txt rename to pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/INSTALL.txt diff --git a/pkg/chartutil/testdata/dependent-chart-with-all-in-requirements-yaml/LICENSE b/pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/LICENSE similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-with-all-in-requirements-yaml/LICENSE rename to pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/LICENSE diff --git a/pkg/chartutil/testdata/dependent-chart-with-all-in-requirements-yaml/README.md b/pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/README.md similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-with-all-in-requirements-yaml/README.md rename to pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/README.md diff --git a/pkg/chartutil/testdata/dependent-chart-with-all-in-requirements-yaml/charts/_ignore_me b/pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/_ignore_me similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-with-all-in-requirements-yaml/charts/_ignore_me rename to pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/_ignore_me diff --git a/pkg/chartutil/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/Chart.yaml b/pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/Chart.yaml similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/Chart.yaml rename to pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/Chart.yaml diff --git a/pkg/chartutil/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/README.md b/pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/README.md similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/README.md rename to pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/README.md diff --git a/pkg/chartutil/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/charts/mast1/Chart.yaml b/pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/charts/mast1/Chart.yaml similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/charts/mast1/Chart.yaml rename to pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/charts/mast1/Chart.yaml diff --git a/pkg/chartutil/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/charts/mast1/values.yaml b/pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/charts/mast1/values.yaml similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/charts/mast1/values.yaml rename to pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/charts/mast1/values.yaml diff --git a/pkg/chartutil/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/charts/mast2-0.1.0.tgz b/pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/charts/mast2-0.1.0.tgz similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/charts/mast2-0.1.0.tgz rename to pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/charts/mast2-0.1.0.tgz diff --git a/pkg/chartutil/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/templates/alpine-pod.yaml b/pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/templates/alpine-pod.yaml similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/templates/alpine-pod.yaml rename to pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/templates/alpine-pod.yaml diff --git a/pkg/chartutil/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/values.yaml b/pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/values.yaml similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/values.yaml rename to pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/values.yaml diff --git a/pkg/chartutil/testdata/dependent-chart-with-all-in-requirements-yaml/charts/mariner-4.3.2.tgz b/pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/mariner-4.3.2.tgz similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-with-all-in-requirements-yaml/charts/mariner-4.3.2.tgz rename to pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/mariner-4.3.2.tgz diff --git a/pkg/chartutil/testdata/dependent-chart-with-all-in-requirements-yaml/docs/README.md b/pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/docs/README.md similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-with-all-in-requirements-yaml/docs/README.md rename to pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/docs/README.md diff --git a/pkg/chartutil/testdata/dependent-chart-with-all-in-requirements-yaml/icon.svg b/pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/icon.svg similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-with-all-in-requirements-yaml/icon.svg rename to pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/icon.svg diff --git a/pkg/chartutil/testdata/dependent-chart-with-all-in-requirements-yaml/ignore/me.txt b/pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/ignore/me.txt similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-with-all-in-requirements-yaml/ignore/me.txt rename to pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/ignore/me.txt diff --git a/pkg/chartutil/testdata/dependent-chart-with-all-in-requirements-yaml/templates/template.tpl b/pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/templates/template.tpl similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-with-all-in-requirements-yaml/templates/template.tpl rename to pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/templates/template.tpl diff --git a/pkg/chartutil/testdata/dependent-chart-with-all-in-requirements-yaml/values.yaml b/pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/values.yaml similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-with-all-in-requirements-yaml/values.yaml rename to pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/values.yaml diff --git a/pkg/chartutil/testdata/dependent-chart-with-mixed-requirements-yaml/.helmignore b/pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/.helmignore similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-with-mixed-requirements-yaml/.helmignore rename to pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/.helmignore diff --git a/pkg/chartutil/testdata/dependent-chart-with-mixed-requirements-yaml/Chart.yaml b/pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/Chart.yaml similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-with-mixed-requirements-yaml/Chart.yaml rename to pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/Chart.yaml diff --git a/pkg/chartutil/testdata/dependent-chart-with-mixed-requirements-yaml/INSTALL.txt b/pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/INSTALL.txt similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-with-mixed-requirements-yaml/INSTALL.txt rename to pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/INSTALL.txt diff --git a/pkg/chartutil/testdata/dependent-chart-with-mixed-requirements-yaml/LICENSE b/pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/LICENSE similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-with-mixed-requirements-yaml/LICENSE rename to pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/LICENSE diff --git a/pkg/chartutil/testdata/dependent-chart-with-mixed-requirements-yaml/README.md b/pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/README.md similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-with-mixed-requirements-yaml/README.md rename to pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/README.md diff --git a/pkg/chartutil/testdata/dependent-chart-with-mixed-requirements-yaml/charts/_ignore_me b/pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/_ignore_me similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-with-mixed-requirements-yaml/charts/_ignore_me rename to pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/_ignore_me diff --git a/pkg/chartutil/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/Chart.yaml b/pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/Chart.yaml similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/Chart.yaml rename to pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/Chart.yaml diff --git a/pkg/chartutil/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/README.md b/pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/README.md similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/README.md rename to pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/README.md diff --git a/pkg/chartutil/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/charts/mast1/Chart.yaml b/pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/charts/mast1/Chart.yaml similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/charts/mast1/Chart.yaml rename to pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/charts/mast1/Chart.yaml diff --git a/pkg/chartutil/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/charts/mast1/values.yaml b/pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/charts/mast1/values.yaml similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/charts/mast1/values.yaml rename to pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/charts/mast1/values.yaml diff --git a/pkg/chartutil/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/charts/mast2-0.1.0.tgz b/pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/charts/mast2-0.1.0.tgz similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/charts/mast2-0.1.0.tgz rename to pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/charts/mast2-0.1.0.tgz diff --git a/pkg/chartutil/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/templates/alpine-pod.yaml b/pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/templates/alpine-pod.yaml similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/templates/alpine-pod.yaml rename to pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/templates/alpine-pod.yaml diff --git a/pkg/chartutil/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/values.yaml b/pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/values.yaml similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/values.yaml rename to pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/values.yaml diff --git a/pkg/chartutil/testdata/dependent-chart-with-mixed-requirements-yaml/charts/mariner-4.3.2.tgz b/pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/mariner-4.3.2.tgz similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-with-mixed-requirements-yaml/charts/mariner-4.3.2.tgz rename to pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/mariner-4.3.2.tgz diff --git a/pkg/chartutil/testdata/dependent-chart-with-mixed-requirements-yaml/docs/README.md b/pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/docs/README.md similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-with-mixed-requirements-yaml/docs/README.md rename to pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/docs/README.md diff --git a/pkg/chartutil/testdata/dependent-chart-with-mixed-requirements-yaml/icon.svg b/pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/icon.svg similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-with-mixed-requirements-yaml/icon.svg rename to pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/icon.svg diff --git a/pkg/chartutil/testdata/dependent-chart-with-mixed-requirements-yaml/ignore/me.txt b/pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/ignore/me.txt similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-with-mixed-requirements-yaml/ignore/me.txt rename to pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/ignore/me.txt diff --git a/pkg/chartutil/testdata/dependent-chart-with-mixed-requirements-yaml/templates/template.tpl b/pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/templates/template.tpl similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-with-mixed-requirements-yaml/templates/template.tpl rename to pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/templates/template.tpl diff --git a/pkg/chartutil/testdata/dependent-chart-with-mixed-requirements-yaml/values.yaml b/pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/values.yaml similarity index 100% rename from pkg/chartutil/testdata/dependent-chart-with-mixed-requirements-yaml/values.yaml rename to pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/values.yaml diff --git a/pkg/chartutil/testdata/frobnitz-1.2.3.tgz b/pkg/chart/util/testdata/frobnitz-1.2.3.tgz similarity index 100% rename from pkg/chartutil/testdata/frobnitz-1.2.3.tgz rename to pkg/chart/util/testdata/frobnitz-1.2.3.tgz diff --git a/pkg/chartutil/testdata/frobnitz/.helmignore b/pkg/chart/util/testdata/frobnitz/.helmignore similarity index 100% rename from pkg/chartutil/testdata/frobnitz/.helmignore rename to pkg/chart/util/testdata/frobnitz/.helmignore diff --git a/pkg/chartutil/testdata/frobnitz/Chart.lock b/pkg/chart/util/testdata/frobnitz/Chart.lock similarity index 100% rename from pkg/chartutil/testdata/frobnitz/Chart.lock rename to pkg/chart/util/testdata/frobnitz/Chart.lock diff --git a/pkg/chartutil/testdata/frobnitz/Chart.yaml b/pkg/chart/util/testdata/frobnitz/Chart.yaml similarity index 100% rename from pkg/chartutil/testdata/frobnitz/Chart.yaml rename to pkg/chart/util/testdata/frobnitz/Chart.yaml diff --git a/pkg/chartutil/testdata/frobnitz/INSTALL.txt b/pkg/chart/util/testdata/frobnitz/INSTALL.txt similarity index 100% rename from pkg/chartutil/testdata/frobnitz/INSTALL.txt rename to pkg/chart/util/testdata/frobnitz/INSTALL.txt diff --git a/pkg/chartutil/testdata/frobnitz/LICENSE b/pkg/chart/util/testdata/frobnitz/LICENSE similarity index 100% rename from pkg/chartutil/testdata/frobnitz/LICENSE rename to pkg/chart/util/testdata/frobnitz/LICENSE diff --git a/pkg/chartutil/testdata/frobnitz/README.md b/pkg/chart/util/testdata/frobnitz/README.md similarity index 100% rename from pkg/chartutil/testdata/frobnitz/README.md rename to pkg/chart/util/testdata/frobnitz/README.md diff --git a/pkg/chartutil/testdata/frobnitz/charts/_ignore_me b/pkg/chart/util/testdata/frobnitz/charts/_ignore_me similarity index 100% rename from pkg/chartutil/testdata/frobnitz/charts/_ignore_me rename to pkg/chart/util/testdata/frobnitz/charts/_ignore_me diff --git a/pkg/chartutil/testdata/frobnitz/charts/alpine/Chart.yaml b/pkg/chart/util/testdata/frobnitz/charts/alpine/Chart.yaml similarity index 100% rename from pkg/chartutil/testdata/frobnitz/charts/alpine/Chart.yaml rename to pkg/chart/util/testdata/frobnitz/charts/alpine/Chart.yaml diff --git a/pkg/chartutil/testdata/frobnitz/charts/alpine/README.md b/pkg/chart/util/testdata/frobnitz/charts/alpine/README.md similarity index 100% rename from pkg/chartutil/testdata/frobnitz/charts/alpine/README.md rename to pkg/chart/util/testdata/frobnitz/charts/alpine/README.md diff --git a/pkg/chartutil/testdata/frobnitz/charts/alpine/charts/mast1/Chart.yaml b/pkg/chart/util/testdata/frobnitz/charts/alpine/charts/mast1/Chart.yaml similarity index 100% rename from pkg/chartutil/testdata/frobnitz/charts/alpine/charts/mast1/Chart.yaml rename to pkg/chart/util/testdata/frobnitz/charts/alpine/charts/mast1/Chart.yaml diff --git a/pkg/chartutil/testdata/frobnitz/charts/alpine/charts/mast1/values.yaml b/pkg/chart/util/testdata/frobnitz/charts/alpine/charts/mast1/values.yaml similarity index 100% rename from pkg/chartutil/testdata/frobnitz/charts/alpine/charts/mast1/values.yaml rename to pkg/chart/util/testdata/frobnitz/charts/alpine/charts/mast1/values.yaml diff --git a/pkg/chartutil/testdata/frobnitz/charts/alpine/charts/mast2-0.1.0.tgz b/pkg/chart/util/testdata/frobnitz/charts/alpine/charts/mast2-0.1.0.tgz similarity index 100% rename from pkg/chartutil/testdata/frobnitz/charts/alpine/charts/mast2-0.1.0.tgz rename to pkg/chart/util/testdata/frobnitz/charts/alpine/charts/mast2-0.1.0.tgz diff --git a/pkg/chartutil/testdata/frobnitz/charts/alpine/templates/alpine-pod.yaml b/pkg/chart/util/testdata/frobnitz/charts/alpine/templates/alpine-pod.yaml similarity index 100% rename from pkg/chartutil/testdata/frobnitz/charts/alpine/templates/alpine-pod.yaml rename to pkg/chart/util/testdata/frobnitz/charts/alpine/templates/alpine-pod.yaml diff --git a/pkg/chartutil/testdata/frobnitz/charts/alpine/values.yaml b/pkg/chart/util/testdata/frobnitz/charts/alpine/values.yaml similarity index 100% rename from pkg/chartutil/testdata/frobnitz/charts/alpine/values.yaml rename to pkg/chart/util/testdata/frobnitz/charts/alpine/values.yaml diff --git a/pkg/chartutil/testdata/frobnitz/charts/mariner/Chart.yaml b/pkg/chart/util/testdata/frobnitz/charts/mariner/Chart.yaml similarity index 100% rename from pkg/chartutil/testdata/frobnitz/charts/mariner/Chart.yaml rename to pkg/chart/util/testdata/frobnitz/charts/mariner/Chart.yaml diff --git a/pkg/chartutil/testdata/frobnitz/charts/mariner/charts/albatross/Chart.yaml b/pkg/chart/util/testdata/frobnitz/charts/mariner/charts/albatross/Chart.yaml similarity index 100% rename from pkg/chartutil/testdata/frobnitz/charts/mariner/charts/albatross/Chart.yaml rename to pkg/chart/util/testdata/frobnitz/charts/mariner/charts/albatross/Chart.yaml diff --git a/pkg/chartutil/testdata/frobnitz/charts/mariner/charts/albatross/values.yaml b/pkg/chart/util/testdata/frobnitz/charts/mariner/charts/albatross/values.yaml similarity index 100% rename from pkg/chartutil/testdata/frobnitz/charts/mariner/charts/albatross/values.yaml rename to pkg/chart/util/testdata/frobnitz/charts/mariner/charts/albatross/values.yaml diff --git a/pkg/chartutil/testdata/frobnitz/charts/mariner/templates/placeholder.tpl b/pkg/chart/util/testdata/frobnitz/charts/mariner/templates/placeholder.tpl similarity index 100% rename from pkg/chartutil/testdata/frobnitz/charts/mariner/templates/placeholder.tpl rename to pkg/chart/util/testdata/frobnitz/charts/mariner/templates/placeholder.tpl diff --git a/pkg/chartutil/testdata/frobnitz/charts/mariner/values.yaml b/pkg/chart/util/testdata/frobnitz/charts/mariner/values.yaml similarity index 100% rename from pkg/chartutil/testdata/frobnitz/charts/mariner/values.yaml rename to pkg/chart/util/testdata/frobnitz/charts/mariner/values.yaml diff --git a/pkg/chartutil/testdata/frobnitz/docs/README.md b/pkg/chart/util/testdata/frobnitz/docs/README.md similarity index 100% rename from pkg/chartutil/testdata/frobnitz/docs/README.md rename to pkg/chart/util/testdata/frobnitz/docs/README.md diff --git a/pkg/chartutil/testdata/frobnitz/icon.svg b/pkg/chart/util/testdata/frobnitz/icon.svg similarity index 100% rename from pkg/chartutil/testdata/frobnitz/icon.svg rename to pkg/chart/util/testdata/frobnitz/icon.svg diff --git a/pkg/chartutil/testdata/frobnitz/ignore/me.txt b/pkg/chart/util/testdata/frobnitz/ignore/me.txt similarity index 100% rename from pkg/chartutil/testdata/frobnitz/ignore/me.txt rename to pkg/chart/util/testdata/frobnitz/ignore/me.txt diff --git a/pkg/chartutil/testdata/frobnitz/templates/template.tpl b/pkg/chart/util/testdata/frobnitz/templates/template.tpl similarity index 100% rename from pkg/chartutil/testdata/frobnitz/templates/template.tpl rename to pkg/chart/util/testdata/frobnitz/templates/template.tpl diff --git a/pkg/chartutil/testdata/frobnitz/values.yaml b/pkg/chart/util/testdata/frobnitz/values.yaml similarity index 100% rename from pkg/chartutil/testdata/frobnitz/values.yaml rename to pkg/chart/util/testdata/frobnitz/values.yaml diff --git a/pkg/chartutil/testdata/frobnitz_backslash-1.2.3.tgz b/pkg/chart/util/testdata/frobnitz_backslash-1.2.3.tgz similarity index 100% rename from pkg/chartutil/testdata/frobnitz_backslash-1.2.3.tgz rename to pkg/chart/util/testdata/frobnitz_backslash-1.2.3.tgz diff --git a/pkg/chartutil/testdata/genfrob.sh b/pkg/chart/util/testdata/genfrob.sh similarity index 100% rename from pkg/chartutil/testdata/genfrob.sh rename to pkg/chart/util/testdata/genfrob.sh diff --git a/pkg/chartutil/testdata/import-values-from-enabled-subchart/parent-chart/Chart.lock b/pkg/chart/util/testdata/import-values-from-enabled-subchart/parent-chart/Chart.lock similarity index 100% rename from pkg/chartutil/testdata/import-values-from-enabled-subchart/parent-chart/Chart.lock rename to pkg/chart/util/testdata/import-values-from-enabled-subchart/parent-chart/Chart.lock diff --git a/pkg/chartutil/testdata/import-values-from-enabled-subchart/parent-chart/Chart.yaml b/pkg/chart/util/testdata/import-values-from-enabled-subchart/parent-chart/Chart.yaml similarity index 100% rename from pkg/chartutil/testdata/import-values-from-enabled-subchart/parent-chart/Chart.yaml rename to pkg/chart/util/testdata/import-values-from-enabled-subchart/parent-chart/Chart.yaml diff --git a/pkg/chartutil/testdata/import-values-from-enabled-subchart/parent-chart/charts/dev-v0.1.0.tgz b/pkg/chart/util/testdata/import-values-from-enabled-subchart/parent-chart/charts/dev-v0.1.0.tgz similarity index 100% rename from pkg/chartutil/testdata/import-values-from-enabled-subchart/parent-chart/charts/dev-v0.1.0.tgz rename to pkg/chart/util/testdata/import-values-from-enabled-subchart/parent-chart/charts/dev-v0.1.0.tgz diff --git a/pkg/chartutil/testdata/import-values-from-enabled-subchart/parent-chart/charts/prod-v0.1.0.tgz b/pkg/chart/util/testdata/import-values-from-enabled-subchart/parent-chart/charts/prod-v0.1.0.tgz similarity index 100% rename from pkg/chartutil/testdata/import-values-from-enabled-subchart/parent-chart/charts/prod-v0.1.0.tgz rename to pkg/chart/util/testdata/import-values-from-enabled-subchart/parent-chart/charts/prod-v0.1.0.tgz diff --git a/pkg/chartutil/testdata/import-values-from-enabled-subchart/parent-chart/envs/dev/Chart.yaml b/pkg/chart/util/testdata/import-values-from-enabled-subchart/parent-chart/envs/dev/Chart.yaml similarity index 100% rename from pkg/chartutil/testdata/import-values-from-enabled-subchart/parent-chart/envs/dev/Chart.yaml rename to pkg/chart/util/testdata/import-values-from-enabled-subchart/parent-chart/envs/dev/Chart.yaml diff --git a/pkg/chartutil/testdata/import-values-from-enabled-subchart/parent-chart/envs/dev/values.yaml b/pkg/chart/util/testdata/import-values-from-enabled-subchart/parent-chart/envs/dev/values.yaml similarity index 100% rename from pkg/chartutil/testdata/import-values-from-enabled-subchart/parent-chart/envs/dev/values.yaml rename to pkg/chart/util/testdata/import-values-from-enabled-subchart/parent-chart/envs/dev/values.yaml diff --git a/pkg/chartutil/testdata/import-values-from-enabled-subchart/parent-chart/envs/prod/Chart.yaml b/pkg/chart/util/testdata/import-values-from-enabled-subchart/parent-chart/envs/prod/Chart.yaml similarity index 100% rename from pkg/chartutil/testdata/import-values-from-enabled-subchart/parent-chart/envs/prod/Chart.yaml rename to pkg/chart/util/testdata/import-values-from-enabled-subchart/parent-chart/envs/prod/Chart.yaml diff --git a/pkg/chartutil/testdata/import-values-from-enabled-subchart/parent-chart/envs/prod/values.yaml b/pkg/chart/util/testdata/import-values-from-enabled-subchart/parent-chart/envs/prod/values.yaml similarity index 100% rename from pkg/chartutil/testdata/import-values-from-enabled-subchart/parent-chart/envs/prod/values.yaml rename to pkg/chart/util/testdata/import-values-from-enabled-subchart/parent-chart/envs/prod/values.yaml diff --git a/pkg/chartutil/testdata/import-values-from-enabled-subchart/parent-chart/templates/autoscaler.yaml b/pkg/chart/util/testdata/import-values-from-enabled-subchart/parent-chart/templates/autoscaler.yaml similarity index 100% rename from pkg/chartutil/testdata/import-values-from-enabled-subchart/parent-chart/templates/autoscaler.yaml rename to pkg/chart/util/testdata/import-values-from-enabled-subchart/parent-chart/templates/autoscaler.yaml diff --git a/pkg/chartutil/testdata/import-values-from-enabled-subchart/parent-chart/values.yaml b/pkg/chart/util/testdata/import-values-from-enabled-subchart/parent-chart/values.yaml similarity index 100% rename from pkg/chartutil/testdata/import-values-from-enabled-subchart/parent-chart/values.yaml rename to pkg/chart/util/testdata/import-values-from-enabled-subchart/parent-chart/values.yaml diff --git a/pkg/chartutil/testdata/joonix/Chart.yaml b/pkg/chart/util/testdata/joonix/Chart.yaml similarity index 100% rename from pkg/chartutil/testdata/joonix/Chart.yaml rename to pkg/chart/util/testdata/joonix/Chart.yaml diff --git a/pkg/chartutil/testdata/joonix/charts/.gitkeep b/pkg/chart/util/testdata/joonix/charts/.gitkeep similarity index 100% rename from pkg/chartutil/testdata/joonix/charts/.gitkeep rename to pkg/chart/util/testdata/joonix/charts/.gitkeep diff --git a/pkg/chartutil/testdata/subpop/Chart.yaml b/pkg/chart/util/testdata/subpop/Chart.yaml similarity index 100% rename from pkg/chartutil/testdata/subpop/Chart.yaml rename to pkg/chart/util/testdata/subpop/Chart.yaml diff --git a/pkg/chartutil/testdata/subpop/README.md b/pkg/chart/util/testdata/subpop/README.md similarity index 100% rename from pkg/chartutil/testdata/subpop/README.md rename to pkg/chart/util/testdata/subpop/README.md diff --git a/pkg/chartutil/testdata/subpop/charts/subchart1/Chart.yaml b/pkg/chart/util/testdata/subpop/charts/subchart1/Chart.yaml similarity index 100% rename from pkg/chartutil/testdata/subpop/charts/subchart1/Chart.yaml rename to pkg/chart/util/testdata/subpop/charts/subchart1/Chart.yaml diff --git a/pkg/chartutil/testdata/subpop/charts/subchart1/charts/subchartA/Chart.yaml b/pkg/chart/util/testdata/subpop/charts/subchart1/charts/subchartA/Chart.yaml similarity index 100% rename from pkg/chartutil/testdata/subpop/charts/subchart1/charts/subchartA/Chart.yaml rename to pkg/chart/util/testdata/subpop/charts/subchart1/charts/subchartA/Chart.yaml diff --git a/pkg/chartutil/testdata/subpop/charts/subchart1/charts/subchartA/templates/service.yaml b/pkg/chart/util/testdata/subpop/charts/subchart1/charts/subchartA/templates/service.yaml similarity index 100% rename from pkg/chartutil/testdata/subpop/charts/subchart1/charts/subchartA/templates/service.yaml rename to pkg/chart/util/testdata/subpop/charts/subchart1/charts/subchartA/templates/service.yaml diff --git a/pkg/chartutil/testdata/subpop/charts/subchart1/charts/subchartA/values.yaml b/pkg/chart/util/testdata/subpop/charts/subchart1/charts/subchartA/values.yaml similarity index 100% rename from pkg/chartutil/testdata/subpop/charts/subchart1/charts/subchartA/values.yaml rename to pkg/chart/util/testdata/subpop/charts/subchart1/charts/subchartA/values.yaml diff --git a/pkg/chartutil/testdata/subpop/charts/subchart1/charts/subchartB/Chart.yaml b/pkg/chart/util/testdata/subpop/charts/subchart1/charts/subchartB/Chart.yaml similarity index 100% rename from pkg/chartutil/testdata/subpop/charts/subchart1/charts/subchartB/Chart.yaml rename to pkg/chart/util/testdata/subpop/charts/subchart1/charts/subchartB/Chart.yaml diff --git a/pkg/chartutil/testdata/subpop/charts/subchart1/charts/subchartB/templates/service.yaml b/pkg/chart/util/testdata/subpop/charts/subchart1/charts/subchartB/templates/service.yaml similarity index 100% rename from pkg/chartutil/testdata/subpop/charts/subchart1/charts/subchartB/templates/service.yaml rename to pkg/chart/util/testdata/subpop/charts/subchart1/charts/subchartB/templates/service.yaml diff --git a/pkg/chartutil/testdata/subpop/charts/subchart1/charts/subchartB/values.yaml b/pkg/chart/util/testdata/subpop/charts/subchart1/charts/subchartB/values.yaml similarity index 100% rename from pkg/chartutil/testdata/subpop/charts/subchart1/charts/subchartB/values.yaml rename to pkg/chart/util/testdata/subpop/charts/subchart1/charts/subchartB/values.yaml diff --git a/pkg/chartutil/testdata/subpop/charts/subchart1/crds/crdA.yaml b/pkg/chart/util/testdata/subpop/charts/subchart1/crds/crdA.yaml similarity index 100% rename from pkg/chartutil/testdata/subpop/charts/subchart1/crds/crdA.yaml rename to pkg/chart/util/testdata/subpop/charts/subchart1/crds/crdA.yaml diff --git a/pkg/chartutil/testdata/subpop/charts/subchart1/templates/NOTES.txt b/pkg/chart/util/testdata/subpop/charts/subchart1/templates/NOTES.txt similarity index 100% rename from pkg/chartutil/testdata/subpop/charts/subchart1/templates/NOTES.txt rename to pkg/chart/util/testdata/subpop/charts/subchart1/templates/NOTES.txt diff --git a/pkg/chartutil/testdata/subpop/charts/subchart1/templates/service.yaml b/pkg/chart/util/testdata/subpop/charts/subchart1/templates/service.yaml similarity index 100% rename from pkg/chartutil/testdata/subpop/charts/subchart1/templates/service.yaml rename to pkg/chart/util/testdata/subpop/charts/subchart1/templates/service.yaml diff --git a/pkg/chartutil/testdata/subpop/charts/subchart1/templates/subdir/role.yaml b/pkg/chart/util/testdata/subpop/charts/subchart1/templates/subdir/role.yaml similarity index 100% rename from pkg/chartutil/testdata/subpop/charts/subchart1/templates/subdir/role.yaml rename to pkg/chart/util/testdata/subpop/charts/subchart1/templates/subdir/role.yaml diff --git a/pkg/chartutil/testdata/subpop/charts/subchart1/templates/subdir/rolebinding.yaml b/pkg/chart/util/testdata/subpop/charts/subchart1/templates/subdir/rolebinding.yaml similarity index 100% rename from pkg/chartutil/testdata/subpop/charts/subchart1/templates/subdir/rolebinding.yaml rename to pkg/chart/util/testdata/subpop/charts/subchart1/templates/subdir/rolebinding.yaml diff --git a/pkg/chartutil/testdata/subpop/charts/subchart1/templates/subdir/serviceaccount.yaml b/pkg/chart/util/testdata/subpop/charts/subchart1/templates/subdir/serviceaccount.yaml similarity index 100% rename from pkg/chartutil/testdata/subpop/charts/subchart1/templates/subdir/serviceaccount.yaml rename to pkg/chart/util/testdata/subpop/charts/subchart1/templates/subdir/serviceaccount.yaml diff --git a/pkg/chartutil/testdata/subpop/charts/subchart1/values.yaml b/pkg/chart/util/testdata/subpop/charts/subchart1/values.yaml similarity index 100% rename from pkg/chartutil/testdata/subpop/charts/subchart1/values.yaml rename to pkg/chart/util/testdata/subpop/charts/subchart1/values.yaml diff --git a/pkg/chartutil/testdata/subpop/charts/subchart2/Chart.yaml b/pkg/chart/util/testdata/subpop/charts/subchart2/Chart.yaml similarity index 100% rename from pkg/chartutil/testdata/subpop/charts/subchart2/Chart.yaml rename to pkg/chart/util/testdata/subpop/charts/subchart2/Chart.yaml diff --git a/pkg/chartutil/testdata/subpop/charts/subchart2/charts/subchartB/Chart.yaml b/pkg/chart/util/testdata/subpop/charts/subchart2/charts/subchartB/Chart.yaml similarity index 100% rename from pkg/chartutil/testdata/subpop/charts/subchart2/charts/subchartB/Chart.yaml rename to pkg/chart/util/testdata/subpop/charts/subchart2/charts/subchartB/Chart.yaml diff --git a/pkg/chartutil/testdata/subpop/charts/subchart2/charts/subchartB/templates/service.yaml b/pkg/chart/util/testdata/subpop/charts/subchart2/charts/subchartB/templates/service.yaml similarity index 100% rename from pkg/chartutil/testdata/subpop/charts/subchart2/charts/subchartB/templates/service.yaml rename to pkg/chart/util/testdata/subpop/charts/subchart2/charts/subchartB/templates/service.yaml diff --git a/pkg/chartutil/testdata/subpop/charts/subchart2/charts/subchartB/values.yaml b/pkg/chart/util/testdata/subpop/charts/subchart2/charts/subchartB/values.yaml similarity index 100% rename from pkg/chartutil/testdata/subpop/charts/subchart2/charts/subchartB/values.yaml rename to pkg/chart/util/testdata/subpop/charts/subchart2/charts/subchartB/values.yaml diff --git a/pkg/chartutil/testdata/subpop/charts/subchart2/charts/subchartC/Chart.yaml b/pkg/chart/util/testdata/subpop/charts/subchart2/charts/subchartC/Chart.yaml similarity index 100% rename from pkg/chartutil/testdata/subpop/charts/subchart2/charts/subchartC/Chart.yaml rename to pkg/chart/util/testdata/subpop/charts/subchart2/charts/subchartC/Chart.yaml diff --git a/pkg/chartutil/testdata/subpop/charts/subchart2/charts/subchartC/templates/service.yaml b/pkg/chart/util/testdata/subpop/charts/subchart2/charts/subchartC/templates/service.yaml similarity index 100% rename from pkg/chartutil/testdata/subpop/charts/subchart2/charts/subchartC/templates/service.yaml rename to pkg/chart/util/testdata/subpop/charts/subchart2/charts/subchartC/templates/service.yaml diff --git a/pkg/chartutil/testdata/subpop/charts/subchart2/charts/subchartC/values.yaml b/pkg/chart/util/testdata/subpop/charts/subchart2/charts/subchartC/values.yaml similarity index 100% rename from pkg/chartutil/testdata/subpop/charts/subchart2/charts/subchartC/values.yaml rename to pkg/chart/util/testdata/subpop/charts/subchart2/charts/subchartC/values.yaml diff --git a/pkg/chartutil/testdata/subpop/charts/subchart2/templates/service.yaml b/pkg/chart/util/testdata/subpop/charts/subchart2/templates/service.yaml similarity index 100% rename from pkg/chartutil/testdata/subpop/charts/subchart2/templates/service.yaml rename to pkg/chart/util/testdata/subpop/charts/subchart2/templates/service.yaml diff --git a/pkg/chartutil/testdata/subpop/charts/subchart2/values.yaml b/pkg/chart/util/testdata/subpop/charts/subchart2/values.yaml similarity index 100% rename from pkg/chartutil/testdata/subpop/charts/subchart2/values.yaml rename to pkg/chart/util/testdata/subpop/charts/subchart2/values.yaml diff --git a/pkg/chartutil/testdata/subpop/noreqs/Chart.yaml b/pkg/chart/util/testdata/subpop/noreqs/Chart.yaml similarity index 100% rename from pkg/chartutil/testdata/subpop/noreqs/Chart.yaml rename to pkg/chart/util/testdata/subpop/noreqs/Chart.yaml diff --git a/pkg/chartutil/testdata/subpop/noreqs/templates/service.yaml b/pkg/chart/util/testdata/subpop/noreqs/templates/service.yaml similarity index 100% rename from pkg/chartutil/testdata/subpop/noreqs/templates/service.yaml rename to pkg/chart/util/testdata/subpop/noreqs/templates/service.yaml diff --git a/pkg/chartutil/testdata/subpop/noreqs/values.yaml b/pkg/chart/util/testdata/subpop/noreqs/values.yaml similarity index 100% rename from pkg/chartutil/testdata/subpop/noreqs/values.yaml rename to pkg/chart/util/testdata/subpop/noreqs/values.yaml diff --git a/pkg/chartutil/testdata/subpop/values.yaml b/pkg/chart/util/testdata/subpop/values.yaml similarity index 100% rename from pkg/chartutil/testdata/subpop/values.yaml rename to pkg/chart/util/testdata/subpop/values.yaml diff --git a/pkg/chartutil/testdata/test-values-invalid.schema.json b/pkg/chart/util/testdata/test-values-invalid.schema.json similarity index 100% rename from pkg/chartutil/testdata/test-values-invalid.schema.json rename to pkg/chart/util/testdata/test-values-invalid.schema.json diff --git a/pkg/chartutil/testdata/test-values-negative.yaml b/pkg/chart/util/testdata/test-values-negative.yaml similarity index 100% rename from pkg/chartutil/testdata/test-values-negative.yaml rename to pkg/chart/util/testdata/test-values-negative.yaml diff --git a/pkg/chartutil/testdata/test-values.schema.json b/pkg/chart/util/testdata/test-values.schema.json similarity index 100% rename from pkg/chartutil/testdata/test-values.schema.json rename to pkg/chart/util/testdata/test-values.schema.json diff --git a/pkg/chartutil/testdata/test-values.yaml b/pkg/chart/util/testdata/test-values.yaml similarity index 100% rename from pkg/chartutil/testdata/test-values.yaml rename to pkg/chart/util/testdata/test-values.yaml diff --git a/pkg/chartutil/testdata/three-level-dependent-chart/README.md b/pkg/chart/util/testdata/three-level-dependent-chart/README.md similarity index 100% rename from pkg/chartutil/testdata/three-level-dependent-chart/README.md rename to pkg/chart/util/testdata/three-level-dependent-chart/README.md diff --git a/pkg/chartutil/testdata/three-level-dependent-chart/umbrella/Chart.yaml b/pkg/chart/util/testdata/three-level-dependent-chart/umbrella/Chart.yaml similarity index 100% rename from pkg/chartutil/testdata/three-level-dependent-chart/umbrella/Chart.yaml rename to pkg/chart/util/testdata/three-level-dependent-chart/umbrella/Chart.yaml diff --git a/pkg/chartutil/testdata/three-level-dependent-chart/umbrella/charts/app1/Chart.yaml b/pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app1/Chart.yaml similarity index 100% rename from pkg/chartutil/testdata/three-level-dependent-chart/umbrella/charts/app1/Chart.yaml rename to pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app1/Chart.yaml diff --git a/pkg/chartutil/testdata/three-level-dependent-chart/umbrella/charts/app1/charts/library/Chart.yaml b/pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app1/charts/library/Chart.yaml similarity index 100% rename from pkg/chartutil/testdata/three-level-dependent-chart/umbrella/charts/app1/charts/library/Chart.yaml rename to pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app1/charts/library/Chart.yaml diff --git a/pkg/chartutil/testdata/three-level-dependent-chart/umbrella/charts/app1/charts/library/templates/service.yaml b/pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app1/charts/library/templates/service.yaml similarity index 100% rename from pkg/chartutil/testdata/three-level-dependent-chart/umbrella/charts/app1/charts/library/templates/service.yaml rename to pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app1/charts/library/templates/service.yaml diff --git a/pkg/chartutil/testdata/three-level-dependent-chart/umbrella/charts/app1/charts/library/values.yaml b/pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app1/charts/library/values.yaml similarity index 100% rename from pkg/chartutil/testdata/three-level-dependent-chart/umbrella/charts/app1/charts/library/values.yaml rename to pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app1/charts/library/values.yaml diff --git a/pkg/chartutil/testdata/three-level-dependent-chart/umbrella/charts/app1/templates/service.yaml b/pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app1/templates/service.yaml similarity index 100% rename from pkg/chartutil/testdata/three-level-dependent-chart/umbrella/charts/app1/templates/service.yaml rename to pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app1/templates/service.yaml diff --git a/pkg/chartutil/testdata/three-level-dependent-chart/umbrella/charts/app1/values.yaml b/pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app1/values.yaml similarity index 100% rename from pkg/chartutil/testdata/three-level-dependent-chart/umbrella/charts/app1/values.yaml rename to pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app1/values.yaml diff --git a/pkg/chartutil/testdata/three-level-dependent-chart/umbrella/charts/app2/Chart.yaml b/pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app2/Chart.yaml similarity index 100% rename from pkg/chartutil/testdata/three-level-dependent-chart/umbrella/charts/app2/Chart.yaml rename to pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app2/Chart.yaml diff --git a/pkg/chartutil/testdata/three-level-dependent-chart/umbrella/charts/app2/charts/library/Chart.yaml b/pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app2/charts/library/Chart.yaml similarity index 100% rename from pkg/chartutil/testdata/three-level-dependent-chart/umbrella/charts/app2/charts/library/Chart.yaml rename to pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app2/charts/library/Chart.yaml diff --git a/pkg/chartutil/testdata/three-level-dependent-chart/umbrella/charts/app2/charts/library/templates/service.yaml b/pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app2/charts/library/templates/service.yaml similarity index 100% rename from pkg/chartutil/testdata/three-level-dependent-chart/umbrella/charts/app2/charts/library/templates/service.yaml rename to pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app2/charts/library/templates/service.yaml diff --git a/pkg/chartutil/testdata/three-level-dependent-chart/umbrella/charts/app2/charts/library/values.yaml b/pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app2/charts/library/values.yaml similarity index 100% rename from pkg/chartutil/testdata/three-level-dependent-chart/umbrella/charts/app2/charts/library/values.yaml rename to pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app2/charts/library/values.yaml diff --git a/pkg/chartutil/testdata/three-level-dependent-chart/umbrella/charts/app2/templates/service.yaml b/pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app2/templates/service.yaml similarity index 100% rename from pkg/chartutil/testdata/three-level-dependent-chart/umbrella/charts/app2/templates/service.yaml rename to pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app2/templates/service.yaml diff --git a/pkg/chartutil/testdata/three-level-dependent-chart/umbrella/charts/app2/values.yaml b/pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app2/values.yaml similarity index 100% rename from pkg/chartutil/testdata/three-level-dependent-chart/umbrella/charts/app2/values.yaml rename to pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app2/values.yaml diff --git a/pkg/chartutil/testdata/three-level-dependent-chart/umbrella/charts/app3/Chart.yaml b/pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app3/Chart.yaml similarity index 100% rename from pkg/chartutil/testdata/three-level-dependent-chart/umbrella/charts/app3/Chart.yaml rename to pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app3/Chart.yaml diff --git a/pkg/chartutil/testdata/three-level-dependent-chart/umbrella/charts/app3/charts/library/Chart.yaml b/pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app3/charts/library/Chart.yaml similarity index 100% rename from pkg/chartutil/testdata/three-level-dependent-chart/umbrella/charts/app3/charts/library/Chart.yaml rename to pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app3/charts/library/Chart.yaml diff --git a/pkg/chartutil/testdata/three-level-dependent-chart/umbrella/charts/app3/charts/library/templates/service.yaml b/pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app3/charts/library/templates/service.yaml similarity index 100% rename from pkg/chartutil/testdata/three-level-dependent-chart/umbrella/charts/app3/charts/library/templates/service.yaml rename to pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app3/charts/library/templates/service.yaml diff --git a/pkg/chartutil/testdata/three-level-dependent-chart/umbrella/charts/app3/charts/library/values.yaml b/pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app3/charts/library/values.yaml similarity index 100% rename from pkg/chartutil/testdata/three-level-dependent-chart/umbrella/charts/app3/charts/library/values.yaml rename to pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app3/charts/library/values.yaml diff --git a/pkg/chartutil/testdata/three-level-dependent-chart/umbrella/charts/app3/templates/service.yaml b/pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app3/templates/service.yaml similarity index 100% rename from pkg/chartutil/testdata/three-level-dependent-chart/umbrella/charts/app3/templates/service.yaml rename to pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app3/templates/service.yaml diff --git a/pkg/chartutil/testdata/three-level-dependent-chart/umbrella/charts/app3/values.yaml b/pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app3/values.yaml similarity index 100% rename from pkg/chartutil/testdata/three-level-dependent-chart/umbrella/charts/app3/values.yaml rename to pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app3/values.yaml diff --git a/pkg/chartutil/testdata/three-level-dependent-chart/umbrella/charts/app4/Chart.yaml b/pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app4/Chart.yaml similarity index 100% rename from pkg/chartutil/testdata/three-level-dependent-chart/umbrella/charts/app4/Chart.yaml rename to pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app4/Chart.yaml diff --git a/pkg/chartutil/testdata/three-level-dependent-chart/umbrella/charts/app4/charts/library/Chart.yaml b/pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app4/charts/library/Chart.yaml similarity index 100% rename from pkg/chartutil/testdata/three-level-dependent-chart/umbrella/charts/app4/charts/library/Chart.yaml rename to pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app4/charts/library/Chart.yaml diff --git a/pkg/chartutil/testdata/three-level-dependent-chart/umbrella/charts/app4/charts/library/templates/service.yaml b/pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app4/charts/library/templates/service.yaml similarity index 100% rename from pkg/chartutil/testdata/three-level-dependent-chart/umbrella/charts/app4/charts/library/templates/service.yaml rename to pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app4/charts/library/templates/service.yaml diff --git a/pkg/chartutil/testdata/three-level-dependent-chart/umbrella/charts/app4/charts/library/values.yaml b/pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app4/charts/library/values.yaml similarity index 100% rename from pkg/chartutil/testdata/three-level-dependent-chart/umbrella/charts/app4/charts/library/values.yaml rename to pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app4/charts/library/values.yaml diff --git a/pkg/chartutil/testdata/three-level-dependent-chart/umbrella/charts/app4/templates/service.yaml b/pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app4/templates/service.yaml similarity index 100% rename from pkg/chartutil/testdata/three-level-dependent-chart/umbrella/charts/app4/templates/service.yaml rename to pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app4/templates/service.yaml diff --git a/pkg/chartutil/testdata/three-level-dependent-chart/umbrella/charts/app4/values.yaml b/pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app4/values.yaml similarity index 100% rename from pkg/chartutil/testdata/three-level-dependent-chart/umbrella/charts/app4/values.yaml rename to pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app4/values.yaml diff --git a/pkg/chartutil/testdata/three-level-dependent-chart/umbrella/values.yaml b/pkg/chart/util/testdata/three-level-dependent-chart/umbrella/values.yaml similarity index 100% rename from pkg/chartutil/testdata/three-level-dependent-chart/umbrella/values.yaml rename to pkg/chart/util/testdata/three-level-dependent-chart/umbrella/values.yaml diff --git a/pkg/chartutil/validate_name.go b/pkg/chart/util/validate_name.go similarity index 99% rename from pkg/chartutil/validate_name.go rename to pkg/chart/util/validate_name.go index 05c090cb6..73be43303 100644 --- a/pkg/chartutil/validate_name.go +++ b/pkg/chart/util/validate_name.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package chartutil +package util import ( "fmt" diff --git a/pkg/chartutil/validate_name_test.go b/pkg/chart/util/validate_name_test.go similarity index 99% rename from pkg/chartutil/validate_name_test.go rename to pkg/chart/util/validate_name_test.go index 09dec9fbb..cfc62a0f7 100644 --- a/pkg/chartutil/validate_name_test.go +++ b/pkg/chart/util/validate_name_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package chartutil +package util import "testing" diff --git a/pkg/chartutil/values.go b/pkg/chart/util/values.go similarity index 99% rename from pkg/chartutil/values.go rename to pkg/chart/util/values.go index 706c44d48..46952c079 100644 --- a/pkg/chartutil/values.go +++ b/pkg/chart/util/values.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package chartutil +package util import ( "encoding/json" diff --git a/pkg/chartutil/values_test.go b/pkg/chart/util/values_test.go similarity index 99% rename from pkg/chartutil/values_test.go rename to pkg/chart/util/values_test.go index 56167c8a1..660b7e4ed 100644 --- a/pkg/chartutil/values_test.go +++ b/pkg/chart/util/values_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package chartutil +package util import ( "bytes" diff --git a/pkg/downloader/manager.go b/pkg/downloader/manager.go index f10cbfb8d..361cd6109 100644 --- a/pkg/downloader/manager.go +++ b/pkg/downloader/manager.go @@ -38,7 +38,7 @@ import ( "helm.sh/helm/v4/internal/urlutil" "helm.sh/helm/v4/pkg/chart" "helm.sh/helm/v4/pkg/chart/loader" - "helm.sh/helm/v4/pkg/chartutil" + chartutil "helm.sh/helm/v4/pkg/chart/util" "helm.sh/helm/v4/pkg/getter" "helm.sh/helm/v4/pkg/helmpath" "helm.sh/helm/v4/pkg/registry" diff --git a/pkg/downloader/manager_test.go b/pkg/downloader/manager_test.go index b721c6a0d..c9947e341 100644 --- a/pkg/downloader/manager_test.go +++ b/pkg/downloader/manager_test.go @@ -24,7 +24,7 @@ import ( "helm.sh/helm/v4/pkg/chart" "helm.sh/helm/v4/pkg/chart/loader" - "helm.sh/helm/v4/pkg/chartutil" + chartutil "helm.sh/helm/v4/pkg/chart/util" "helm.sh/helm/v4/pkg/getter" "helm.sh/helm/v4/pkg/repo/repotest" ) diff --git a/pkg/engine/engine.go b/pkg/engine/engine.go index 8f69505f6..0229b1833 100644 --- a/pkg/engine/engine.go +++ b/pkg/engine/engine.go @@ -30,7 +30,7 @@ import ( "k8s.io/client-go/rest" "helm.sh/helm/v4/pkg/chart" - "helm.sh/helm/v4/pkg/chartutil" + chartutil "helm.sh/helm/v4/pkg/chart/util" ) // Engine is an implementation of the Helm rendering implementation for templates. diff --git a/pkg/engine/engine_test.go b/pkg/engine/engine_test.go index f6a96bd6a..4c28c2965 100644 --- a/pkg/engine/engine_test.go +++ b/pkg/engine/engine_test.go @@ -31,7 +31,7 @@ import ( "k8s.io/client-go/dynamic/fake" "helm.sh/helm/v4/pkg/chart" - "helm.sh/helm/v4/pkg/chartutil" + chartutil "helm.sh/helm/v4/pkg/chart/util" ) func TestSortTemplates(t *testing.T) { diff --git a/pkg/lint/lint.go b/pkg/lint/lint.go index 70a49ee90..b53400c87 100644 --- a/pkg/lint/lint.go +++ b/pkg/lint/lint.go @@ -19,7 +19,7 @@ package lint // import "helm.sh/helm/v4/pkg/lint" import ( "path/filepath" - "helm.sh/helm/v4/pkg/chartutil" + chartutil "helm.sh/helm/v4/pkg/chart/util" "helm.sh/helm/v4/pkg/lint/rules" "helm.sh/helm/v4/pkg/lint/support" ) diff --git a/pkg/lint/lint_test.go b/pkg/lint/lint_test.go index 9246b64f2..bba024d59 100644 --- a/pkg/lint/lint_test.go +++ b/pkg/lint/lint_test.go @@ -21,7 +21,7 @@ import ( "testing" "time" - "helm.sh/helm/v4/pkg/chartutil" + chartutil "helm.sh/helm/v4/pkg/chart/util" "helm.sh/helm/v4/pkg/lint/support" ) diff --git a/pkg/lint/rules/chartfile.go b/pkg/lint/rules/chartfile.go index 2e718067b..a1e08b58d 100644 --- a/pkg/lint/rules/chartfile.go +++ b/pkg/lint/rules/chartfile.go @@ -27,7 +27,7 @@ import ( "sigs.k8s.io/yaml" "helm.sh/helm/v4/pkg/chart" - "helm.sh/helm/v4/pkg/chartutil" + chartutil "helm.sh/helm/v4/pkg/chart/util" "helm.sh/helm/v4/pkg/lint/support" ) diff --git a/pkg/lint/rules/chartfile_test.go b/pkg/lint/rules/chartfile_test.go index eb9b19cb7..6d709790a 100644 --- a/pkg/lint/rules/chartfile_test.go +++ b/pkg/lint/rules/chartfile_test.go @@ -25,7 +25,7 @@ import ( "github.com/pkg/errors" "helm.sh/helm/v4/pkg/chart" - "helm.sh/helm/v4/pkg/chartutil" + chartutil "helm.sh/helm/v4/pkg/chart/util" "helm.sh/helm/v4/pkg/lint/support" ) diff --git a/pkg/lint/rules/dependencies_test.go b/pkg/lint/rules/dependencies_test.go index e167b4479..e946b1c01 100644 --- a/pkg/lint/rules/dependencies_test.go +++ b/pkg/lint/rules/dependencies_test.go @@ -20,7 +20,7 @@ import ( "testing" "helm.sh/helm/v4/pkg/chart" - "helm.sh/helm/v4/pkg/chartutil" + chartutil "helm.sh/helm/v4/pkg/chart/util" "helm.sh/helm/v4/pkg/lint/support" ) diff --git a/pkg/lint/rules/deprecations.go b/pkg/lint/rules/deprecations.go index 6eae06802..0a8e642c9 100644 --- a/pkg/lint/rules/deprecations.go +++ b/pkg/lint/rules/deprecations.go @@ -25,7 +25,7 @@ import ( "k8s.io/apiserver/pkg/endpoints/deprecation" kscheme "k8s.io/client-go/kubernetes/scheme" - "helm.sh/helm/v4/pkg/chartutil" + chartutil "helm.sh/helm/v4/pkg/chart/util" ) var ( diff --git a/pkg/lint/rules/template.go b/pkg/lint/rules/template.go index a50485a50..ec434aba5 100644 --- a/pkg/lint/rules/template.go +++ b/pkg/lint/rules/template.go @@ -34,7 +34,7 @@ import ( "k8s.io/apimachinery/pkg/util/yaml" "helm.sh/helm/v4/pkg/chart/loader" - "helm.sh/helm/v4/pkg/chartutil" + chartutil "helm.sh/helm/v4/pkg/chart/util" "helm.sh/helm/v4/pkg/engine" "helm.sh/helm/v4/pkg/lint/support" ) diff --git a/pkg/lint/rules/template_test.go b/pkg/lint/rules/template_test.go index 9e6dc4004..d3185d8c8 100644 --- a/pkg/lint/rules/template_test.go +++ b/pkg/lint/rules/template_test.go @@ -24,7 +24,7 @@ import ( "testing" "helm.sh/helm/v4/pkg/chart" - "helm.sh/helm/v4/pkg/chartutil" + chartutil "helm.sh/helm/v4/pkg/chart/util" "helm.sh/helm/v4/pkg/lint/support" ) diff --git a/pkg/lint/rules/values.go b/pkg/lint/rules/values.go index 82278522d..f430178c3 100644 --- a/pkg/lint/rules/values.go +++ b/pkg/lint/rules/values.go @@ -22,7 +22,7 @@ import ( "github.com/pkg/errors" - "helm.sh/helm/v4/pkg/chartutil" + chartutil "helm.sh/helm/v4/pkg/chart/util" "helm.sh/helm/v4/pkg/lint/support" ) diff --git a/pkg/releaseutil/manifest_sorter.go b/pkg/releaseutil/manifest_sorter.go index b2db2ff9f..c7d92b184 100644 --- a/pkg/releaseutil/manifest_sorter.go +++ b/pkg/releaseutil/manifest_sorter.go @@ -26,7 +26,7 @@ import ( "github.com/pkg/errors" "sigs.k8s.io/yaml" - "helm.sh/helm/v4/pkg/chartutil" + chartutil "helm.sh/helm/v4/pkg/chart/util" "helm.sh/helm/v4/pkg/release" ) diff --git a/pkg/repo/repotest/server.go b/pkg/repo/repotest/server.go index 0155c54d8..7b004dbc3 100644 --- a/pkg/repo/repotest/server.go +++ b/pkg/repo/repotest/server.go @@ -36,7 +36,7 @@ import ( "helm.sh/helm/v4/pkg/chart" "helm.sh/helm/v4/pkg/chart/loader" - "helm.sh/helm/v4/pkg/chartutil" + chartutil "helm.sh/helm/v4/pkg/chart/util" ociRegistry "helm.sh/helm/v4/pkg/registry" "helm.sh/helm/v4/pkg/repo" ) From 8dd279271e5a18613aa33655c0bd990e6979cf47 Mon Sep 17 00:00:00 2001 From: Robert Sirchia Date: Fri, 21 Feb 2025 15:33:24 -0500 Subject: [PATCH 47/68] remove unused config.go Signed-off-by: Robert Sirchia --- pkg/kube/config.go | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 pkg/kube/config.go diff --git a/pkg/kube/config.go b/pkg/kube/config.go deleted file mode 100644 index 0ef94453f..000000000 --- a/pkg/kube/config.go +++ /dev/null @@ -1,30 +0,0 @@ -/* -Copyright The Helm Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package kube // import "helm.sh/helm/v4/pkg/kube" - -import "k8s.io/cli-runtime/pkg/genericclioptions" - -// GetConfig returns a Kubernetes client config. -// -// Deprecated -func GetConfig(kubeconfig, context, namespace string) *genericclioptions.ConfigFlags { - cf := genericclioptions.NewConfigFlags(true) - cf.Namespace = &namespace - cf.Context = &context - cf.KubeConfig = &kubeconfig - return cf -} From 5c648151d59f0f88bd9e5d878f5909f75bde6ed7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 21 Feb 2025 21:59:40 +0000 Subject: [PATCH 48/68] build(deps): bump ossf/scorecard-action from 2.4.0 to 2.4.1 Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.4.0 to 2.4.1. - [Release notes](https://github.com/ossf/scorecard-action/releases) - [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md) - [Commits](https://github.com/ossf/scorecard-action/compare/62b2cac7ed8198b15735ed49ab1e5cf35480ba46...f49aabe0b5af0936a0987cfb85d86b75731b0186) --- updated-dependencies: - dependency-name: ossf/scorecard-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/scorecards.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/scorecards.yml b/.github/workflows/scorecards.yml index 7f568cf9d..a31084c72 100644 --- a/.github/workflows/scorecards.yml +++ b/.github/workflows/scorecards.yml @@ -33,7 +33,7 @@ jobs: persist-credentials: false - name: "Run analysis" - uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0 + uses: ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # v2.4.1 with: results_file: results.sarif results_format: sarif From 3d35e786c75493120833523da97c390f7c9b024e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 21 Feb 2025 21:59:44 +0000 Subject: [PATCH 49/68] build(deps): bump actions/upload-artifact from 4.6.0 to 4.6.1 Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.6.0 to 4.6.1. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08...4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/scorecards.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/scorecards.yml b/.github/workflows/scorecards.yml index 7f568cf9d..55b5581c1 100644 --- a/.github/workflows/scorecards.yml +++ b/.github/workflows/scorecards.yml @@ -55,7 +55,7 @@ jobs: # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF # format to the repository Actions tab. - name: "Upload artifact" - uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 + uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1 with: name: SARIF file path: results.sarif From f475f3e1fd8c4eb04dd07b78c68967bba39cedb8 Mon Sep 17 00:00:00 2001 From: Yarden Shoham Date: Sat, 22 Feb 2025 13:05:21 +0200 Subject: [PATCH 50/68] feat: error out when post-renderer produces no output When the templating post-renderer produces no output, something went wrong so we error out. Signed-off-by: Yarden Shoham --- pkg/postrender/exec.go | 6 ++++++ pkg/postrender/exec_test.go | 15 +++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/pkg/postrender/exec.go b/pkg/postrender/exec.go index 167e737d6..30f3983cf 100644 --- a/pkg/postrender/exec.go +++ b/pkg/postrender/exec.go @@ -64,6 +64,12 @@ func (p *execRender) Run(renderedManifests *bytes.Buffer) (*bytes.Buffer, error) return nil, errors.Wrapf(err, "error while running command %s. error output:\n%s", p.binaryPath, stderr.String()) } + // If the binary returned almost nothing, it's likely that it didn't + // successfully render anything + if len(bytes.TrimSpace(postRendered.Bytes())) == 0 { + return nil, errors.Errorf("post render binary %s did not produce any output %s", p.binaryPath, postRendered.String()) + } + return postRendered, nil } diff --git a/pkg/postrender/exec_test.go b/pkg/postrender/exec_test.go index 19a6ec6c4..2b091cc12 100644 --- a/pkg/postrender/exec_test.go +++ b/pkg/postrender/exec_test.go @@ -121,6 +121,21 @@ func TestExecRun(t *testing.T) { is.Contains(output.String(), "BARTEST") } +func TestExecRunWithNoOutput(t *testing.T) { + if runtime.GOOS == "windows" { + // the actual Run test uses a basic sed example, so skip this test on windows + t.Skip("skipping on windows") + } + is := assert.New(t) + testpath := setupTestingScript(t) + + renderer, err := NewExec(testpath) + require.NoError(t, err) + + _, err = renderer.Run(bytes.NewBufferString("")) + is.Error(err) +} + func TestNewExecWithOneArgsRun(t *testing.T) { if runtime.GOOS == "windows" { // the actual Run test uses a basic sed example, so skip this test on windows From 9e17871afbb3e71fc8846fafd2b4aa6b7ccb0cd4 Mon Sep 17 00:00:00 2001 From: Yarden Shoham Date: Sat, 22 Feb 2025 14:25:26 +0200 Subject: [PATCH 51/68] fix: error when more than one post-renderer is specified We now make sure the post-renderer flag can be passed at most once instead of silently taking the last one passed. Example: ```bash $ helm template test ... --post-renderer=true --post-renderer=cat Error: invalid argument "cat" for "--post-renderer" flag: cannot set post-renderer more than once, given: cat, previous: true ``` Signed-off-by: Yarden Shoham --- cmd/helm/flags.go | 4 ++++ cmd/helm/flags_test.go | 24 ++++++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/cmd/helm/flags.go b/cmd/helm/flags.go index 8d0f644d6..b92e7cf0b 100644 --- a/cmd/helm/flags.go +++ b/cmd/helm/flags.go @@ -24,6 +24,7 @@ import ( "sort" "strings" + "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/spf13/pflag" "k8s.io/klog/v2" @@ -143,6 +144,9 @@ func (p *postRendererString) Set(val string) error { if val == "" { return nil } + if p.options.binaryPath != "" && p.options.binaryPath != val { + return errors.Errorf("cannot set post-renderer more than once, given: %s, previous: %s", val, p.options.binaryPath) + } p.options.binaryPath = val pr, err := postrender.NewExec(p.options.binaryPath, p.options.args...) if err != nil { diff --git a/cmd/helm/flags_test.go b/cmd/helm/flags_test.go index 295f55022..bea916c34 100644 --- a/cmd/helm/flags_test.go +++ b/cmd/helm/flags_test.go @@ -20,6 +20,9 @@ import ( "fmt" "testing" + "github.com/stretchr/testify/require" + + "helm.sh/helm/v4/pkg/action" "helm.sh/helm/v4/pkg/chart" "helm.sh/helm/v4/pkg/release" helmtime "helm.sh/helm/v4/pkg/time" @@ -93,3 +96,24 @@ func outputFlagCompletionTest(t *testing.T, cmdName string) { }} runTestCmd(t, tests) } + +func TestPostRendererFlagSetOnce(t *testing.T) { + cfg := action.Configuration{} + client := action.NewInstall(&cfg) + str := postRendererString{ + options: &postRendererOptions{ + renderer: &client.PostRenderer, + }, + } + // Set the binary once + err := str.Set("echo") + require.NoError(t, err) + + // Set the binary again to the same value is ok + err = str.Set("echo") + require.NoError(t, err) + + // Set the binary again to a different value is not ok + err = str.Set("cat") + require.Error(t, err) +} From 392ff9391657840d00c825030d68bef6c5181cc7 Mon Sep 17 00:00:00 2001 From: Felipe Santos Date: Sun, 23 Feb 2025 16:51:33 -0300 Subject: [PATCH 52/68] Fix flaky TestDedupeRepos (#30576) Signed-off-by: Felipe Santos --- pkg/downloader/manager_test.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/downloader/manager_test.go b/pkg/downloader/manager_test.go index 481a9e038..8731fb003 100644 --- a/pkg/downloader/manager_test.go +++ b/pkg/downloader/manager_test.go @@ -22,6 +22,8 @@ import ( "reflect" "testing" + "github.com/stretchr/testify/assert" + "helm.sh/helm/v4/pkg/chart" "helm.sh/helm/v4/pkg/chart/loader" chartutil "helm.sh/helm/v4/pkg/chart/util" @@ -657,9 +659,8 @@ func TestDedupeRepos(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - if got := dedupeRepos(tt.repos); !reflect.DeepEqual(got, tt.want) { - t.Errorf("received:\n%v\nwant:\n%v", got, tt.want) - } + got := dedupeRepos(tt.repos) + assert.ElementsMatch(t, tt.want, got) }) } } From 326fdc3e5fa89f62dd1584dd46236f2bb8ecdbdb Mon Sep 17 00:00:00 2001 From: Yarden Shoham Date: Mon, 24 Feb 2025 07:23:18 +0200 Subject: [PATCH 53/68] Apply suggestions from code review Co-authored-by: George Jenkins Signed-off-by: Yarden Shoham --- cmd/helm/flags.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/helm/flags.go b/cmd/helm/flags.go index b92e7cf0b..d8e0107fd 100644 --- a/cmd/helm/flags.go +++ b/cmd/helm/flags.go @@ -144,8 +144,8 @@ func (p *postRendererString) Set(val string) error { if val == "" { return nil } - if p.options.binaryPath != "" && p.options.binaryPath != val { - return errors.Errorf("cannot set post-renderer more than once, given: %s, previous: %s", val, p.options.binaryPath) + if p.options.binaryPath != "" { + return fmt.Errorf("cannot specify --post-renderer flag more than once") } p.options.binaryPath = val pr, err := postrender.NewExec(p.options.binaryPath, p.options.args...) From dd728861a9a4353273ad77b7e16cba69144e42e6 Mon Sep 17 00:00:00 2001 From: Yarden Shoham Date: Mon, 24 Feb 2025 07:24:15 +0200 Subject: [PATCH 54/68] Fix tests Signed-off-by: Yarden Shoham --- cmd/helm/flags.go | 1 - cmd/helm/flags_test.go | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/cmd/helm/flags.go b/cmd/helm/flags.go index d8e0107fd..379b2140d 100644 --- a/cmd/helm/flags.go +++ b/cmd/helm/flags.go @@ -24,7 +24,6 @@ import ( "sort" "strings" - "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/spf13/pflag" "k8s.io/klog/v2" diff --git a/cmd/helm/flags_test.go b/cmd/helm/flags_test.go index bea916c34..3b43b1f47 100644 --- a/cmd/helm/flags_test.go +++ b/cmd/helm/flags_test.go @@ -109,9 +109,9 @@ func TestPostRendererFlagSetOnce(t *testing.T) { err := str.Set("echo") require.NoError(t, err) - // Set the binary again to the same value is ok + // Set the binary again to the same value is not ok err = str.Set("echo") - require.NoError(t, err) + require.Error(t, err) // Set the binary again to a different value is not ok err = str.Set("cat") From ab926212d9f14db74f3ead30d00a0a6fa4587f8c Mon Sep 17 00:00:00 2001 From: Yarden Shoham Date: Mon, 24 Feb 2025 07:26:12 +0200 Subject: [PATCH 55/68] Apply suggestions from code review Co-authored-by: George Jenkins Signed-off-by: Yarden Shoham --- pkg/postrender/exec.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/postrender/exec.go b/pkg/postrender/exec.go index 30f3983cf..84357c656 100644 --- a/pkg/postrender/exec.go +++ b/pkg/postrender/exec.go @@ -67,7 +67,7 @@ func (p *execRender) Run(renderedManifests *bytes.Buffer) (*bytes.Buffer, error) // If the binary returned almost nothing, it's likely that it didn't // successfully render anything if len(bytes.TrimSpace(postRendered.Bytes())) == 0 { - return nil, errors.Errorf("post render binary %s did not produce any output %s", p.binaryPath, postRendered.String()) + return nil, errors.Errorf("post-renderer %q produced empty output", p.binaryPath) } return postRendered, nil From 297f7b9acb5203967edc19c90b2719d48084c531 Mon Sep 17 00:00:00 2001 From: Austin Abro Date: Mon, 24 Feb 2025 15:11:54 +0000 Subject: [PATCH 56/68] squash Signed-off-by: Austin Abro --- cmd/helm/helm.go | 29 +--- cmd/helm/helm_test.go | 147 +--------------- {cmd/helm => pkg/cmd}/completion.go | 4 +- {cmd/helm => pkg/cmd}/completion_test.go | 2 +- {cmd/helm => pkg/cmd}/create.go | 4 +- {cmd/helm => pkg/cmd}/create_test.go | 2 +- {cmd/helm => pkg/cmd}/dependency.go | 4 +- {cmd/helm => pkg/cmd}/dependency_build.go | 4 +- .../helm => pkg/cmd}/dependency_build_test.go | 2 +- {cmd/helm => pkg/cmd}/dependency_test.go | 2 +- {cmd/helm => pkg/cmd}/dependency_update.go | 4 +- .../cmd}/dependency_update_test.go | 2 +- {cmd/helm => pkg/cmd}/docs.go | 4 +- {cmd/helm => pkg/cmd}/docs_test.go | 2 +- {cmd/helm => pkg/cmd}/env.go | 4 +- {cmd/helm => pkg/cmd}/env_test.go | 2 +- {cmd/helm => pkg/cmd}/flags.go | 2 +- {cmd/helm => pkg/cmd}/flags_test.go | 2 +- {cmd/helm => pkg/cmd}/get.go | 4 +- {cmd/helm => pkg/cmd}/get_all.go | 4 +- {cmd/helm => pkg/cmd}/get_all_test.go | 2 +- {cmd/helm => pkg/cmd}/get_hooks.go | 4 +- {cmd/helm => pkg/cmd}/get_hooks_test.go | 2 +- {cmd/helm => pkg/cmd}/get_manifest.go | 4 +- {cmd/helm => pkg/cmd}/get_manifest_test.go | 2 +- {cmd/helm => pkg/cmd}/get_metadata.go | 4 +- {cmd/helm => pkg/cmd}/get_metadata_test.go | 2 +- {cmd/helm => pkg/cmd}/get_notes.go | 4 +- {cmd/helm => pkg/cmd}/get_notes_test.go | 2 +- {cmd/helm => pkg/cmd}/get_test.go | 2 +- {cmd/helm => pkg/cmd}/get_values.go | 4 +- {cmd/helm => pkg/cmd}/get_values_test.go | 2 +- pkg/cmd/helpers_test.go | 164 ++++++++++++++++++ {cmd/helm => pkg/cmd}/history.go | 4 +- {cmd/helm => pkg/cmd}/history_test.go | 2 +- {cmd/helm => pkg/cmd}/install.go | 12 +- {cmd/helm => pkg/cmd}/install_test.go | 2 +- {cmd/helm => pkg/cmd}/lint.go | 2 +- {cmd/helm => pkg/cmd}/lint_test.go | 2 +- {cmd/helm => pkg/cmd}/list.go | 6 +- {cmd/helm => pkg/cmd}/list_test.go | 2 +- {cmd/helm => pkg/cmd}/load_plugins.go | 10 +- {cmd/helm => pkg/cmd}/package.go | 2 +- {cmd/helm => pkg/cmd}/package_test.go | 2 +- {cmd/helm => pkg/cmd}/plugin.go | 4 +- {cmd/helm => pkg/cmd}/plugin_install.go | 6 +- {cmd/helm => pkg/cmd}/plugin_list.go | 4 +- {cmd/helm => pkg/cmd}/plugin_test.go | 14 +- {cmd/helm => pkg/cmd}/plugin_uninstall.go | 4 +- {cmd/helm => pkg/cmd}/plugin_update.go | 6 +- {cmd/helm => pkg/cmd}/printer.go | 2 +- {cmd/helm => pkg/cmd}/profiling.go | 2 +- {cmd/helm => pkg/cmd}/pull.go | 6 +- {cmd/helm => pkg/cmd}/pull_test.go | 2 +- {cmd/helm => pkg/cmd}/push.go | 4 +- {cmd/helm => pkg/cmd}/push_test.go | 2 +- {cmd/helm => pkg/cmd}/registry.go | 2 +- {cmd/helm => pkg/cmd}/registry_login.go | 6 +- {cmd/helm => pkg/cmd}/registry_login_test.go | 2 +- {cmd/helm => pkg/cmd}/registry_logout.go | 4 +- {cmd/helm => pkg/cmd}/registry_logout_test.go | 2 +- {cmd/helm => pkg/cmd}/release_testing.go | 4 +- {cmd/helm => pkg/cmd}/release_testing_test.go | 2 +- {cmd/helm => pkg/cmd}/repo.go | 4 +- {cmd/helm => pkg/cmd}/repo_add.go | 4 +- {cmd/helm => pkg/cmd}/repo_add_test.go | 2 +- {cmd/helm => pkg/cmd}/repo_index.go | 4 +- {cmd/helm => pkg/cmd}/repo_index_test.go | 2 +- {cmd/helm => pkg/cmd}/repo_list.go | 4 +- {cmd/helm => pkg/cmd}/repo_list_test.go | 2 +- {cmd/helm => pkg/cmd}/repo_remove.go | 4 +- {cmd/helm => pkg/cmd}/repo_remove_test.go | 2 +- {cmd/helm => pkg/cmd}/repo_test.go | 2 +- {cmd/helm => pkg/cmd}/repo_update.go | 4 +- {cmd/helm => pkg/cmd}/repo_update_test.go | 2 +- {cmd/helm => pkg/cmd}/require/args.go | 0 {cmd/helm => pkg/cmd}/require/args_test.go | 0 {cmd/helm => pkg/cmd}/rollback.go | 4 +- {cmd/helm => pkg/cmd}/rollback_test.go | 2 +- {cmd/helm => pkg/cmd}/root.go | 17 +- {cmd/helm => pkg/cmd}/root_test.go | 2 +- {cmd/helm => pkg/cmd}/search.go | 2 +- {cmd/helm => pkg/cmd}/search/search.go | 0 {cmd/helm => pkg/cmd}/search/search_test.go | 0 {cmd/helm => pkg/cmd}/search_hub.go | 4 +- {cmd/helm => pkg/cmd}/search_hub_test.go | 2 +- {cmd/helm => pkg/cmd}/search_repo.go | 14 +- {cmd/helm => pkg/cmd}/search_repo_test.go | 2 +- {cmd/helm => pkg/cmd}/search_test.go | 2 +- {cmd/helm => pkg/cmd}/show.go | 8 +- {cmd/helm => pkg/cmd}/show_test.go | 2 +- {cmd/helm => pkg/cmd}/status.go | 4 +- {cmd/helm => pkg/cmd}/status_test.go | 2 +- {cmd/helm => pkg/cmd}/template.go | 4 +- {cmd/helm => pkg/cmd}/template_test.go | 2 +- .../helm/plugins/fullenv/completion.yaml | 0 .../helm/plugins/fullenv/fullenv.sh | 0 .../helm/plugins/fullenv/plugin.yaml | 0 .../helm/repositories.yaml | 0 .../helm/repository/test-name-charts.txt | 0 .../helm/repository/test-name-index.yaml | 0 .../helm/repository/testing-index.yaml | 0 .../cmd}/testdata/helm-test-key.pub | Bin .../cmd}/testdata/helm-test-key.secret | Bin .../helmhome/helm/plugins/args/args.sh | 0 .../helm/plugins/args/plugin.complete | 0 .../helmhome/helm/plugins/args/plugin.yaml | 0 .../helm/plugins/echo/completion.yaml | 0 .../helm/plugins/echo/plugin.complete | 0 .../helmhome/helm/plugins/echo/plugin.yaml | 0 .../helmhome/helm/plugins/env/completion.yaml | 0 .../helmhome/helm/plugins/env/plugin.yaml | 0 .../helm/plugins/exitwith/completion.yaml | 0 .../helm/plugins/exitwith/exitwith.sh | 0 .../helm/plugins/exitwith/plugin.yaml | 0 .../helm/plugins/fullenv/completion.yaml | 0 .../helmhome/helm/plugins/fullenv/fullenv.sh | 0 .../helmhome/helm/plugins/fullenv/plugin.yaml | 0 .../testdata/helmhome/helm/repositories.yaml | 0 .../helm/repository/test-name-charts.txt | 0 .../helm/repository/test-name-index.yaml | 0 .../helm/repository/testing-index.yaml | 0 .../output/chart-with-subchart-update.txt | 0 .../output/dependency-list-archive.txt | 0 .../output/dependency-list-no-chart-linux.txt | 0 .../dependency-list-no-requirements-linux.txt | 0 .../cmd}/testdata/output/dependency-list.txt | 0 .../cmd}/testdata/output/deprecated-chart.txt | 0 .../cmd}/testdata/output/docs-type-comp.txt | 0 .../testdata/output/empty_default_comp.txt | 0 .../testdata/output/empty_nofile_comp.txt | 0 .../cmd}/testdata/output/env-comp.txt | 0 .../cmd}/testdata/output/get-all-no-args.txt | 0 .../testdata/output/get-hooks-no-args.txt | 0 .../cmd}/testdata/output/get-hooks.txt | 0 .../testdata/output/get-manifest-no-args.txt | 0 .../cmd}/testdata/output/get-manifest.txt | 0 .../testdata/output/get-metadata-args.txt | 0 .../cmd}/testdata/output/get-metadata.json | 0 .../cmd}/testdata/output/get-metadata.txt | 0 .../cmd}/testdata/output/get-metadata.yaml | 0 .../testdata/output/get-notes-no-args.txt | 0 .../cmd}/testdata/output/get-notes.txt | 0 .../testdata/output/get-release-template.txt | 0 .../cmd}/testdata/output/get-release.txt | 0 .../cmd}/testdata/output/get-values-all.txt | 0 .../cmd}/testdata/output/get-values-args.txt | 0 .../cmd}/testdata/output/get-values.txt | 0 .../cmd}/testdata/output/history-limit.txt | 0 .../cmd}/testdata/output/history.json | 0 .../cmd}/testdata/output/history.txt | 0 .../cmd}/testdata/output/history.yaml | 0 .../testdata/output/install-and-replace.txt | 0 .../output/install-and-take-ownership.txt | 0 .../output/install-chart-bad-type.txt | 0 .../install-dry-run-with-secret-hidden.txt | 0 .../output/install-dry-run-with-secret.txt | 0 .../testdata/output/install-hide-secret.txt | 0 .../testdata/output/install-lib-chart.txt | 0 .../testdata/output/install-name-template.txt | 0 .../cmd}/testdata/output/install-no-args.txt | 0 .../cmd}/testdata/output/install-no-hooks.txt | 0 .../install-with-multiple-values-files.txt | 0 .../output/install-with-multiple-values.txt | 0 .../testdata/output/install-with-timeout.txt | 0 .../output/install-with-values-file.txt | 0 .../testdata/output/install-with-values.txt | 0 .../output/install-with-wait-for-jobs.txt | 0 .../testdata/output/install-with-wait.txt | 0 .../cmd}/testdata/output/install.txt | 0 .../cmd}/testdata/output/issue-9027.txt | 0 .../cmd}/testdata/output/issue-totoml.txt | 0 ...hart-with-bad-subcharts-with-subcharts.txt | 0 .../output/lint-chart-with-bad-subcharts.txt | 0 ...lint-chart-with-deprecated-api-old-k8s.txt | 0 .../lint-chart-with-deprecated-api-strict.txt | 0 .../output/lint-chart-with-deprecated-api.txt | 0 .../testdata/output/lint-quiet-with-error.txt | 0 .../output/lint-quiet-with-warning.txt | 0 .../cmd}/testdata/output/lint-quiet.txt | 0 .../cmd}/testdata/output/list-all.txt | 0 .../testdata/output/list-date-reversed.txt | 0 .../cmd}/testdata/output/list-date.txt | 0 .../cmd}/testdata/output/list-failed.txt | 0 .../cmd}/testdata/output/list-filter.txt | 0 .../cmd}/testdata/output/list-max.txt | 0 .../cmd}/testdata/output/list-namespace.txt | 0 .../cmd}/testdata/output/list-no-headers.txt | 0 .../cmd}/testdata/output/list-offset.txt | 0 .../cmd}/testdata/output/list-pending.txt | 0 .../cmd}/testdata/output/list-reverse.txt | 0 .../cmd}/testdata/output/list-short-json.txt | 0 .../cmd}/testdata/output/list-short-yaml.txt | 0 .../cmd}/testdata/output/list-short.txt | 0 .../cmd}/testdata/output/list-superseded.txt | 0 .../cmd}/testdata/output/list-uninstalled.txt | 0 .../testdata/output/list-uninstalling.txt | 0 .../helm => pkg/cmd}/testdata/output/list.txt | 0 .../cmd}/testdata/output/object-order.txt | 0 .../cmd}/testdata/output/output-comp.txt | 0 .../cmd}/testdata/output/plugin_args_comp.txt | 0 .../testdata/output/plugin_args_flag_comp.txt | 0 .../output/plugin_args_many_args_comp.txt | 0 .../testdata/output/plugin_args_ns_comp.txt | 0 .../output/plugin_echo_no_directive.txt | 0 .../cmd}/testdata/output/plugin_list_comp.txt | 0 .../testdata/output/plugin_repeat_comp.txt | 0 .../testdata/output/release_list_comp.txt | 0 .../output/release_list_repeat_comp.txt | 0 .../cmd}/testdata/output/repo-add.txt | 0 .../cmd}/testdata/output/repo-add2.txt | 0 .../cmd}/testdata/output/repo_list_comp.txt | 0 .../cmd}/testdata/output/repo_repeat_comp.txt | 0 .../cmd}/testdata/output/revision-comp.txt | 0 .../output/revision-wrong-args-comp.txt | 0 .../cmd}/testdata/output/rollback-comp.txt | 0 .../cmd}/testdata/output/rollback-no-args.txt | 0 .../testdata/output/rollback-no-revision.txt | 0 .../output/rollback-non-existent-version.txt | 0 .../cmd}/testdata/output/rollback-timeout.txt | 0 .../output/rollback-wait-for-jobs.txt | 0 .../cmd}/testdata/output/rollback-wait.txt | 0 .../output/rollback-wrong-args-comp.txt | 0 .../cmd}/testdata/output/rollback.txt | 0 .../testdata/output/schema-negative-cli.txt | 0 .../cmd}/testdata/output/schema-negative.txt | 0 .../cmd}/testdata/output/schema.txt | 0 .../output/search-constraint-single.txt | 0 .../testdata/output/search-constraint.txt | 0 .../output/search-multiple-devel-release.txt | 0 .../output/search-multiple-stable-release.txt | 0 .../search-multiple-versions-constraints.txt | 0 .../output/search-multiple-versions.txt | 0 .../output/search-not-found-error.txt | 0 .../cmd}/testdata/output/search-not-found.txt | 0 .../testdata/output/search-output-json.txt | 0 .../testdata/output/search-output-yaml.txt | 0 .../cmd}/testdata/output/search-regex.txt | 0 .../output/search-versions-constraint.txt | 0 .../cmd}/testdata/output/status-comp.txt | 0 .../cmd}/testdata/output/status-with-desc.txt | 0 .../testdata/output/status-with-notes.txt | 0 .../output/status-with-resources.json | 0 .../testdata/output/status-with-resources.txt | 0 .../output/status-with-test-suite.txt | 0 .../output/status-wrong-args-comp.txt | 0 .../cmd}/testdata/output/status.json | 0 .../cmd}/testdata/output/status.txt | 0 .../output/subchart-schema-cli-negative.txt | 0 .../testdata/output/subchart-schema-cli.txt | 0 .../output/subchart-schema-negative.txt | 0 .../output/template-chart-bad-type.txt | 0 ...te-chart-with-template-lib-archive-dep.txt | 0 .../template-chart-with-template-lib-dep.txt | 0 .../testdata/output/template-lib-chart.txt | 0 .../output/template-name-template.txt | 0 .../cmd}/testdata/output/template-no-args.txt | 0 .../cmd}/testdata/output/template-set.txt | 0 .../output/template-show-only-glob.txt | 0 .../output/template-show-only-multiple.txt | 0 .../output/template-show-only-one.txt | 0 .../testdata/output/template-skip-tests.txt | 0 .../output/template-subchart-cm-set-file.txt | 0 .../output/template-subchart-cm-set.txt | 0 .../testdata/output/template-subchart-cm.txt | 0 .../testdata/output/template-values-files.txt | 0 .../output/template-with-api-version.txt | 0 .../testdata/output/template-with-crds.txt | 0 .../template-with-invalid-yaml-debug.txt | 0 .../output/template-with-invalid-yaml.txt | 0 .../output/template-with-kube-version.txt | 0 .../cmd}/testdata/output/template.txt | 0 .../output/uninstall-keep-history.txt | 0 .../testdata/output/uninstall-multiple.txt | 0 .../testdata/output/uninstall-no-args.txt | 0 .../testdata/output/uninstall-no-hooks.txt | 0 .../testdata/output/uninstall-timeout.txt | 0 .../cmd}/testdata/output/uninstall-wait.txt | 0 .../cmd}/testdata/output/uninstall.txt | 0 .../output/upgrade-and-take-ownership.txt | 0 .../upgrade-uninstalled-with-keep-history.txt | 0 .../output/upgrade-with-bad-dependencies.txt | 0 ...e-with-bad-or-missing-existing-release.txt | 0 .../output/upgrade-with-dependency-update.txt | 0 .../output/upgrade-with-install-timeout.txt | 0 .../testdata/output/upgrade-with-install.txt | 0 .../upgrade-with-missing-dependencies.txt | 0 .../output/upgrade-with-pending-install.txt | 0 .../output/upgrade-with-reset-values.txt | 0 .../output/upgrade-with-reset-values2.txt | 0 .../testdata/output/upgrade-with-timeout.txt | 0 .../output/upgrade-with-wait-for-jobs.txt | 0 .../testdata/output/upgrade-with-wait.txt | 0 .../cmd}/testdata/output/upgrade.txt | 0 .../cmd}/testdata/output/values.json | 0 .../cmd}/testdata/output/values.yaml | 0 .../output/version-client-shorthand.txt | 0 .../cmd}/testdata/output/version-client.txt | 0 .../cmd}/testdata/output/version-comp.txt | 0 .../testdata/output/version-invalid-comp.txt | 0 .../cmd}/testdata/output/version-short.txt | 0 .../cmd}/testdata/output/version-template.txt | 0 .../cmd}/testdata/output/version.txt | 0 {cmd/helm => pkg/cmd}/testdata/password | 0 {cmd/helm => pkg/cmd}/testdata/plugins.yaml | 0 .../cmd}/testdata/repositories.yaml | 0 .../testdata/testcharts/alpine/Chart.yaml | 0 .../cmd}/testdata/testcharts/alpine/README.md | 0 .../testcharts/alpine/extra_values.yaml | 0 .../testcharts/alpine/more_values.yaml | 0 .../alpine/templates/alpine-pod.yaml | 0 .../testdata/testcharts/alpine/values.yaml | 0 .../chart-bad-requirements/.helmignore | 0 .../chart-bad-requirements/Chart.yaml | 0 .../charts/reqsubchart/.helmignore | 0 .../charts/reqsubchart/Chart.yaml | 0 .../charts/reqsubchart/values.yaml | 0 .../chart-bad-requirements/values.yaml | 0 .../testcharts/chart-bad-type/Chart.yaml | 0 .../testcharts/chart-bad-type/README.md | 0 .../chart-bad-type/extra_values.yaml | 0 .../chart-bad-type/more_values.yaml | 0 .../chart-bad-type/templates/alpine-pod.yaml | 0 .../testcharts/chart-bad-type/values.yaml | 0 .../testcharts/chart-missing-deps/.helmignore | 0 .../testcharts/chart-missing-deps/Chart.yaml | 0 .../charts/reqsubchart/.helmignore | 0 .../charts/reqsubchart/Chart.yaml | 0 .../charts/reqsubchart/values.yaml | 0 .../testcharts/chart-missing-deps/values.yaml | 0 .../chart-with-bad-subcharts/Chart.yaml | 0 .../charts/bad-subchart/Chart.yaml | 0 .../charts/bad-subchart/values.yaml | 0 .../charts/good-subchart/Chart.yaml | 0 .../charts/good-subchart/values.yaml | 0 .../requirements.yaml | 0 .../chart-with-bad-subcharts/values.yaml | 0 .../chart-with-deprecated-api/Chart.yaml | 0 .../templates/horizontalpodautoscaler.yaml | 0 .../chart-with-deprecated-api/values.yaml | 0 .../testcharts/chart-with-lib-dep/.helmignore | 0 .../testcharts/chart-with-lib-dep/Chart.yaml | 0 .../charts/common-0.0.5.tgz | Bin .../chart-with-lib-dep/templates/NOTES.txt | 0 .../chart-with-lib-dep/templates/_helpers.tpl | 0 .../templates/deployment.yaml | 0 .../chart-with-lib-dep/templates/ingress.yaml | 0 .../chart-with-lib-dep/templates/service.yaml | 0 .../testcharts/chart-with-lib-dep/values.yaml | 0 .../chart-with-only-crds/.helmignore | 0 .../chart-with-only-crds/Chart.yaml | 0 .../chart-with-only-crds/crds/test-crd.yaml | 0 .../chart-with-schema-and-subchart/Chart.yaml | 0 .../charts/subchart-with-schema/Chart.yaml | 0 .../subchart-with-schema/templates/empty.yaml | 0 .../subchart-with-schema/values.schema.json | 0 .../charts/subchart-with-schema/values.yaml | 0 .../templates/empty.yaml | 0 .../values.schema.json | 0 .../values.yaml | 0 .../Chart.yaml | 0 .../templates/empty.yaml | 0 .../values.schema.json | 0 .../values.yaml | 0 .../chart-with-schema-negative/Chart.yaml | 0 .../templates/empty.yaml | 0 .../values.schema.json | 0 .../chart-with-schema-negative/values.yaml | 0 .../testcharts/chart-with-schema/Chart.yaml | 0 .../chart-with-schema/extra-values.yaml | 0 .../chart-with-schema/templates/empty.yaml | 0 .../chart-with-schema/values.schema.json | 0 .../testcharts/chart-with-schema/values.yaml | 0 .../testcharts/chart-with-secret/Chart.yaml | 0 .../templates/configmap.yaml | 0 .../chart-with-secret/templates/secret.yaml | 0 .../chart-with-subchart-notes/Chart.yaml | 0 .../charts/subchart-with-notes/Chart.yaml | 0 .../subchart-with-notes/templates/NOTES.txt | 0 .../templates/NOTES.txt | 0 .../chart-with-subchart-update/Chart.lock | 0 .../chart-with-subchart-update/Chart.yaml | 0 .../charts/subchart-with-notes/Chart.yaml | 0 .../subchart-with-notes/templates/NOTES.txt | 0 .../templates/NOTES.txt | 0 .../.helmignore | 0 .../Chart.yaml | 0 .../charts/common-0.0.5.tgz | Bin .../templates/NOTES.txt | 0 .../templates/_helpers.tpl | 0 .../templates/deployment.yaml | 0 .../templates/ingress.yaml | 0 .../templates/service.yaml | 0 .../values.yaml | 0 .../chart-with-template-lib-dep/.helmignore | 0 .../chart-with-template-lib-dep/Chart.yaml | 0 .../charts/common/.helmignore | 0 .../charts/common/Chart.yaml | 0 .../charts/common/README.md | 0 .../charts/common/templates/_chartref.tpl | 0 .../charts/common/templates/_configmap.yaml | 0 .../charts/common/templates/_container.yaml | 0 .../charts/common/templates/_deployment.yaml | 0 .../charts/common/templates/_envvar.tpl | 0 .../charts/common/templates/_fullname.tpl | 0 .../charts/common/templates/_ingress.yaml | 0 .../charts/common/templates/_metadata.yaml | 0 .../templates/_metadata_annotations.tpl | 0 .../common/templates/_metadata_labels.tpl | 0 .../charts/common/templates/_name.tpl | 0 .../templates/_persistentvolumeclaim.yaml | 0 .../charts/common/templates/_secret.yaml | 0 .../charts/common/templates/_service.yaml | 0 .../charts/common/templates/_util.tpl | 0 .../charts/common/templates/_volume.tpl | 0 .../charts/common/templates/configmap.yaml | 0 .../charts/common/values.yaml | 0 .../templates/NOTES.txt | 0 .../templates/_helpers.tpl | 0 .../templates/deployment.yaml | 0 .../templates/ingress.yaml | 0 .../templates/service.yaml | 0 .../chart-with-template-lib-dep/values.yaml | 0 .../Chart.yaml | 0 .../README.md | 0 .../templates/alpine-pod.yaml | 0 .../values.yaml | 0 .../testcharts/compressedchart-0.1.0.tar.gz | Bin .../testcharts/compressedchart-0.1.0.tgz | Bin .../testcharts/compressedchart-0.2.0.tgz | Bin .../testcharts/compressedchart-0.3.0.tgz | Bin .../compressedchart-with-hyphens-0.1.0.tgz | Bin .../testdata/testcharts/deprecated/Chart.yaml | 0 .../testdata/testcharts/deprecated/README.md | 0 .../cmd}/testdata/testcharts/empty/Chart.yaml | 0 .../cmd}/testdata/testcharts/empty/README.md | 0 .../testcharts/empty/templates/empty.yaml | 0 .../testdata/testcharts/empty/values.yaml | 0 .../testcharts/issue-7233/.helmignore | 0 .../testdata/testcharts/issue-7233/Chart.yaml | 0 .../testcharts/issue-7233/requirements.lock | 0 .../testcharts/issue-7233/requirements.yaml | 0 .../issue-7233/templates/configmap.yaml | 0 .../testcharts/issue-7233/values.yaml | 0 .../testdata/testcharts/issue-9027/Chart.yaml | 0 .../issue-9027/charts/subchart/Chart.yaml | 0 .../charts/subchart/templates/values.yaml | 0 .../issue-9027/charts/subchart/values.yaml | 0 .../issue-9027/templates/values.yaml | 0 .../testcharts/issue-9027/values.yaml | 0 .../testcharts/issue-totoml/Chart.yaml | 0 .../issue-totoml/templates/configmap.yaml | 0 .../testcharts/issue-totoml/values.yaml | 0 .../testdata/testcharts/issue1979/Chart.yaml | 0 .../testdata/testcharts/issue1979/README.md | 0 .../testcharts/issue1979/extra_values.yaml | 0 .../testcharts/issue1979/more_values.yaml | 0 .../issue1979/templates/alpine-pod.yaml | 0 .../testdata/testcharts/issue1979/values.yaml | 0 .../testdata/testcharts/lib-chart/.helmignore | 0 .../testdata/testcharts/lib-chart/Chart.yaml | 0 .../testdata/testcharts/lib-chart/README.md | 0 .../lib-chart/templates/_chartref.tpl | 0 .../lib-chart/templates/_configmap.yaml | 0 .../lib-chart/templates/_container.yaml | 0 .../lib-chart/templates/_deployment.yaml | 0 .../lib-chart/templates/_envvar.tpl | 0 .../lib-chart/templates/_fullname.tpl | 0 .../lib-chart/templates/_ingress.yaml | 0 .../lib-chart/templates/_metadata.yaml | 0 .../templates/_metadata_annotations.tpl | 0 .../lib-chart/templates/_metadata_labels.tpl | 0 .../testcharts/lib-chart/templates/_name.tpl | 0 .../templates/_persistentvolumeclaim.yaml | 0 .../lib-chart/templates/_secret.yaml | 0 .../lib-chart/templates/_service.yaml | 0 .../testcharts/lib-chart/templates/_util.tpl | 0 .../lib-chart/templates/_volume.tpl | 0 .../testdata/testcharts/lib-chart/values.yaml | 0 .../testcharts/object-order/Chart.yaml | 0 .../object-order/templates/01-a.yml | 0 .../object-order/templates/02-b.yml | 0 .../testcharts/object-order/values.yaml | 0 .../testcharts/oci-dependent-chart-0.1.0.tgz | Bin .../pre-release-chart-0.1.0-alpha.tgz | Bin .../testdata/testcharts/reqtest-0.1.0.tgz | Bin .../testdata/testcharts/reqtest/.helmignore | 0 .../testdata/testcharts/reqtest/Chart.lock | 0 .../testdata/testcharts/reqtest/Chart.yaml | 0 .../reqtest/charts/reqsubchart/.helmignore | 0 .../reqtest/charts/reqsubchart/Chart.yaml | 0 .../reqtest/charts/reqsubchart/values.yaml | 0 .../reqtest/charts/reqsubchart2/.helmignore | 0 .../reqtest/charts/reqsubchart2/Chart.yaml | 0 .../reqtest/charts/reqsubchart2/values.yaml | 0 .../reqtest/charts/reqsubchart3-0.2.0.tgz | Bin .../testdata/testcharts/reqtest/values.yaml | 0 .../testdata/testcharts/signtest-0.1.0.tgz | Bin .../testcharts/signtest-0.1.0.tgz.prov | 0 .../testdata/testcharts/signtest/.helmignore | 0 .../testdata/testcharts/signtest/Chart.yaml | 0 .../testcharts/signtest/alpine/Chart.yaml | 0 .../testcharts/signtest/alpine/README.md | 0 .../signtest/alpine/templates/alpine-pod.yaml | 0 .../testcharts/signtest/alpine/values.yaml | 0 .../testcharts/signtest/templates/pod.yaml | 0 .../testdata/testcharts/signtest/values.yaml | 0 .../testdata/testcharts/subchart/Chart.yaml | 0 .../subchart/charts/subchartA/Chart.yaml | 0 .../charts/subchartA/templates/service.yaml | 0 .../subchart/charts/subchartA/values.yaml | 0 .../subchart/charts/subchartB/Chart.yaml | 0 .../charts/subchartB/templates/service.yaml | 0 .../subchart/charts/subchartB/values.yaml | 0 .../testcharts/subchart/crds/crdA.yaml | 0 .../testcharts/subchart/extra_values.yaml | 0 .../testcharts/subchart/templates/NOTES.txt | 0 .../subchart/templates/service.yaml | 0 .../subchart/templates/subdir/configmap.yaml | 0 .../subchart/templates/subdir/role.yaml | 0 .../templates/subdir/rolebinding.yaml | 0 .../templates/subdir/serviceaccount.yaml | 0 .../subchart/templates/tests/test-config.yaml | 0 .../templates/tests/test-nothing.yaml | 0 .../testdata/testcharts/subchart/values.yaml | 0 .../upgradetest/templates/configmap.yaml | 0 .../testcharts/upgradetest/values.yaml | 0 .../cmd}/testdata/testplugin/plugin.yaml | 0 .../cmd}/testdata/testserver/index.yaml | 0 .../testserver/repository/repositories.yaml | 0 {cmd/helm => pkg/cmd}/uninstall.go | 4 +- {cmd/helm => pkg/cmd}/uninstall_test.go | 2 +- {cmd/helm => pkg/cmd}/upgrade.go | 8 +- {cmd/helm => pkg/cmd}/upgrade_test.go | 2 +- {cmd/helm => pkg/cmd}/verify.go | 4 +- {cmd/helm => pkg/cmd}/verify_test.go | 2 +- {cmd/helm => pkg/cmd}/version.go | 4 +- {cmd/helm => pkg/cmd}/version_test.go | 2 +- 538 files changed, 354 insertions(+), 335 deletions(-) rename {cmd/helm => pkg/cmd}/completion.go (99%) rename {cmd/helm => pkg/cmd}/completion_test.go (99%) rename {cmd/helm => pkg/cmd}/create.go (98%) rename {cmd/helm => pkg/cmd}/create_test.go (99%) rename {cmd/helm => pkg/cmd}/dependency.go (98%) rename {cmd/helm => pkg/cmd}/dependency_build.go (98%) rename {cmd/helm => pkg/cmd}/dependency_build_test.go (99%) rename {cmd/helm => pkg/cmd}/dependency_test.go (99%) rename {cmd/helm => pkg/cmd}/dependency_update.go (98%) rename {cmd/helm => pkg/cmd}/dependency_update_test.go (99%) rename {cmd/helm => pkg/cmd}/docs.go (98%) rename {cmd/helm => pkg/cmd}/docs_test.go (98%) rename {cmd/helm => pkg/cmd}/env.go (97%) rename {cmd/helm => pkg/cmd}/env_test.go (98%) rename {cmd/helm => pkg/cmd}/flags.go (99%) rename {cmd/helm => pkg/cmd}/flags_test.go (99%) rename {cmd/helm => pkg/cmd}/get.go (96%) rename {cmd/helm => pkg/cmd}/get_all.go (97%) rename {cmd/helm => pkg/cmd}/get_all_test.go (99%) rename {cmd/helm => pkg/cmd}/get_hooks.go (97%) rename {cmd/helm => pkg/cmd}/get_hooks_test.go (99%) rename {cmd/helm => pkg/cmd}/get_manifest.go (97%) rename {cmd/helm => pkg/cmd}/get_manifest_test.go (99%) rename {cmd/helm => pkg/cmd}/get_metadata.go (98%) rename {cmd/helm => pkg/cmd}/get_metadata_test.go (99%) rename {cmd/helm => pkg/cmd}/get_notes.go (97%) rename {cmd/helm => pkg/cmd}/get_notes_test.go (99%) rename {cmd/helm => pkg/cmd}/get_test.go (98%) rename {cmd/helm => pkg/cmd}/get_values.go (98%) rename {cmd/helm => pkg/cmd}/get_values_test.go (99%) create mode 100644 pkg/cmd/helpers_test.go rename {cmd/helm => pkg/cmd}/history.go (99%) rename {cmd/helm => pkg/cmd}/history_test.go (99%) rename {cmd/helm => pkg/cmd}/install.go (98%) rename {cmd/helm => pkg/cmd}/install_test.go (99%) rename {cmd/helm => pkg/cmd}/lint.go (99%) rename {cmd/helm => pkg/cmd}/lint_test.go (99%) rename {cmd/helm => pkg/cmd}/list.go (98%) rename {cmd/helm => pkg/cmd}/list_test.go (99%) rename {cmd/helm => pkg/cmd}/load_plugins.go (99%) rename {cmd/helm => pkg/cmd}/package.go (99%) rename {cmd/helm => pkg/cmd}/package_test.go (99%) rename {cmd/helm => pkg/cmd}/plugin.go (97%) rename {cmd/helm => pkg/cmd}/plugin_install.go (96%) rename {cmd/helm => pkg/cmd}/plugin_list.go (97%) rename {cmd/helm => pkg/cmd}/plugin_test.go (98%) rename {cmd/helm => pkg/cmd}/plugin_uninstall.go (97%) rename {cmd/helm => pkg/cmd}/plugin_update.go (95%) rename {cmd/helm => pkg/cmd}/printer.go (98%) rename {cmd/helm => pkg/cmd}/profiling.go (99%) rename {cmd/helm => pkg/cmd}/pull.go (97%) rename {cmd/helm => pkg/cmd}/pull_test.go (99%) rename {cmd/helm => pkg/cmd}/push.go (98%) rename {cmd/helm => pkg/cmd}/push_test.go (98%) rename {cmd/helm => pkg/cmd}/registry.go (98%) rename {cmd/helm => pkg/cmd}/registry_login.go (97%) rename {cmd/helm => pkg/cmd}/registry_login_test.go (98%) rename {cmd/helm => pkg/cmd}/registry_logout.go (96%) rename {cmd/helm => pkg/cmd}/registry_logout_test.go (98%) rename {cmd/helm => pkg/cmd}/release_testing.go (98%) rename {cmd/helm => pkg/cmd}/release_testing_test.go (98%) rename {cmd/helm => pkg/cmd}/repo.go (96%) rename {cmd/helm => pkg/cmd}/repo_add.go (99%) rename {cmd/helm => pkg/cmd}/repo_add_test.go (99%) rename {cmd/helm => pkg/cmd}/repo_index.go (98%) rename {cmd/helm => pkg/cmd}/repo_index_test.go (99%) rename {cmd/helm => pkg/cmd}/repo_list.go (98%) rename {cmd/helm => pkg/cmd}/repo_list_test.go (98%) rename {cmd/helm => pkg/cmd}/repo_remove.go (98%) rename {cmd/helm => pkg/cmd}/repo_remove_test.go (99%) rename {cmd/helm => pkg/cmd}/repo_test.go (98%) rename {cmd/helm => pkg/cmd}/repo_update.go (98%) rename {cmd/helm => pkg/cmd}/repo_update_test.go (99%) rename {cmd/helm => pkg/cmd}/require/args.go (100%) rename {cmd/helm => pkg/cmd}/require/args_test.go (100%) rename {cmd/helm => pkg/cmd}/rollback.go (98%) rename {cmd/helm => pkg/cmd}/rollback_test.go (99%) rename {cmd/helm => pkg/cmd}/root.go (97%) rename {cmd/helm => pkg/cmd}/root_test.go (99%) rename {cmd/helm => pkg/cmd}/search.go (98%) rename {cmd/helm => pkg/cmd}/search/search.go (100%) rename {cmd/helm => pkg/cmd}/search/search_test.go (100%) rename {cmd/helm => pkg/cmd}/search_hub.go (99%) rename {cmd/helm => pkg/cmd}/search_hub_test.go (99%) rename {cmd/helm => pkg/cmd}/search_repo.go (97%) rename {cmd/helm => pkg/cmd}/search_repo_test.go (99%) rename {cmd/helm => pkg/cmd}/search_test.go (98%) rename {cmd/helm => pkg/cmd}/show.go (97%) rename {cmd/helm => pkg/cmd}/show_test.go (99%) rename {cmd/helm => pkg/cmd}/status.go (99%) rename {cmd/helm => pkg/cmd}/status_test.go (99%) rename {cmd/helm => pkg/cmd}/template.go (99%) rename {cmd/helm => pkg/cmd}/template_test.go (99%) rename {cmd/helm => pkg/cmd}/testdata/helm home with space/helm/plugins/fullenv/completion.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/helm home with space/helm/plugins/fullenv/fullenv.sh (100%) rename {cmd/helm => pkg/cmd}/testdata/helm home with space/helm/plugins/fullenv/plugin.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/helm home with space/helm/repositories.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/helm home with space/helm/repository/test-name-charts.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/helm home with space/helm/repository/test-name-index.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/helm home with space/helm/repository/testing-index.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/helm-test-key.pub (100%) rename {cmd/helm => pkg/cmd}/testdata/helm-test-key.secret (100%) rename {cmd/helm => pkg/cmd}/testdata/helmhome/helm/plugins/args/args.sh (100%) rename {cmd/helm => pkg/cmd}/testdata/helmhome/helm/plugins/args/plugin.complete (100%) rename {cmd/helm => pkg/cmd}/testdata/helmhome/helm/plugins/args/plugin.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/helmhome/helm/plugins/echo/completion.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/helmhome/helm/plugins/echo/plugin.complete (100%) rename {cmd/helm => pkg/cmd}/testdata/helmhome/helm/plugins/echo/plugin.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/helmhome/helm/plugins/env/completion.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/helmhome/helm/plugins/env/plugin.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/helmhome/helm/plugins/exitwith/completion.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/helmhome/helm/plugins/exitwith/exitwith.sh (100%) rename {cmd/helm => pkg/cmd}/testdata/helmhome/helm/plugins/exitwith/plugin.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/helmhome/helm/plugins/fullenv/completion.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/helmhome/helm/plugins/fullenv/fullenv.sh (100%) rename {cmd/helm => pkg/cmd}/testdata/helmhome/helm/plugins/fullenv/plugin.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/helmhome/helm/repositories.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/helmhome/helm/repository/test-name-charts.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/helmhome/helm/repository/test-name-index.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/helmhome/helm/repository/testing-index.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/output/chart-with-subchart-update.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/dependency-list-archive.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/dependency-list-no-chart-linux.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/dependency-list-no-requirements-linux.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/dependency-list.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/deprecated-chart.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/docs-type-comp.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/empty_default_comp.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/empty_nofile_comp.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/env-comp.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/get-all-no-args.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/get-hooks-no-args.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/get-hooks.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/get-manifest-no-args.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/get-manifest.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/get-metadata-args.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/get-metadata.json (100%) rename {cmd/helm => pkg/cmd}/testdata/output/get-metadata.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/get-metadata.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/output/get-notes-no-args.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/get-notes.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/get-release-template.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/get-release.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/get-values-all.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/get-values-args.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/get-values.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/history-limit.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/history.json (100%) rename {cmd/helm => pkg/cmd}/testdata/output/history.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/history.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/output/install-and-replace.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/install-and-take-ownership.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/install-chart-bad-type.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/install-dry-run-with-secret-hidden.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/install-dry-run-with-secret.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/install-hide-secret.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/install-lib-chart.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/install-name-template.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/install-no-args.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/install-no-hooks.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/install-with-multiple-values-files.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/install-with-multiple-values.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/install-with-timeout.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/install-with-values-file.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/install-with-values.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/install-with-wait-for-jobs.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/install-with-wait.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/install.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/issue-9027.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/issue-totoml.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/lint-chart-with-bad-subcharts-with-subcharts.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/lint-chart-with-bad-subcharts.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/lint-chart-with-deprecated-api-old-k8s.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/lint-chart-with-deprecated-api-strict.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/lint-chart-with-deprecated-api.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/lint-quiet-with-error.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/lint-quiet-with-warning.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/lint-quiet.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/list-all.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/list-date-reversed.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/list-date.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/list-failed.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/list-filter.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/list-max.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/list-namespace.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/list-no-headers.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/list-offset.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/list-pending.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/list-reverse.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/list-short-json.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/list-short-yaml.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/list-short.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/list-superseded.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/list-uninstalled.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/list-uninstalling.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/list.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/object-order.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/output-comp.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/plugin_args_comp.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/plugin_args_flag_comp.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/plugin_args_many_args_comp.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/plugin_args_ns_comp.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/plugin_echo_no_directive.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/plugin_list_comp.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/plugin_repeat_comp.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/release_list_comp.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/release_list_repeat_comp.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/repo-add.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/repo-add2.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/repo_list_comp.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/repo_repeat_comp.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/revision-comp.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/revision-wrong-args-comp.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/rollback-comp.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/rollback-no-args.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/rollback-no-revision.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/rollback-non-existent-version.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/rollback-timeout.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/rollback-wait-for-jobs.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/rollback-wait.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/rollback-wrong-args-comp.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/rollback.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/schema-negative-cli.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/schema-negative.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/schema.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/search-constraint-single.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/search-constraint.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/search-multiple-devel-release.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/search-multiple-stable-release.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/search-multiple-versions-constraints.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/search-multiple-versions.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/search-not-found-error.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/search-not-found.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/search-output-json.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/search-output-yaml.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/search-regex.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/search-versions-constraint.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/status-comp.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/status-with-desc.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/status-with-notes.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/status-with-resources.json (100%) rename {cmd/helm => pkg/cmd}/testdata/output/status-with-resources.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/status-with-test-suite.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/status-wrong-args-comp.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/status.json (100%) rename {cmd/helm => pkg/cmd}/testdata/output/status.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/subchart-schema-cli-negative.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/subchart-schema-cli.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/subchart-schema-negative.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/template-chart-bad-type.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/template-chart-with-template-lib-archive-dep.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/template-chart-with-template-lib-dep.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/template-lib-chart.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/template-name-template.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/template-no-args.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/template-set.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/template-show-only-glob.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/template-show-only-multiple.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/template-show-only-one.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/template-skip-tests.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/template-subchart-cm-set-file.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/template-subchart-cm-set.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/template-subchart-cm.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/template-values-files.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/template-with-api-version.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/template-with-crds.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/template-with-invalid-yaml-debug.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/template-with-invalid-yaml.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/template-with-kube-version.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/template.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/uninstall-keep-history.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/uninstall-multiple.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/uninstall-no-args.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/uninstall-no-hooks.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/uninstall-timeout.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/uninstall-wait.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/uninstall.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/upgrade-and-take-ownership.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/upgrade-uninstalled-with-keep-history.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/upgrade-with-bad-dependencies.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/upgrade-with-bad-or-missing-existing-release.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/upgrade-with-dependency-update.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/upgrade-with-install-timeout.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/upgrade-with-install.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/upgrade-with-missing-dependencies.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/upgrade-with-pending-install.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/upgrade-with-reset-values.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/upgrade-with-reset-values2.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/upgrade-with-timeout.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/upgrade-with-wait-for-jobs.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/upgrade-with-wait.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/upgrade.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/values.json (100%) rename {cmd/helm => pkg/cmd}/testdata/output/values.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/output/version-client-shorthand.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/version-client.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/version-comp.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/version-invalid-comp.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/version-short.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/version-template.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/output/version.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/password (100%) rename {cmd/helm => pkg/cmd}/testdata/plugins.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/repositories.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/alpine/Chart.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/alpine/README.md (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/alpine/extra_values.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/alpine/more_values.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/alpine/templates/alpine-pod.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/alpine/values.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-bad-requirements/.helmignore (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-bad-requirements/Chart.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-bad-requirements/charts/reqsubchart/.helmignore (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-bad-requirements/charts/reqsubchart/Chart.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-bad-requirements/charts/reqsubchart/values.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-bad-requirements/values.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-bad-type/Chart.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-bad-type/README.md (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-bad-type/extra_values.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-bad-type/more_values.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-bad-type/templates/alpine-pod.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-bad-type/values.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-missing-deps/.helmignore (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-missing-deps/Chart.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-missing-deps/charts/reqsubchart/.helmignore (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-missing-deps/charts/reqsubchart/Chart.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-missing-deps/charts/reqsubchart/values.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-missing-deps/values.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-bad-subcharts/Chart.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-bad-subcharts/charts/bad-subchart/Chart.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-bad-subcharts/charts/bad-subchart/values.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-bad-subcharts/charts/good-subchart/Chart.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-bad-subcharts/charts/good-subchart/values.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-bad-subcharts/requirements.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-bad-subcharts/values.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-deprecated-api/Chart.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-deprecated-api/templates/horizontalpodautoscaler.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-deprecated-api/values.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-lib-dep/.helmignore (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-lib-dep/Chart.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-lib-dep/charts/common-0.0.5.tgz (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-lib-dep/templates/NOTES.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-lib-dep/templates/_helpers.tpl (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-lib-dep/templates/deployment.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-lib-dep/templates/ingress.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-lib-dep/templates/service.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-lib-dep/values.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-only-crds/.helmignore (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-only-crds/Chart.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-only-crds/crds/test-crd.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-schema-and-subchart/Chart.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-schema-and-subchart/charts/subchart-with-schema/Chart.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-schema-and-subchart/charts/subchart-with-schema/templates/empty.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-schema-and-subchart/charts/subchart-with-schema/values.schema.json (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-schema-and-subchart/charts/subchart-with-schema/values.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-schema-and-subchart/templates/empty.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-schema-and-subchart/values.schema.json (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-schema-and-subchart/values.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-schema-negative-skip-validation/Chart.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-schema-negative-skip-validation/templates/empty.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-schema-negative-skip-validation/values.schema.json (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-schema-negative-skip-validation/values.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-schema-negative/Chart.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-schema-negative/templates/empty.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-schema-negative/values.schema.json (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-schema-negative/values.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-schema/Chart.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-schema/extra-values.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-schema/templates/empty.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-schema/values.schema.json (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-schema/values.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-secret/Chart.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-secret/templates/configmap.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-secret/templates/secret.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-subchart-notes/Chart.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-subchart-notes/charts/subchart-with-notes/Chart.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-subchart-notes/charts/subchart-with-notes/templates/NOTES.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-subchart-notes/templates/NOTES.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-subchart-update/Chart.lock (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-subchart-update/Chart.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-subchart-update/charts/subchart-with-notes/Chart.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-subchart-update/charts/subchart-with-notes/templates/NOTES.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-subchart-update/templates/NOTES.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-template-lib-archive-dep/.helmignore (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-template-lib-archive-dep/Chart.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-template-lib-archive-dep/charts/common-0.0.5.tgz (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-template-lib-archive-dep/templates/NOTES.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-template-lib-archive-dep/templates/_helpers.tpl (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-template-lib-archive-dep/templates/deployment.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-template-lib-archive-dep/templates/ingress.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-template-lib-archive-dep/templates/service.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-template-lib-archive-dep/values.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-template-lib-dep/.helmignore (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-template-lib-dep/Chart.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-template-lib-dep/charts/common/.helmignore (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-template-lib-dep/charts/common/Chart.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-template-lib-dep/charts/common/README.md (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_chartref.tpl (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_configmap.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_container.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_deployment.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_envvar.tpl (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_fullname.tpl (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_ingress.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_metadata.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_metadata_annotations.tpl (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_metadata_labels.tpl (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_name.tpl (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_persistentvolumeclaim.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_secret.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_service.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_util.tpl (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_volume.tpl (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/configmap.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-template-lib-dep/charts/common/values.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-template-lib-dep/templates/NOTES.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-template-lib-dep/templates/_helpers.tpl (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-template-lib-dep/templates/deployment.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-template-lib-dep/templates/ingress.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-template-lib-dep/templates/service.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-template-lib-dep/values.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-template-with-invalid-yaml/Chart.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-template-with-invalid-yaml/README.md (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-template-with-invalid-yaml/templates/alpine-pod.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/chart-with-template-with-invalid-yaml/values.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/compressedchart-0.1.0.tar.gz (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/compressedchart-0.1.0.tgz (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/compressedchart-0.2.0.tgz (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/compressedchart-0.3.0.tgz (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/compressedchart-with-hyphens-0.1.0.tgz (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/deprecated/Chart.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/deprecated/README.md (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/empty/Chart.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/empty/README.md (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/empty/templates/empty.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/empty/values.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/issue-7233/.helmignore (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/issue-7233/Chart.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/issue-7233/requirements.lock (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/issue-7233/requirements.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/issue-7233/templates/configmap.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/issue-7233/values.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/issue-9027/Chart.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/issue-9027/charts/subchart/Chart.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/issue-9027/charts/subchart/templates/values.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/issue-9027/charts/subchart/values.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/issue-9027/templates/values.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/issue-9027/values.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/issue-totoml/Chart.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/issue-totoml/templates/configmap.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/issue-totoml/values.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/issue1979/Chart.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/issue1979/README.md (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/issue1979/extra_values.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/issue1979/more_values.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/issue1979/templates/alpine-pod.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/issue1979/values.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/lib-chart/.helmignore (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/lib-chart/Chart.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/lib-chart/README.md (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/lib-chart/templates/_chartref.tpl (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/lib-chart/templates/_configmap.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/lib-chart/templates/_container.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/lib-chart/templates/_deployment.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/lib-chart/templates/_envvar.tpl (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/lib-chart/templates/_fullname.tpl (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/lib-chart/templates/_ingress.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/lib-chart/templates/_metadata.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/lib-chart/templates/_metadata_annotations.tpl (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/lib-chart/templates/_metadata_labels.tpl (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/lib-chart/templates/_name.tpl (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/lib-chart/templates/_persistentvolumeclaim.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/lib-chart/templates/_secret.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/lib-chart/templates/_service.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/lib-chart/templates/_util.tpl (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/lib-chart/templates/_volume.tpl (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/lib-chart/values.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/object-order/Chart.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/object-order/templates/01-a.yml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/object-order/templates/02-b.yml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/object-order/values.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/oci-dependent-chart-0.1.0.tgz (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/pre-release-chart-0.1.0-alpha.tgz (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/reqtest-0.1.0.tgz (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/reqtest/.helmignore (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/reqtest/Chart.lock (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/reqtest/Chart.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/reqtest/charts/reqsubchart/.helmignore (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/reqtest/charts/reqsubchart/Chart.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/reqtest/charts/reqsubchart/values.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/reqtest/charts/reqsubchart2/.helmignore (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/reqtest/charts/reqsubchart2/Chart.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/reqtest/charts/reqsubchart2/values.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/reqtest/charts/reqsubchart3-0.2.0.tgz (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/reqtest/values.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/signtest-0.1.0.tgz (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/signtest-0.1.0.tgz.prov (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/signtest/.helmignore (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/signtest/Chart.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/signtest/alpine/Chart.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/signtest/alpine/README.md (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/signtest/alpine/templates/alpine-pod.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/signtest/alpine/values.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/signtest/templates/pod.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/signtest/values.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/subchart/Chart.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/subchart/charts/subchartA/Chart.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/subchart/charts/subchartA/templates/service.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/subchart/charts/subchartA/values.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/subchart/charts/subchartB/Chart.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/subchart/charts/subchartB/templates/service.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/subchart/charts/subchartB/values.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/subchart/crds/crdA.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/subchart/extra_values.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/subchart/templates/NOTES.txt (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/subchart/templates/service.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/subchart/templates/subdir/configmap.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/subchart/templates/subdir/role.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/subchart/templates/subdir/rolebinding.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/subchart/templates/subdir/serviceaccount.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/subchart/templates/tests/test-config.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/subchart/templates/tests/test-nothing.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/subchart/values.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/upgradetest/templates/configmap.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testcharts/upgradetest/values.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testplugin/plugin.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testserver/index.yaml (100%) rename {cmd/helm => pkg/cmd}/testdata/testserver/repository/repositories.yaml (100%) rename {cmd/helm => pkg/cmd}/uninstall.go (98%) rename {cmd/helm => pkg/cmd}/uninstall_test.go (99%) rename {cmd/helm => pkg/cmd}/upgrade.go (99%) rename {cmd/helm => pkg/cmd}/upgrade_test.go (99%) rename {cmd/helm => pkg/cmd}/verify.go (97%) rename {cmd/helm => pkg/cmd}/verify_test.go (99%) rename {cmd/helm => pkg/cmd}/version.go (98%) rename {cmd/helm => pkg/cmd}/version_test.go (98%) diff --git a/cmd/helm/helm.go b/cmd/helm/helm.go index c8de18796..78b2c6cd3 100644 --- a/cmd/helm/helm.go +++ b/cmd/helm/helm.go @@ -17,12 +17,10 @@ limitations under the License. package main // import "helm.sh/helm/v4/cmd/helm" import ( - "fmt" "io" "log" "os" "strings" - "time" "github.com/spf13/cobra" "sigs.k8s.io/yaml" @@ -32,6 +30,7 @@ import ( "helm.sh/helm/v4/pkg/action" "helm.sh/helm/v4/pkg/cli" + helmcmd "helm.sh/helm/v4/pkg/cmd" "helm.sh/helm/v4/pkg/kube" kubefake "helm.sh/helm/v4/pkg/kube/fake" "helm.sh/helm/v4/pkg/release" @@ -44,19 +43,6 @@ func init() { log.SetFlags(log.Lshortfile) } -func debug(format string, v ...interface{}) { - if settings.Debug { - timeNow := time.Now().String() - format = fmt.Sprintf("%s [debug] %s\n", timeNow, format) - log.Output(2, fmt.Sprintf(format, v...)) - } -} - -func warning(format string, v ...interface{}) { - format = fmt.Sprintf("WARNING: %s\n", format) - fmt.Fprintf(os.Stderr, format, v...) -} - // hookOutputWriter provides the writer for writing hook logs. func hookOutputWriter(_, _, _ string) io.Writer { return log.Writer() @@ -70,16 +56,15 @@ func main() { kube.ManagedFieldsManager = "helm" actionConfig := new(action.Configuration) - cmd, err := newRootCmd(actionConfig, os.Stdout, os.Args[1:]) + cmd, err := helmcmd.NewRootCmd(actionConfig, os.Stdout, os.Args[1:]) if err != nil { - warning("%+v", err) + helmcmd.Warning("%+v", err) os.Exit(1) } - // run when each command's execute method is called cobra.OnInitialize(func() { helmDriver := os.Getenv("HELM_DRIVER") - if err := actionConfig.Init(settings.RESTClientGetter(), settings.Namespace(), helmDriver, debug); err != nil { + if err := actionConfig.Init(settings.RESTClientGetter(), settings.Namespace(), helmDriver, helmcmd.Debug); err != nil { log.Fatal(err) } if helmDriver == "memory" { @@ -89,10 +74,10 @@ func main() { }) if err := cmd.Execute(); err != nil { - debug("%+v", err) + helmcmd.Debug("%+v", err) switch e := err.(type) { - case pluginError: - os.Exit(e.code) + case helmcmd.PluginError: + os.Exit(e.Code) default: os.Exit(1) } diff --git a/cmd/helm/helm_test.go b/cmd/helm/helm_test.go index e7a05aecf..5431daad0 100644 --- a/cmd/helm/helm_test.go +++ b/cmd/helm/helm_test.go @@ -18,153 +18,12 @@ package main import ( "bytes" - "io" "os" "os/exec" "runtime" - "strings" "testing" - - shellwords "github.com/mattn/go-shellwords" - "github.com/spf13/cobra" - - "helm.sh/helm/v4/internal/test" - "helm.sh/helm/v4/pkg/action" - chartutil "helm.sh/helm/v4/pkg/chart/util" - "helm.sh/helm/v4/pkg/cli" - kubefake "helm.sh/helm/v4/pkg/kube/fake" - "helm.sh/helm/v4/pkg/release" - "helm.sh/helm/v4/pkg/storage" - "helm.sh/helm/v4/pkg/storage/driver" - "helm.sh/helm/v4/pkg/time" ) -func testTimestamper() time.Time { return time.Unix(242085845, 0).UTC() } - -func init() { - action.Timestamper = testTimestamper -} - -func runTestCmd(t *testing.T, tests []cmdTestCase) { - t.Helper() - for _, tt := range tests { - for i := 0; i <= tt.repeat; i++ { - t.Run(tt.name, func(t *testing.T) { - defer resetEnv()() - - storage := storageFixture() - for _, rel := range tt.rels { - if err := storage.Create(rel); err != nil { - t.Fatal(err) - } - } - t.Logf("running cmd (attempt %d): %s", i+1, tt.cmd) - _, out, err := executeActionCommandC(storage, tt.cmd) - if tt.wantError && err == nil { - t.Errorf("expected error, got success with the following output:\n%s", out) - } - if !tt.wantError && err != nil { - t.Errorf("expected no error, got: '%v'", err) - } - if tt.golden != "" { - test.AssertGoldenString(t, out, tt.golden) - } - }) - } - } -} - -func storageFixture() *storage.Storage { - return storage.Init(driver.NewMemory()) -} - -func executeActionCommandC(store *storage.Storage, cmd string) (*cobra.Command, string, error) { - return executeActionCommandStdinC(store, nil, cmd) -} - -func executeActionCommandStdinC(store *storage.Storage, in *os.File, cmd string) (*cobra.Command, string, error) { - args, err := shellwords.Parse(cmd) - if err != nil { - return nil, "", err - } - - buf := new(bytes.Buffer) - - actionConfig := &action.Configuration{ - Releases: store, - KubeClient: &kubefake.PrintingKubeClient{Out: io.Discard}, - Capabilities: chartutil.DefaultCapabilities, - Log: func(_ string, _ ...interface{}) {}, - } - - root, err := newRootCmd(actionConfig, buf, args) - if err != nil { - return nil, "", err - } - - root.SetOut(buf) - root.SetErr(buf) - root.SetArgs(args) - - oldStdin := os.Stdin - if in != nil { - root.SetIn(in) - os.Stdin = in - } - - if mem, ok := store.Driver.(*driver.Memory); ok { - mem.SetNamespace(settings.Namespace()) - } - c, err := root.ExecuteC() - - result := buf.String() - - os.Stdin = oldStdin - - return c, result, err -} - -// cmdTestCase describes a test case that works with releases. -type cmdTestCase struct { - name string - cmd string - golden string - wantError bool - // Rels are the available releases at the start of the test. - rels []*release.Release - // Number of repeats (in case a feature was previously flaky and the test checks - // it's now stably producing identical results). 0 means test is run exactly once. - repeat int -} - -func executeActionCommand(cmd string) (*cobra.Command, string, error) { - return executeActionCommandC(storageFixture(), cmd) -} - -func resetEnv() func() { - origEnv := os.Environ() - return func() { - os.Clearenv() - for _, pair := range origEnv { - kv := strings.SplitN(pair, "=", 2) - os.Setenv(kv[0], kv[1]) - } - settings = cli.New() - } -} - -func testChdir(t *testing.T, dir string) func() { - t.Helper() - old, err := os.Getwd() - if err != nil { - t.Fatal(err) - } - if err := os.Chdir(dir); err != nil { - t.Fatal(err) - } - return func() { os.Chdir(old) } -} - func TestPluginExitCode(t *testing.T) { if os.Getenv("RUN_MAIN_FOR_TESTING") == "1" { os.Args = []string{"helm", "exitwith", "2"} @@ -190,10 +49,8 @@ func TestPluginExitCode(t *testing.T) { "RUN_MAIN_FOR_TESTING=1", // See pkg/cli/environment.go for which envvars can be used for configuring these passes // and also see plugin_test.go for how a plugin env can be set up. - // We just does the same setup as plugin_test.go via envvars - "HELM_PLUGINS=testdata/helmhome/helm/plugins", - "HELM_REPOSITORY_CONFIG=testdata/helmhome/helm/repositories.yaml", - "HELM_REPOSITORY_CACHE=testdata/helmhome/helm/repository", + // This mimics the "exitwith" test case in TestLoadPlugins using envvars + "HELM_PLUGINS=../../pkg/cmd/testdata/helmhome/helm/plugins", ) stdout := &bytes.Buffer{} stderr := &bytes.Buffer{} diff --git a/cmd/helm/completion.go b/pkg/cmd/completion.go similarity index 99% rename from cmd/helm/completion.go rename to pkg/cmd/completion.go index 5d2186939..6f6dbd25d 100644 --- a/cmd/helm/completion.go +++ b/pkg/cmd/completion.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -23,7 +23,7 @@ import ( "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" + "helm.sh/helm/v4/pkg/cmd/require" ) const completionDesc = ` diff --git a/cmd/helm/completion_test.go b/pkg/cmd/completion_test.go similarity index 99% rename from cmd/helm/completion_test.go rename to pkg/cmd/completion_test.go index 4dd427232..0618a7f64 100644 --- a/cmd/helm/completion_test.go +++ b/pkg/cmd/completion_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" diff --git a/cmd/helm/create.go b/pkg/cmd/create.go similarity index 98% rename from cmd/helm/create.go rename to pkg/cmd/create.go index a18f2c915..d1e7ef4c6 100644 --- a/cmd/helm/create.go +++ b/pkg/cmd/create.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -23,9 +23,9 @@ import ( "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/chart" chartutil "helm.sh/helm/v4/pkg/chart/util" + "helm.sh/helm/v4/pkg/cmd/require" "helm.sh/helm/v4/pkg/helmpath" ) diff --git a/cmd/helm/create_test.go b/pkg/cmd/create_test.go similarity index 99% rename from cmd/helm/create_test.go rename to pkg/cmd/create_test.go index 76fce804c..8f40bfc57 100644 --- a/cmd/helm/create_test.go +++ b/pkg/cmd/create_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" diff --git a/cmd/helm/dependency.go b/pkg/cmd/dependency.go similarity index 98% rename from cmd/helm/dependency.go rename to pkg/cmd/dependency.go index 5e108b6fd..34bbff6be 100644 --- a/cmd/helm/dependency.go +++ b/pkg/cmd/dependency.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "io" @@ -22,8 +22,8 @@ import ( "github.com/spf13/cobra" "github.com/spf13/pflag" - "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" + "helm.sh/helm/v4/pkg/cmd/require" ) const dependencyDesc = ` diff --git a/cmd/helm/dependency_build.go b/pkg/cmd/dependency_build.go similarity index 98% rename from cmd/helm/dependency_build.go rename to pkg/cmd/dependency_build.go index 719c720a7..16907facf 100644 --- a/cmd/helm/dependency_build.go +++ b/pkg/cmd/dependency_build.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -24,8 +24,8 @@ import ( "github.com/spf13/cobra" "k8s.io/client-go/util/homedir" - "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" + "helm.sh/helm/v4/pkg/cmd/require" "helm.sh/helm/v4/pkg/downloader" "helm.sh/helm/v4/pkg/getter" ) diff --git a/cmd/helm/dependency_build_test.go b/pkg/cmd/dependency_build_test.go similarity index 99% rename from cmd/helm/dependency_build_test.go rename to pkg/cmd/dependency_build_test.go index 76c01d911..8d0191e3f 100644 --- a/cmd/helm/dependency_build_test.go +++ b/pkg/cmd/dependency_build_test.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" diff --git a/cmd/helm/dependency_test.go b/pkg/cmd/dependency_test.go similarity index 99% rename from cmd/helm/dependency_test.go rename to pkg/cmd/dependency_test.go index 34c6a25e1..d6bcebf1b 100644 --- a/cmd/helm/dependency_test.go +++ b/pkg/cmd/dependency_test.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "runtime" diff --git a/cmd/helm/dependency_update.go b/pkg/cmd/dependency_update.go similarity index 98% rename from cmd/helm/dependency_update.go rename to pkg/cmd/dependency_update.go index 563d7eba5..921e5ef49 100644 --- a/cmd/helm/dependency_update.go +++ b/pkg/cmd/dependency_update.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -22,8 +22,8 @@ import ( "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" + "helm.sh/helm/v4/pkg/cmd/require" "helm.sh/helm/v4/pkg/downloader" "helm.sh/helm/v4/pkg/getter" ) diff --git a/cmd/helm/dependency_update_test.go b/pkg/cmd/dependency_update_test.go similarity index 99% rename from cmd/helm/dependency_update_test.go rename to pkg/cmd/dependency_update_test.go index 0732ba7b5..3246f9c54 100644 --- a/cmd/helm/dependency_update_test.go +++ b/pkg/cmd/dependency_update_test.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" diff --git a/cmd/helm/docs.go b/pkg/cmd/docs.go similarity index 98% rename from cmd/helm/docs.go rename to pkg/cmd/docs.go index 571840b5f..b3fd773f9 100644 --- a/cmd/helm/docs.go +++ b/pkg/cmd/docs.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -28,7 +28,7 @@ import ( "golang.org/x/text/cases" "golang.org/x/text/language" - "helm.sh/helm/v4/cmd/helm/require" + "helm.sh/helm/v4/pkg/cmd/require" ) const docsDesc = ` diff --git a/cmd/helm/docs_test.go b/pkg/cmd/docs_test.go similarity index 98% rename from cmd/helm/docs_test.go rename to pkg/cmd/docs_test.go index fe5864d5e..4a8a8c687 100644 --- a/cmd/helm/docs_test.go +++ b/pkg/cmd/docs_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "testing" diff --git a/cmd/helm/env.go b/pkg/cmd/env.go similarity index 97% rename from cmd/helm/env.go rename to pkg/cmd/env.go index c7305434b..8da201031 100644 --- a/cmd/helm/env.go +++ b/pkg/cmd/env.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -23,7 +23,7 @@ import ( "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" + "helm.sh/helm/v4/pkg/cmd/require" ) var envHelp = ` diff --git a/cmd/helm/env_test.go b/pkg/cmd/env_test.go similarity index 98% rename from cmd/helm/env_test.go rename to pkg/cmd/env_test.go index 01ef25933..c5d7af1b7 100644 --- a/cmd/helm/env_test.go +++ b/pkg/cmd/env_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "testing" diff --git a/cmd/helm/flags.go b/pkg/cmd/flags.go similarity index 99% rename from cmd/helm/flags.go rename to pkg/cmd/flags.go index 8d0f644d6..7c69385b4 100644 --- a/cmd/helm/flags.go +++ b/pkg/cmd/flags.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "flag" diff --git a/cmd/helm/flags_test.go b/pkg/cmd/flags_test.go similarity index 99% rename from cmd/helm/flags_test.go rename to pkg/cmd/flags_test.go index 295f55022..da026ea8c 100644 --- a/cmd/helm/flags_test.go +++ b/pkg/cmd/flags_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" diff --git a/cmd/helm/get.go b/pkg/cmd/get.go similarity index 96% rename from cmd/helm/get.go rename to pkg/cmd/get.go index 27d536f8b..1e672beea 100644 --- a/cmd/helm/get.go +++ b/pkg/cmd/get.go @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "io" "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" + "helm.sh/helm/v4/pkg/cmd/require" ) var getHelp = ` diff --git a/cmd/helm/get_all.go b/pkg/cmd/get_all.go similarity index 97% rename from cmd/helm/get_all.go rename to pkg/cmd/get_all.go index 522327b67..aee92df51 100644 --- a/cmd/helm/get_all.go +++ b/pkg/cmd/get_all.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "io" @@ -22,9 +22,9 @@ import ( "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" "helm.sh/helm/v4/pkg/cli/output" + "helm.sh/helm/v4/pkg/cmd/require" ) var getAllHelp = ` diff --git a/cmd/helm/get_all_test.go b/pkg/cmd/get_all_test.go similarity index 99% rename from cmd/helm/get_all_test.go rename to pkg/cmd/get_all_test.go index 60ea1161d..163400d22 100644 --- a/cmd/helm/get_all_test.go +++ b/pkg/cmd/get_all_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "testing" diff --git a/cmd/helm/get_hooks.go b/pkg/cmd/get_hooks.go similarity index 97% rename from cmd/helm/get_hooks.go rename to pkg/cmd/get_hooks.go index 25c6eb4e3..7ffefd93c 100644 --- a/cmd/helm/get_hooks.go +++ b/pkg/cmd/get_hooks.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -23,8 +23,8 @@ import ( "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" + "helm.sh/helm/v4/pkg/cmd/require" ) const getHooksHelp = ` diff --git a/cmd/helm/get_hooks_test.go b/pkg/cmd/get_hooks_test.go similarity index 99% rename from cmd/helm/get_hooks_test.go rename to pkg/cmd/get_hooks_test.go index 75cf448cc..62eaefd1b 100644 --- a/cmd/helm/get_hooks_test.go +++ b/pkg/cmd/get_hooks_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "testing" diff --git a/cmd/helm/get_manifest.go b/pkg/cmd/get_manifest.go similarity index 97% rename from cmd/helm/get_manifest.go rename to pkg/cmd/get_manifest.go index d2a4bbe96..021495d8d 100644 --- a/cmd/helm/get_manifest.go +++ b/pkg/cmd/get_manifest.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -23,8 +23,8 @@ import ( "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" + "helm.sh/helm/v4/pkg/cmd/require" ) var getManifestHelp = ` diff --git a/cmd/helm/get_manifest_test.go b/pkg/cmd/get_manifest_test.go similarity index 99% rename from cmd/helm/get_manifest_test.go rename to pkg/cmd/get_manifest_test.go index b266620e7..004cd9ad2 100644 --- a/cmd/helm/get_manifest_test.go +++ b/pkg/cmd/get_manifest_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "testing" diff --git a/cmd/helm/get_metadata.go b/pkg/cmd/get_metadata.go similarity index 98% rename from cmd/helm/get_metadata.go rename to pkg/cmd/get_metadata.go index 4ab0c8cab..9f58e0f4e 100644 --- a/cmd/helm/get_metadata.go +++ b/pkg/cmd/get_metadata.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -24,9 +24,9 @@ import ( "github.com/spf13/cobra" k8sLabels "k8s.io/apimachinery/pkg/labels" - "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" "helm.sh/helm/v4/pkg/cli/output" + "helm.sh/helm/v4/pkg/cmd/require" ) type metadataWriter struct { diff --git a/cmd/helm/get_metadata_test.go b/pkg/cmd/get_metadata_test.go similarity index 99% rename from cmd/helm/get_metadata_test.go rename to pkg/cmd/get_metadata_test.go index 28c3c3649..213fe705d 100644 --- a/cmd/helm/get_metadata_test.go +++ b/pkg/cmd/get_metadata_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "testing" diff --git a/cmd/helm/get_notes.go b/pkg/cmd/get_notes.go similarity index 97% rename from cmd/helm/get_notes.go rename to pkg/cmd/get_notes.go index 8a8e67079..ae79d8bcc 100644 --- a/cmd/helm/get_notes.go +++ b/pkg/cmd/get_notes.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -23,8 +23,8 @@ import ( "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" + "helm.sh/helm/v4/pkg/cmd/require" ) var getNotesHelp = ` diff --git a/cmd/helm/get_notes_test.go b/pkg/cmd/get_notes_test.go similarity index 99% rename from cmd/helm/get_notes_test.go rename to pkg/cmd/get_notes_test.go index 4ddd4c7a8..0071cdcc2 100644 --- a/cmd/helm/get_notes_test.go +++ b/pkg/cmd/get_notes_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "testing" diff --git a/cmd/helm/get_test.go b/pkg/cmd/get_test.go similarity index 98% rename from cmd/helm/get_test.go rename to pkg/cmd/get_test.go index 79f914bea..cf81e4df7 100644 --- a/cmd/helm/get_test.go +++ b/pkg/cmd/get_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "testing" diff --git a/cmd/helm/get_values.go b/pkg/cmd/get_values.go similarity index 98% rename from cmd/helm/get_values.go rename to pkg/cmd/get_values.go index 8244fbaaa..02b195551 100644 --- a/cmd/helm/get_values.go +++ b/pkg/cmd/get_values.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -23,9 +23,9 @@ import ( "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" "helm.sh/helm/v4/pkg/cli/output" + "helm.sh/helm/v4/pkg/cmd/require" ) var getValuesHelp = ` diff --git a/cmd/helm/get_values_test.go b/pkg/cmd/get_values_test.go similarity index 99% rename from cmd/helm/get_values_test.go rename to pkg/cmd/get_values_test.go index 44610c103..7f82531e3 100644 --- a/cmd/helm/get_values_test.go +++ b/pkg/cmd/get_values_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "testing" diff --git a/pkg/cmd/helpers_test.go b/pkg/cmd/helpers_test.go new file mode 100644 index 000000000..8002cb0d1 --- /dev/null +++ b/pkg/cmd/helpers_test.go @@ -0,0 +1,164 @@ +/* +Copyright The Helm Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package cmd + +import ( + "bytes" + "io" + "os" + "strings" + "testing" + + shellwords "github.com/mattn/go-shellwords" + "github.com/spf13/cobra" + + "helm.sh/helm/v4/internal/test" + "helm.sh/helm/v4/pkg/action" + chartutil "helm.sh/helm/v4/pkg/chart/util" + "helm.sh/helm/v4/pkg/cli" + kubefake "helm.sh/helm/v4/pkg/kube/fake" + "helm.sh/helm/v4/pkg/release" + "helm.sh/helm/v4/pkg/storage" + "helm.sh/helm/v4/pkg/storage/driver" + "helm.sh/helm/v4/pkg/time" +) + +func testTimestamper() time.Time { return time.Unix(242085845, 0).UTC() } + +func init() { + action.Timestamper = testTimestamper +} + +func runTestCmd(t *testing.T, tests []cmdTestCase) { + t.Helper() + for _, tt := range tests { + for i := 0; i <= tt.repeat; i++ { + t.Run(tt.name, func(t *testing.T) { + defer resetEnv()() + + storage := storageFixture() + for _, rel := range tt.rels { + if err := storage.Create(rel); err != nil { + t.Fatal(err) + } + } + t.Logf("running cmd (attempt %d): %s", i+1, tt.cmd) + _, out, err := executeActionCommandC(storage, tt.cmd) + if tt.wantError && err == nil { + t.Errorf("expected error, got success with the following output:\n%s", out) + } + if !tt.wantError && err != nil { + t.Errorf("expected no error, got: '%v'", err) + } + if tt.golden != "" { + test.AssertGoldenString(t, out, tt.golden) + } + }) + } + } +} + +func storageFixture() *storage.Storage { + return storage.Init(driver.NewMemory()) +} + +func executeActionCommandC(store *storage.Storage, cmd string) (*cobra.Command, string, error) { + return executeActionCommandStdinC(store, nil, cmd) +} + +func executeActionCommandStdinC(store *storage.Storage, in *os.File, cmd string) (*cobra.Command, string, error) { + args, err := shellwords.Parse(cmd) + if err != nil { + return nil, "", err + } + + buf := new(bytes.Buffer) + + actionConfig := &action.Configuration{ + Releases: store, + KubeClient: &kubefake.PrintingKubeClient{Out: io.Discard}, + Capabilities: chartutil.DefaultCapabilities, + Log: func(_ string, _ ...interface{}) {}, + } + + root, err := NewRootCmd(actionConfig, buf, args) + if err != nil { + return nil, "", err + } + + root.SetOut(buf) + root.SetErr(buf) + root.SetArgs(args) + + oldStdin := os.Stdin + if in != nil { + root.SetIn(in) + os.Stdin = in + } + + if mem, ok := store.Driver.(*driver.Memory); ok { + mem.SetNamespace(settings.Namespace()) + } + c, err := root.ExecuteC() + + result := buf.String() + + os.Stdin = oldStdin + + return c, result, err +} + +// cmdTestCase describes a test case that works with releases. +type cmdTestCase struct { + name string + cmd string + golden string + wantError bool + // Rels are the available releases at the start of the test. + rels []*release.Release + // Number of repeats (in case a feature was previously flaky and the test checks + // it's now stably producing identical results). 0 means test is run exactly once. + repeat int +} + +func executeActionCommand(cmd string) (*cobra.Command, string, error) { + return executeActionCommandC(storageFixture(), cmd) +} + +func resetEnv() func() { + origEnv := os.Environ() + return func() { + os.Clearenv() + for _, pair := range origEnv { + kv := strings.SplitN(pair, "=", 2) + os.Setenv(kv[0], kv[1]) + } + settings = cli.New() + } +} + +func testChdir(t *testing.T, dir string) func() { + t.Helper() + old, err := os.Getwd() + if err != nil { + t.Fatal(err) + } + if err := os.Chdir(dir); err != nil { + t.Fatal(err) + } + return func() { os.Chdir(old) } +} diff --git a/cmd/helm/history.go b/pkg/cmd/history.go similarity index 99% rename from cmd/helm/history.go rename to pkg/cmd/history.go index 91d005e7a..87ba97714 100644 --- a/cmd/helm/history.go +++ b/pkg/cmd/history.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -25,10 +25,10 @@ import ( "github.com/gosuri/uitable" "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" "helm.sh/helm/v4/pkg/chart" "helm.sh/helm/v4/pkg/cli/output" + "helm.sh/helm/v4/pkg/cmd/require" "helm.sh/helm/v4/pkg/release" "helm.sh/helm/v4/pkg/releaseutil" helmtime "helm.sh/helm/v4/pkg/time" diff --git a/cmd/helm/history_test.go b/pkg/cmd/history_test.go similarity index 99% rename from cmd/helm/history_test.go rename to pkg/cmd/history_test.go index 07f5134c6..52e742334 100644 --- a/cmd/helm/history_test.go +++ b/pkg/cmd/history_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" diff --git a/cmd/helm/install.go b/pkg/cmd/install.go similarity index 98% rename from cmd/helm/install.go rename to pkg/cmd/install.go index fe09dfc53..ee94b3489 100644 --- a/cmd/helm/install.go +++ b/pkg/cmd/install.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "context" @@ -30,12 +30,12 @@ import ( "github.com/spf13/cobra" "github.com/spf13/pflag" - "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" "helm.sh/helm/v4/pkg/chart" "helm.sh/helm/v4/pkg/chart/loader" "helm.sh/helm/v4/pkg/cli/output" "helm.sh/helm/v4/pkg/cli/values" + "helm.sh/helm/v4/pkg/cmd/require" "helm.sh/helm/v4/pkg/downloader" "helm.sh/helm/v4/pkg/getter" "helm.sh/helm/v4/pkg/release" @@ -229,9 +229,9 @@ func addInstallFlags(cmd *cobra.Command, f *pflag.FlagSet, client *action.Instal } func runInstall(args []string, client *action.Install, valueOpts *values.Options, out io.Writer) (*release.Release, error) { - debug("Original chart version: %q", client.Version) + Debug("Original chart version: %q", client.Version) if client.Version == "" && client.Devel { - debug("setting version to >0.0.0-0") + Debug("setting version to >0.0.0-0") client.Version = ">0.0.0-0" } @@ -246,7 +246,7 @@ func runInstall(args []string, client *action.Install, valueOpts *values.Options return nil, err } - debug("CHART PATH: %s\n", cp) + Debug("CHART PATH: %s\n", cp) p := getter.All(settings) vals, err := valueOpts.MergeValues(p) @@ -265,7 +265,7 @@ func runInstall(args []string, client *action.Install, valueOpts *values.Options } if chartRequested.Metadata.Deprecated { - warning("This chart is deprecated") + Warning("This chart is deprecated") } if req := chartRequested.Metadata.Dependencies; req != nil { diff --git a/cmd/helm/install_test.go b/pkg/cmd/install_test.go similarity index 99% rename from cmd/helm/install_test.go rename to pkg/cmd/install_test.go index be8480423..9cd244e84 100644 --- a/cmd/helm/install_test.go +++ b/pkg/cmd/install_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" diff --git a/cmd/helm/lint.go b/pkg/cmd/lint.go similarity index 99% rename from cmd/helm/lint.go rename to pkg/cmd/lint.go index 3e37922b2..ba154d1e6 100644 --- a/cmd/helm/lint.go +++ b/pkg/cmd/lint.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" diff --git a/cmd/helm/lint_test.go b/pkg/cmd/lint_test.go similarity index 99% rename from cmd/helm/lint_test.go rename to pkg/cmd/lint_test.go index 166b69ba0..401c84d74 100644 --- a/cmd/helm/lint_test.go +++ b/pkg/cmd/lint_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" diff --git a/cmd/helm/list.go b/pkg/cmd/list.go similarity index 98% rename from cmd/helm/list.go rename to pkg/cmd/list.go index 67da22cdf..2e1a7737b 100644 --- a/cmd/helm/list.go +++ b/pkg/cmd/list.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -25,9 +25,9 @@ import ( "github.com/gosuri/uitable" "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" "helm.sh/helm/v4/pkg/cli/output" + "helm.sh/helm/v4/pkg/cmd/require" "helm.sh/helm/v4/pkg/release" ) @@ -71,7 +71,7 @@ func newListCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { ValidArgsFunction: noMoreArgsCompFunc, RunE: func(cmd *cobra.Command, _ []string) error { if client.AllNamespaces { - if err := cfg.Init(settings.RESTClientGetter(), "", os.Getenv("HELM_DRIVER"), debug); err != nil { + if err := cfg.Init(settings.RESTClientGetter(), "", os.Getenv("HELM_DRIVER"), Debug); err != nil { return err } } diff --git a/cmd/helm/list_test.go b/pkg/cmd/list_test.go similarity index 99% rename from cmd/helm/list_test.go rename to pkg/cmd/list_test.go index 01b6d7490..866c6a151 100644 --- a/cmd/helm/list_test.go +++ b/pkg/cmd/list_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "testing" diff --git a/cmd/helm/load_plugins.go b/pkg/cmd/load_plugins.go similarity index 99% rename from cmd/helm/load_plugins.go rename to pkg/cmd/load_plugins.go index 23b1b7ff4..3cf701242 100644 --- a/cmd/helm/load_plugins.go +++ b/pkg/cmd/load_plugins.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "bytes" @@ -39,9 +39,9 @@ const ( pluginDynamicCompletionExecutable = "plugin.complete" ) -type pluginError struct { +type PluginError struct { error - code int + Code int } // loadPlugins loads plugins into the command list. @@ -138,9 +138,9 @@ func callPluginExecutable(pluginName string, main string, argv []string, out io. if eerr, ok := err.(*exec.ExitError); ok { os.Stderr.Write(eerr.Stderr) status := eerr.Sys().(syscall.WaitStatus) - return pluginError{ + return PluginError{ error: errors.Errorf("plugin %q exited with error", pluginName), - code: status.ExitStatus(), + Code: status.ExitStatus(), } } return err diff --git a/cmd/helm/package.go b/pkg/cmd/package.go similarity index 99% rename from cmd/helm/package.go rename to pkg/cmd/package.go index 185442b20..7bc22dfb4 100644 --- a/cmd/helm/package.go +++ b/pkg/cmd/package.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" diff --git a/cmd/helm/package_test.go b/pkg/cmd/package_test.go similarity index 99% rename from cmd/helm/package_test.go rename to pkg/cmd/package_test.go index 107928765..4a7a143bf 100644 --- a/cmd/helm/package_test.go +++ b/pkg/cmd/package_test.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" diff --git a/cmd/helm/plugin.go b/pkg/cmd/plugin.go similarity index 97% rename from cmd/helm/plugin.go rename to pkg/cmd/plugin.go index 82fd34b72..3340e76e6 100644 --- a/cmd/helm/plugin.go +++ b/pkg/cmd/plugin.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "io" @@ -66,7 +66,7 @@ func runHook(p *plugin.Plugin, event string) error { prog := exec.Command(main, argv...) - debug("running %s hook: %s", event, prog) + Debug("running %s hook: %s", event, prog) prog.Stdout, prog.Stderr = os.Stdout, os.Stderr if err := prog.Run(); err != nil { diff --git a/cmd/helm/plugin_install.go b/pkg/cmd/plugin_install.go similarity index 96% rename from cmd/helm/plugin_install.go rename to pkg/cmd/plugin_install.go index d8dff6316..e17744cbb 100644 --- a/cmd/helm/plugin_install.go +++ b/pkg/cmd/plugin_install.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -22,7 +22,7 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" + "helm.sh/helm/v4/pkg/cmd/require" "helm.sh/helm/v4/pkg/plugin" "helm.sh/helm/v4/pkg/plugin/installer" ) @@ -79,7 +79,7 @@ func (o *pluginInstallOptions) run(out io.Writer) error { return err } - debug("loading plugin from %s", i.Path()) + Debug("loading plugin from %s", i.Path()) p, err := plugin.LoadDir(i.Path()) if err != nil { return errors.Wrap(err, "plugin is installed but unusable") diff --git a/cmd/helm/plugin_list.go b/pkg/cmd/plugin_list.go similarity index 97% rename from cmd/helm/plugin_list.go rename to pkg/cmd/plugin_list.go index 27ce3c973..9cca790ae 100644 --- a/cmd/helm/plugin_list.go +++ b/pkg/cmd/plugin_list.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -32,7 +32,7 @@ func newPluginListCmd(out io.Writer) *cobra.Command { Short: "list installed Helm plugins", ValidArgsFunction: noMoreArgsCompFunc, RunE: func(_ *cobra.Command, _ []string) error { - debug("pluginDirs: %s", settings.PluginsDirectory) + Debug("pluginDirs: %s", settings.PluginsDirectory) plugins, err := plugin.FindPlugins(settings.PluginsDirectory) if err != nil { return err diff --git a/cmd/helm/plugin_test.go b/pkg/cmd/plugin_test.go similarity index 98% rename from cmd/helm/plugin_test.go rename to pkg/cmd/plugin_test.go index 4d2aa1a59..c5d3728b9 100644 --- a/cmd/helm/plugin_test.go +++ b/pkg/cmd/plugin_test.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "bytes" @@ -143,12 +143,12 @@ func TestLoadPlugins(t *testing.T) { if runtime.GOOS != "windows" { if err := pp.RunE(pp, tt.args); err != nil { if tt.code > 0 { - perr, ok := err.(pluginError) + perr, ok := err.(PluginError) if !ok { t.Errorf("Expected %s to return pluginError: got %v(%T)", tt.use, err, err) } - if perr.code != tt.code { - t.Errorf("Expected %s to return %d: got %d", tt.use, tt.code, perr.code) + if perr.Code != tt.code { + t.Errorf("Expected %s to return %d: got %d", tt.use, tt.code, perr.Code) } } else { t.Errorf("Error running %s: %+v", tt.use, err) @@ -218,12 +218,12 @@ func TestLoadPluginsWithSpace(t *testing.T) { if runtime.GOOS != "windows" { if err := pp.RunE(pp, tt.args); err != nil { if tt.code > 0 { - perr, ok := err.(pluginError) + perr, ok := err.(PluginError) if !ok { t.Errorf("Expected %s to return pluginError: got %v(%T)", tt.use, err, err) } - if perr.code != tt.code { - t.Errorf("Expected %s to return %d: got %d", tt.use, tt.code, perr.code) + if perr.Code != tt.code { + t.Errorf("Expected %s to return %d: got %d", tt.use, tt.code, perr.Code) } } else { t.Errorf("Error running %s: %+v", tt.use, err) diff --git a/cmd/helm/plugin_uninstall.go b/pkg/cmd/plugin_uninstall.go similarity index 97% rename from cmd/helm/plugin_uninstall.go rename to pkg/cmd/plugin_uninstall.go index 6ef4e4f59..c1f90ca49 100644 --- a/cmd/helm/plugin_uninstall.go +++ b/pkg/cmd/plugin_uninstall.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -60,7 +60,7 @@ func (o *pluginUninstallOptions) complete(args []string) error { } func (o *pluginUninstallOptions) run(out io.Writer) error { - debug("loading installed plugins from %s", settings.PluginsDirectory) + Debug("loading installed plugins from %s", settings.PluginsDirectory) plugins, err := plugin.FindPlugins(settings.PluginsDirectory) if err != nil { return err diff --git a/cmd/helm/plugin_update.go b/pkg/cmd/plugin_update.go similarity index 95% rename from cmd/helm/plugin_update.go rename to pkg/cmd/plugin_update.go index 5d0465274..cbbd8994c 100644 --- a/cmd/helm/plugin_update.go +++ b/pkg/cmd/plugin_update.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -62,7 +62,7 @@ func (o *pluginUpdateOptions) complete(args []string) error { func (o *pluginUpdateOptions) run(out io.Writer) error { installer.Debug = settings.Debug - debug("loading installed plugins from %s", settings.PluginsDirectory) + Debug("loading installed plugins from %s", settings.PluginsDirectory) plugins, err := plugin.FindPlugins(settings.PluginsDirectory) if err != nil { return err @@ -104,7 +104,7 @@ func updatePlugin(p *plugin.Plugin) error { return err } - debug("loading plugin from %s", i.Path()) + Debug("loading plugin from %s", i.Path()) updatedPlugin, err := plugin.LoadDir(i.Path()) if err != nil { return err diff --git a/cmd/helm/printer.go b/pkg/cmd/printer.go similarity index 98% rename from cmd/helm/printer.go rename to pkg/cmd/printer.go index 7cf7bf994..30238f5bb 100644 --- a/cmd/helm/printer.go +++ b/pkg/cmd/printer.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "io" diff --git a/cmd/helm/profiling.go b/pkg/cmd/profiling.go similarity index 99% rename from cmd/helm/profiling.go rename to pkg/cmd/profiling.go index 950ad15da..45e7b9342 100644 --- a/cmd/helm/profiling.go +++ b/pkg/cmd/profiling.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "errors" diff --git a/cmd/helm/pull.go b/pkg/cmd/pull.go similarity index 97% rename from cmd/helm/pull.go rename to pkg/cmd/pull.go index 231db30bc..5d188ee4f 100644 --- a/cmd/helm/pull.go +++ b/pkg/cmd/pull.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -23,8 +23,8 @@ import ( "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" + "helm.sh/helm/v4/pkg/cmd/require" ) const pullDesc = ` @@ -60,7 +60,7 @@ func newPullCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { RunE: func(_ *cobra.Command, args []string) error { client.Settings = settings if client.Version == "" && client.Devel { - debug("setting version to >0.0.0-0") + Debug("setting version to >0.0.0-0") client.Version = ">0.0.0-0" } diff --git a/cmd/helm/pull_test.go b/pkg/cmd/pull_test.go similarity index 99% rename from cmd/helm/pull_test.go rename to pkg/cmd/pull_test.go index 1110a6bdf..c30c94b49 100644 --- a/cmd/helm/pull_test.go +++ b/pkg/cmd/pull_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" diff --git a/cmd/helm/push.go b/pkg/cmd/push.go similarity index 98% rename from cmd/helm/push.go rename to pkg/cmd/push.go index f5b275b9d..94d322b9d 100644 --- a/cmd/helm/push.go +++ b/pkg/cmd/push.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -22,8 +22,8 @@ import ( "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" + "helm.sh/helm/v4/pkg/cmd/require" "helm.sh/helm/v4/pkg/pusher" ) diff --git a/cmd/helm/push_test.go b/pkg/cmd/push_test.go similarity index 98% rename from cmd/helm/push_test.go rename to pkg/cmd/push_test.go index 8e56d99dc..80d08b48f 100644 --- a/cmd/helm/push_test.go +++ b/pkg/cmd/push_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "testing" diff --git a/cmd/helm/registry.go b/pkg/cmd/registry.go similarity index 98% rename from cmd/helm/registry.go rename to pkg/cmd/registry.go index f771dcb9c..fcd06f13b 100644 --- a/cmd/helm/registry.go +++ b/pkg/cmd/registry.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "io" diff --git a/cmd/helm/registry_login.go b/pkg/cmd/registry_login.go similarity index 97% rename from cmd/helm/registry_login.go rename to pkg/cmd/registry_login.go index 74ad4cebe..1dfb3c798 100644 --- a/cmd/helm/registry_login.go +++ b/pkg/cmd/registry_login.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "bufio" @@ -27,8 +27,8 @@ import ( "github.com/moby/term" "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" + "helm.sh/helm/v4/pkg/cmd/require" ) const registryLoginDesc = ` @@ -122,7 +122,7 @@ func getUsernamePassword(usernameOpt string, passwordOpt string, passwordFromStd } } } else { - warning("Using --password via the CLI is insecure. Use --password-stdin.") + Warning("Using --password via the CLI is insecure. Use --password-stdin.") } return username, password, nil diff --git a/cmd/helm/registry_login_test.go b/pkg/cmd/registry_login_test.go similarity index 98% rename from cmd/helm/registry_login_test.go rename to pkg/cmd/registry_login_test.go index 517fe08e1..6e4f2116e 100644 --- a/cmd/helm/registry_login_test.go +++ b/pkg/cmd/registry_login_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "testing" diff --git a/cmd/helm/registry_logout.go b/pkg/cmd/registry_logout.go similarity index 96% rename from cmd/helm/registry_logout.go rename to pkg/cmd/registry_logout.go index 13190c8cf..300453705 100644 --- a/cmd/helm/registry_logout.go +++ b/pkg/cmd/registry_logout.go @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "io" "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" + "helm.sh/helm/v4/pkg/cmd/require" ) const registryLogoutDesc = ` diff --git a/cmd/helm/registry_logout_test.go b/pkg/cmd/registry_logout_test.go similarity index 98% rename from cmd/helm/registry_logout_test.go rename to pkg/cmd/registry_logout_test.go index 31f716725..31a21b277 100644 --- a/cmd/helm/registry_logout_test.go +++ b/pkg/cmd/registry_logout_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "testing" diff --git a/cmd/helm/release_testing.go b/pkg/cmd/release_testing.go similarity index 98% rename from cmd/helm/release_testing.go rename to pkg/cmd/release_testing.go index a8c57f5d9..4904aa9f1 100644 --- a/cmd/helm/release_testing.go +++ b/pkg/cmd/release_testing.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -25,9 +25,9 @@ import ( "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" "helm.sh/helm/v4/pkg/cli/output" + "helm.sh/helm/v4/pkg/cmd/require" ) const releaseTestHelp = ` diff --git a/cmd/helm/release_testing_test.go b/pkg/cmd/release_testing_test.go similarity index 98% rename from cmd/helm/release_testing_test.go rename to pkg/cmd/release_testing_test.go index 680a9bd3e..43599ad0d 100644 --- a/cmd/helm/release_testing_test.go +++ b/pkg/cmd/release_testing_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "testing" diff --git a/cmd/helm/repo.go b/pkg/cmd/repo.go similarity index 96% rename from cmd/helm/repo.go rename to pkg/cmd/repo.go index 291f0bb10..925669e13 100644 --- a/cmd/helm/repo.go +++ b/pkg/cmd/repo.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "io" @@ -23,7 +23,7 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" + "helm.sh/helm/v4/pkg/cmd/require" ) var repoHelm = ` diff --git a/cmd/helm/repo_add.go b/pkg/cmd/repo_add.go similarity index 99% rename from cmd/helm/repo_add.go rename to pkg/cmd/repo_add.go index cd3dc8a62..f6c0c11c0 100644 --- a/cmd/helm/repo_add.go +++ b/pkg/cmd/repo_add.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "context" @@ -31,7 +31,7 @@ import ( "golang.org/x/term" "sigs.k8s.io/yaml" - "helm.sh/helm/v4/cmd/helm/require" + "helm.sh/helm/v4/pkg/cmd/require" "helm.sh/helm/v4/pkg/getter" "helm.sh/helm/v4/pkg/repo" ) diff --git a/cmd/helm/repo_add_test.go b/pkg/cmd/repo_add_test.go similarity index 99% rename from cmd/helm/repo_add_test.go rename to pkg/cmd/repo_add_test.go index 35911d5ae..0f3a3de4f 100644 --- a/cmd/helm/repo_add_test.go +++ b/pkg/cmd/repo_add_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" diff --git a/cmd/helm/repo_index.go b/pkg/cmd/repo_index.go similarity index 98% rename from cmd/helm/repo_index.go rename to pkg/cmd/repo_index.go index c84a3f1ab..13a0a9439 100644 --- a/cmd/helm/repo_index.go +++ b/pkg/cmd/repo_index.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "io" @@ -24,7 +24,7 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" + "helm.sh/helm/v4/pkg/cmd/require" "helm.sh/helm/v4/pkg/repo" ) diff --git a/cmd/helm/repo_index_test.go b/pkg/cmd/repo_index_test.go similarity index 99% rename from cmd/helm/repo_index_test.go rename to pkg/cmd/repo_index_test.go index e63a7bf63..c865c8a5d 100644 --- a/cmd/helm/repo_index_test.go +++ b/pkg/cmd/repo_index_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "bytes" diff --git a/cmd/helm/repo_list.go b/pkg/cmd/repo_list.go similarity index 98% rename from cmd/helm/repo_list.go rename to pkg/cmd/repo_list.go index e0ad10147..5b6113a13 100644 --- a/cmd/helm/repo_list.go +++ b/pkg/cmd/repo_list.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -24,8 +24,8 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/cli/output" + "helm.sh/helm/v4/pkg/cmd/require" "helm.sh/helm/v4/pkg/repo" ) diff --git a/cmd/helm/repo_list_test.go b/pkg/cmd/repo_list_test.go similarity index 98% rename from cmd/helm/repo_list_test.go rename to pkg/cmd/repo_list_test.go index 90149ebda..1da5484cc 100644 --- a/cmd/helm/repo_list_test.go +++ b/pkg/cmd/repo_list_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "testing" diff --git a/cmd/helm/repo_remove.go b/pkg/cmd/repo_remove.go similarity index 98% rename from cmd/helm/repo_remove.go rename to pkg/cmd/repo_remove.go index 6b72b0710..97630810a 100644 --- a/cmd/helm/repo_remove.go +++ b/pkg/cmd/repo_remove.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -25,7 +25,7 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" + "helm.sh/helm/v4/pkg/cmd/require" "helm.sh/helm/v4/pkg/helmpath" "helm.sh/helm/v4/pkg/repo" ) diff --git a/cmd/helm/repo_remove_test.go b/pkg/cmd/repo_remove_test.go similarity index 99% rename from cmd/helm/repo_remove_test.go rename to pkg/cmd/repo_remove_test.go index 7e6609671..b8bc7179a 100644 --- a/cmd/helm/repo_remove_test.go +++ b/pkg/cmd/repo_remove_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "bytes" diff --git a/cmd/helm/repo_test.go b/pkg/cmd/repo_test.go similarity index 98% rename from cmd/helm/repo_test.go rename to pkg/cmd/repo_test.go index 2b0df7c4c..6b89a66c3 100644 --- a/cmd/helm/repo_test.go +++ b/pkg/cmd/repo_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "testing" diff --git a/cmd/helm/repo_update.go b/pkg/cmd/repo_update.go similarity index 98% rename from cmd/helm/repo_update.go rename to pkg/cmd/repo_update.go index 1379385c1..25071377b 100644 --- a/cmd/helm/repo_update.go +++ b/pkg/cmd/repo_update.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -25,7 +25,7 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" + "helm.sh/helm/v4/pkg/cmd/require" "helm.sh/helm/v4/pkg/getter" "helm.sh/helm/v4/pkg/repo" ) diff --git a/cmd/helm/repo_update_test.go b/pkg/cmd/repo_update_test.go similarity index 99% rename from cmd/helm/repo_update_test.go rename to pkg/cmd/repo_update_test.go index 7e379da91..5b27a6dfb 100644 --- a/cmd/helm/repo_update_test.go +++ b/pkg/cmd/repo_update_test.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "bytes" diff --git a/cmd/helm/require/args.go b/pkg/cmd/require/args.go similarity index 100% rename from cmd/helm/require/args.go rename to pkg/cmd/require/args.go diff --git a/cmd/helm/require/args_test.go b/pkg/cmd/require/args_test.go similarity index 100% rename from cmd/helm/require/args_test.go rename to pkg/cmd/require/args_test.go diff --git a/cmd/helm/rollback.go b/pkg/cmd/rollback.go similarity index 98% rename from cmd/helm/rollback.go rename to pkg/cmd/rollback.go index a65f30a1f..155c9fb01 100644 --- a/cmd/helm/rollback.go +++ b/pkg/cmd/rollback.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -24,8 +24,8 @@ import ( "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" + "helm.sh/helm/v4/pkg/cmd/require" ) const rollbackDesc = ` diff --git a/cmd/helm/rollback_test.go b/pkg/cmd/rollback_test.go similarity index 99% rename from cmd/helm/rollback_test.go rename to pkg/cmd/rollback_test.go index a94327e07..400726d6c 100644 --- a/cmd/helm/rollback_test.go +++ b/pkg/cmd/rollback_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" diff --git a/cmd/helm/root.go b/pkg/cmd/root.go similarity index 97% rename from cmd/helm/root.go rename to pkg/cmd/root.go index dd3ddeab7..ff4dcecbc 100644 --- a/cmd/helm/root.go +++ b/pkg/cmd/root.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main // import "helm.sh/helm/v4/cmd/helm" +package cmd // import "helm.sh/helm/v4/pkg/cmd" import ( "context" @@ -32,6 +32,7 @@ import ( "helm.sh/helm/v4/internal/tlsutil" "helm.sh/helm/v4/pkg/action" + "helm.sh/helm/v4/pkg/cli" "helm.sh/helm/v4/pkg/registry" "helm.sh/helm/v4/pkg/repo" ) @@ -89,7 +90,19 @@ By default, the default directories depend on the Operating System. The defaults | Windows | %TEMP%\helm | %APPDATA%\helm | %APPDATA%\helm | ` -func newRootCmd(actionConfig *action.Configuration, out io.Writer, args []string) (*cobra.Command, error) { +var settings = cli.New() + +func Debug(format string, v ...interface{}) { + if settings.Debug { + log.Output(2, fmt.Sprintf("[debug] "+format+"\n", v...)) + } +} + +func Warning(format string, v ...interface{}) { + fmt.Fprintf(os.Stderr, "WARNING: "+format+"\n", v...) +} + +func NewRootCmd(actionConfig *action.Configuration, out io.Writer, args []string) (*cobra.Command, error) { cmd := &cobra.Command{ Use: "helm", Short: "The Helm package manager for Kubernetes.", diff --git a/cmd/helm/root_test.go b/pkg/cmd/root_test.go similarity index 99% rename from cmd/helm/root_test.go rename to pkg/cmd/root_test.go index e30850900..9521a5aa2 100644 --- a/cmd/helm/root_test.go +++ b/pkg/cmd/root_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "os" diff --git a/cmd/helm/search.go b/pkg/cmd/search.go similarity index 98% rename from cmd/helm/search.go rename to pkg/cmd/search.go index 6c62d5d2e..4d110286d 100644 --- a/cmd/helm/search.go +++ b/pkg/cmd/search.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "io" diff --git a/cmd/helm/search/search.go b/pkg/cmd/search/search.go similarity index 100% rename from cmd/helm/search/search.go rename to pkg/cmd/search/search.go diff --git a/cmd/helm/search/search_test.go b/pkg/cmd/search/search_test.go similarity index 100% rename from cmd/helm/search/search_test.go rename to pkg/cmd/search/search_test.go diff --git a/cmd/helm/search_hub.go b/pkg/cmd/search_hub.go similarity index 99% rename from cmd/helm/search_hub.go rename to pkg/cmd/search_hub.go index 5bdb1092d..b7f25444e 100644 --- a/cmd/helm/search_hub.go +++ b/pkg/cmd/search_hub.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -89,7 +89,7 @@ func (o *searchHubOptions) run(out io.Writer, args []string) error { q := strings.Join(args, " ") results, err := c.Search(q) if err != nil { - debug("%s", err) + Debug("%s", err) return fmt.Errorf("unable to perform search against %q", o.searchEndpoint) } diff --git a/cmd/helm/search_hub_test.go b/pkg/cmd/search_hub_test.go similarity index 99% rename from cmd/helm/search_hub_test.go rename to pkg/cmd/search_hub_test.go index f3730275a..8e056f771 100644 --- a/cmd/helm/search_hub_test.go +++ b/pkg/cmd/search_hub_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" diff --git a/cmd/helm/search_repo.go b/pkg/cmd/search_repo.go similarity index 97% rename from cmd/helm/search_repo.go rename to pkg/cmd/search_repo.go index 36e8a8c58..bc73e52b2 100644 --- a/cmd/helm/search_repo.go +++ b/pkg/cmd/search_repo.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "bufio" @@ -30,8 +30,8 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/search" "helm.sh/helm/v4/pkg/cli/output" + "helm.sh/helm/v4/pkg/cmd/search" "helm.sh/helm/v4/pkg/helmpath" "helm.sh/helm/v4/pkg/repo" ) @@ -130,17 +130,17 @@ func (o *searchRepoOptions) run(out io.Writer, args []string) error { } func (o *searchRepoOptions) setupSearchedVersion() { - debug("Original chart version: %q", o.version) + Debug("Original chart version: %q", o.version) if o.version != "" { return } if o.devel { // search for releases and prereleases (alpha, beta, and release candidate releases). - debug("setting version to >0.0.0-0") + Debug("setting version to >0.0.0-0") o.version = ">0.0.0-0" } else { // search only for stable releases, prerelease versions will be skipped - debug("setting version to >0.0.0") + Debug("setting version to >0.0.0") o.version = ">0.0.0" } } @@ -189,8 +189,8 @@ func (o *searchRepoOptions) buildIndex() (*search.Index, error) { f := filepath.Join(o.repoCacheDir, helmpath.CacheIndexFile(n)) ind, err := repo.LoadIndexFile(f) if err != nil { - warning("Repo %q is corrupt or missing. Try 'helm repo update'.", n) - warning("%s", err) + Warning("Repo %q is corrupt or missing. Try 'helm repo update'.", n) + Warning("%s", err) continue } diff --git a/cmd/helm/search_repo_test.go b/pkg/cmd/search_repo_test.go similarity index 99% rename from cmd/helm/search_repo_test.go rename to pkg/cmd/search_repo_test.go index 9039842f0..e7f104e05 100644 --- a/cmd/helm/search_repo_test.go +++ b/pkg/cmd/search_repo_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "testing" diff --git a/cmd/helm/search_test.go b/pkg/cmd/search_test.go similarity index 98% rename from cmd/helm/search_test.go rename to pkg/cmd/search_test.go index 6cf845b06..a0e5d84cb 100644 --- a/cmd/helm/search_test.go +++ b/pkg/cmd/search_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import "testing" diff --git a/cmd/helm/show.go b/pkg/cmd/show.go similarity index 97% rename from cmd/helm/show.go rename to pkg/cmd/show.go index 492de94f6..a02af6f18 100644 --- a/cmd/helm/show.go +++ b/pkg/cmd/show.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -23,8 +23,8 @@ import ( "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" + "helm.sh/helm/v4/pkg/cmd/require" ) const showDesc = ` @@ -211,9 +211,9 @@ func addShowFlags(subCmd *cobra.Command, client *action.Show) { } func runShow(args []string, client *action.Show) (string, error) { - debug("Original chart version: %q", client.Version) + Debug("Original chart version: %q", client.Version) if client.Version == "" && client.Devel { - debug("setting version to >0.0.0-0") + Debug("setting version to >0.0.0-0") client.Version = ">0.0.0-0" } diff --git a/cmd/helm/show_test.go b/pkg/cmd/show_test.go similarity index 99% rename from cmd/helm/show_test.go rename to pkg/cmd/show_test.go index 0598095b5..ab8cafc37 100644 --- a/cmd/helm/show_test.go +++ b/pkg/cmd/show_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" diff --git a/cmd/helm/status.go b/pkg/cmd/status.go similarity index 99% rename from cmd/helm/status.go rename to pkg/cmd/status.go index fd3e4ce14..7a97bde3f 100644 --- a/cmd/helm/status.go +++ b/pkg/cmd/status.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "bytes" @@ -28,10 +28,10 @@ import ( "k8s.io/kubectl/pkg/cmd/get" - "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" chartutil "helm.sh/helm/v4/pkg/chart/util" "helm.sh/helm/v4/pkg/cli/output" + "helm.sh/helm/v4/pkg/cmd/require" "helm.sh/helm/v4/pkg/release" ) diff --git a/cmd/helm/status_test.go b/pkg/cmd/status_test.go similarity index 99% rename from cmd/helm/status_test.go rename to pkg/cmd/status_test.go index 1973fe068..8603f416b 100644 --- a/cmd/helm/status_test.go +++ b/pkg/cmd/status_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "testing" diff --git a/cmd/helm/template.go b/pkg/cmd/template.go similarity index 99% rename from cmd/helm/template.go rename to pkg/cmd/template.go index 1a6265eba..4b4a0bc8d 100644 --- a/cmd/helm/template.go +++ b/pkg/cmd/template.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "bytes" @@ -32,10 +32,10 @@ import ( "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" chartutil "helm.sh/helm/v4/pkg/chart/util" "helm.sh/helm/v4/pkg/cli/values" + "helm.sh/helm/v4/pkg/cmd/require" "helm.sh/helm/v4/pkg/releaseutil" ) diff --git a/cmd/helm/template_test.go b/pkg/cmd/template_test.go similarity index 99% rename from cmd/helm/template_test.go rename to pkg/cmd/template_test.go index 28e24ce63..c478fced4 100644 --- a/cmd/helm/template_test.go +++ b/pkg/cmd/template_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" diff --git a/cmd/helm/testdata/helm home with space/helm/plugins/fullenv/completion.yaml b/pkg/cmd/testdata/helm home with space/helm/plugins/fullenv/completion.yaml similarity index 100% rename from cmd/helm/testdata/helm home with space/helm/plugins/fullenv/completion.yaml rename to pkg/cmd/testdata/helm home with space/helm/plugins/fullenv/completion.yaml diff --git a/cmd/helm/testdata/helm home with space/helm/plugins/fullenv/fullenv.sh b/pkg/cmd/testdata/helm home with space/helm/plugins/fullenv/fullenv.sh similarity index 100% rename from cmd/helm/testdata/helm home with space/helm/plugins/fullenv/fullenv.sh rename to pkg/cmd/testdata/helm home with space/helm/plugins/fullenv/fullenv.sh diff --git a/cmd/helm/testdata/helm home with space/helm/plugins/fullenv/plugin.yaml b/pkg/cmd/testdata/helm home with space/helm/plugins/fullenv/plugin.yaml similarity index 100% rename from cmd/helm/testdata/helm home with space/helm/plugins/fullenv/plugin.yaml rename to pkg/cmd/testdata/helm home with space/helm/plugins/fullenv/plugin.yaml diff --git a/cmd/helm/testdata/helm home with space/helm/repositories.yaml b/pkg/cmd/testdata/helm home with space/helm/repositories.yaml similarity index 100% rename from cmd/helm/testdata/helm home with space/helm/repositories.yaml rename to pkg/cmd/testdata/helm home with space/helm/repositories.yaml diff --git a/cmd/helm/testdata/helm home with space/helm/repository/test-name-charts.txt b/pkg/cmd/testdata/helm home with space/helm/repository/test-name-charts.txt similarity index 100% rename from cmd/helm/testdata/helm home with space/helm/repository/test-name-charts.txt rename to pkg/cmd/testdata/helm home with space/helm/repository/test-name-charts.txt diff --git a/cmd/helm/testdata/helm home with space/helm/repository/test-name-index.yaml b/pkg/cmd/testdata/helm home with space/helm/repository/test-name-index.yaml similarity index 100% rename from cmd/helm/testdata/helm home with space/helm/repository/test-name-index.yaml rename to pkg/cmd/testdata/helm home with space/helm/repository/test-name-index.yaml diff --git a/cmd/helm/testdata/helm home with space/helm/repository/testing-index.yaml b/pkg/cmd/testdata/helm home with space/helm/repository/testing-index.yaml similarity index 100% rename from cmd/helm/testdata/helm home with space/helm/repository/testing-index.yaml rename to pkg/cmd/testdata/helm home with space/helm/repository/testing-index.yaml diff --git a/cmd/helm/testdata/helm-test-key.pub b/pkg/cmd/testdata/helm-test-key.pub similarity index 100% rename from cmd/helm/testdata/helm-test-key.pub rename to pkg/cmd/testdata/helm-test-key.pub diff --git a/cmd/helm/testdata/helm-test-key.secret b/pkg/cmd/testdata/helm-test-key.secret similarity index 100% rename from cmd/helm/testdata/helm-test-key.secret rename to pkg/cmd/testdata/helm-test-key.secret diff --git a/cmd/helm/testdata/helmhome/helm/plugins/args/args.sh b/pkg/cmd/testdata/helmhome/helm/plugins/args/args.sh similarity index 100% rename from cmd/helm/testdata/helmhome/helm/plugins/args/args.sh rename to pkg/cmd/testdata/helmhome/helm/plugins/args/args.sh diff --git a/cmd/helm/testdata/helmhome/helm/plugins/args/plugin.complete b/pkg/cmd/testdata/helmhome/helm/plugins/args/plugin.complete similarity index 100% rename from cmd/helm/testdata/helmhome/helm/plugins/args/plugin.complete rename to pkg/cmd/testdata/helmhome/helm/plugins/args/plugin.complete diff --git a/cmd/helm/testdata/helmhome/helm/plugins/args/plugin.yaml b/pkg/cmd/testdata/helmhome/helm/plugins/args/plugin.yaml similarity index 100% rename from cmd/helm/testdata/helmhome/helm/plugins/args/plugin.yaml rename to pkg/cmd/testdata/helmhome/helm/plugins/args/plugin.yaml diff --git a/cmd/helm/testdata/helmhome/helm/plugins/echo/completion.yaml b/pkg/cmd/testdata/helmhome/helm/plugins/echo/completion.yaml similarity index 100% rename from cmd/helm/testdata/helmhome/helm/plugins/echo/completion.yaml rename to pkg/cmd/testdata/helmhome/helm/plugins/echo/completion.yaml diff --git a/cmd/helm/testdata/helmhome/helm/plugins/echo/plugin.complete b/pkg/cmd/testdata/helmhome/helm/plugins/echo/plugin.complete similarity index 100% rename from cmd/helm/testdata/helmhome/helm/plugins/echo/plugin.complete rename to pkg/cmd/testdata/helmhome/helm/plugins/echo/plugin.complete diff --git a/cmd/helm/testdata/helmhome/helm/plugins/echo/plugin.yaml b/pkg/cmd/testdata/helmhome/helm/plugins/echo/plugin.yaml similarity index 100% rename from cmd/helm/testdata/helmhome/helm/plugins/echo/plugin.yaml rename to pkg/cmd/testdata/helmhome/helm/plugins/echo/plugin.yaml diff --git a/cmd/helm/testdata/helmhome/helm/plugins/env/completion.yaml b/pkg/cmd/testdata/helmhome/helm/plugins/env/completion.yaml similarity index 100% rename from cmd/helm/testdata/helmhome/helm/plugins/env/completion.yaml rename to pkg/cmd/testdata/helmhome/helm/plugins/env/completion.yaml diff --git a/cmd/helm/testdata/helmhome/helm/plugins/env/plugin.yaml b/pkg/cmd/testdata/helmhome/helm/plugins/env/plugin.yaml similarity index 100% rename from cmd/helm/testdata/helmhome/helm/plugins/env/plugin.yaml rename to pkg/cmd/testdata/helmhome/helm/plugins/env/plugin.yaml diff --git a/cmd/helm/testdata/helmhome/helm/plugins/exitwith/completion.yaml b/pkg/cmd/testdata/helmhome/helm/plugins/exitwith/completion.yaml similarity index 100% rename from cmd/helm/testdata/helmhome/helm/plugins/exitwith/completion.yaml rename to pkg/cmd/testdata/helmhome/helm/plugins/exitwith/completion.yaml diff --git a/cmd/helm/testdata/helmhome/helm/plugins/exitwith/exitwith.sh b/pkg/cmd/testdata/helmhome/helm/plugins/exitwith/exitwith.sh similarity index 100% rename from cmd/helm/testdata/helmhome/helm/plugins/exitwith/exitwith.sh rename to pkg/cmd/testdata/helmhome/helm/plugins/exitwith/exitwith.sh diff --git a/cmd/helm/testdata/helmhome/helm/plugins/exitwith/plugin.yaml b/pkg/cmd/testdata/helmhome/helm/plugins/exitwith/plugin.yaml similarity index 100% rename from cmd/helm/testdata/helmhome/helm/plugins/exitwith/plugin.yaml rename to pkg/cmd/testdata/helmhome/helm/plugins/exitwith/plugin.yaml diff --git a/cmd/helm/testdata/helmhome/helm/plugins/fullenv/completion.yaml b/pkg/cmd/testdata/helmhome/helm/plugins/fullenv/completion.yaml similarity index 100% rename from cmd/helm/testdata/helmhome/helm/plugins/fullenv/completion.yaml rename to pkg/cmd/testdata/helmhome/helm/plugins/fullenv/completion.yaml diff --git a/cmd/helm/testdata/helmhome/helm/plugins/fullenv/fullenv.sh b/pkg/cmd/testdata/helmhome/helm/plugins/fullenv/fullenv.sh similarity index 100% rename from cmd/helm/testdata/helmhome/helm/plugins/fullenv/fullenv.sh rename to pkg/cmd/testdata/helmhome/helm/plugins/fullenv/fullenv.sh diff --git a/cmd/helm/testdata/helmhome/helm/plugins/fullenv/plugin.yaml b/pkg/cmd/testdata/helmhome/helm/plugins/fullenv/plugin.yaml similarity index 100% rename from cmd/helm/testdata/helmhome/helm/plugins/fullenv/plugin.yaml rename to pkg/cmd/testdata/helmhome/helm/plugins/fullenv/plugin.yaml diff --git a/cmd/helm/testdata/helmhome/helm/repositories.yaml b/pkg/cmd/testdata/helmhome/helm/repositories.yaml similarity index 100% rename from cmd/helm/testdata/helmhome/helm/repositories.yaml rename to pkg/cmd/testdata/helmhome/helm/repositories.yaml diff --git a/cmd/helm/testdata/helmhome/helm/repository/test-name-charts.txt b/pkg/cmd/testdata/helmhome/helm/repository/test-name-charts.txt similarity index 100% rename from cmd/helm/testdata/helmhome/helm/repository/test-name-charts.txt rename to pkg/cmd/testdata/helmhome/helm/repository/test-name-charts.txt diff --git a/cmd/helm/testdata/helmhome/helm/repository/test-name-index.yaml b/pkg/cmd/testdata/helmhome/helm/repository/test-name-index.yaml similarity index 100% rename from cmd/helm/testdata/helmhome/helm/repository/test-name-index.yaml rename to pkg/cmd/testdata/helmhome/helm/repository/test-name-index.yaml diff --git a/cmd/helm/testdata/helmhome/helm/repository/testing-index.yaml b/pkg/cmd/testdata/helmhome/helm/repository/testing-index.yaml similarity index 100% rename from cmd/helm/testdata/helmhome/helm/repository/testing-index.yaml rename to pkg/cmd/testdata/helmhome/helm/repository/testing-index.yaml diff --git a/cmd/helm/testdata/output/chart-with-subchart-update.txt b/pkg/cmd/testdata/output/chart-with-subchart-update.txt similarity index 100% rename from cmd/helm/testdata/output/chart-with-subchart-update.txt rename to pkg/cmd/testdata/output/chart-with-subchart-update.txt diff --git a/cmd/helm/testdata/output/dependency-list-archive.txt b/pkg/cmd/testdata/output/dependency-list-archive.txt similarity index 100% rename from cmd/helm/testdata/output/dependency-list-archive.txt rename to pkg/cmd/testdata/output/dependency-list-archive.txt diff --git a/cmd/helm/testdata/output/dependency-list-no-chart-linux.txt b/pkg/cmd/testdata/output/dependency-list-no-chart-linux.txt similarity index 100% rename from cmd/helm/testdata/output/dependency-list-no-chart-linux.txt rename to pkg/cmd/testdata/output/dependency-list-no-chart-linux.txt diff --git a/cmd/helm/testdata/output/dependency-list-no-requirements-linux.txt b/pkg/cmd/testdata/output/dependency-list-no-requirements-linux.txt similarity index 100% rename from cmd/helm/testdata/output/dependency-list-no-requirements-linux.txt rename to pkg/cmd/testdata/output/dependency-list-no-requirements-linux.txt diff --git a/cmd/helm/testdata/output/dependency-list.txt b/pkg/cmd/testdata/output/dependency-list.txt similarity index 100% rename from cmd/helm/testdata/output/dependency-list.txt rename to pkg/cmd/testdata/output/dependency-list.txt diff --git a/cmd/helm/testdata/output/deprecated-chart.txt b/pkg/cmd/testdata/output/deprecated-chart.txt similarity index 100% rename from cmd/helm/testdata/output/deprecated-chart.txt rename to pkg/cmd/testdata/output/deprecated-chart.txt diff --git a/cmd/helm/testdata/output/docs-type-comp.txt b/pkg/cmd/testdata/output/docs-type-comp.txt similarity index 100% rename from cmd/helm/testdata/output/docs-type-comp.txt rename to pkg/cmd/testdata/output/docs-type-comp.txt diff --git a/cmd/helm/testdata/output/empty_default_comp.txt b/pkg/cmd/testdata/output/empty_default_comp.txt similarity index 100% rename from cmd/helm/testdata/output/empty_default_comp.txt rename to pkg/cmd/testdata/output/empty_default_comp.txt diff --git a/cmd/helm/testdata/output/empty_nofile_comp.txt b/pkg/cmd/testdata/output/empty_nofile_comp.txt similarity index 100% rename from cmd/helm/testdata/output/empty_nofile_comp.txt rename to pkg/cmd/testdata/output/empty_nofile_comp.txt diff --git a/cmd/helm/testdata/output/env-comp.txt b/pkg/cmd/testdata/output/env-comp.txt similarity index 100% rename from cmd/helm/testdata/output/env-comp.txt rename to pkg/cmd/testdata/output/env-comp.txt diff --git a/cmd/helm/testdata/output/get-all-no-args.txt b/pkg/cmd/testdata/output/get-all-no-args.txt similarity index 100% rename from cmd/helm/testdata/output/get-all-no-args.txt rename to pkg/cmd/testdata/output/get-all-no-args.txt diff --git a/cmd/helm/testdata/output/get-hooks-no-args.txt b/pkg/cmd/testdata/output/get-hooks-no-args.txt similarity index 100% rename from cmd/helm/testdata/output/get-hooks-no-args.txt rename to pkg/cmd/testdata/output/get-hooks-no-args.txt diff --git a/cmd/helm/testdata/output/get-hooks.txt b/pkg/cmd/testdata/output/get-hooks.txt similarity index 100% rename from cmd/helm/testdata/output/get-hooks.txt rename to pkg/cmd/testdata/output/get-hooks.txt diff --git a/cmd/helm/testdata/output/get-manifest-no-args.txt b/pkg/cmd/testdata/output/get-manifest-no-args.txt similarity index 100% rename from cmd/helm/testdata/output/get-manifest-no-args.txt rename to pkg/cmd/testdata/output/get-manifest-no-args.txt diff --git a/cmd/helm/testdata/output/get-manifest.txt b/pkg/cmd/testdata/output/get-manifest.txt similarity index 100% rename from cmd/helm/testdata/output/get-manifest.txt rename to pkg/cmd/testdata/output/get-manifest.txt diff --git a/cmd/helm/testdata/output/get-metadata-args.txt b/pkg/cmd/testdata/output/get-metadata-args.txt similarity index 100% rename from cmd/helm/testdata/output/get-metadata-args.txt rename to pkg/cmd/testdata/output/get-metadata-args.txt diff --git a/cmd/helm/testdata/output/get-metadata.json b/pkg/cmd/testdata/output/get-metadata.json similarity index 100% rename from cmd/helm/testdata/output/get-metadata.json rename to pkg/cmd/testdata/output/get-metadata.json diff --git a/cmd/helm/testdata/output/get-metadata.txt b/pkg/cmd/testdata/output/get-metadata.txt similarity index 100% rename from cmd/helm/testdata/output/get-metadata.txt rename to pkg/cmd/testdata/output/get-metadata.txt diff --git a/cmd/helm/testdata/output/get-metadata.yaml b/pkg/cmd/testdata/output/get-metadata.yaml similarity index 100% rename from cmd/helm/testdata/output/get-metadata.yaml rename to pkg/cmd/testdata/output/get-metadata.yaml diff --git a/cmd/helm/testdata/output/get-notes-no-args.txt b/pkg/cmd/testdata/output/get-notes-no-args.txt similarity index 100% rename from cmd/helm/testdata/output/get-notes-no-args.txt rename to pkg/cmd/testdata/output/get-notes-no-args.txt diff --git a/cmd/helm/testdata/output/get-notes.txt b/pkg/cmd/testdata/output/get-notes.txt similarity index 100% rename from cmd/helm/testdata/output/get-notes.txt rename to pkg/cmd/testdata/output/get-notes.txt diff --git a/cmd/helm/testdata/output/get-release-template.txt b/pkg/cmd/testdata/output/get-release-template.txt similarity index 100% rename from cmd/helm/testdata/output/get-release-template.txt rename to pkg/cmd/testdata/output/get-release-template.txt diff --git a/cmd/helm/testdata/output/get-release.txt b/pkg/cmd/testdata/output/get-release.txt similarity index 100% rename from cmd/helm/testdata/output/get-release.txt rename to pkg/cmd/testdata/output/get-release.txt diff --git a/cmd/helm/testdata/output/get-values-all.txt b/pkg/cmd/testdata/output/get-values-all.txt similarity index 100% rename from cmd/helm/testdata/output/get-values-all.txt rename to pkg/cmd/testdata/output/get-values-all.txt diff --git a/cmd/helm/testdata/output/get-values-args.txt b/pkg/cmd/testdata/output/get-values-args.txt similarity index 100% rename from cmd/helm/testdata/output/get-values-args.txt rename to pkg/cmd/testdata/output/get-values-args.txt diff --git a/cmd/helm/testdata/output/get-values.txt b/pkg/cmd/testdata/output/get-values.txt similarity index 100% rename from cmd/helm/testdata/output/get-values.txt rename to pkg/cmd/testdata/output/get-values.txt diff --git a/cmd/helm/testdata/output/history-limit.txt b/pkg/cmd/testdata/output/history-limit.txt similarity index 100% rename from cmd/helm/testdata/output/history-limit.txt rename to pkg/cmd/testdata/output/history-limit.txt diff --git a/cmd/helm/testdata/output/history.json b/pkg/cmd/testdata/output/history.json similarity index 100% rename from cmd/helm/testdata/output/history.json rename to pkg/cmd/testdata/output/history.json diff --git a/cmd/helm/testdata/output/history.txt b/pkg/cmd/testdata/output/history.txt similarity index 100% rename from cmd/helm/testdata/output/history.txt rename to pkg/cmd/testdata/output/history.txt diff --git a/cmd/helm/testdata/output/history.yaml b/pkg/cmd/testdata/output/history.yaml similarity index 100% rename from cmd/helm/testdata/output/history.yaml rename to pkg/cmd/testdata/output/history.yaml diff --git a/cmd/helm/testdata/output/install-and-replace.txt b/pkg/cmd/testdata/output/install-and-replace.txt similarity index 100% rename from cmd/helm/testdata/output/install-and-replace.txt rename to pkg/cmd/testdata/output/install-and-replace.txt diff --git a/cmd/helm/testdata/output/install-and-take-ownership.txt b/pkg/cmd/testdata/output/install-and-take-ownership.txt similarity index 100% rename from cmd/helm/testdata/output/install-and-take-ownership.txt rename to pkg/cmd/testdata/output/install-and-take-ownership.txt diff --git a/cmd/helm/testdata/output/install-chart-bad-type.txt b/pkg/cmd/testdata/output/install-chart-bad-type.txt similarity index 100% rename from cmd/helm/testdata/output/install-chart-bad-type.txt rename to pkg/cmd/testdata/output/install-chart-bad-type.txt diff --git a/cmd/helm/testdata/output/install-dry-run-with-secret-hidden.txt b/pkg/cmd/testdata/output/install-dry-run-with-secret-hidden.txt similarity index 100% rename from cmd/helm/testdata/output/install-dry-run-with-secret-hidden.txt rename to pkg/cmd/testdata/output/install-dry-run-with-secret-hidden.txt diff --git a/cmd/helm/testdata/output/install-dry-run-with-secret.txt b/pkg/cmd/testdata/output/install-dry-run-with-secret.txt similarity index 100% rename from cmd/helm/testdata/output/install-dry-run-with-secret.txt rename to pkg/cmd/testdata/output/install-dry-run-with-secret.txt diff --git a/cmd/helm/testdata/output/install-hide-secret.txt b/pkg/cmd/testdata/output/install-hide-secret.txt similarity index 100% rename from cmd/helm/testdata/output/install-hide-secret.txt rename to pkg/cmd/testdata/output/install-hide-secret.txt diff --git a/cmd/helm/testdata/output/install-lib-chart.txt b/pkg/cmd/testdata/output/install-lib-chart.txt similarity index 100% rename from cmd/helm/testdata/output/install-lib-chart.txt rename to pkg/cmd/testdata/output/install-lib-chart.txt diff --git a/cmd/helm/testdata/output/install-name-template.txt b/pkg/cmd/testdata/output/install-name-template.txt similarity index 100% rename from cmd/helm/testdata/output/install-name-template.txt rename to pkg/cmd/testdata/output/install-name-template.txt diff --git a/cmd/helm/testdata/output/install-no-args.txt b/pkg/cmd/testdata/output/install-no-args.txt similarity index 100% rename from cmd/helm/testdata/output/install-no-args.txt rename to pkg/cmd/testdata/output/install-no-args.txt diff --git a/cmd/helm/testdata/output/install-no-hooks.txt b/pkg/cmd/testdata/output/install-no-hooks.txt similarity index 100% rename from cmd/helm/testdata/output/install-no-hooks.txt rename to pkg/cmd/testdata/output/install-no-hooks.txt diff --git a/cmd/helm/testdata/output/install-with-multiple-values-files.txt b/pkg/cmd/testdata/output/install-with-multiple-values-files.txt similarity index 100% rename from cmd/helm/testdata/output/install-with-multiple-values-files.txt rename to pkg/cmd/testdata/output/install-with-multiple-values-files.txt diff --git a/cmd/helm/testdata/output/install-with-multiple-values.txt b/pkg/cmd/testdata/output/install-with-multiple-values.txt similarity index 100% rename from cmd/helm/testdata/output/install-with-multiple-values.txt rename to pkg/cmd/testdata/output/install-with-multiple-values.txt diff --git a/cmd/helm/testdata/output/install-with-timeout.txt b/pkg/cmd/testdata/output/install-with-timeout.txt similarity index 100% rename from cmd/helm/testdata/output/install-with-timeout.txt rename to pkg/cmd/testdata/output/install-with-timeout.txt diff --git a/cmd/helm/testdata/output/install-with-values-file.txt b/pkg/cmd/testdata/output/install-with-values-file.txt similarity index 100% rename from cmd/helm/testdata/output/install-with-values-file.txt rename to pkg/cmd/testdata/output/install-with-values-file.txt diff --git a/cmd/helm/testdata/output/install-with-values.txt b/pkg/cmd/testdata/output/install-with-values.txt similarity index 100% rename from cmd/helm/testdata/output/install-with-values.txt rename to pkg/cmd/testdata/output/install-with-values.txt diff --git a/cmd/helm/testdata/output/install-with-wait-for-jobs.txt b/pkg/cmd/testdata/output/install-with-wait-for-jobs.txt similarity index 100% rename from cmd/helm/testdata/output/install-with-wait-for-jobs.txt rename to pkg/cmd/testdata/output/install-with-wait-for-jobs.txt diff --git a/cmd/helm/testdata/output/install-with-wait.txt b/pkg/cmd/testdata/output/install-with-wait.txt similarity index 100% rename from cmd/helm/testdata/output/install-with-wait.txt rename to pkg/cmd/testdata/output/install-with-wait.txt diff --git a/cmd/helm/testdata/output/install.txt b/pkg/cmd/testdata/output/install.txt similarity index 100% rename from cmd/helm/testdata/output/install.txt rename to pkg/cmd/testdata/output/install.txt diff --git a/cmd/helm/testdata/output/issue-9027.txt b/pkg/cmd/testdata/output/issue-9027.txt similarity index 100% rename from cmd/helm/testdata/output/issue-9027.txt rename to pkg/cmd/testdata/output/issue-9027.txt diff --git a/cmd/helm/testdata/output/issue-totoml.txt b/pkg/cmd/testdata/output/issue-totoml.txt similarity index 100% rename from cmd/helm/testdata/output/issue-totoml.txt rename to pkg/cmd/testdata/output/issue-totoml.txt diff --git a/cmd/helm/testdata/output/lint-chart-with-bad-subcharts-with-subcharts.txt b/pkg/cmd/testdata/output/lint-chart-with-bad-subcharts-with-subcharts.txt similarity index 100% rename from cmd/helm/testdata/output/lint-chart-with-bad-subcharts-with-subcharts.txt rename to pkg/cmd/testdata/output/lint-chart-with-bad-subcharts-with-subcharts.txt diff --git a/cmd/helm/testdata/output/lint-chart-with-bad-subcharts.txt b/pkg/cmd/testdata/output/lint-chart-with-bad-subcharts.txt similarity index 100% rename from cmd/helm/testdata/output/lint-chart-with-bad-subcharts.txt rename to pkg/cmd/testdata/output/lint-chart-with-bad-subcharts.txt diff --git a/cmd/helm/testdata/output/lint-chart-with-deprecated-api-old-k8s.txt b/pkg/cmd/testdata/output/lint-chart-with-deprecated-api-old-k8s.txt similarity index 100% rename from cmd/helm/testdata/output/lint-chart-with-deprecated-api-old-k8s.txt rename to pkg/cmd/testdata/output/lint-chart-with-deprecated-api-old-k8s.txt diff --git a/cmd/helm/testdata/output/lint-chart-with-deprecated-api-strict.txt b/pkg/cmd/testdata/output/lint-chart-with-deprecated-api-strict.txt similarity index 100% rename from cmd/helm/testdata/output/lint-chart-with-deprecated-api-strict.txt rename to pkg/cmd/testdata/output/lint-chart-with-deprecated-api-strict.txt diff --git a/cmd/helm/testdata/output/lint-chart-with-deprecated-api.txt b/pkg/cmd/testdata/output/lint-chart-with-deprecated-api.txt similarity index 100% rename from cmd/helm/testdata/output/lint-chart-with-deprecated-api.txt rename to pkg/cmd/testdata/output/lint-chart-with-deprecated-api.txt diff --git a/cmd/helm/testdata/output/lint-quiet-with-error.txt b/pkg/cmd/testdata/output/lint-quiet-with-error.txt similarity index 100% rename from cmd/helm/testdata/output/lint-quiet-with-error.txt rename to pkg/cmd/testdata/output/lint-quiet-with-error.txt diff --git a/cmd/helm/testdata/output/lint-quiet-with-warning.txt b/pkg/cmd/testdata/output/lint-quiet-with-warning.txt similarity index 100% rename from cmd/helm/testdata/output/lint-quiet-with-warning.txt rename to pkg/cmd/testdata/output/lint-quiet-with-warning.txt diff --git a/cmd/helm/testdata/output/lint-quiet.txt b/pkg/cmd/testdata/output/lint-quiet.txt similarity index 100% rename from cmd/helm/testdata/output/lint-quiet.txt rename to pkg/cmd/testdata/output/lint-quiet.txt diff --git a/cmd/helm/testdata/output/list-all.txt b/pkg/cmd/testdata/output/list-all.txt similarity index 100% rename from cmd/helm/testdata/output/list-all.txt rename to pkg/cmd/testdata/output/list-all.txt diff --git a/cmd/helm/testdata/output/list-date-reversed.txt b/pkg/cmd/testdata/output/list-date-reversed.txt similarity index 100% rename from cmd/helm/testdata/output/list-date-reversed.txt rename to pkg/cmd/testdata/output/list-date-reversed.txt diff --git a/cmd/helm/testdata/output/list-date.txt b/pkg/cmd/testdata/output/list-date.txt similarity index 100% rename from cmd/helm/testdata/output/list-date.txt rename to pkg/cmd/testdata/output/list-date.txt diff --git a/cmd/helm/testdata/output/list-failed.txt b/pkg/cmd/testdata/output/list-failed.txt similarity index 100% rename from cmd/helm/testdata/output/list-failed.txt rename to pkg/cmd/testdata/output/list-failed.txt diff --git a/cmd/helm/testdata/output/list-filter.txt b/pkg/cmd/testdata/output/list-filter.txt similarity index 100% rename from cmd/helm/testdata/output/list-filter.txt rename to pkg/cmd/testdata/output/list-filter.txt diff --git a/cmd/helm/testdata/output/list-max.txt b/pkg/cmd/testdata/output/list-max.txt similarity index 100% rename from cmd/helm/testdata/output/list-max.txt rename to pkg/cmd/testdata/output/list-max.txt diff --git a/cmd/helm/testdata/output/list-namespace.txt b/pkg/cmd/testdata/output/list-namespace.txt similarity index 100% rename from cmd/helm/testdata/output/list-namespace.txt rename to pkg/cmd/testdata/output/list-namespace.txt diff --git a/cmd/helm/testdata/output/list-no-headers.txt b/pkg/cmd/testdata/output/list-no-headers.txt similarity index 100% rename from cmd/helm/testdata/output/list-no-headers.txt rename to pkg/cmd/testdata/output/list-no-headers.txt diff --git a/cmd/helm/testdata/output/list-offset.txt b/pkg/cmd/testdata/output/list-offset.txt similarity index 100% rename from cmd/helm/testdata/output/list-offset.txt rename to pkg/cmd/testdata/output/list-offset.txt diff --git a/cmd/helm/testdata/output/list-pending.txt b/pkg/cmd/testdata/output/list-pending.txt similarity index 100% rename from cmd/helm/testdata/output/list-pending.txt rename to pkg/cmd/testdata/output/list-pending.txt diff --git a/cmd/helm/testdata/output/list-reverse.txt b/pkg/cmd/testdata/output/list-reverse.txt similarity index 100% rename from cmd/helm/testdata/output/list-reverse.txt rename to pkg/cmd/testdata/output/list-reverse.txt diff --git a/cmd/helm/testdata/output/list-short-json.txt b/pkg/cmd/testdata/output/list-short-json.txt similarity index 100% rename from cmd/helm/testdata/output/list-short-json.txt rename to pkg/cmd/testdata/output/list-short-json.txt diff --git a/cmd/helm/testdata/output/list-short-yaml.txt b/pkg/cmd/testdata/output/list-short-yaml.txt similarity index 100% rename from cmd/helm/testdata/output/list-short-yaml.txt rename to pkg/cmd/testdata/output/list-short-yaml.txt diff --git a/cmd/helm/testdata/output/list-short.txt b/pkg/cmd/testdata/output/list-short.txt similarity index 100% rename from cmd/helm/testdata/output/list-short.txt rename to pkg/cmd/testdata/output/list-short.txt diff --git a/cmd/helm/testdata/output/list-superseded.txt b/pkg/cmd/testdata/output/list-superseded.txt similarity index 100% rename from cmd/helm/testdata/output/list-superseded.txt rename to pkg/cmd/testdata/output/list-superseded.txt diff --git a/cmd/helm/testdata/output/list-uninstalled.txt b/pkg/cmd/testdata/output/list-uninstalled.txt similarity index 100% rename from cmd/helm/testdata/output/list-uninstalled.txt rename to pkg/cmd/testdata/output/list-uninstalled.txt diff --git a/cmd/helm/testdata/output/list-uninstalling.txt b/pkg/cmd/testdata/output/list-uninstalling.txt similarity index 100% rename from cmd/helm/testdata/output/list-uninstalling.txt rename to pkg/cmd/testdata/output/list-uninstalling.txt diff --git a/cmd/helm/testdata/output/list.txt b/pkg/cmd/testdata/output/list.txt similarity index 100% rename from cmd/helm/testdata/output/list.txt rename to pkg/cmd/testdata/output/list.txt diff --git a/cmd/helm/testdata/output/object-order.txt b/pkg/cmd/testdata/output/object-order.txt similarity index 100% rename from cmd/helm/testdata/output/object-order.txt rename to pkg/cmd/testdata/output/object-order.txt diff --git a/cmd/helm/testdata/output/output-comp.txt b/pkg/cmd/testdata/output/output-comp.txt similarity index 100% rename from cmd/helm/testdata/output/output-comp.txt rename to pkg/cmd/testdata/output/output-comp.txt diff --git a/cmd/helm/testdata/output/plugin_args_comp.txt b/pkg/cmd/testdata/output/plugin_args_comp.txt similarity index 100% rename from cmd/helm/testdata/output/plugin_args_comp.txt rename to pkg/cmd/testdata/output/plugin_args_comp.txt diff --git a/cmd/helm/testdata/output/plugin_args_flag_comp.txt b/pkg/cmd/testdata/output/plugin_args_flag_comp.txt similarity index 100% rename from cmd/helm/testdata/output/plugin_args_flag_comp.txt rename to pkg/cmd/testdata/output/plugin_args_flag_comp.txt diff --git a/cmd/helm/testdata/output/plugin_args_many_args_comp.txt b/pkg/cmd/testdata/output/plugin_args_many_args_comp.txt similarity index 100% rename from cmd/helm/testdata/output/plugin_args_many_args_comp.txt rename to pkg/cmd/testdata/output/plugin_args_many_args_comp.txt diff --git a/cmd/helm/testdata/output/plugin_args_ns_comp.txt b/pkg/cmd/testdata/output/plugin_args_ns_comp.txt similarity index 100% rename from cmd/helm/testdata/output/plugin_args_ns_comp.txt rename to pkg/cmd/testdata/output/plugin_args_ns_comp.txt diff --git a/cmd/helm/testdata/output/plugin_echo_no_directive.txt b/pkg/cmd/testdata/output/plugin_echo_no_directive.txt similarity index 100% rename from cmd/helm/testdata/output/plugin_echo_no_directive.txt rename to pkg/cmd/testdata/output/plugin_echo_no_directive.txt diff --git a/cmd/helm/testdata/output/plugin_list_comp.txt b/pkg/cmd/testdata/output/plugin_list_comp.txt similarity index 100% rename from cmd/helm/testdata/output/plugin_list_comp.txt rename to pkg/cmd/testdata/output/plugin_list_comp.txt diff --git a/cmd/helm/testdata/output/plugin_repeat_comp.txt b/pkg/cmd/testdata/output/plugin_repeat_comp.txt similarity index 100% rename from cmd/helm/testdata/output/plugin_repeat_comp.txt rename to pkg/cmd/testdata/output/plugin_repeat_comp.txt diff --git a/cmd/helm/testdata/output/release_list_comp.txt b/pkg/cmd/testdata/output/release_list_comp.txt similarity index 100% rename from cmd/helm/testdata/output/release_list_comp.txt rename to pkg/cmd/testdata/output/release_list_comp.txt diff --git a/cmd/helm/testdata/output/release_list_repeat_comp.txt b/pkg/cmd/testdata/output/release_list_repeat_comp.txt similarity index 100% rename from cmd/helm/testdata/output/release_list_repeat_comp.txt rename to pkg/cmd/testdata/output/release_list_repeat_comp.txt diff --git a/cmd/helm/testdata/output/repo-add.txt b/pkg/cmd/testdata/output/repo-add.txt similarity index 100% rename from cmd/helm/testdata/output/repo-add.txt rename to pkg/cmd/testdata/output/repo-add.txt diff --git a/cmd/helm/testdata/output/repo-add2.txt b/pkg/cmd/testdata/output/repo-add2.txt similarity index 100% rename from cmd/helm/testdata/output/repo-add2.txt rename to pkg/cmd/testdata/output/repo-add2.txt diff --git a/cmd/helm/testdata/output/repo_list_comp.txt b/pkg/cmd/testdata/output/repo_list_comp.txt similarity index 100% rename from cmd/helm/testdata/output/repo_list_comp.txt rename to pkg/cmd/testdata/output/repo_list_comp.txt diff --git a/cmd/helm/testdata/output/repo_repeat_comp.txt b/pkg/cmd/testdata/output/repo_repeat_comp.txt similarity index 100% rename from cmd/helm/testdata/output/repo_repeat_comp.txt rename to pkg/cmd/testdata/output/repo_repeat_comp.txt diff --git a/cmd/helm/testdata/output/revision-comp.txt b/pkg/cmd/testdata/output/revision-comp.txt similarity index 100% rename from cmd/helm/testdata/output/revision-comp.txt rename to pkg/cmd/testdata/output/revision-comp.txt diff --git a/cmd/helm/testdata/output/revision-wrong-args-comp.txt b/pkg/cmd/testdata/output/revision-wrong-args-comp.txt similarity index 100% rename from cmd/helm/testdata/output/revision-wrong-args-comp.txt rename to pkg/cmd/testdata/output/revision-wrong-args-comp.txt diff --git a/cmd/helm/testdata/output/rollback-comp.txt b/pkg/cmd/testdata/output/rollback-comp.txt similarity index 100% rename from cmd/helm/testdata/output/rollback-comp.txt rename to pkg/cmd/testdata/output/rollback-comp.txt diff --git a/cmd/helm/testdata/output/rollback-no-args.txt b/pkg/cmd/testdata/output/rollback-no-args.txt similarity index 100% rename from cmd/helm/testdata/output/rollback-no-args.txt rename to pkg/cmd/testdata/output/rollback-no-args.txt diff --git a/cmd/helm/testdata/output/rollback-no-revision.txt b/pkg/cmd/testdata/output/rollback-no-revision.txt similarity index 100% rename from cmd/helm/testdata/output/rollback-no-revision.txt rename to pkg/cmd/testdata/output/rollback-no-revision.txt diff --git a/cmd/helm/testdata/output/rollback-non-existent-version.txt b/pkg/cmd/testdata/output/rollback-non-existent-version.txt similarity index 100% rename from cmd/helm/testdata/output/rollback-non-existent-version.txt rename to pkg/cmd/testdata/output/rollback-non-existent-version.txt diff --git a/cmd/helm/testdata/output/rollback-timeout.txt b/pkg/cmd/testdata/output/rollback-timeout.txt similarity index 100% rename from cmd/helm/testdata/output/rollback-timeout.txt rename to pkg/cmd/testdata/output/rollback-timeout.txt diff --git a/cmd/helm/testdata/output/rollback-wait-for-jobs.txt b/pkg/cmd/testdata/output/rollback-wait-for-jobs.txt similarity index 100% rename from cmd/helm/testdata/output/rollback-wait-for-jobs.txt rename to pkg/cmd/testdata/output/rollback-wait-for-jobs.txt diff --git a/cmd/helm/testdata/output/rollback-wait.txt b/pkg/cmd/testdata/output/rollback-wait.txt similarity index 100% rename from cmd/helm/testdata/output/rollback-wait.txt rename to pkg/cmd/testdata/output/rollback-wait.txt diff --git a/cmd/helm/testdata/output/rollback-wrong-args-comp.txt b/pkg/cmd/testdata/output/rollback-wrong-args-comp.txt similarity index 100% rename from cmd/helm/testdata/output/rollback-wrong-args-comp.txt rename to pkg/cmd/testdata/output/rollback-wrong-args-comp.txt diff --git a/cmd/helm/testdata/output/rollback.txt b/pkg/cmd/testdata/output/rollback.txt similarity index 100% rename from cmd/helm/testdata/output/rollback.txt rename to pkg/cmd/testdata/output/rollback.txt diff --git a/cmd/helm/testdata/output/schema-negative-cli.txt b/pkg/cmd/testdata/output/schema-negative-cli.txt similarity index 100% rename from cmd/helm/testdata/output/schema-negative-cli.txt rename to pkg/cmd/testdata/output/schema-negative-cli.txt diff --git a/cmd/helm/testdata/output/schema-negative.txt b/pkg/cmd/testdata/output/schema-negative.txt similarity index 100% rename from cmd/helm/testdata/output/schema-negative.txt rename to pkg/cmd/testdata/output/schema-negative.txt diff --git a/cmd/helm/testdata/output/schema.txt b/pkg/cmd/testdata/output/schema.txt similarity index 100% rename from cmd/helm/testdata/output/schema.txt rename to pkg/cmd/testdata/output/schema.txt diff --git a/cmd/helm/testdata/output/search-constraint-single.txt b/pkg/cmd/testdata/output/search-constraint-single.txt similarity index 100% rename from cmd/helm/testdata/output/search-constraint-single.txt rename to pkg/cmd/testdata/output/search-constraint-single.txt diff --git a/cmd/helm/testdata/output/search-constraint.txt b/pkg/cmd/testdata/output/search-constraint.txt similarity index 100% rename from cmd/helm/testdata/output/search-constraint.txt rename to pkg/cmd/testdata/output/search-constraint.txt diff --git a/cmd/helm/testdata/output/search-multiple-devel-release.txt b/pkg/cmd/testdata/output/search-multiple-devel-release.txt similarity index 100% rename from cmd/helm/testdata/output/search-multiple-devel-release.txt rename to pkg/cmd/testdata/output/search-multiple-devel-release.txt diff --git a/cmd/helm/testdata/output/search-multiple-stable-release.txt b/pkg/cmd/testdata/output/search-multiple-stable-release.txt similarity index 100% rename from cmd/helm/testdata/output/search-multiple-stable-release.txt rename to pkg/cmd/testdata/output/search-multiple-stable-release.txt diff --git a/cmd/helm/testdata/output/search-multiple-versions-constraints.txt b/pkg/cmd/testdata/output/search-multiple-versions-constraints.txt similarity index 100% rename from cmd/helm/testdata/output/search-multiple-versions-constraints.txt rename to pkg/cmd/testdata/output/search-multiple-versions-constraints.txt diff --git a/cmd/helm/testdata/output/search-multiple-versions.txt b/pkg/cmd/testdata/output/search-multiple-versions.txt similarity index 100% rename from cmd/helm/testdata/output/search-multiple-versions.txt rename to pkg/cmd/testdata/output/search-multiple-versions.txt diff --git a/cmd/helm/testdata/output/search-not-found-error.txt b/pkg/cmd/testdata/output/search-not-found-error.txt similarity index 100% rename from cmd/helm/testdata/output/search-not-found-error.txt rename to pkg/cmd/testdata/output/search-not-found-error.txt diff --git a/cmd/helm/testdata/output/search-not-found.txt b/pkg/cmd/testdata/output/search-not-found.txt similarity index 100% rename from cmd/helm/testdata/output/search-not-found.txt rename to pkg/cmd/testdata/output/search-not-found.txt diff --git a/cmd/helm/testdata/output/search-output-json.txt b/pkg/cmd/testdata/output/search-output-json.txt similarity index 100% rename from cmd/helm/testdata/output/search-output-json.txt rename to pkg/cmd/testdata/output/search-output-json.txt diff --git a/cmd/helm/testdata/output/search-output-yaml.txt b/pkg/cmd/testdata/output/search-output-yaml.txt similarity index 100% rename from cmd/helm/testdata/output/search-output-yaml.txt rename to pkg/cmd/testdata/output/search-output-yaml.txt diff --git a/cmd/helm/testdata/output/search-regex.txt b/pkg/cmd/testdata/output/search-regex.txt similarity index 100% rename from cmd/helm/testdata/output/search-regex.txt rename to pkg/cmd/testdata/output/search-regex.txt diff --git a/cmd/helm/testdata/output/search-versions-constraint.txt b/pkg/cmd/testdata/output/search-versions-constraint.txt similarity index 100% rename from cmd/helm/testdata/output/search-versions-constraint.txt rename to pkg/cmd/testdata/output/search-versions-constraint.txt diff --git a/cmd/helm/testdata/output/status-comp.txt b/pkg/cmd/testdata/output/status-comp.txt similarity index 100% rename from cmd/helm/testdata/output/status-comp.txt rename to pkg/cmd/testdata/output/status-comp.txt diff --git a/cmd/helm/testdata/output/status-with-desc.txt b/pkg/cmd/testdata/output/status-with-desc.txt similarity index 100% rename from cmd/helm/testdata/output/status-with-desc.txt rename to pkg/cmd/testdata/output/status-with-desc.txt diff --git a/cmd/helm/testdata/output/status-with-notes.txt b/pkg/cmd/testdata/output/status-with-notes.txt similarity index 100% rename from cmd/helm/testdata/output/status-with-notes.txt rename to pkg/cmd/testdata/output/status-with-notes.txt diff --git a/cmd/helm/testdata/output/status-with-resources.json b/pkg/cmd/testdata/output/status-with-resources.json similarity index 100% rename from cmd/helm/testdata/output/status-with-resources.json rename to pkg/cmd/testdata/output/status-with-resources.json diff --git a/cmd/helm/testdata/output/status-with-resources.txt b/pkg/cmd/testdata/output/status-with-resources.txt similarity index 100% rename from cmd/helm/testdata/output/status-with-resources.txt rename to pkg/cmd/testdata/output/status-with-resources.txt diff --git a/cmd/helm/testdata/output/status-with-test-suite.txt b/pkg/cmd/testdata/output/status-with-test-suite.txt similarity index 100% rename from cmd/helm/testdata/output/status-with-test-suite.txt rename to pkg/cmd/testdata/output/status-with-test-suite.txt diff --git a/cmd/helm/testdata/output/status-wrong-args-comp.txt b/pkg/cmd/testdata/output/status-wrong-args-comp.txt similarity index 100% rename from cmd/helm/testdata/output/status-wrong-args-comp.txt rename to pkg/cmd/testdata/output/status-wrong-args-comp.txt diff --git a/cmd/helm/testdata/output/status.json b/pkg/cmd/testdata/output/status.json similarity index 100% rename from cmd/helm/testdata/output/status.json rename to pkg/cmd/testdata/output/status.json diff --git a/cmd/helm/testdata/output/status.txt b/pkg/cmd/testdata/output/status.txt similarity index 100% rename from cmd/helm/testdata/output/status.txt rename to pkg/cmd/testdata/output/status.txt diff --git a/cmd/helm/testdata/output/subchart-schema-cli-negative.txt b/pkg/cmd/testdata/output/subchart-schema-cli-negative.txt similarity index 100% rename from cmd/helm/testdata/output/subchart-schema-cli-negative.txt rename to pkg/cmd/testdata/output/subchart-schema-cli-negative.txt diff --git a/cmd/helm/testdata/output/subchart-schema-cli.txt b/pkg/cmd/testdata/output/subchart-schema-cli.txt similarity index 100% rename from cmd/helm/testdata/output/subchart-schema-cli.txt rename to pkg/cmd/testdata/output/subchart-schema-cli.txt diff --git a/cmd/helm/testdata/output/subchart-schema-negative.txt b/pkg/cmd/testdata/output/subchart-schema-negative.txt similarity index 100% rename from cmd/helm/testdata/output/subchart-schema-negative.txt rename to pkg/cmd/testdata/output/subchart-schema-negative.txt diff --git a/cmd/helm/testdata/output/template-chart-bad-type.txt b/pkg/cmd/testdata/output/template-chart-bad-type.txt similarity index 100% rename from cmd/helm/testdata/output/template-chart-bad-type.txt rename to pkg/cmd/testdata/output/template-chart-bad-type.txt diff --git a/cmd/helm/testdata/output/template-chart-with-template-lib-archive-dep.txt b/pkg/cmd/testdata/output/template-chart-with-template-lib-archive-dep.txt similarity index 100% rename from cmd/helm/testdata/output/template-chart-with-template-lib-archive-dep.txt rename to pkg/cmd/testdata/output/template-chart-with-template-lib-archive-dep.txt diff --git a/cmd/helm/testdata/output/template-chart-with-template-lib-dep.txt b/pkg/cmd/testdata/output/template-chart-with-template-lib-dep.txt similarity index 100% rename from cmd/helm/testdata/output/template-chart-with-template-lib-dep.txt rename to pkg/cmd/testdata/output/template-chart-with-template-lib-dep.txt diff --git a/cmd/helm/testdata/output/template-lib-chart.txt b/pkg/cmd/testdata/output/template-lib-chart.txt similarity index 100% rename from cmd/helm/testdata/output/template-lib-chart.txt rename to pkg/cmd/testdata/output/template-lib-chart.txt diff --git a/cmd/helm/testdata/output/template-name-template.txt b/pkg/cmd/testdata/output/template-name-template.txt similarity index 100% rename from cmd/helm/testdata/output/template-name-template.txt rename to pkg/cmd/testdata/output/template-name-template.txt diff --git a/cmd/helm/testdata/output/template-no-args.txt b/pkg/cmd/testdata/output/template-no-args.txt similarity index 100% rename from cmd/helm/testdata/output/template-no-args.txt rename to pkg/cmd/testdata/output/template-no-args.txt diff --git a/cmd/helm/testdata/output/template-set.txt b/pkg/cmd/testdata/output/template-set.txt similarity index 100% rename from cmd/helm/testdata/output/template-set.txt rename to pkg/cmd/testdata/output/template-set.txt diff --git a/cmd/helm/testdata/output/template-show-only-glob.txt b/pkg/cmd/testdata/output/template-show-only-glob.txt similarity index 100% rename from cmd/helm/testdata/output/template-show-only-glob.txt rename to pkg/cmd/testdata/output/template-show-only-glob.txt diff --git a/cmd/helm/testdata/output/template-show-only-multiple.txt b/pkg/cmd/testdata/output/template-show-only-multiple.txt similarity index 100% rename from cmd/helm/testdata/output/template-show-only-multiple.txt rename to pkg/cmd/testdata/output/template-show-only-multiple.txt diff --git a/cmd/helm/testdata/output/template-show-only-one.txt b/pkg/cmd/testdata/output/template-show-only-one.txt similarity index 100% rename from cmd/helm/testdata/output/template-show-only-one.txt rename to pkg/cmd/testdata/output/template-show-only-one.txt diff --git a/cmd/helm/testdata/output/template-skip-tests.txt b/pkg/cmd/testdata/output/template-skip-tests.txt similarity index 100% rename from cmd/helm/testdata/output/template-skip-tests.txt rename to pkg/cmd/testdata/output/template-skip-tests.txt diff --git a/cmd/helm/testdata/output/template-subchart-cm-set-file.txt b/pkg/cmd/testdata/output/template-subchart-cm-set-file.txt similarity index 100% rename from cmd/helm/testdata/output/template-subchart-cm-set-file.txt rename to pkg/cmd/testdata/output/template-subchart-cm-set-file.txt diff --git a/cmd/helm/testdata/output/template-subchart-cm-set.txt b/pkg/cmd/testdata/output/template-subchart-cm-set.txt similarity index 100% rename from cmd/helm/testdata/output/template-subchart-cm-set.txt rename to pkg/cmd/testdata/output/template-subchart-cm-set.txt diff --git a/cmd/helm/testdata/output/template-subchart-cm.txt b/pkg/cmd/testdata/output/template-subchart-cm.txt similarity index 100% rename from cmd/helm/testdata/output/template-subchart-cm.txt rename to pkg/cmd/testdata/output/template-subchart-cm.txt diff --git a/cmd/helm/testdata/output/template-values-files.txt b/pkg/cmd/testdata/output/template-values-files.txt similarity index 100% rename from cmd/helm/testdata/output/template-values-files.txt rename to pkg/cmd/testdata/output/template-values-files.txt diff --git a/cmd/helm/testdata/output/template-with-api-version.txt b/pkg/cmd/testdata/output/template-with-api-version.txt similarity index 100% rename from cmd/helm/testdata/output/template-with-api-version.txt rename to pkg/cmd/testdata/output/template-with-api-version.txt diff --git a/cmd/helm/testdata/output/template-with-crds.txt b/pkg/cmd/testdata/output/template-with-crds.txt similarity index 100% rename from cmd/helm/testdata/output/template-with-crds.txt rename to pkg/cmd/testdata/output/template-with-crds.txt diff --git a/cmd/helm/testdata/output/template-with-invalid-yaml-debug.txt b/pkg/cmd/testdata/output/template-with-invalid-yaml-debug.txt similarity index 100% rename from cmd/helm/testdata/output/template-with-invalid-yaml-debug.txt rename to pkg/cmd/testdata/output/template-with-invalid-yaml-debug.txt diff --git a/cmd/helm/testdata/output/template-with-invalid-yaml.txt b/pkg/cmd/testdata/output/template-with-invalid-yaml.txt similarity index 100% rename from cmd/helm/testdata/output/template-with-invalid-yaml.txt rename to pkg/cmd/testdata/output/template-with-invalid-yaml.txt diff --git a/cmd/helm/testdata/output/template-with-kube-version.txt b/pkg/cmd/testdata/output/template-with-kube-version.txt similarity index 100% rename from cmd/helm/testdata/output/template-with-kube-version.txt rename to pkg/cmd/testdata/output/template-with-kube-version.txt diff --git a/cmd/helm/testdata/output/template.txt b/pkg/cmd/testdata/output/template.txt similarity index 100% rename from cmd/helm/testdata/output/template.txt rename to pkg/cmd/testdata/output/template.txt diff --git a/cmd/helm/testdata/output/uninstall-keep-history.txt b/pkg/cmd/testdata/output/uninstall-keep-history.txt similarity index 100% rename from cmd/helm/testdata/output/uninstall-keep-history.txt rename to pkg/cmd/testdata/output/uninstall-keep-history.txt diff --git a/cmd/helm/testdata/output/uninstall-multiple.txt b/pkg/cmd/testdata/output/uninstall-multiple.txt similarity index 100% rename from cmd/helm/testdata/output/uninstall-multiple.txt rename to pkg/cmd/testdata/output/uninstall-multiple.txt diff --git a/cmd/helm/testdata/output/uninstall-no-args.txt b/pkg/cmd/testdata/output/uninstall-no-args.txt similarity index 100% rename from cmd/helm/testdata/output/uninstall-no-args.txt rename to pkg/cmd/testdata/output/uninstall-no-args.txt diff --git a/cmd/helm/testdata/output/uninstall-no-hooks.txt b/pkg/cmd/testdata/output/uninstall-no-hooks.txt similarity index 100% rename from cmd/helm/testdata/output/uninstall-no-hooks.txt rename to pkg/cmd/testdata/output/uninstall-no-hooks.txt diff --git a/cmd/helm/testdata/output/uninstall-timeout.txt b/pkg/cmd/testdata/output/uninstall-timeout.txt similarity index 100% rename from cmd/helm/testdata/output/uninstall-timeout.txt rename to pkg/cmd/testdata/output/uninstall-timeout.txt diff --git a/cmd/helm/testdata/output/uninstall-wait.txt b/pkg/cmd/testdata/output/uninstall-wait.txt similarity index 100% rename from cmd/helm/testdata/output/uninstall-wait.txt rename to pkg/cmd/testdata/output/uninstall-wait.txt diff --git a/cmd/helm/testdata/output/uninstall.txt b/pkg/cmd/testdata/output/uninstall.txt similarity index 100% rename from cmd/helm/testdata/output/uninstall.txt rename to pkg/cmd/testdata/output/uninstall.txt diff --git a/cmd/helm/testdata/output/upgrade-and-take-ownership.txt b/pkg/cmd/testdata/output/upgrade-and-take-ownership.txt similarity index 100% rename from cmd/helm/testdata/output/upgrade-and-take-ownership.txt rename to pkg/cmd/testdata/output/upgrade-and-take-ownership.txt diff --git a/cmd/helm/testdata/output/upgrade-uninstalled-with-keep-history.txt b/pkg/cmd/testdata/output/upgrade-uninstalled-with-keep-history.txt similarity index 100% rename from cmd/helm/testdata/output/upgrade-uninstalled-with-keep-history.txt rename to pkg/cmd/testdata/output/upgrade-uninstalled-with-keep-history.txt diff --git a/cmd/helm/testdata/output/upgrade-with-bad-dependencies.txt b/pkg/cmd/testdata/output/upgrade-with-bad-dependencies.txt similarity index 100% rename from cmd/helm/testdata/output/upgrade-with-bad-dependencies.txt rename to pkg/cmd/testdata/output/upgrade-with-bad-dependencies.txt diff --git a/cmd/helm/testdata/output/upgrade-with-bad-or-missing-existing-release.txt b/pkg/cmd/testdata/output/upgrade-with-bad-or-missing-existing-release.txt similarity index 100% rename from cmd/helm/testdata/output/upgrade-with-bad-or-missing-existing-release.txt rename to pkg/cmd/testdata/output/upgrade-with-bad-or-missing-existing-release.txt diff --git a/cmd/helm/testdata/output/upgrade-with-dependency-update.txt b/pkg/cmd/testdata/output/upgrade-with-dependency-update.txt similarity index 100% rename from cmd/helm/testdata/output/upgrade-with-dependency-update.txt rename to pkg/cmd/testdata/output/upgrade-with-dependency-update.txt diff --git a/cmd/helm/testdata/output/upgrade-with-install-timeout.txt b/pkg/cmd/testdata/output/upgrade-with-install-timeout.txt similarity index 100% rename from cmd/helm/testdata/output/upgrade-with-install-timeout.txt rename to pkg/cmd/testdata/output/upgrade-with-install-timeout.txt diff --git a/cmd/helm/testdata/output/upgrade-with-install.txt b/pkg/cmd/testdata/output/upgrade-with-install.txt similarity index 100% rename from cmd/helm/testdata/output/upgrade-with-install.txt rename to pkg/cmd/testdata/output/upgrade-with-install.txt diff --git a/cmd/helm/testdata/output/upgrade-with-missing-dependencies.txt b/pkg/cmd/testdata/output/upgrade-with-missing-dependencies.txt similarity index 100% rename from cmd/helm/testdata/output/upgrade-with-missing-dependencies.txt rename to pkg/cmd/testdata/output/upgrade-with-missing-dependencies.txt diff --git a/cmd/helm/testdata/output/upgrade-with-pending-install.txt b/pkg/cmd/testdata/output/upgrade-with-pending-install.txt similarity index 100% rename from cmd/helm/testdata/output/upgrade-with-pending-install.txt rename to pkg/cmd/testdata/output/upgrade-with-pending-install.txt diff --git a/cmd/helm/testdata/output/upgrade-with-reset-values.txt b/pkg/cmd/testdata/output/upgrade-with-reset-values.txt similarity index 100% rename from cmd/helm/testdata/output/upgrade-with-reset-values.txt rename to pkg/cmd/testdata/output/upgrade-with-reset-values.txt diff --git a/cmd/helm/testdata/output/upgrade-with-reset-values2.txt b/pkg/cmd/testdata/output/upgrade-with-reset-values2.txt similarity index 100% rename from cmd/helm/testdata/output/upgrade-with-reset-values2.txt rename to pkg/cmd/testdata/output/upgrade-with-reset-values2.txt diff --git a/cmd/helm/testdata/output/upgrade-with-timeout.txt b/pkg/cmd/testdata/output/upgrade-with-timeout.txt similarity index 100% rename from cmd/helm/testdata/output/upgrade-with-timeout.txt rename to pkg/cmd/testdata/output/upgrade-with-timeout.txt diff --git a/cmd/helm/testdata/output/upgrade-with-wait-for-jobs.txt b/pkg/cmd/testdata/output/upgrade-with-wait-for-jobs.txt similarity index 100% rename from cmd/helm/testdata/output/upgrade-with-wait-for-jobs.txt rename to pkg/cmd/testdata/output/upgrade-with-wait-for-jobs.txt diff --git a/cmd/helm/testdata/output/upgrade-with-wait.txt b/pkg/cmd/testdata/output/upgrade-with-wait.txt similarity index 100% rename from cmd/helm/testdata/output/upgrade-with-wait.txt rename to pkg/cmd/testdata/output/upgrade-with-wait.txt diff --git a/cmd/helm/testdata/output/upgrade.txt b/pkg/cmd/testdata/output/upgrade.txt similarity index 100% rename from cmd/helm/testdata/output/upgrade.txt rename to pkg/cmd/testdata/output/upgrade.txt diff --git a/cmd/helm/testdata/output/values.json b/pkg/cmd/testdata/output/values.json similarity index 100% rename from cmd/helm/testdata/output/values.json rename to pkg/cmd/testdata/output/values.json diff --git a/cmd/helm/testdata/output/values.yaml b/pkg/cmd/testdata/output/values.yaml similarity index 100% rename from cmd/helm/testdata/output/values.yaml rename to pkg/cmd/testdata/output/values.yaml diff --git a/cmd/helm/testdata/output/version-client-shorthand.txt b/pkg/cmd/testdata/output/version-client-shorthand.txt similarity index 100% rename from cmd/helm/testdata/output/version-client-shorthand.txt rename to pkg/cmd/testdata/output/version-client-shorthand.txt diff --git a/cmd/helm/testdata/output/version-client.txt b/pkg/cmd/testdata/output/version-client.txt similarity index 100% rename from cmd/helm/testdata/output/version-client.txt rename to pkg/cmd/testdata/output/version-client.txt diff --git a/cmd/helm/testdata/output/version-comp.txt b/pkg/cmd/testdata/output/version-comp.txt similarity index 100% rename from cmd/helm/testdata/output/version-comp.txt rename to pkg/cmd/testdata/output/version-comp.txt diff --git a/cmd/helm/testdata/output/version-invalid-comp.txt b/pkg/cmd/testdata/output/version-invalid-comp.txt similarity index 100% rename from cmd/helm/testdata/output/version-invalid-comp.txt rename to pkg/cmd/testdata/output/version-invalid-comp.txt diff --git a/cmd/helm/testdata/output/version-short.txt b/pkg/cmd/testdata/output/version-short.txt similarity index 100% rename from cmd/helm/testdata/output/version-short.txt rename to pkg/cmd/testdata/output/version-short.txt diff --git a/cmd/helm/testdata/output/version-template.txt b/pkg/cmd/testdata/output/version-template.txt similarity index 100% rename from cmd/helm/testdata/output/version-template.txt rename to pkg/cmd/testdata/output/version-template.txt diff --git a/cmd/helm/testdata/output/version.txt b/pkg/cmd/testdata/output/version.txt similarity index 100% rename from cmd/helm/testdata/output/version.txt rename to pkg/cmd/testdata/output/version.txt diff --git a/cmd/helm/testdata/password b/pkg/cmd/testdata/password similarity index 100% rename from cmd/helm/testdata/password rename to pkg/cmd/testdata/password diff --git a/cmd/helm/testdata/plugins.yaml b/pkg/cmd/testdata/plugins.yaml similarity index 100% rename from cmd/helm/testdata/plugins.yaml rename to pkg/cmd/testdata/plugins.yaml diff --git a/cmd/helm/testdata/repositories.yaml b/pkg/cmd/testdata/repositories.yaml similarity index 100% rename from cmd/helm/testdata/repositories.yaml rename to pkg/cmd/testdata/repositories.yaml diff --git a/cmd/helm/testdata/testcharts/alpine/Chart.yaml b/pkg/cmd/testdata/testcharts/alpine/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/alpine/Chart.yaml rename to pkg/cmd/testdata/testcharts/alpine/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/alpine/README.md b/pkg/cmd/testdata/testcharts/alpine/README.md similarity index 100% rename from cmd/helm/testdata/testcharts/alpine/README.md rename to pkg/cmd/testdata/testcharts/alpine/README.md diff --git a/cmd/helm/testdata/testcharts/alpine/extra_values.yaml b/pkg/cmd/testdata/testcharts/alpine/extra_values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/alpine/extra_values.yaml rename to pkg/cmd/testdata/testcharts/alpine/extra_values.yaml diff --git a/cmd/helm/testdata/testcharts/alpine/more_values.yaml b/pkg/cmd/testdata/testcharts/alpine/more_values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/alpine/more_values.yaml rename to pkg/cmd/testdata/testcharts/alpine/more_values.yaml diff --git a/cmd/helm/testdata/testcharts/alpine/templates/alpine-pod.yaml b/pkg/cmd/testdata/testcharts/alpine/templates/alpine-pod.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/alpine/templates/alpine-pod.yaml rename to pkg/cmd/testdata/testcharts/alpine/templates/alpine-pod.yaml diff --git a/cmd/helm/testdata/testcharts/alpine/values.yaml b/pkg/cmd/testdata/testcharts/alpine/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/alpine/values.yaml rename to pkg/cmd/testdata/testcharts/alpine/values.yaml diff --git a/cmd/helm/testdata/testcharts/chart-bad-requirements/.helmignore b/pkg/cmd/testdata/testcharts/chart-bad-requirements/.helmignore similarity index 100% rename from cmd/helm/testdata/testcharts/chart-bad-requirements/.helmignore rename to pkg/cmd/testdata/testcharts/chart-bad-requirements/.helmignore diff --git a/cmd/helm/testdata/testcharts/chart-bad-requirements/Chart.yaml b/pkg/cmd/testdata/testcharts/chart-bad-requirements/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-bad-requirements/Chart.yaml rename to pkg/cmd/testdata/testcharts/chart-bad-requirements/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/chart-bad-requirements/charts/reqsubchart/.helmignore b/pkg/cmd/testdata/testcharts/chart-bad-requirements/charts/reqsubchart/.helmignore similarity index 100% rename from cmd/helm/testdata/testcharts/chart-bad-requirements/charts/reqsubchart/.helmignore rename to pkg/cmd/testdata/testcharts/chart-bad-requirements/charts/reqsubchart/.helmignore diff --git a/cmd/helm/testdata/testcharts/chart-bad-requirements/charts/reqsubchart/Chart.yaml b/pkg/cmd/testdata/testcharts/chart-bad-requirements/charts/reqsubchart/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-bad-requirements/charts/reqsubchart/Chart.yaml rename to pkg/cmd/testdata/testcharts/chart-bad-requirements/charts/reqsubchart/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/chart-bad-requirements/charts/reqsubchart/values.yaml b/pkg/cmd/testdata/testcharts/chart-bad-requirements/charts/reqsubchart/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-bad-requirements/charts/reqsubchart/values.yaml rename to pkg/cmd/testdata/testcharts/chart-bad-requirements/charts/reqsubchart/values.yaml diff --git a/cmd/helm/testdata/testcharts/chart-bad-requirements/values.yaml b/pkg/cmd/testdata/testcharts/chart-bad-requirements/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-bad-requirements/values.yaml rename to pkg/cmd/testdata/testcharts/chart-bad-requirements/values.yaml diff --git a/cmd/helm/testdata/testcharts/chart-bad-type/Chart.yaml b/pkg/cmd/testdata/testcharts/chart-bad-type/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-bad-type/Chart.yaml rename to pkg/cmd/testdata/testcharts/chart-bad-type/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/chart-bad-type/README.md b/pkg/cmd/testdata/testcharts/chart-bad-type/README.md similarity index 100% rename from cmd/helm/testdata/testcharts/chart-bad-type/README.md rename to pkg/cmd/testdata/testcharts/chart-bad-type/README.md diff --git a/cmd/helm/testdata/testcharts/chart-bad-type/extra_values.yaml b/pkg/cmd/testdata/testcharts/chart-bad-type/extra_values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-bad-type/extra_values.yaml rename to pkg/cmd/testdata/testcharts/chart-bad-type/extra_values.yaml diff --git a/cmd/helm/testdata/testcharts/chart-bad-type/more_values.yaml b/pkg/cmd/testdata/testcharts/chart-bad-type/more_values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-bad-type/more_values.yaml rename to pkg/cmd/testdata/testcharts/chart-bad-type/more_values.yaml diff --git a/cmd/helm/testdata/testcharts/chart-bad-type/templates/alpine-pod.yaml b/pkg/cmd/testdata/testcharts/chart-bad-type/templates/alpine-pod.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-bad-type/templates/alpine-pod.yaml rename to pkg/cmd/testdata/testcharts/chart-bad-type/templates/alpine-pod.yaml diff --git a/cmd/helm/testdata/testcharts/chart-bad-type/values.yaml b/pkg/cmd/testdata/testcharts/chart-bad-type/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-bad-type/values.yaml rename to pkg/cmd/testdata/testcharts/chart-bad-type/values.yaml diff --git a/cmd/helm/testdata/testcharts/chart-missing-deps/.helmignore b/pkg/cmd/testdata/testcharts/chart-missing-deps/.helmignore similarity index 100% rename from cmd/helm/testdata/testcharts/chart-missing-deps/.helmignore rename to pkg/cmd/testdata/testcharts/chart-missing-deps/.helmignore diff --git a/cmd/helm/testdata/testcharts/chart-missing-deps/Chart.yaml b/pkg/cmd/testdata/testcharts/chart-missing-deps/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-missing-deps/Chart.yaml rename to pkg/cmd/testdata/testcharts/chart-missing-deps/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/chart-missing-deps/charts/reqsubchart/.helmignore b/pkg/cmd/testdata/testcharts/chart-missing-deps/charts/reqsubchart/.helmignore similarity index 100% rename from cmd/helm/testdata/testcharts/chart-missing-deps/charts/reqsubchart/.helmignore rename to pkg/cmd/testdata/testcharts/chart-missing-deps/charts/reqsubchart/.helmignore diff --git a/cmd/helm/testdata/testcharts/chart-missing-deps/charts/reqsubchart/Chart.yaml b/pkg/cmd/testdata/testcharts/chart-missing-deps/charts/reqsubchart/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-missing-deps/charts/reqsubchart/Chart.yaml rename to pkg/cmd/testdata/testcharts/chart-missing-deps/charts/reqsubchart/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/chart-missing-deps/charts/reqsubchart/values.yaml b/pkg/cmd/testdata/testcharts/chart-missing-deps/charts/reqsubchart/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-missing-deps/charts/reqsubchart/values.yaml rename to pkg/cmd/testdata/testcharts/chart-missing-deps/charts/reqsubchart/values.yaml diff --git a/cmd/helm/testdata/testcharts/chart-missing-deps/values.yaml b/pkg/cmd/testdata/testcharts/chart-missing-deps/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-missing-deps/values.yaml rename to pkg/cmd/testdata/testcharts/chart-missing-deps/values.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-bad-subcharts/Chart.yaml b/pkg/cmd/testdata/testcharts/chart-with-bad-subcharts/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-bad-subcharts/Chart.yaml rename to pkg/cmd/testdata/testcharts/chart-with-bad-subcharts/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-bad-subcharts/charts/bad-subchart/Chart.yaml b/pkg/cmd/testdata/testcharts/chart-with-bad-subcharts/charts/bad-subchart/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-bad-subcharts/charts/bad-subchart/Chart.yaml rename to pkg/cmd/testdata/testcharts/chart-with-bad-subcharts/charts/bad-subchart/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-bad-subcharts/charts/bad-subchart/values.yaml b/pkg/cmd/testdata/testcharts/chart-with-bad-subcharts/charts/bad-subchart/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-bad-subcharts/charts/bad-subchart/values.yaml rename to pkg/cmd/testdata/testcharts/chart-with-bad-subcharts/charts/bad-subchart/values.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-bad-subcharts/charts/good-subchart/Chart.yaml b/pkg/cmd/testdata/testcharts/chart-with-bad-subcharts/charts/good-subchart/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-bad-subcharts/charts/good-subchart/Chart.yaml rename to pkg/cmd/testdata/testcharts/chart-with-bad-subcharts/charts/good-subchart/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-bad-subcharts/charts/good-subchart/values.yaml b/pkg/cmd/testdata/testcharts/chart-with-bad-subcharts/charts/good-subchart/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-bad-subcharts/charts/good-subchart/values.yaml rename to pkg/cmd/testdata/testcharts/chart-with-bad-subcharts/charts/good-subchart/values.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-bad-subcharts/requirements.yaml b/pkg/cmd/testdata/testcharts/chart-with-bad-subcharts/requirements.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-bad-subcharts/requirements.yaml rename to pkg/cmd/testdata/testcharts/chart-with-bad-subcharts/requirements.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-bad-subcharts/values.yaml b/pkg/cmd/testdata/testcharts/chart-with-bad-subcharts/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-bad-subcharts/values.yaml rename to pkg/cmd/testdata/testcharts/chart-with-bad-subcharts/values.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-deprecated-api/Chart.yaml b/pkg/cmd/testdata/testcharts/chart-with-deprecated-api/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-deprecated-api/Chart.yaml rename to pkg/cmd/testdata/testcharts/chart-with-deprecated-api/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-deprecated-api/templates/horizontalpodautoscaler.yaml b/pkg/cmd/testdata/testcharts/chart-with-deprecated-api/templates/horizontalpodautoscaler.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-deprecated-api/templates/horizontalpodautoscaler.yaml rename to pkg/cmd/testdata/testcharts/chart-with-deprecated-api/templates/horizontalpodautoscaler.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-deprecated-api/values.yaml b/pkg/cmd/testdata/testcharts/chart-with-deprecated-api/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-deprecated-api/values.yaml rename to pkg/cmd/testdata/testcharts/chart-with-deprecated-api/values.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-lib-dep/.helmignore b/pkg/cmd/testdata/testcharts/chart-with-lib-dep/.helmignore similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-lib-dep/.helmignore rename to pkg/cmd/testdata/testcharts/chart-with-lib-dep/.helmignore diff --git a/cmd/helm/testdata/testcharts/chart-with-lib-dep/Chart.yaml b/pkg/cmd/testdata/testcharts/chart-with-lib-dep/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-lib-dep/Chart.yaml rename to pkg/cmd/testdata/testcharts/chart-with-lib-dep/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-lib-dep/charts/common-0.0.5.tgz b/pkg/cmd/testdata/testcharts/chart-with-lib-dep/charts/common-0.0.5.tgz similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-lib-dep/charts/common-0.0.5.tgz rename to pkg/cmd/testdata/testcharts/chart-with-lib-dep/charts/common-0.0.5.tgz diff --git a/cmd/helm/testdata/testcharts/chart-with-lib-dep/templates/NOTES.txt b/pkg/cmd/testdata/testcharts/chart-with-lib-dep/templates/NOTES.txt similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-lib-dep/templates/NOTES.txt rename to pkg/cmd/testdata/testcharts/chart-with-lib-dep/templates/NOTES.txt diff --git a/cmd/helm/testdata/testcharts/chart-with-lib-dep/templates/_helpers.tpl b/pkg/cmd/testdata/testcharts/chart-with-lib-dep/templates/_helpers.tpl similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-lib-dep/templates/_helpers.tpl rename to pkg/cmd/testdata/testcharts/chart-with-lib-dep/templates/_helpers.tpl diff --git a/cmd/helm/testdata/testcharts/chart-with-lib-dep/templates/deployment.yaml b/pkg/cmd/testdata/testcharts/chart-with-lib-dep/templates/deployment.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-lib-dep/templates/deployment.yaml rename to pkg/cmd/testdata/testcharts/chart-with-lib-dep/templates/deployment.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-lib-dep/templates/ingress.yaml b/pkg/cmd/testdata/testcharts/chart-with-lib-dep/templates/ingress.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-lib-dep/templates/ingress.yaml rename to pkg/cmd/testdata/testcharts/chart-with-lib-dep/templates/ingress.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-lib-dep/templates/service.yaml b/pkg/cmd/testdata/testcharts/chart-with-lib-dep/templates/service.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-lib-dep/templates/service.yaml rename to pkg/cmd/testdata/testcharts/chart-with-lib-dep/templates/service.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-lib-dep/values.yaml b/pkg/cmd/testdata/testcharts/chart-with-lib-dep/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-lib-dep/values.yaml rename to pkg/cmd/testdata/testcharts/chart-with-lib-dep/values.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-only-crds/.helmignore b/pkg/cmd/testdata/testcharts/chart-with-only-crds/.helmignore similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-only-crds/.helmignore rename to pkg/cmd/testdata/testcharts/chart-with-only-crds/.helmignore diff --git a/cmd/helm/testdata/testcharts/chart-with-only-crds/Chart.yaml b/pkg/cmd/testdata/testcharts/chart-with-only-crds/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-only-crds/Chart.yaml rename to pkg/cmd/testdata/testcharts/chart-with-only-crds/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-only-crds/crds/test-crd.yaml b/pkg/cmd/testdata/testcharts/chart-with-only-crds/crds/test-crd.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-only-crds/crds/test-crd.yaml rename to pkg/cmd/testdata/testcharts/chart-with-only-crds/crds/test-crd.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-schema-and-subchart/Chart.yaml b/pkg/cmd/testdata/testcharts/chart-with-schema-and-subchart/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-schema-and-subchart/Chart.yaml rename to pkg/cmd/testdata/testcharts/chart-with-schema-and-subchart/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-schema-and-subchart/charts/subchart-with-schema/Chart.yaml b/pkg/cmd/testdata/testcharts/chart-with-schema-and-subchart/charts/subchart-with-schema/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-schema-and-subchart/charts/subchart-with-schema/Chart.yaml rename to pkg/cmd/testdata/testcharts/chart-with-schema-and-subchart/charts/subchart-with-schema/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-schema-and-subchart/charts/subchart-with-schema/templates/empty.yaml b/pkg/cmd/testdata/testcharts/chart-with-schema-and-subchart/charts/subchart-with-schema/templates/empty.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-schema-and-subchart/charts/subchart-with-schema/templates/empty.yaml rename to pkg/cmd/testdata/testcharts/chart-with-schema-and-subchart/charts/subchart-with-schema/templates/empty.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-schema-and-subchart/charts/subchart-with-schema/values.schema.json b/pkg/cmd/testdata/testcharts/chart-with-schema-and-subchart/charts/subchart-with-schema/values.schema.json similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-schema-and-subchart/charts/subchart-with-schema/values.schema.json rename to pkg/cmd/testdata/testcharts/chart-with-schema-and-subchart/charts/subchart-with-schema/values.schema.json diff --git a/cmd/helm/testdata/testcharts/chart-with-schema-and-subchart/charts/subchart-with-schema/values.yaml b/pkg/cmd/testdata/testcharts/chart-with-schema-and-subchart/charts/subchart-with-schema/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-schema-and-subchart/charts/subchart-with-schema/values.yaml rename to pkg/cmd/testdata/testcharts/chart-with-schema-and-subchart/charts/subchart-with-schema/values.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-schema-and-subchart/templates/empty.yaml b/pkg/cmd/testdata/testcharts/chart-with-schema-and-subchart/templates/empty.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-schema-and-subchart/templates/empty.yaml rename to pkg/cmd/testdata/testcharts/chart-with-schema-and-subchart/templates/empty.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-schema-and-subchart/values.schema.json b/pkg/cmd/testdata/testcharts/chart-with-schema-and-subchart/values.schema.json similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-schema-and-subchart/values.schema.json rename to pkg/cmd/testdata/testcharts/chart-with-schema-and-subchart/values.schema.json diff --git a/cmd/helm/testdata/testcharts/chart-with-schema-and-subchart/values.yaml b/pkg/cmd/testdata/testcharts/chart-with-schema-and-subchart/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-schema-and-subchart/values.yaml rename to pkg/cmd/testdata/testcharts/chart-with-schema-and-subchart/values.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-schema-negative-skip-validation/Chart.yaml b/pkg/cmd/testdata/testcharts/chart-with-schema-negative-skip-validation/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-schema-negative-skip-validation/Chart.yaml rename to pkg/cmd/testdata/testcharts/chart-with-schema-negative-skip-validation/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-schema-negative-skip-validation/templates/empty.yaml b/pkg/cmd/testdata/testcharts/chart-with-schema-negative-skip-validation/templates/empty.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-schema-negative-skip-validation/templates/empty.yaml rename to pkg/cmd/testdata/testcharts/chart-with-schema-negative-skip-validation/templates/empty.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-schema-negative-skip-validation/values.schema.json b/pkg/cmd/testdata/testcharts/chart-with-schema-negative-skip-validation/values.schema.json similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-schema-negative-skip-validation/values.schema.json rename to pkg/cmd/testdata/testcharts/chart-with-schema-negative-skip-validation/values.schema.json diff --git a/cmd/helm/testdata/testcharts/chart-with-schema-negative-skip-validation/values.yaml b/pkg/cmd/testdata/testcharts/chart-with-schema-negative-skip-validation/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-schema-negative-skip-validation/values.yaml rename to pkg/cmd/testdata/testcharts/chart-with-schema-negative-skip-validation/values.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-schema-negative/Chart.yaml b/pkg/cmd/testdata/testcharts/chart-with-schema-negative/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-schema-negative/Chart.yaml rename to pkg/cmd/testdata/testcharts/chart-with-schema-negative/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-schema-negative/templates/empty.yaml b/pkg/cmd/testdata/testcharts/chart-with-schema-negative/templates/empty.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-schema-negative/templates/empty.yaml rename to pkg/cmd/testdata/testcharts/chart-with-schema-negative/templates/empty.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-schema-negative/values.schema.json b/pkg/cmd/testdata/testcharts/chart-with-schema-negative/values.schema.json similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-schema-negative/values.schema.json rename to pkg/cmd/testdata/testcharts/chart-with-schema-negative/values.schema.json diff --git a/cmd/helm/testdata/testcharts/chart-with-schema-negative/values.yaml b/pkg/cmd/testdata/testcharts/chart-with-schema-negative/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-schema-negative/values.yaml rename to pkg/cmd/testdata/testcharts/chart-with-schema-negative/values.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-schema/Chart.yaml b/pkg/cmd/testdata/testcharts/chart-with-schema/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-schema/Chart.yaml rename to pkg/cmd/testdata/testcharts/chart-with-schema/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-schema/extra-values.yaml b/pkg/cmd/testdata/testcharts/chart-with-schema/extra-values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-schema/extra-values.yaml rename to pkg/cmd/testdata/testcharts/chart-with-schema/extra-values.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-schema/templates/empty.yaml b/pkg/cmd/testdata/testcharts/chart-with-schema/templates/empty.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-schema/templates/empty.yaml rename to pkg/cmd/testdata/testcharts/chart-with-schema/templates/empty.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-schema/values.schema.json b/pkg/cmd/testdata/testcharts/chart-with-schema/values.schema.json similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-schema/values.schema.json rename to pkg/cmd/testdata/testcharts/chart-with-schema/values.schema.json diff --git a/cmd/helm/testdata/testcharts/chart-with-schema/values.yaml b/pkg/cmd/testdata/testcharts/chart-with-schema/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-schema/values.yaml rename to pkg/cmd/testdata/testcharts/chart-with-schema/values.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-secret/Chart.yaml b/pkg/cmd/testdata/testcharts/chart-with-secret/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-secret/Chart.yaml rename to pkg/cmd/testdata/testcharts/chart-with-secret/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-secret/templates/configmap.yaml b/pkg/cmd/testdata/testcharts/chart-with-secret/templates/configmap.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-secret/templates/configmap.yaml rename to pkg/cmd/testdata/testcharts/chart-with-secret/templates/configmap.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-secret/templates/secret.yaml b/pkg/cmd/testdata/testcharts/chart-with-secret/templates/secret.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-secret/templates/secret.yaml rename to pkg/cmd/testdata/testcharts/chart-with-secret/templates/secret.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-subchart-notes/Chart.yaml b/pkg/cmd/testdata/testcharts/chart-with-subchart-notes/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-subchart-notes/Chart.yaml rename to pkg/cmd/testdata/testcharts/chart-with-subchart-notes/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-subchart-notes/charts/subchart-with-notes/Chart.yaml b/pkg/cmd/testdata/testcharts/chart-with-subchart-notes/charts/subchart-with-notes/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-subchart-notes/charts/subchart-with-notes/Chart.yaml rename to pkg/cmd/testdata/testcharts/chart-with-subchart-notes/charts/subchart-with-notes/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-subchart-notes/charts/subchart-with-notes/templates/NOTES.txt b/pkg/cmd/testdata/testcharts/chart-with-subchart-notes/charts/subchart-with-notes/templates/NOTES.txt similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-subchart-notes/charts/subchart-with-notes/templates/NOTES.txt rename to pkg/cmd/testdata/testcharts/chart-with-subchart-notes/charts/subchart-with-notes/templates/NOTES.txt diff --git a/cmd/helm/testdata/testcharts/chart-with-subchart-notes/templates/NOTES.txt b/pkg/cmd/testdata/testcharts/chart-with-subchart-notes/templates/NOTES.txt similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-subchart-notes/templates/NOTES.txt rename to pkg/cmd/testdata/testcharts/chart-with-subchart-notes/templates/NOTES.txt diff --git a/cmd/helm/testdata/testcharts/chart-with-subchart-update/Chart.lock b/pkg/cmd/testdata/testcharts/chart-with-subchart-update/Chart.lock similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-subchart-update/Chart.lock rename to pkg/cmd/testdata/testcharts/chart-with-subchart-update/Chart.lock diff --git a/cmd/helm/testdata/testcharts/chart-with-subchart-update/Chart.yaml b/pkg/cmd/testdata/testcharts/chart-with-subchart-update/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-subchart-update/Chart.yaml rename to pkg/cmd/testdata/testcharts/chart-with-subchart-update/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-subchart-update/charts/subchart-with-notes/Chart.yaml b/pkg/cmd/testdata/testcharts/chart-with-subchart-update/charts/subchart-with-notes/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-subchart-update/charts/subchart-with-notes/Chart.yaml rename to pkg/cmd/testdata/testcharts/chart-with-subchart-update/charts/subchart-with-notes/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-subchart-update/charts/subchart-with-notes/templates/NOTES.txt b/pkg/cmd/testdata/testcharts/chart-with-subchart-update/charts/subchart-with-notes/templates/NOTES.txt similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-subchart-update/charts/subchart-with-notes/templates/NOTES.txt rename to pkg/cmd/testdata/testcharts/chart-with-subchart-update/charts/subchart-with-notes/templates/NOTES.txt diff --git a/cmd/helm/testdata/testcharts/chart-with-subchart-update/templates/NOTES.txt b/pkg/cmd/testdata/testcharts/chart-with-subchart-update/templates/NOTES.txt similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-subchart-update/templates/NOTES.txt rename to pkg/cmd/testdata/testcharts/chart-with-subchart-update/templates/NOTES.txt diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-archive-dep/.helmignore b/pkg/cmd/testdata/testcharts/chart-with-template-lib-archive-dep/.helmignore similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-archive-dep/.helmignore rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-archive-dep/.helmignore diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-archive-dep/Chart.yaml b/pkg/cmd/testdata/testcharts/chart-with-template-lib-archive-dep/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-archive-dep/Chart.yaml rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-archive-dep/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-archive-dep/charts/common-0.0.5.tgz b/pkg/cmd/testdata/testcharts/chart-with-template-lib-archive-dep/charts/common-0.0.5.tgz similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-archive-dep/charts/common-0.0.5.tgz rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-archive-dep/charts/common-0.0.5.tgz diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-archive-dep/templates/NOTES.txt b/pkg/cmd/testdata/testcharts/chart-with-template-lib-archive-dep/templates/NOTES.txt similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-archive-dep/templates/NOTES.txt rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-archive-dep/templates/NOTES.txt diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-archive-dep/templates/_helpers.tpl b/pkg/cmd/testdata/testcharts/chart-with-template-lib-archive-dep/templates/_helpers.tpl similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-archive-dep/templates/_helpers.tpl rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-archive-dep/templates/_helpers.tpl diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-archive-dep/templates/deployment.yaml b/pkg/cmd/testdata/testcharts/chart-with-template-lib-archive-dep/templates/deployment.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-archive-dep/templates/deployment.yaml rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-archive-dep/templates/deployment.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-archive-dep/templates/ingress.yaml b/pkg/cmd/testdata/testcharts/chart-with-template-lib-archive-dep/templates/ingress.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-archive-dep/templates/ingress.yaml rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-archive-dep/templates/ingress.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-archive-dep/templates/service.yaml b/pkg/cmd/testdata/testcharts/chart-with-template-lib-archive-dep/templates/service.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-archive-dep/templates/service.yaml rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-archive-dep/templates/service.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-archive-dep/values.yaml b/pkg/cmd/testdata/testcharts/chart-with-template-lib-archive-dep/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-archive-dep/values.yaml rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-archive-dep/values.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/.helmignore b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/.helmignore similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/.helmignore rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/.helmignore diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/Chart.yaml b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/Chart.yaml rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/.helmignore b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/.helmignore similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/.helmignore rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/.helmignore diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/Chart.yaml b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/Chart.yaml rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/README.md b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/README.md similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/README.md rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/README.md diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_chartref.tpl b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_chartref.tpl similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_chartref.tpl rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_chartref.tpl diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_configmap.yaml b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_configmap.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_configmap.yaml rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_configmap.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_container.yaml b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_container.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_container.yaml rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_container.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_deployment.yaml b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_deployment.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_deployment.yaml rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_deployment.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_envvar.tpl b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_envvar.tpl similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_envvar.tpl rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_envvar.tpl diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_fullname.tpl b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_fullname.tpl similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_fullname.tpl rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_fullname.tpl diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_ingress.yaml b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_ingress.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_ingress.yaml rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_ingress.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_metadata.yaml b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_metadata.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_metadata.yaml rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_metadata.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_metadata_annotations.tpl b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_metadata_annotations.tpl similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_metadata_annotations.tpl rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_metadata_annotations.tpl diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_metadata_labels.tpl b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_metadata_labels.tpl similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_metadata_labels.tpl rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_metadata_labels.tpl diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_name.tpl b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_name.tpl similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_name.tpl rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_name.tpl diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_persistentvolumeclaim.yaml b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_persistentvolumeclaim.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_persistentvolumeclaim.yaml rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_persistentvolumeclaim.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_secret.yaml b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_secret.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_secret.yaml rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_secret.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_service.yaml b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_service.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_service.yaml rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_service.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_util.tpl b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_util.tpl similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_util.tpl rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_util.tpl diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_volume.tpl b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_volume.tpl similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_volume.tpl rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/_volume.tpl diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/configmap.yaml b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/configmap.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/configmap.yaml rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/templates/configmap.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/values.yaml b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/charts/common/values.yaml rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/charts/common/values.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/templates/NOTES.txt b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/templates/NOTES.txt similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/templates/NOTES.txt rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/templates/NOTES.txt diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/templates/_helpers.tpl b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/templates/_helpers.tpl similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/templates/_helpers.tpl rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/templates/_helpers.tpl diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/templates/deployment.yaml b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/templates/deployment.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/templates/deployment.yaml rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/templates/deployment.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/templates/ingress.yaml b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/templates/ingress.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/templates/ingress.yaml rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/templates/ingress.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/templates/service.yaml b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/templates/service.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/templates/service.yaml rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/templates/service.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-template-lib-dep/values.yaml b/pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-lib-dep/values.yaml rename to pkg/cmd/testdata/testcharts/chart-with-template-lib-dep/values.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-template-with-invalid-yaml/Chart.yaml b/pkg/cmd/testdata/testcharts/chart-with-template-with-invalid-yaml/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-with-invalid-yaml/Chart.yaml rename to pkg/cmd/testdata/testcharts/chart-with-template-with-invalid-yaml/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-template-with-invalid-yaml/README.md b/pkg/cmd/testdata/testcharts/chart-with-template-with-invalid-yaml/README.md similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-with-invalid-yaml/README.md rename to pkg/cmd/testdata/testcharts/chart-with-template-with-invalid-yaml/README.md diff --git a/cmd/helm/testdata/testcharts/chart-with-template-with-invalid-yaml/templates/alpine-pod.yaml b/pkg/cmd/testdata/testcharts/chart-with-template-with-invalid-yaml/templates/alpine-pod.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-with-invalid-yaml/templates/alpine-pod.yaml rename to pkg/cmd/testdata/testcharts/chart-with-template-with-invalid-yaml/templates/alpine-pod.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-template-with-invalid-yaml/values.yaml b/pkg/cmd/testdata/testcharts/chart-with-template-with-invalid-yaml/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-template-with-invalid-yaml/values.yaml rename to pkg/cmd/testdata/testcharts/chart-with-template-with-invalid-yaml/values.yaml diff --git a/cmd/helm/testdata/testcharts/compressedchart-0.1.0.tar.gz b/pkg/cmd/testdata/testcharts/compressedchart-0.1.0.tar.gz similarity index 100% rename from cmd/helm/testdata/testcharts/compressedchart-0.1.0.tar.gz rename to pkg/cmd/testdata/testcharts/compressedchart-0.1.0.tar.gz diff --git a/cmd/helm/testdata/testcharts/compressedchart-0.1.0.tgz b/pkg/cmd/testdata/testcharts/compressedchart-0.1.0.tgz similarity index 100% rename from cmd/helm/testdata/testcharts/compressedchart-0.1.0.tgz rename to pkg/cmd/testdata/testcharts/compressedchart-0.1.0.tgz diff --git a/cmd/helm/testdata/testcharts/compressedchart-0.2.0.tgz b/pkg/cmd/testdata/testcharts/compressedchart-0.2.0.tgz similarity index 100% rename from cmd/helm/testdata/testcharts/compressedchart-0.2.0.tgz rename to pkg/cmd/testdata/testcharts/compressedchart-0.2.0.tgz diff --git a/cmd/helm/testdata/testcharts/compressedchart-0.3.0.tgz b/pkg/cmd/testdata/testcharts/compressedchart-0.3.0.tgz similarity index 100% rename from cmd/helm/testdata/testcharts/compressedchart-0.3.0.tgz rename to pkg/cmd/testdata/testcharts/compressedchart-0.3.0.tgz diff --git a/cmd/helm/testdata/testcharts/compressedchart-with-hyphens-0.1.0.tgz b/pkg/cmd/testdata/testcharts/compressedchart-with-hyphens-0.1.0.tgz similarity index 100% rename from cmd/helm/testdata/testcharts/compressedchart-with-hyphens-0.1.0.tgz rename to pkg/cmd/testdata/testcharts/compressedchart-with-hyphens-0.1.0.tgz diff --git a/cmd/helm/testdata/testcharts/deprecated/Chart.yaml b/pkg/cmd/testdata/testcharts/deprecated/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/deprecated/Chart.yaml rename to pkg/cmd/testdata/testcharts/deprecated/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/deprecated/README.md b/pkg/cmd/testdata/testcharts/deprecated/README.md similarity index 100% rename from cmd/helm/testdata/testcharts/deprecated/README.md rename to pkg/cmd/testdata/testcharts/deprecated/README.md diff --git a/cmd/helm/testdata/testcharts/empty/Chart.yaml b/pkg/cmd/testdata/testcharts/empty/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/empty/Chart.yaml rename to pkg/cmd/testdata/testcharts/empty/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/empty/README.md b/pkg/cmd/testdata/testcharts/empty/README.md similarity index 100% rename from cmd/helm/testdata/testcharts/empty/README.md rename to pkg/cmd/testdata/testcharts/empty/README.md diff --git a/cmd/helm/testdata/testcharts/empty/templates/empty.yaml b/pkg/cmd/testdata/testcharts/empty/templates/empty.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/empty/templates/empty.yaml rename to pkg/cmd/testdata/testcharts/empty/templates/empty.yaml diff --git a/cmd/helm/testdata/testcharts/empty/values.yaml b/pkg/cmd/testdata/testcharts/empty/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/empty/values.yaml rename to pkg/cmd/testdata/testcharts/empty/values.yaml diff --git a/cmd/helm/testdata/testcharts/issue-7233/.helmignore b/pkg/cmd/testdata/testcharts/issue-7233/.helmignore similarity index 100% rename from cmd/helm/testdata/testcharts/issue-7233/.helmignore rename to pkg/cmd/testdata/testcharts/issue-7233/.helmignore diff --git a/cmd/helm/testdata/testcharts/issue-7233/Chart.yaml b/pkg/cmd/testdata/testcharts/issue-7233/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/issue-7233/Chart.yaml rename to pkg/cmd/testdata/testcharts/issue-7233/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/issue-7233/requirements.lock b/pkg/cmd/testdata/testcharts/issue-7233/requirements.lock similarity index 100% rename from cmd/helm/testdata/testcharts/issue-7233/requirements.lock rename to pkg/cmd/testdata/testcharts/issue-7233/requirements.lock diff --git a/cmd/helm/testdata/testcharts/issue-7233/requirements.yaml b/pkg/cmd/testdata/testcharts/issue-7233/requirements.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/issue-7233/requirements.yaml rename to pkg/cmd/testdata/testcharts/issue-7233/requirements.yaml diff --git a/cmd/helm/testdata/testcharts/issue-7233/templates/configmap.yaml b/pkg/cmd/testdata/testcharts/issue-7233/templates/configmap.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/issue-7233/templates/configmap.yaml rename to pkg/cmd/testdata/testcharts/issue-7233/templates/configmap.yaml diff --git a/cmd/helm/testdata/testcharts/issue-7233/values.yaml b/pkg/cmd/testdata/testcharts/issue-7233/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/issue-7233/values.yaml rename to pkg/cmd/testdata/testcharts/issue-7233/values.yaml diff --git a/cmd/helm/testdata/testcharts/issue-9027/Chart.yaml b/pkg/cmd/testdata/testcharts/issue-9027/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/issue-9027/Chart.yaml rename to pkg/cmd/testdata/testcharts/issue-9027/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/issue-9027/charts/subchart/Chart.yaml b/pkg/cmd/testdata/testcharts/issue-9027/charts/subchart/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/issue-9027/charts/subchart/Chart.yaml rename to pkg/cmd/testdata/testcharts/issue-9027/charts/subchart/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/issue-9027/charts/subchart/templates/values.yaml b/pkg/cmd/testdata/testcharts/issue-9027/charts/subchart/templates/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/issue-9027/charts/subchart/templates/values.yaml rename to pkg/cmd/testdata/testcharts/issue-9027/charts/subchart/templates/values.yaml diff --git a/cmd/helm/testdata/testcharts/issue-9027/charts/subchart/values.yaml b/pkg/cmd/testdata/testcharts/issue-9027/charts/subchart/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/issue-9027/charts/subchart/values.yaml rename to pkg/cmd/testdata/testcharts/issue-9027/charts/subchart/values.yaml diff --git a/cmd/helm/testdata/testcharts/issue-9027/templates/values.yaml b/pkg/cmd/testdata/testcharts/issue-9027/templates/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/issue-9027/templates/values.yaml rename to pkg/cmd/testdata/testcharts/issue-9027/templates/values.yaml diff --git a/cmd/helm/testdata/testcharts/issue-9027/values.yaml b/pkg/cmd/testdata/testcharts/issue-9027/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/issue-9027/values.yaml rename to pkg/cmd/testdata/testcharts/issue-9027/values.yaml diff --git a/cmd/helm/testdata/testcharts/issue-totoml/Chart.yaml b/pkg/cmd/testdata/testcharts/issue-totoml/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/issue-totoml/Chart.yaml rename to pkg/cmd/testdata/testcharts/issue-totoml/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/issue-totoml/templates/configmap.yaml b/pkg/cmd/testdata/testcharts/issue-totoml/templates/configmap.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/issue-totoml/templates/configmap.yaml rename to pkg/cmd/testdata/testcharts/issue-totoml/templates/configmap.yaml diff --git a/cmd/helm/testdata/testcharts/issue-totoml/values.yaml b/pkg/cmd/testdata/testcharts/issue-totoml/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/issue-totoml/values.yaml rename to pkg/cmd/testdata/testcharts/issue-totoml/values.yaml diff --git a/cmd/helm/testdata/testcharts/issue1979/Chart.yaml b/pkg/cmd/testdata/testcharts/issue1979/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/issue1979/Chart.yaml rename to pkg/cmd/testdata/testcharts/issue1979/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/issue1979/README.md b/pkg/cmd/testdata/testcharts/issue1979/README.md similarity index 100% rename from cmd/helm/testdata/testcharts/issue1979/README.md rename to pkg/cmd/testdata/testcharts/issue1979/README.md diff --git a/cmd/helm/testdata/testcharts/issue1979/extra_values.yaml b/pkg/cmd/testdata/testcharts/issue1979/extra_values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/issue1979/extra_values.yaml rename to pkg/cmd/testdata/testcharts/issue1979/extra_values.yaml diff --git a/cmd/helm/testdata/testcharts/issue1979/more_values.yaml b/pkg/cmd/testdata/testcharts/issue1979/more_values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/issue1979/more_values.yaml rename to pkg/cmd/testdata/testcharts/issue1979/more_values.yaml diff --git a/cmd/helm/testdata/testcharts/issue1979/templates/alpine-pod.yaml b/pkg/cmd/testdata/testcharts/issue1979/templates/alpine-pod.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/issue1979/templates/alpine-pod.yaml rename to pkg/cmd/testdata/testcharts/issue1979/templates/alpine-pod.yaml diff --git a/cmd/helm/testdata/testcharts/issue1979/values.yaml b/pkg/cmd/testdata/testcharts/issue1979/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/issue1979/values.yaml rename to pkg/cmd/testdata/testcharts/issue1979/values.yaml diff --git a/cmd/helm/testdata/testcharts/lib-chart/.helmignore b/pkg/cmd/testdata/testcharts/lib-chart/.helmignore similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/.helmignore rename to pkg/cmd/testdata/testcharts/lib-chart/.helmignore diff --git a/cmd/helm/testdata/testcharts/lib-chart/Chart.yaml b/pkg/cmd/testdata/testcharts/lib-chart/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/Chart.yaml rename to pkg/cmd/testdata/testcharts/lib-chart/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/lib-chart/README.md b/pkg/cmd/testdata/testcharts/lib-chart/README.md similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/README.md rename to pkg/cmd/testdata/testcharts/lib-chart/README.md diff --git a/cmd/helm/testdata/testcharts/lib-chart/templates/_chartref.tpl b/pkg/cmd/testdata/testcharts/lib-chart/templates/_chartref.tpl similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/templates/_chartref.tpl rename to pkg/cmd/testdata/testcharts/lib-chart/templates/_chartref.tpl diff --git a/cmd/helm/testdata/testcharts/lib-chart/templates/_configmap.yaml b/pkg/cmd/testdata/testcharts/lib-chart/templates/_configmap.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/templates/_configmap.yaml rename to pkg/cmd/testdata/testcharts/lib-chart/templates/_configmap.yaml diff --git a/cmd/helm/testdata/testcharts/lib-chart/templates/_container.yaml b/pkg/cmd/testdata/testcharts/lib-chart/templates/_container.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/templates/_container.yaml rename to pkg/cmd/testdata/testcharts/lib-chart/templates/_container.yaml diff --git a/cmd/helm/testdata/testcharts/lib-chart/templates/_deployment.yaml b/pkg/cmd/testdata/testcharts/lib-chart/templates/_deployment.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/templates/_deployment.yaml rename to pkg/cmd/testdata/testcharts/lib-chart/templates/_deployment.yaml diff --git a/cmd/helm/testdata/testcharts/lib-chart/templates/_envvar.tpl b/pkg/cmd/testdata/testcharts/lib-chart/templates/_envvar.tpl similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/templates/_envvar.tpl rename to pkg/cmd/testdata/testcharts/lib-chart/templates/_envvar.tpl diff --git a/cmd/helm/testdata/testcharts/lib-chart/templates/_fullname.tpl b/pkg/cmd/testdata/testcharts/lib-chart/templates/_fullname.tpl similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/templates/_fullname.tpl rename to pkg/cmd/testdata/testcharts/lib-chart/templates/_fullname.tpl diff --git a/cmd/helm/testdata/testcharts/lib-chart/templates/_ingress.yaml b/pkg/cmd/testdata/testcharts/lib-chart/templates/_ingress.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/templates/_ingress.yaml rename to pkg/cmd/testdata/testcharts/lib-chart/templates/_ingress.yaml diff --git a/cmd/helm/testdata/testcharts/lib-chart/templates/_metadata.yaml b/pkg/cmd/testdata/testcharts/lib-chart/templates/_metadata.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/templates/_metadata.yaml rename to pkg/cmd/testdata/testcharts/lib-chart/templates/_metadata.yaml diff --git a/cmd/helm/testdata/testcharts/lib-chart/templates/_metadata_annotations.tpl b/pkg/cmd/testdata/testcharts/lib-chart/templates/_metadata_annotations.tpl similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/templates/_metadata_annotations.tpl rename to pkg/cmd/testdata/testcharts/lib-chart/templates/_metadata_annotations.tpl diff --git a/cmd/helm/testdata/testcharts/lib-chart/templates/_metadata_labels.tpl b/pkg/cmd/testdata/testcharts/lib-chart/templates/_metadata_labels.tpl similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/templates/_metadata_labels.tpl rename to pkg/cmd/testdata/testcharts/lib-chart/templates/_metadata_labels.tpl diff --git a/cmd/helm/testdata/testcharts/lib-chart/templates/_name.tpl b/pkg/cmd/testdata/testcharts/lib-chart/templates/_name.tpl similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/templates/_name.tpl rename to pkg/cmd/testdata/testcharts/lib-chart/templates/_name.tpl diff --git a/cmd/helm/testdata/testcharts/lib-chart/templates/_persistentvolumeclaim.yaml b/pkg/cmd/testdata/testcharts/lib-chart/templates/_persistentvolumeclaim.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/templates/_persistentvolumeclaim.yaml rename to pkg/cmd/testdata/testcharts/lib-chart/templates/_persistentvolumeclaim.yaml diff --git a/cmd/helm/testdata/testcharts/lib-chart/templates/_secret.yaml b/pkg/cmd/testdata/testcharts/lib-chart/templates/_secret.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/templates/_secret.yaml rename to pkg/cmd/testdata/testcharts/lib-chart/templates/_secret.yaml diff --git a/cmd/helm/testdata/testcharts/lib-chart/templates/_service.yaml b/pkg/cmd/testdata/testcharts/lib-chart/templates/_service.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/templates/_service.yaml rename to pkg/cmd/testdata/testcharts/lib-chart/templates/_service.yaml diff --git a/cmd/helm/testdata/testcharts/lib-chart/templates/_util.tpl b/pkg/cmd/testdata/testcharts/lib-chart/templates/_util.tpl similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/templates/_util.tpl rename to pkg/cmd/testdata/testcharts/lib-chart/templates/_util.tpl diff --git a/cmd/helm/testdata/testcharts/lib-chart/templates/_volume.tpl b/pkg/cmd/testdata/testcharts/lib-chart/templates/_volume.tpl similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/templates/_volume.tpl rename to pkg/cmd/testdata/testcharts/lib-chart/templates/_volume.tpl diff --git a/cmd/helm/testdata/testcharts/lib-chart/values.yaml b/pkg/cmd/testdata/testcharts/lib-chart/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/values.yaml rename to pkg/cmd/testdata/testcharts/lib-chart/values.yaml diff --git a/cmd/helm/testdata/testcharts/object-order/Chart.yaml b/pkg/cmd/testdata/testcharts/object-order/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/object-order/Chart.yaml rename to pkg/cmd/testdata/testcharts/object-order/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/object-order/templates/01-a.yml b/pkg/cmd/testdata/testcharts/object-order/templates/01-a.yml similarity index 100% rename from cmd/helm/testdata/testcharts/object-order/templates/01-a.yml rename to pkg/cmd/testdata/testcharts/object-order/templates/01-a.yml diff --git a/cmd/helm/testdata/testcharts/object-order/templates/02-b.yml b/pkg/cmd/testdata/testcharts/object-order/templates/02-b.yml similarity index 100% rename from cmd/helm/testdata/testcharts/object-order/templates/02-b.yml rename to pkg/cmd/testdata/testcharts/object-order/templates/02-b.yml diff --git a/cmd/helm/testdata/testcharts/object-order/values.yaml b/pkg/cmd/testdata/testcharts/object-order/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/object-order/values.yaml rename to pkg/cmd/testdata/testcharts/object-order/values.yaml diff --git a/cmd/helm/testdata/testcharts/oci-dependent-chart-0.1.0.tgz b/pkg/cmd/testdata/testcharts/oci-dependent-chart-0.1.0.tgz similarity index 100% rename from cmd/helm/testdata/testcharts/oci-dependent-chart-0.1.0.tgz rename to pkg/cmd/testdata/testcharts/oci-dependent-chart-0.1.0.tgz diff --git a/cmd/helm/testdata/testcharts/pre-release-chart-0.1.0-alpha.tgz b/pkg/cmd/testdata/testcharts/pre-release-chart-0.1.0-alpha.tgz similarity index 100% rename from cmd/helm/testdata/testcharts/pre-release-chart-0.1.0-alpha.tgz rename to pkg/cmd/testdata/testcharts/pre-release-chart-0.1.0-alpha.tgz diff --git a/cmd/helm/testdata/testcharts/reqtest-0.1.0.tgz b/pkg/cmd/testdata/testcharts/reqtest-0.1.0.tgz similarity index 100% rename from cmd/helm/testdata/testcharts/reqtest-0.1.0.tgz rename to pkg/cmd/testdata/testcharts/reqtest-0.1.0.tgz diff --git a/cmd/helm/testdata/testcharts/reqtest/.helmignore b/pkg/cmd/testdata/testcharts/reqtest/.helmignore similarity index 100% rename from cmd/helm/testdata/testcharts/reqtest/.helmignore rename to pkg/cmd/testdata/testcharts/reqtest/.helmignore diff --git a/cmd/helm/testdata/testcharts/reqtest/Chart.lock b/pkg/cmd/testdata/testcharts/reqtest/Chart.lock similarity index 100% rename from cmd/helm/testdata/testcharts/reqtest/Chart.lock rename to pkg/cmd/testdata/testcharts/reqtest/Chart.lock diff --git a/cmd/helm/testdata/testcharts/reqtest/Chart.yaml b/pkg/cmd/testdata/testcharts/reqtest/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/reqtest/Chart.yaml rename to pkg/cmd/testdata/testcharts/reqtest/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/reqtest/charts/reqsubchart/.helmignore b/pkg/cmd/testdata/testcharts/reqtest/charts/reqsubchart/.helmignore similarity index 100% rename from cmd/helm/testdata/testcharts/reqtest/charts/reqsubchart/.helmignore rename to pkg/cmd/testdata/testcharts/reqtest/charts/reqsubchart/.helmignore diff --git a/cmd/helm/testdata/testcharts/reqtest/charts/reqsubchart/Chart.yaml b/pkg/cmd/testdata/testcharts/reqtest/charts/reqsubchart/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/reqtest/charts/reqsubchart/Chart.yaml rename to pkg/cmd/testdata/testcharts/reqtest/charts/reqsubchart/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/reqtest/charts/reqsubchart/values.yaml b/pkg/cmd/testdata/testcharts/reqtest/charts/reqsubchart/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/reqtest/charts/reqsubchart/values.yaml rename to pkg/cmd/testdata/testcharts/reqtest/charts/reqsubchart/values.yaml diff --git a/cmd/helm/testdata/testcharts/reqtest/charts/reqsubchart2/.helmignore b/pkg/cmd/testdata/testcharts/reqtest/charts/reqsubchart2/.helmignore similarity index 100% rename from cmd/helm/testdata/testcharts/reqtest/charts/reqsubchart2/.helmignore rename to pkg/cmd/testdata/testcharts/reqtest/charts/reqsubchart2/.helmignore diff --git a/cmd/helm/testdata/testcharts/reqtest/charts/reqsubchart2/Chart.yaml b/pkg/cmd/testdata/testcharts/reqtest/charts/reqsubchart2/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/reqtest/charts/reqsubchart2/Chart.yaml rename to pkg/cmd/testdata/testcharts/reqtest/charts/reqsubchart2/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/reqtest/charts/reqsubchart2/values.yaml b/pkg/cmd/testdata/testcharts/reqtest/charts/reqsubchart2/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/reqtest/charts/reqsubchart2/values.yaml rename to pkg/cmd/testdata/testcharts/reqtest/charts/reqsubchart2/values.yaml diff --git a/cmd/helm/testdata/testcharts/reqtest/charts/reqsubchart3-0.2.0.tgz b/pkg/cmd/testdata/testcharts/reqtest/charts/reqsubchart3-0.2.0.tgz similarity index 100% rename from cmd/helm/testdata/testcharts/reqtest/charts/reqsubchart3-0.2.0.tgz rename to pkg/cmd/testdata/testcharts/reqtest/charts/reqsubchart3-0.2.0.tgz diff --git a/cmd/helm/testdata/testcharts/reqtest/values.yaml b/pkg/cmd/testdata/testcharts/reqtest/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/reqtest/values.yaml rename to pkg/cmd/testdata/testcharts/reqtest/values.yaml diff --git a/cmd/helm/testdata/testcharts/signtest-0.1.0.tgz b/pkg/cmd/testdata/testcharts/signtest-0.1.0.tgz similarity index 100% rename from cmd/helm/testdata/testcharts/signtest-0.1.0.tgz rename to pkg/cmd/testdata/testcharts/signtest-0.1.0.tgz diff --git a/cmd/helm/testdata/testcharts/signtest-0.1.0.tgz.prov b/pkg/cmd/testdata/testcharts/signtest-0.1.0.tgz.prov similarity index 100% rename from cmd/helm/testdata/testcharts/signtest-0.1.0.tgz.prov rename to pkg/cmd/testdata/testcharts/signtest-0.1.0.tgz.prov diff --git a/cmd/helm/testdata/testcharts/signtest/.helmignore b/pkg/cmd/testdata/testcharts/signtest/.helmignore similarity index 100% rename from cmd/helm/testdata/testcharts/signtest/.helmignore rename to pkg/cmd/testdata/testcharts/signtest/.helmignore diff --git a/cmd/helm/testdata/testcharts/signtest/Chart.yaml b/pkg/cmd/testdata/testcharts/signtest/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/signtest/Chart.yaml rename to pkg/cmd/testdata/testcharts/signtest/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/signtest/alpine/Chart.yaml b/pkg/cmd/testdata/testcharts/signtest/alpine/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/signtest/alpine/Chart.yaml rename to pkg/cmd/testdata/testcharts/signtest/alpine/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/signtest/alpine/README.md b/pkg/cmd/testdata/testcharts/signtest/alpine/README.md similarity index 100% rename from cmd/helm/testdata/testcharts/signtest/alpine/README.md rename to pkg/cmd/testdata/testcharts/signtest/alpine/README.md diff --git a/cmd/helm/testdata/testcharts/signtest/alpine/templates/alpine-pod.yaml b/pkg/cmd/testdata/testcharts/signtest/alpine/templates/alpine-pod.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/signtest/alpine/templates/alpine-pod.yaml rename to pkg/cmd/testdata/testcharts/signtest/alpine/templates/alpine-pod.yaml diff --git a/cmd/helm/testdata/testcharts/signtest/alpine/values.yaml b/pkg/cmd/testdata/testcharts/signtest/alpine/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/signtest/alpine/values.yaml rename to pkg/cmd/testdata/testcharts/signtest/alpine/values.yaml diff --git a/cmd/helm/testdata/testcharts/signtest/templates/pod.yaml b/pkg/cmd/testdata/testcharts/signtest/templates/pod.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/signtest/templates/pod.yaml rename to pkg/cmd/testdata/testcharts/signtest/templates/pod.yaml diff --git a/cmd/helm/testdata/testcharts/signtest/values.yaml b/pkg/cmd/testdata/testcharts/signtest/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/signtest/values.yaml rename to pkg/cmd/testdata/testcharts/signtest/values.yaml diff --git a/cmd/helm/testdata/testcharts/subchart/Chart.yaml b/pkg/cmd/testdata/testcharts/subchart/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/subchart/Chart.yaml rename to pkg/cmd/testdata/testcharts/subchart/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/subchart/charts/subchartA/Chart.yaml b/pkg/cmd/testdata/testcharts/subchart/charts/subchartA/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/subchart/charts/subchartA/Chart.yaml rename to pkg/cmd/testdata/testcharts/subchart/charts/subchartA/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/subchart/charts/subchartA/templates/service.yaml b/pkg/cmd/testdata/testcharts/subchart/charts/subchartA/templates/service.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/subchart/charts/subchartA/templates/service.yaml rename to pkg/cmd/testdata/testcharts/subchart/charts/subchartA/templates/service.yaml diff --git a/cmd/helm/testdata/testcharts/subchart/charts/subchartA/values.yaml b/pkg/cmd/testdata/testcharts/subchart/charts/subchartA/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/subchart/charts/subchartA/values.yaml rename to pkg/cmd/testdata/testcharts/subchart/charts/subchartA/values.yaml diff --git a/cmd/helm/testdata/testcharts/subchart/charts/subchartB/Chart.yaml b/pkg/cmd/testdata/testcharts/subchart/charts/subchartB/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/subchart/charts/subchartB/Chart.yaml rename to pkg/cmd/testdata/testcharts/subchart/charts/subchartB/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/subchart/charts/subchartB/templates/service.yaml b/pkg/cmd/testdata/testcharts/subchart/charts/subchartB/templates/service.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/subchart/charts/subchartB/templates/service.yaml rename to pkg/cmd/testdata/testcharts/subchart/charts/subchartB/templates/service.yaml diff --git a/cmd/helm/testdata/testcharts/subchart/charts/subchartB/values.yaml b/pkg/cmd/testdata/testcharts/subchart/charts/subchartB/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/subchart/charts/subchartB/values.yaml rename to pkg/cmd/testdata/testcharts/subchart/charts/subchartB/values.yaml diff --git a/cmd/helm/testdata/testcharts/subchart/crds/crdA.yaml b/pkg/cmd/testdata/testcharts/subchart/crds/crdA.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/subchart/crds/crdA.yaml rename to pkg/cmd/testdata/testcharts/subchart/crds/crdA.yaml diff --git a/cmd/helm/testdata/testcharts/subchart/extra_values.yaml b/pkg/cmd/testdata/testcharts/subchart/extra_values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/subchart/extra_values.yaml rename to pkg/cmd/testdata/testcharts/subchart/extra_values.yaml diff --git a/cmd/helm/testdata/testcharts/subchart/templates/NOTES.txt b/pkg/cmd/testdata/testcharts/subchart/templates/NOTES.txt similarity index 100% rename from cmd/helm/testdata/testcharts/subchart/templates/NOTES.txt rename to pkg/cmd/testdata/testcharts/subchart/templates/NOTES.txt diff --git a/cmd/helm/testdata/testcharts/subchart/templates/service.yaml b/pkg/cmd/testdata/testcharts/subchart/templates/service.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/subchart/templates/service.yaml rename to pkg/cmd/testdata/testcharts/subchart/templates/service.yaml diff --git a/cmd/helm/testdata/testcharts/subchart/templates/subdir/configmap.yaml b/pkg/cmd/testdata/testcharts/subchart/templates/subdir/configmap.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/subchart/templates/subdir/configmap.yaml rename to pkg/cmd/testdata/testcharts/subchart/templates/subdir/configmap.yaml diff --git a/cmd/helm/testdata/testcharts/subchart/templates/subdir/role.yaml b/pkg/cmd/testdata/testcharts/subchart/templates/subdir/role.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/subchart/templates/subdir/role.yaml rename to pkg/cmd/testdata/testcharts/subchart/templates/subdir/role.yaml diff --git a/cmd/helm/testdata/testcharts/subchart/templates/subdir/rolebinding.yaml b/pkg/cmd/testdata/testcharts/subchart/templates/subdir/rolebinding.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/subchart/templates/subdir/rolebinding.yaml rename to pkg/cmd/testdata/testcharts/subchart/templates/subdir/rolebinding.yaml diff --git a/cmd/helm/testdata/testcharts/subchart/templates/subdir/serviceaccount.yaml b/pkg/cmd/testdata/testcharts/subchart/templates/subdir/serviceaccount.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/subchart/templates/subdir/serviceaccount.yaml rename to pkg/cmd/testdata/testcharts/subchart/templates/subdir/serviceaccount.yaml diff --git a/cmd/helm/testdata/testcharts/subchart/templates/tests/test-config.yaml b/pkg/cmd/testdata/testcharts/subchart/templates/tests/test-config.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/subchart/templates/tests/test-config.yaml rename to pkg/cmd/testdata/testcharts/subchart/templates/tests/test-config.yaml diff --git a/cmd/helm/testdata/testcharts/subchart/templates/tests/test-nothing.yaml b/pkg/cmd/testdata/testcharts/subchart/templates/tests/test-nothing.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/subchart/templates/tests/test-nothing.yaml rename to pkg/cmd/testdata/testcharts/subchart/templates/tests/test-nothing.yaml diff --git a/cmd/helm/testdata/testcharts/subchart/values.yaml b/pkg/cmd/testdata/testcharts/subchart/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/subchart/values.yaml rename to pkg/cmd/testdata/testcharts/subchart/values.yaml diff --git a/cmd/helm/testdata/testcharts/upgradetest/templates/configmap.yaml b/pkg/cmd/testdata/testcharts/upgradetest/templates/configmap.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/upgradetest/templates/configmap.yaml rename to pkg/cmd/testdata/testcharts/upgradetest/templates/configmap.yaml diff --git a/cmd/helm/testdata/testcharts/upgradetest/values.yaml b/pkg/cmd/testdata/testcharts/upgradetest/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/upgradetest/values.yaml rename to pkg/cmd/testdata/testcharts/upgradetest/values.yaml diff --git a/cmd/helm/testdata/testplugin/plugin.yaml b/pkg/cmd/testdata/testplugin/plugin.yaml similarity index 100% rename from cmd/helm/testdata/testplugin/plugin.yaml rename to pkg/cmd/testdata/testplugin/plugin.yaml diff --git a/cmd/helm/testdata/testserver/index.yaml b/pkg/cmd/testdata/testserver/index.yaml similarity index 100% rename from cmd/helm/testdata/testserver/index.yaml rename to pkg/cmd/testdata/testserver/index.yaml diff --git a/cmd/helm/testdata/testserver/repository/repositories.yaml b/pkg/cmd/testdata/testserver/repository/repositories.yaml similarity index 100% rename from cmd/helm/testdata/testserver/repository/repositories.yaml rename to pkg/cmd/testdata/testserver/repository/repositories.yaml diff --git a/cmd/helm/uninstall.go b/pkg/cmd/uninstall.go similarity index 98% rename from cmd/helm/uninstall.go rename to pkg/cmd/uninstall.go index 9c5e25c87..c4e70cf75 100644 --- a/cmd/helm/uninstall.go +++ b/pkg/cmd/uninstall.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -23,8 +23,8 @@ import ( "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" + "helm.sh/helm/v4/pkg/cmd/require" ) const uninstallDesc = ` diff --git a/cmd/helm/uninstall_test.go b/pkg/cmd/uninstall_test.go similarity index 99% rename from cmd/helm/uninstall_test.go rename to pkg/cmd/uninstall_test.go index f9bc71ec2..36d9ad117 100644 --- a/cmd/helm/uninstall_test.go +++ b/pkg/cmd/uninstall_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "testing" diff --git a/cmd/helm/upgrade.go b/pkg/cmd/upgrade.go similarity index 99% rename from cmd/helm/upgrade.go rename to pkg/cmd/upgrade.go index 6684f9ebf..dfb28a98e 100644 --- a/cmd/helm/upgrade.go +++ b/pkg/cmd/upgrade.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "context" @@ -29,11 +29,11 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" "helm.sh/helm/v4/pkg/chart/loader" "helm.sh/helm/v4/pkg/cli/output" "helm.sh/helm/v4/pkg/cli/values" + "helm.sh/helm/v4/pkg/cmd/require" "helm.sh/helm/v4/pkg/downloader" "helm.sh/helm/v4/pkg/getter" "helm.sh/helm/v4/pkg/release" @@ -173,7 +173,7 @@ func newUpgradeCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { } if client.Version == "" && client.Devel { - debug("setting version to >0.0.0-0") + Debug("setting version to >0.0.0-0") client.Version = ">0.0.0-0" } @@ -225,7 +225,7 @@ func newUpgradeCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { } if ch.Metadata.Deprecated { - warning("This chart is deprecated") + Warning("This chart is deprecated") } // Create context and prepare the handle of SIGTERM diff --git a/cmd/helm/upgrade_test.go b/pkg/cmd/upgrade_test.go similarity index 99% rename from cmd/helm/upgrade_test.go rename to pkg/cmd/upgrade_test.go index f97a4a26b..0c454b9bf 100644 --- a/cmd/helm/upgrade_test.go +++ b/pkg/cmd/upgrade_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" diff --git a/cmd/helm/verify.go b/pkg/cmd/verify.go similarity index 97% rename from cmd/helm/verify.go rename to pkg/cmd/verify.go index 197a164b6..50f1ea914 100644 --- a/cmd/helm/verify.go +++ b/pkg/cmd/verify.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -21,8 +21,8 @@ import ( "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" + "helm.sh/helm/v4/pkg/cmd/require" ) const verifyDesc = ` diff --git a/cmd/helm/verify_test.go b/pkg/cmd/verify_test.go similarity index 99% rename from cmd/helm/verify_test.go rename to pkg/cmd/verify_test.go index 23b793557..ae373afd2 100644 --- a/cmd/helm/verify_test.go +++ b/pkg/cmd/verify_test.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" diff --git a/cmd/helm/version.go b/pkg/cmd/version.go similarity index 98% rename from cmd/helm/version.go rename to pkg/cmd/version.go index 030ce2dcd..0211716fe 100644 --- a/cmd/helm/version.go +++ b/pkg/cmd/version.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "fmt" @@ -23,8 +23,8 @@ import ( "github.com/spf13/cobra" - "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/internal/version" + "helm.sh/helm/v4/pkg/cmd/require" ) const versionDesc = ` diff --git a/cmd/helm/version_test.go b/pkg/cmd/version_test.go similarity index 98% rename from cmd/helm/version_test.go rename to pkg/cmd/version_test.go index aa3cbfb7d..c06c72309 100644 --- a/cmd/helm/version_test.go +++ b/pkg/cmd/version_test.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cmd import ( "testing" From 18ca7c100250d70b2b5f45964eef22013b1bd384 Mon Sep 17 00:00:00 2001 From: Matt Farina Date: Mon, 24 Feb 2025 14:58:51 -0500 Subject: [PATCH 57/68] Move pkg/releaseutil to pkg/release/util The releaseutil package was originally designed to work against a generated codebase from a protobuf in Helm v2. This is when Helm used gRPC to communicate to a server side component named Tiller. When Helm moved everything client side, this package remained and it supported the release package. This change moves releaseutil to be a sub-packge of release. This is part of the change to support apiVersion v3 charts which is documented in HIP 20 Signed-off-by: Matt Farina --- cmd/helm/history.go | 2 +- cmd/helm/template.go | 2 +- pkg/action/action.go | 2 +- pkg/action/install.go | 2 +- pkg/action/list.go | 2 +- pkg/action/resource_policy.go | 2 +- pkg/action/uninstall.go | 2 +- pkg/action/upgrade.go | 2 +- pkg/{releaseutil => release/util}/filter.go | 2 +- pkg/{releaseutil => release/util}/filter_test.go | 2 +- pkg/{releaseutil => release/util}/kind_sorter.go | 2 +- pkg/{releaseutil => release/util}/kind_sorter_test.go | 2 +- pkg/{releaseutil => release/util}/manifest.go | 2 +- pkg/{releaseutil => release/util}/manifest_sorter.go | 2 +- pkg/{releaseutil => release/util}/manifest_sorter_test.go | 2 +- pkg/{releaseutil => release/util}/manifest_test.go | 2 +- pkg/{releaseutil => release/util}/sorter.go | 2 +- pkg/{releaseutil => release/util}/sorter_test.go | 2 +- pkg/storage/storage.go | 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) rename pkg/{releaseutil => release/util}/filter.go (96%) rename pkg/{releaseutil => release/util}/filter_test.go (96%) rename pkg/{releaseutil => release/util}/kind_sorter.go (99%) rename pkg/{releaseutil => release/util}/kind_sorter_test.go (99%) rename pkg/{releaseutil => release/util}/manifest.go (99%) rename pkg/{releaseutil => release/util}/manifest_sorter.go (99%) rename pkg/{releaseutil => release/util}/manifest_sorter_test.go (99%) rename pkg/{releaseutil => release/util}/manifest_test.go (95%) rename pkg/{releaseutil => release/util}/sorter.go (97%) rename pkg/{releaseutil => release/util}/sorter_test.go (97%) diff --git a/cmd/helm/history.go b/cmd/helm/history.go index 91d005e7a..2c929c161 100644 --- a/cmd/helm/history.go +++ b/cmd/helm/history.go @@ -30,7 +30,7 @@ import ( "helm.sh/helm/v4/pkg/chart" "helm.sh/helm/v4/pkg/cli/output" "helm.sh/helm/v4/pkg/release" - "helm.sh/helm/v4/pkg/releaseutil" + releaseutil "helm.sh/helm/v4/pkg/release/util" helmtime "helm.sh/helm/v4/pkg/time" ) diff --git a/cmd/helm/template.go b/cmd/helm/template.go index 1a6265eba..212664dc8 100644 --- a/cmd/helm/template.go +++ b/cmd/helm/template.go @@ -36,7 +36,7 @@ import ( "helm.sh/helm/v4/pkg/action" chartutil "helm.sh/helm/v4/pkg/chart/util" "helm.sh/helm/v4/pkg/cli/values" - "helm.sh/helm/v4/pkg/releaseutil" + releaseutil "helm.sh/helm/v4/pkg/release/util" ) const templateDesc = ` diff --git a/pkg/action/action.go b/pkg/action/action.go index 6efc6c2ee..eeaebc15f 100644 --- a/pkg/action/action.go +++ b/pkg/action/action.go @@ -40,7 +40,7 @@ import ( "helm.sh/helm/v4/pkg/postrender" "helm.sh/helm/v4/pkg/registry" "helm.sh/helm/v4/pkg/release" - "helm.sh/helm/v4/pkg/releaseutil" + releaseutil "helm.sh/helm/v4/pkg/release/util" "helm.sh/helm/v4/pkg/storage" "helm.sh/helm/v4/pkg/storage/driver" "helm.sh/helm/v4/pkg/time" diff --git a/pkg/action/install.go b/pkg/action/install.go index 6ad77a509..68c1848f6 100644 --- a/pkg/action/install.go +++ b/pkg/action/install.go @@ -49,7 +49,7 @@ import ( "helm.sh/helm/v4/pkg/postrender" "helm.sh/helm/v4/pkg/registry" "helm.sh/helm/v4/pkg/release" - "helm.sh/helm/v4/pkg/releaseutil" + releaseutil "helm.sh/helm/v4/pkg/release/util" "helm.sh/helm/v4/pkg/repo" "helm.sh/helm/v4/pkg/storage" "helm.sh/helm/v4/pkg/storage/driver" diff --git a/pkg/action/list.go b/pkg/action/list.go index f90c31acd..5c2b1e8a1 100644 --- a/pkg/action/list.go +++ b/pkg/action/list.go @@ -23,7 +23,7 @@ import ( "k8s.io/apimachinery/pkg/labels" "helm.sh/helm/v4/pkg/release" - "helm.sh/helm/v4/pkg/releaseutil" + releaseutil "helm.sh/helm/v4/pkg/release/util" ) // ListStates represents zero or more status codes that a list item may have set diff --git a/pkg/action/resource_policy.go b/pkg/action/resource_policy.go index f18acb880..b72e94124 100644 --- a/pkg/action/resource_policy.go +++ b/pkg/action/resource_policy.go @@ -20,7 +20,7 @@ import ( "strings" "helm.sh/helm/v4/pkg/kube" - "helm.sh/helm/v4/pkg/releaseutil" + releaseutil "helm.sh/helm/v4/pkg/release/util" ) func filterManifestsToKeep(manifests []releaseutil.Manifest) (keep, remaining []releaseutil.Manifest) { diff --git a/pkg/action/uninstall.go b/pkg/action/uninstall.go index b786c37f7..6e71197f6 100644 --- a/pkg/action/uninstall.go +++ b/pkg/action/uninstall.go @@ -27,7 +27,7 @@ import ( chartutil "helm.sh/helm/v4/pkg/chart/util" "helm.sh/helm/v4/pkg/kube" "helm.sh/helm/v4/pkg/release" - "helm.sh/helm/v4/pkg/releaseutil" + releaseutil "helm.sh/helm/v4/pkg/release/util" helmtime "helm.sh/helm/v4/pkg/time" ) diff --git a/pkg/action/upgrade.go b/pkg/action/upgrade.go index c5397c984..fa799ad2b 100644 --- a/pkg/action/upgrade.go +++ b/pkg/action/upgrade.go @@ -34,7 +34,7 @@ import ( "helm.sh/helm/v4/pkg/postrender" "helm.sh/helm/v4/pkg/registry" "helm.sh/helm/v4/pkg/release" - "helm.sh/helm/v4/pkg/releaseutil" + releaseutil "helm.sh/helm/v4/pkg/release/util" "helm.sh/helm/v4/pkg/storage/driver" ) diff --git a/pkg/releaseutil/filter.go b/pkg/release/util/filter.go similarity index 96% rename from pkg/releaseutil/filter.go rename to pkg/release/util/filter.go index d600d43e8..e56752f86 100644 --- a/pkg/releaseutil/filter.go +++ b/pkg/release/util/filter.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package releaseutil // import "helm.sh/helm/v4/pkg/releaseutil" +package util // import "helm.sh/helm/v4/pkg/release/util" import rspb "helm.sh/helm/v4/pkg/release" diff --git a/pkg/releaseutil/filter_test.go b/pkg/release/util/filter_test.go similarity index 96% rename from pkg/releaseutil/filter_test.go rename to pkg/release/util/filter_test.go index 9fc5ce9b1..2037ef157 100644 --- a/pkg/releaseutil/filter_test.go +++ b/pkg/release/util/filter_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package releaseutil // import "helm.sh/helm/v4/pkg/releaseutil" +package util // import "helm.sh/helm/v4/pkg/release/util" import ( "testing" diff --git a/pkg/releaseutil/kind_sorter.go b/pkg/release/util/kind_sorter.go similarity index 99% rename from pkg/releaseutil/kind_sorter.go rename to pkg/release/util/kind_sorter.go index ec51d50d8..130b2c831 100644 --- a/pkg/releaseutil/kind_sorter.go +++ b/pkg/release/util/kind_sorter.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package releaseutil +package util import ( "sort" diff --git a/pkg/releaseutil/kind_sorter_test.go b/pkg/release/util/kind_sorter_test.go similarity index 99% rename from pkg/releaseutil/kind_sorter_test.go rename to pkg/release/util/kind_sorter_test.go index f7745d64d..cd40fe459 100644 --- a/pkg/releaseutil/kind_sorter_test.go +++ b/pkg/release/util/kind_sorter_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package releaseutil +package util import ( "bytes" diff --git a/pkg/releaseutil/manifest.go b/pkg/release/util/manifest.go similarity index 99% rename from pkg/releaseutil/manifest.go rename to pkg/release/util/manifest.go index 0b04a4599..9a87949f8 100644 --- a/pkg/releaseutil/manifest.go +++ b/pkg/release/util/manifest.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package releaseutil +package util import ( "fmt" diff --git a/pkg/releaseutil/manifest_sorter.go b/pkg/release/util/manifest_sorter.go similarity index 99% rename from pkg/releaseutil/manifest_sorter.go rename to pkg/release/util/manifest_sorter.go index 2d9a14bf1..a598743a6 100644 --- a/pkg/releaseutil/manifest_sorter.go +++ b/pkg/release/util/manifest_sorter.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package releaseutil +package util import ( "log" diff --git a/pkg/releaseutil/manifest_sorter_test.go b/pkg/release/util/manifest_sorter_test.go similarity index 99% rename from pkg/releaseutil/manifest_sorter_test.go rename to pkg/release/util/manifest_sorter_test.go index 3bd196c12..281f24924 100644 --- a/pkg/releaseutil/manifest_sorter_test.go +++ b/pkg/release/util/manifest_sorter_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package releaseutil +package util import ( "reflect" diff --git a/pkg/releaseutil/manifest_test.go b/pkg/release/util/manifest_test.go similarity index 95% rename from pkg/releaseutil/manifest_test.go rename to pkg/release/util/manifest_test.go index 8e05b76dc..cfc19563d 100644 --- a/pkg/releaseutil/manifest_test.go +++ b/pkg/release/util/manifest_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package releaseutil // import "helm.sh/helm/v4/pkg/releaseutil" +package util // import "helm.sh/helm/v4/pkg/release/util" import ( "reflect" diff --git a/pkg/releaseutil/sorter.go b/pkg/release/util/sorter.go similarity index 97% rename from pkg/releaseutil/sorter.go rename to pkg/release/util/sorter.go index a2135d68f..8b1c89aa3 100644 --- a/pkg/releaseutil/sorter.go +++ b/pkg/release/util/sorter.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package releaseutil // import "helm.sh/helm/v4/pkg/releaseutil" +package util // import "helm.sh/helm/v4/pkg/release/util" import ( "sort" diff --git a/pkg/releaseutil/sorter_test.go b/pkg/release/util/sorter_test.go similarity index 97% rename from pkg/releaseutil/sorter_test.go rename to pkg/release/util/sorter_test.go index bef261ee8..6e92eef5c 100644 --- a/pkg/releaseutil/sorter_test.go +++ b/pkg/release/util/sorter_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package releaseutil // import "helm.sh/helm/v4/pkg/releaseutil" +package util // import "helm.sh/helm/v4/pkg/release/util" import ( "testing" diff --git a/pkg/storage/storage.go b/pkg/storage/storage.go index af339b85e..6a77cbae6 100644 --- a/pkg/storage/storage.go +++ b/pkg/storage/storage.go @@ -23,7 +23,7 @@ import ( "github.com/pkg/errors" rspb "helm.sh/helm/v4/pkg/release" - relutil "helm.sh/helm/v4/pkg/releaseutil" + relutil "helm.sh/helm/v4/pkg/release/util" "helm.sh/helm/v4/pkg/storage/driver" ) From 17adaa437a1a5b1240bce8822694ac34ebd13786 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 22:21:24 +0000 Subject: [PATCH 58/68] build(deps): bump golang.org/x/crypto from 0.33.0 to 0.35.0 Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.33.0 to 0.35.0. - [Commits](https://github.com/golang/crypto/compare/v0.33.0...v0.35.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- go.mod | 4 ++-- go.sum | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index c84140350..0b2836b06 100644 --- a/go.mod +++ b/go.mod @@ -33,9 +33,10 @@ require ( github.com/spf13/pflag v1.0.6 github.com/stretchr/testify v1.10.0 github.com/xeipuuv/gojsonschema v1.2.0 - golang.org/x/crypto v0.33.0 + golang.org/x/crypto v0.35.0 golang.org/x/term v0.29.0 golang.org/x/text v0.22.0 + gopkg.in/yaml.v3 v3.0.1 k8s.io/api v0.32.2 k8s.io/apiextensions-apiserver v0.32.2 k8s.io/apimachinery v0.32.2 @@ -173,7 +174,6 @@ require ( gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/component-base v0.32.2 // indirect k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f // indirect k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 // indirect diff --git a/go.sum b/go.sum index 995e14598..467cef72f 100644 --- a/go.sum +++ b/go.sum @@ -400,8 +400,8 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g= -golang.org/x/crypto v0.33.0 h1:IOBPskki6Lysi0lo9qQvbxiQ+FvsCC/YWOecCHAixus= -golang.org/x/crypto v0.33.0/go.mod h1:bVdXmD7IV/4GdElGPozy6U7lWdRXA4qyRVGJV57uQ5M= +golang.org/x/crypto v0.35.0 h1:b15kiHdrGCHrP6LvwaQ3c03kgNhhiMgvlhxHQhmg2Xs= +golang.org/x/crypto v0.35.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= From 4da004e2dcd2e7e4e0f1512e05cbd19ad3025239 Mon Sep 17 00:00:00 2001 From: Robert Sirchia Date: Tue, 25 Feb 2025 15:15:06 -0500 Subject: [PATCH 59/68] removing old apis Signed-off-by: Robert Sirchia --- pkg/kube/ready.go | 11 ++++------- pkg/kube/ready_test.go | 10 ++++------ 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/pkg/kube/ready.go b/pkg/kube/ready.go index 584b8853a..dd5869e6a 100644 --- a/pkg/kube/ready.go +++ b/pkg/kube/ready.go @@ -21,11 +21,8 @@ import ( "fmt" appsv1 "k8s.io/api/apps/v1" - appsv1beta1 "k8s.io/api/apps/v1beta1" - appsv1beta2 "k8s.io/api/apps/v1beta2" batchv1 "k8s.io/api/batch/v1" corev1 "k8s.io/api/core/v1" - extensionsv1beta1 "k8s.io/api/extensions/v1beta1" apiextv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" apiextv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -105,7 +102,7 @@ func (c *ReadyChecker) IsReady(ctx context.Context, v *resource.Info) (bool, err ready, err := c.jobReady(job) return ready, err } - case *appsv1.Deployment, *appsv1beta1.Deployment, *appsv1beta2.Deployment, *extensionsv1beta1.Deployment: + case *appsv1.Deployment: currentDeployment, err := c.client.AppsV1().Deployments(v.Namespace).Get(ctx, v.Name, metav1.GetOptions{}) if err != nil { return false, err @@ -138,7 +135,7 @@ func (c *ReadyChecker) IsReady(ctx context.Context, v *resource.Info) (bool, err if !c.serviceReady(svc) { return false, nil } - case *extensionsv1beta1.DaemonSet, *appsv1.DaemonSet, *appsv1beta2.DaemonSet: + case *appsv1.DaemonSet: ds, err := c.client.AppsV1().DaemonSets(v.Namespace).Get(ctx, v.Name, metav1.GetOptions{}) if err != nil { return false, err @@ -168,7 +165,7 @@ func (c *ReadyChecker) IsReady(ctx context.Context, v *resource.Info) (bool, err if !c.crdReady(*crd) { return false, nil } - case *appsv1.StatefulSet, *appsv1beta1.StatefulSet, *appsv1beta2.StatefulSet: + case *appsv1.StatefulSet: sts, err := c.client.AppsV1().StatefulSets(v.Namespace).Get(ctx, v.Name, metav1.GetOptions{}) if err != nil { return false, err @@ -188,7 +185,7 @@ func (c *ReadyChecker) IsReady(ctx context.Context, v *resource.Info) (bool, err if !ready || err != nil { return false, err } - case *extensionsv1beta1.ReplicaSet, *appsv1beta2.ReplicaSet, *appsv1.ReplicaSet: + case *appsv1.ReplicaSet: rs, err := c.client.AppsV1().ReplicaSets(v.Namespace).Get(ctx, v.Name, metav1.GetOptions{}) if err != nil { return false, err diff --git a/pkg/kube/ready_test.go b/pkg/kube/ready_test.go index ced0a51a8..a8ba05287 100644 --- a/pkg/kube/ready_test.go +++ b/pkg/kube/ready_test.go @@ -20,10 +20,8 @@ import ( "testing" appsv1 "k8s.io/api/apps/v1" - appsv1beta1 "k8s.io/api/apps/v1beta1" batchv1 "k8s.io/api/batch/v1" corev1 "k8s.io/api/core/v1" - extensionsv1beta1 "k8s.io/api/extensions/v1beta1" apiextv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" apiextv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -523,7 +521,7 @@ func Test_ReadyChecker_IsReady_StatefulSet(t *testing.T) { }, args: args{ ctx: context.TODO(), - resource: &resource.Info{Object: &appsv1beta1.StatefulSet{}, Name: "foo", Namespace: defaultNamespace}, + resource: &resource.Info{Object: &appsv1.StatefulSet{}, Name: "foo", Namespace: defaultNamespace}, }, ss: newStatefulSet("foo", 1, 0, 0, 1, true), want: false, @@ -539,7 +537,7 @@ func Test_ReadyChecker_IsReady_StatefulSet(t *testing.T) { }, args: args{ ctx: context.TODO(), - resource: &resource.Info{Object: &appsv1beta1.StatefulSet{}, Name: "foo", Namespace: defaultNamespace}, + resource: &resource.Info{Object: &appsv1.StatefulSet{}, Name: "foo", Namespace: defaultNamespace}, }, ss: newStatefulSet("bar", 1, 0, 1, 1, true), want: false, @@ -689,7 +687,7 @@ func Test_ReadyChecker_IsReady_ReplicaSet(t *testing.T) { }, args: args{ ctx: context.TODO(), - resource: &resource.Info{Object: &extensionsv1beta1.ReplicaSet{}, Name: "foo", Namespace: defaultNamespace}, + resource: &resource.Info{Object: &appsv1.ReplicaSet{}, Name: "foo", Namespace: defaultNamespace}, }, rs: newReplicaSet("foo", 1, 1, true), want: false, @@ -705,7 +703,7 @@ func Test_ReadyChecker_IsReady_ReplicaSet(t *testing.T) { }, args: args{ ctx: context.TODO(), - resource: &resource.Info{Object: &extensionsv1beta1.ReplicaSet{}, Name: "foo", Namespace: defaultNamespace}, + resource: &resource.Info{Object: &appsv1.ReplicaSet{}, Name: "foo", Namespace: defaultNamespace}, }, rs: newReplicaSet("bar", 1, 1, false), want: false, From 61d3eca55c1c7142c3e344537bf3a7a5be4ca0db Mon Sep 17 00:00:00 2001 From: Matt Farina Date: Tue, 25 Feb 2025 15:20:44 -0500 Subject: [PATCH 60/68] Move pkg/chart to pkg/chart/v2 to prepare for v3 charts This change moves the code, updates the import locations, and adds a doc.go file to document what the v2 package is for. This is part of HIP 20 for v3 charts Signed-off-by: Matt Farina --- Makefile | 4 +-- cmd/helm/completion_test.go | 2 +- cmd/helm/create.go | 4 +-- cmd/helm/create_test.go | 6 ++--- cmd/helm/dependency_build_test.go | 2 +- cmd/helm/dependency_update_test.go | 4 +-- cmd/helm/flags_test.go | 2 +- cmd/helm/helm_test.go | 2 +- cmd/helm/history.go | 2 +- cmd/helm/install.go | 4 +-- cmd/helm/lint.go | 2 +- cmd/helm/list_test.go | 2 +- cmd/helm/package_test.go | 4 +-- cmd/helm/rollback_test.go | 2 +- cmd/helm/search/search_test.go | 2 +- cmd/helm/status.go | 2 +- cmd/helm/status_test.go | 2 +- cmd/helm/template.go | 2 +- cmd/helm/upgrade.go | 2 +- cmd/helm/upgrade_test.go | 6 ++--- internal/monocular/search.go | 2 +- internal/resolver/resolver.go | 4 +-- internal/resolver/resolver_test.go | 2 +- pkg/action/action.go | 4 +-- pkg/action/action_test.go | 4 +-- pkg/action/dependency.go | 4 +-- pkg/action/dependency_test.go | 4 +-- pkg/action/get_metadata.go | 2 +- pkg/action/get_values.go | 2 +- pkg/action/history.go | 2 +- pkg/action/hooks_test.go | 2 +- pkg/action/install.go | 4 +-- pkg/action/install_test.go | 4 +-- pkg/action/lint.go | 2 +- pkg/action/package.go | 4 +-- pkg/action/pull.go | 2 +- pkg/action/release_testing.go | 2 +- pkg/action/rollback.go | 2 +- pkg/action/show.go | 6 ++--- pkg/action/show_test.go | 2 +- pkg/action/uninstall.go | 2 +- pkg/action/upgrade.go | 4 +-- pkg/action/upgrade_test.go | 2 +- pkg/chart/{ => v2}/chart.go | 2 +- pkg/chart/{ => v2}/chart_test.go | 2 +- pkg/chart/{ => v2}/dependency.go | 2 +- pkg/chart/{ => v2}/dependency_test.go | 2 +- pkg/chart/v2/doc.go | 23 ++++++++++++++++++ pkg/chart/{ => v2}/errors.go | 2 +- pkg/chart/{ => v2}/file.go | 2 +- pkg/chart/{ => v2}/fuzz_test.go | 2 +- pkg/chart/{ => v2}/loader/archive.go | 2 +- pkg/chart/{ => v2}/loader/archive_test.go | 0 pkg/chart/{ => v2}/loader/directory.go | 2 +- pkg/chart/{ => v2}/loader/load.go | 2 +- pkg/chart/{ => v2}/loader/load_test.go | 2 +- pkg/chart/{ => v2}/loader/testdata/LICENSE | 0 .../loader/testdata/albatross/Chart.yaml | 0 .../loader/testdata/albatross/values.yaml | 0 .../loader/testdata/frobnitz-1.2.3.tgz | Bin .../{ => v2}/loader/testdata/frobnitz.v1.tgz | Bin .../loader/testdata/frobnitz.v1/.helmignore | 0 .../loader/testdata/frobnitz.v1/Chart.lock | 0 .../loader/testdata/frobnitz.v1/Chart.yaml | 0 .../loader/testdata/frobnitz.v1/INSTALL.txt | 0 .../loader/testdata/frobnitz.v1/LICENSE | 0 .../loader/testdata/frobnitz.v1/README.md | 0 .../testdata/frobnitz.v1/charts/_ignore_me | 0 .../frobnitz.v1/charts/alpine/Chart.yaml | 0 .../frobnitz.v1/charts/alpine/README.md | 0 .../charts/alpine/charts/mast1/Chart.yaml | 0 .../charts/alpine/charts/mast1/values.yaml | 0 .../charts/alpine/charts/mast2-0.1.0.tgz | Bin .../charts/alpine/templates/alpine-pod.yaml | 0 .../frobnitz.v1/charts/alpine/values.yaml | 0 .../frobnitz.v1/charts/mariner-4.3.2.tgz | Bin .../testdata/frobnitz.v1/docs/README.md | 0 .../loader/testdata/frobnitz.v1/icon.svg | 0 .../loader/testdata/frobnitz.v1/ignore/me.txt | 0 .../testdata/frobnitz.v1/requirements.yaml | 0 .../frobnitz.v1/templates/template.tpl | 0 .../loader/testdata/frobnitz.v1/values.yaml | 0 .../testdata/frobnitz.v2.reqs/.helmignore | 0 .../testdata/frobnitz.v2.reqs/Chart.yaml | 0 .../testdata/frobnitz.v2.reqs/INSTALL.txt | 0 .../loader/testdata/frobnitz.v2.reqs/LICENSE | 0 .../testdata/frobnitz.v2.reqs/README.md | 0 .../frobnitz.v2.reqs/charts/_ignore_me | 0 .../frobnitz.v2.reqs/charts/alpine/Chart.yaml | 0 .../frobnitz.v2.reqs/charts/alpine/README.md | 0 .../charts/alpine/charts/mast1/Chart.yaml | 0 .../charts/alpine/charts/mast1/values.yaml | 0 .../charts/alpine/charts/mast2-0.1.0.tgz | Bin .../charts/alpine/templates/alpine-pod.yaml | 0 .../charts/alpine/values.yaml | 0 .../frobnitz.v2.reqs/charts/mariner-4.3.2.tgz | Bin .../testdata/frobnitz.v2.reqs/docs/README.md | 0 .../loader/testdata/frobnitz.v2.reqs/icon.svg | 0 .../testdata/frobnitz.v2.reqs/ignore/me.txt | 0 .../frobnitz.v2.reqs/requirements.yaml | 0 .../frobnitz.v2.reqs/templates/template.tpl | 0 .../testdata/frobnitz.v2.reqs/values.yaml | 0 .../loader/testdata/frobnitz/.helmignore | 0 .../loader/testdata/frobnitz/Chart.lock | 0 .../loader/testdata/frobnitz/Chart.yaml | 0 .../loader/testdata/frobnitz/INSTALL.txt | 0 .../{ => v2}/loader/testdata/frobnitz/LICENSE | 0 .../loader/testdata/frobnitz/README.md | 0 .../testdata/frobnitz/charts/_ignore_me | 0 .../frobnitz/charts/alpine/Chart.yaml | 0 .../testdata/frobnitz/charts/alpine/README.md | 0 .../charts/alpine/charts/mast1/Chart.yaml | 0 .../charts/alpine/charts/mast1/values.yaml | 0 .../charts/alpine/charts/mast2-0.1.0.tgz | Bin .../charts/alpine/templates/alpine-pod.yaml | 0 .../frobnitz/charts/alpine/values.yaml | 0 .../frobnitz/charts/mariner-4.3.2.tgz | Bin .../loader/testdata/frobnitz/docs/README.md | 0 .../loader/testdata/frobnitz/icon.svg | 0 .../loader/testdata/frobnitz/ignore/me.txt | 0 .../testdata/frobnitz/templates/template.tpl | 0 .../loader/testdata/frobnitz/values.yaml | 0 .../testdata/frobnitz_backslash-1.2.3.tgz | Bin .../testdata/frobnitz_backslash/.helmignore | 0 .../testdata/frobnitz_backslash/Chart.lock | 0 .../testdata/frobnitz_backslash/Chart.yaml | 0 .../testdata/frobnitz_backslash/INSTALL.txt | 0 .../testdata/frobnitz_backslash/LICENSE | 0 .../testdata/frobnitz_backslash/README.md | 0 .../frobnitz_backslash/charts/_ignore_me | 0 .../charts/alpine/Chart.yaml | 0 .../charts/alpine/README.md | 0 .../charts/alpine/charts/mast1/Chart.yaml | 0 .../charts/alpine/charts/mast1/values.yaml | 0 .../charts/alpine/charts/mast2-0.1.0.tgz | Bin .../charts/alpine/templates/alpine-pod.yaml | 0 .../charts/alpine/values.yaml | 0 .../charts/mariner-4.3.2.tgz | Bin .../frobnitz_backslash/docs/README.md | 0 .../testdata/frobnitz_backslash/icon.svg | 0 .../testdata/frobnitz_backslash/ignore/me.txt | 0 .../frobnitz_backslash/templates/template.tpl | 0 .../testdata/frobnitz_backslash/values.yaml | 0 .../loader/testdata/frobnitz_with_bom.tgz | Bin .../testdata/frobnitz_with_bom/.helmignore | 0 .../testdata/frobnitz_with_bom/Chart.lock | 0 .../testdata/frobnitz_with_bom/Chart.yaml | 0 .../testdata/frobnitz_with_bom/INSTALL.txt | 0 .../loader/testdata/frobnitz_with_bom/LICENSE | 0 .../testdata/frobnitz_with_bom/README.md | 0 .../frobnitz_with_bom/charts/_ignore_me | 0 .../charts/alpine/Chart.yaml | 0 .../frobnitz_with_bom/charts/alpine/README.md | 0 .../charts/alpine/charts/mast1/Chart.yaml | 0 .../charts/alpine/charts/mast1/values.yaml | 0 .../charts/alpine/charts/mast2-0.1.0.tgz | Bin .../charts/alpine/templates/alpine-pod.yaml | 0 .../charts/alpine/values.yaml | 0 .../charts/mariner-4.3.2.tgz | Bin .../testdata/frobnitz_with_bom/docs/README.md | 0 .../testdata/frobnitz_with_bom/icon.svg | 0 .../testdata/frobnitz_with_bom/ignore/me.txt | 0 .../frobnitz_with_bom/templates/template.tpl | 0 .../testdata/frobnitz_with_bom/values.yaml | 0 .../frobnitz_with_dev_null/.helmignore | 0 .../frobnitz_with_dev_null/Chart.lock | 0 .../frobnitz_with_dev_null/Chart.yaml | 0 .../frobnitz_with_dev_null/INSTALL.txt | 0 .../testdata/frobnitz_with_dev_null/LICENSE | 0 .../testdata/frobnitz_with_dev_null/README.md | 0 .../frobnitz_with_dev_null/charts/_ignore_me | 0 .../charts/alpine/Chart.yaml | 0 .../charts/alpine/README.md | 0 .../charts/alpine/charts/mast1/Chart.yaml | 0 .../charts/alpine/charts/mast1/values.yaml | 0 .../charts/alpine/charts/mast2-0.1.0.tgz | Bin .../charts/alpine/templates/alpine-pod.yaml | 0 .../charts/alpine/values.yaml | 0 .../charts/mariner-4.3.2.tgz | Bin .../frobnitz_with_dev_null/docs/README.md | 0 .../testdata/frobnitz_with_dev_null/icon.svg | 0 .../frobnitz_with_dev_null/ignore/me.txt | 0 .../testdata/frobnitz_with_dev_null/null | 0 .../templates/template.tpl | 0 .../frobnitz_with_dev_null/values.yaml | 0 .../frobnitz_with_symlink/.helmignore | 0 .../testdata/frobnitz_with_symlink/Chart.lock | 0 .../testdata/frobnitz_with_symlink/Chart.yaml | 0 .../frobnitz_with_symlink/INSTALL.txt | 0 .../testdata/frobnitz_with_symlink/README.md | 0 .../frobnitz_with_symlink/charts/_ignore_me | 0 .../charts/alpine/Chart.yaml | 0 .../charts/alpine/README.md | 0 .../charts/alpine/charts/mast1/Chart.yaml | 0 .../charts/alpine/charts/mast1/values.yaml | 0 .../charts/alpine/charts/mast2-0.1.0.tgz | Bin .../charts/alpine/templates/alpine-pod.yaml | 0 .../charts/alpine/values.yaml | 0 .../charts/mariner-4.3.2.tgz | Bin .../frobnitz_with_symlink/docs/README.md | 0 .../testdata/frobnitz_with_symlink/icon.svg | 0 .../frobnitz_with_symlink/ignore/me.txt | 0 .../templates/template.tpl | 0 .../frobnitz_with_symlink/values.yaml | 0 pkg/chart/{ => v2}/loader/testdata/genfrob.sh | 0 .../loader/testdata/mariner/Chart.yaml | 0 .../mariner/charts/albatross-0.1.0.tgz | Bin .../mariner/templates/placeholder.tpl | 0 .../loader/testdata/mariner/values.yaml | 0 pkg/chart/{ => v2}/metadata.go | 2 +- pkg/chart/{ => v2}/metadata_test.go | 2 +- pkg/chart/{ => v2}/util/capabilities.go | 0 pkg/chart/{ => v2}/util/capabilities_test.go | 0 pkg/chart/{ => v2}/util/chartfile.go | 2 +- pkg/chart/{ => v2}/util/chartfile_test.go | 2 +- pkg/chart/{ => v2}/util/coalesce.go | 2 +- pkg/chart/{ => v2}/util/coalesce_test.go | 2 +- pkg/chart/{ => v2}/util/compatible.go | 0 pkg/chart/{ => v2}/util/compatible_test.go | 0 pkg/chart/{ => v2}/util/create.go | 4 +-- pkg/chart/{ => v2}/util/create_test.go | 4 +-- pkg/chart/{ => v2}/util/dependencies.go | 2 +- pkg/chart/{ => v2}/util/dependencies_test.go | 4 +-- pkg/chart/{ => v2}/util/doc.go | 2 +- pkg/chart/{ => v2}/util/errors.go | 0 pkg/chart/{ => v2}/util/errors_test.go | 0 pkg/chart/{ => v2}/util/expand.go | 4 +-- pkg/chart/{ => v2}/util/expand_test.go | 0 pkg/chart/{ => v2}/util/jsonschema.go | 2 +- pkg/chart/{ => v2}/util/jsonschema_test.go | 2 +- pkg/chart/{ => v2}/util/save.go | 2 +- pkg/chart/{ => v2}/util/save_test.go | 4 +-- .../{ => v2}/util/testdata/chartfiletest.yaml | 0 .../{ => v2}/util/testdata/coleridge.yaml | 0 .../dependent-chart-alias/.helmignore | 0 .../testdata/dependent-chart-alias/Chart.lock | 0 .../testdata/dependent-chart-alias/Chart.yaml | 0 .../dependent-chart-alias/INSTALL.txt | 0 .../testdata/dependent-chart-alias/LICENSE | 0 .../testdata/dependent-chart-alias/README.md | 0 .../dependent-chart-alias/charts/_ignore_me | 0 .../charts/alpine/Chart.yaml | 0 .../charts/alpine/README.md | 0 .../charts/alpine/charts/mast1/Chart.yaml | 0 .../charts/alpine/charts/mast1/values.yaml | 0 .../charts/alpine/charts/mast2-0.1.0.tgz | Bin .../charts/alpine/templates/alpine-pod.yaml | 0 .../charts/alpine/values.yaml | 0 .../charts/mariner-4.3.2.tgz | Bin .../dependent-chart-alias/docs/README.md | 0 .../testdata/dependent-chart-alias/icon.svg | 0 .../dependent-chart-alias/ignore/me.txt | 0 .../templates/template.tpl | 0 .../dependent-chart-alias/values.yaml | 0 .../dependent-chart-helmignore/.helmignore | 0 .../dependent-chart-helmignore/Chart.yaml | 0 .../charts/.ignore_me | 0 .../charts/_ignore_me | 0 .../charts/alpine/Chart.yaml | 0 .../charts/alpine/README.md | 0 .../charts/alpine/charts/mast1/Chart.yaml | 0 .../charts/alpine/charts/mast1/values.yaml | 0 .../charts/alpine/charts/mast2-0.1.0.tgz | Bin .../charts/alpine/templates/alpine-pod.yaml | 0 .../charts/alpine/values.yaml | 0 .../templates/template.tpl | 0 .../dependent-chart-helmignore/values.yaml | 0 .../.helmignore | 0 .../Chart.yaml | 0 .../INSTALL.txt | 0 .../LICENSE | 0 .../README.md | 0 .../charts/_ignore_me | 0 .../charts/alpine/Chart.yaml | 0 .../charts/alpine/README.md | 0 .../charts/alpine/charts/mast1/Chart.yaml | 0 .../charts/alpine/charts/mast1/values.yaml | 0 .../charts/alpine/charts/mast2-0.1.0.tgz | Bin .../charts/alpine/templates/alpine-pod.yaml | 0 .../charts/alpine/values.yaml | 0 .../charts/mariner-4.3.2.tgz | Bin .../docs/README.md | 0 .../icon.svg | 0 .../ignore/me.txt | 0 .../templates/template.tpl | 0 .../values.yaml | 0 .../.helmignore | 0 .../Chart.yaml | 0 .../INSTALL.txt | 0 .../LICENSE | 0 .../README.md | 0 .../charts/_ignore_me | 0 .../charts/alpine/Chart.yaml | 0 .../charts/alpine/README.md | 0 .../charts/alpine/charts/mast1/Chart.yaml | 0 .../charts/alpine/charts/mast1/values.yaml | 0 .../charts/alpine/charts/mast2-0.1.0.tgz | Bin .../charts/alpine/templates/alpine-pod.yaml | 0 .../charts/alpine/values.yaml | 0 .../charts/mariner-4.3.2.tgz | Bin .../docs/README.md | 0 .../icon.svg | 0 .../ignore/me.txt | 0 .../templates/template.tpl | 0 .../values.yaml | 0 .../.helmignore | 0 .../Chart.yaml | 0 .../INSTALL.txt | 0 .../LICENSE | 0 .../README.md | 0 .../charts/_ignore_me | 0 .../charts/alpine/Chart.yaml | 0 .../charts/alpine/README.md | 0 .../charts/alpine/charts/mast1/Chart.yaml | 0 .../charts/alpine/charts/mast1/values.yaml | 0 .../charts/alpine/charts/mast2-0.1.0.tgz | Bin .../charts/alpine/templates/alpine-pod.yaml | 0 .../charts/alpine/values.yaml | 0 .../charts/mariner-4.3.2.tgz | Bin .../docs/README.md | 0 .../icon.svg | 0 .../ignore/me.txt | 0 .../templates/template.tpl | 0 .../values.yaml | 0 .../{ => v2}/util/testdata/frobnitz-1.2.3.tgz | Bin .../util/testdata/frobnitz/.helmignore | 0 .../util/testdata/frobnitz/Chart.lock | 0 .../util/testdata/frobnitz/Chart.yaml | 0 .../util/testdata/frobnitz/INSTALL.txt | 0 .../{ => v2}/util/testdata/frobnitz/LICENSE | 0 .../{ => v2}/util/testdata/frobnitz/README.md | 0 .../util/testdata/frobnitz/charts/_ignore_me | 0 .../frobnitz/charts/alpine/Chart.yaml | 0 .../testdata/frobnitz/charts/alpine/README.md | 0 .../charts/alpine/charts/mast1/Chart.yaml | 0 .../charts/alpine/charts/mast1/values.yaml | 0 .../charts/alpine/charts/mast2-0.1.0.tgz | Bin .../charts/alpine/templates/alpine-pod.yaml | 0 .../frobnitz/charts/alpine/values.yaml | 0 .../frobnitz/charts/mariner/Chart.yaml | 0 .../mariner/charts/albatross/Chart.yaml | 0 .../mariner/charts/albatross/values.yaml | 0 .../charts/mariner/templates/placeholder.tpl | 0 .../frobnitz/charts/mariner/values.yaml | 0 .../util/testdata/frobnitz/docs/README.md | 0 .../{ => v2}/util/testdata/frobnitz/icon.svg | 0 .../util/testdata/frobnitz/ignore/me.txt | 0 .../testdata/frobnitz/templates/template.tpl | 0 .../util/testdata/frobnitz/values.yaml | 0 .../testdata/frobnitz_backslash-1.2.3.tgz | Bin pkg/chart/{ => v2}/util/testdata/genfrob.sh | 0 .../parent-chart/Chart.lock | 0 .../parent-chart/Chart.yaml | 0 .../parent-chart/charts/dev-v0.1.0.tgz | Bin .../parent-chart/charts/prod-v0.1.0.tgz | Bin .../parent-chart/envs/dev/Chart.yaml | 0 .../parent-chart/envs/dev/values.yaml | 0 .../parent-chart/envs/prod/Chart.yaml | 0 .../parent-chart/envs/prod/values.yaml | 0 .../parent-chart/templates/autoscaler.yaml | 0 .../parent-chart/values.yaml | 0 .../{ => v2}/util/testdata/joonix/Chart.yaml | 0 .../util/testdata/joonix/charts/.gitkeep | 0 .../{ => v2}/util/testdata/subpop/Chart.yaml | 0 .../{ => v2}/util/testdata/subpop/README.md | 0 .../subpop/charts/subchart1/Chart.yaml | 0 .../subchart1/charts/subchartA/Chart.yaml | 0 .../charts/subchartA/templates/service.yaml | 0 .../subchart1/charts/subchartA/values.yaml | 0 .../subchart1/charts/subchartB/Chart.yaml | 0 .../charts/subchartB/templates/service.yaml | 0 .../subchart1/charts/subchartB/values.yaml | 0 .../subpop/charts/subchart1/crds/crdA.yaml | 0 .../charts/subchart1/templates/NOTES.txt | 0 .../charts/subchart1/templates/service.yaml | 0 .../subchart1/templates/subdir/role.yaml | 0 .../templates/subdir/rolebinding.yaml | 0 .../templates/subdir/serviceaccount.yaml | 0 .../subpop/charts/subchart1/values.yaml | 0 .../subpop/charts/subchart2/Chart.yaml | 0 .../subchart2/charts/subchartB/Chart.yaml | 0 .../charts/subchartB/templates/service.yaml | 0 .../subchart2/charts/subchartB/values.yaml | 0 .../subchart2/charts/subchartC/Chart.yaml | 0 .../charts/subchartC/templates/service.yaml | 0 .../subchart2/charts/subchartC/values.yaml | 0 .../charts/subchart2/templates/service.yaml | 0 .../subpop/charts/subchart2/values.yaml | 0 .../util/testdata/subpop/noreqs/Chart.yaml | 0 .../subpop/noreqs/templates/service.yaml | 0 .../util/testdata/subpop/noreqs/values.yaml | 0 .../{ => v2}/util/testdata/subpop/values.yaml | 0 .../testdata/test-values-invalid.schema.json | 0 .../util/testdata/test-values-negative.yaml | 0 .../util/testdata/test-values.schema.json | 0 .../{ => v2}/util/testdata/test-values.yaml | 0 .../three-level-dependent-chart/README.md | 0 .../umbrella/Chart.yaml | 0 .../umbrella/charts/app1/Chart.yaml | 0 .../charts/app1/charts/library/Chart.yaml | 0 .../charts/library/templates/service.yaml | 0 .../charts/app1/charts/library/values.yaml | 0 .../charts/app1/templates/service.yaml | 0 .../umbrella/charts/app1/values.yaml | 0 .../umbrella/charts/app2/Chart.yaml | 0 .../charts/app2/charts/library/Chart.yaml | 0 .../charts/library/templates/service.yaml | 0 .../charts/app2/charts/library/values.yaml | 0 .../charts/app2/templates/service.yaml | 0 .../umbrella/charts/app2/values.yaml | 0 .../umbrella/charts/app3/Chart.yaml | 0 .../charts/app3/charts/library/Chart.yaml | 0 .../charts/library/templates/service.yaml | 0 .../charts/app3/charts/library/values.yaml | 0 .../charts/app3/templates/service.yaml | 0 .../umbrella/charts/app3/values.yaml | 0 .../umbrella/charts/app4/Chart.yaml | 0 .../charts/app4/charts/library/Chart.yaml | 0 .../charts/library/templates/service.yaml | 0 .../charts/app4/charts/library/values.yaml | 0 .../charts/app4/templates/service.yaml | 0 .../umbrella/charts/app4/values.yaml | 0 .../umbrella/values.yaml | 0 pkg/chart/{ => v2}/util/validate_name.go | 0 pkg/chart/{ => v2}/util/validate_name_test.go | 0 pkg/chart/{ => v2}/util/values.go | 2 +- pkg/chart/{ => v2}/util/values_test.go | 2 +- pkg/cli/values/options.go | 2 +- pkg/downloader/manager.go | 6 ++--- pkg/downloader/manager_test.go | 6 ++--- pkg/engine/engine.go | 4 +-- pkg/engine/engine_test.go | 4 +-- pkg/engine/files.go | 2 +- pkg/lint/lint.go | 2 +- pkg/lint/lint_test.go | 2 +- pkg/lint/rules/chartfile.go | 4 +-- pkg/lint/rules/chartfile_test.go | 4 +-- pkg/lint/rules/dependencies.go | 4 +-- pkg/lint/rules/dependencies_test.go | 4 +-- pkg/lint/rules/deprecations.go | 2 +- pkg/lint/rules/template.go | 4 +-- pkg/lint/rules/template_test.go | 4 +-- pkg/lint/rules/values.go | 2 +- pkg/provenance/sign.go | 4 +-- pkg/pusher/ocipusher.go | 2 +- pkg/registry/client.go | 2 +- pkg/registry/util.go | 4 +-- pkg/registry/util_test.go | 2 +- pkg/release/mock.go | 2 +- pkg/release/release.go | 4 ++- pkg/release/util/manifest_sorter.go | 2 +- pkg/repo/chartrepo.go | 2 +- pkg/repo/chartrepo_test.go | 2 +- pkg/repo/index.go | 4 +-- pkg/repo/index_test.go | 2 +- pkg/repo/repotest/server.go | 6 ++--- 456 files changed, 168 insertions(+), 143 deletions(-) rename pkg/chart/{ => v2}/chart.go (99%) rename pkg/chart/{ => v2}/chart_test.go (99%) rename pkg/chart/{ => v2}/dependency.go (99%) rename pkg/chart/{ => v2}/dependency_test.go (98%) create mode 100644 pkg/chart/v2/doc.go rename pkg/chart/{ => v2}/errors.go (98%) rename pkg/chart/{ => v2}/file.go (98%) rename pkg/chart/{ => v2}/fuzz_test.go (98%) rename pkg/chart/{ => v2}/loader/archive.go (99%) rename pkg/chart/{ => v2}/loader/archive_test.go (100%) rename pkg/chart/{ => v2}/loader/directory.go (98%) rename pkg/chart/{ => v2}/loader/load.go (99%) rename pkg/chart/{ => v2}/loader/load_test.go (99%) rename pkg/chart/{ => v2}/loader/testdata/LICENSE (100%) rename pkg/chart/{ => v2}/loader/testdata/albatross/Chart.yaml (100%) rename pkg/chart/{ => v2}/loader/testdata/albatross/values.yaml (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz-1.2.3.tgz (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz.v1.tgz (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz.v1/.helmignore (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz.v1/Chart.lock (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz.v1/Chart.yaml (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz.v1/INSTALL.txt (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz.v1/LICENSE (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz.v1/README.md (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz.v1/charts/_ignore_me (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz.v1/charts/alpine/Chart.yaml (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz.v1/charts/alpine/README.md (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz.v1/charts/alpine/charts/mast1/Chart.yaml (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz.v1/charts/alpine/charts/mast1/values.yaml (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz.v1/charts/alpine/charts/mast2-0.1.0.tgz (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz.v1/charts/alpine/templates/alpine-pod.yaml (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz.v1/charts/alpine/values.yaml (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz.v1/charts/mariner-4.3.2.tgz (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz.v1/docs/README.md (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz.v1/icon.svg (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz.v1/ignore/me.txt (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz.v1/requirements.yaml (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz.v1/templates/template.tpl (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz.v1/values.yaml (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz.v2.reqs/.helmignore (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz.v2.reqs/Chart.yaml (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz.v2.reqs/INSTALL.txt (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz.v2.reqs/LICENSE (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz.v2.reqs/README.md (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz.v2.reqs/charts/_ignore_me (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz.v2.reqs/charts/alpine/Chart.yaml (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz.v2.reqs/charts/alpine/README.md (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz.v2.reqs/charts/alpine/charts/mast1/Chart.yaml (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz.v2.reqs/charts/alpine/charts/mast1/values.yaml (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz.v2.reqs/charts/alpine/charts/mast2-0.1.0.tgz (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz.v2.reqs/charts/alpine/templates/alpine-pod.yaml (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz.v2.reqs/charts/alpine/values.yaml (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz.v2.reqs/charts/mariner-4.3.2.tgz (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz.v2.reqs/docs/README.md (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz.v2.reqs/icon.svg (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz.v2.reqs/ignore/me.txt (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz.v2.reqs/requirements.yaml (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz.v2.reqs/templates/template.tpl (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz.v2.reqs/values.yaml (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz/.helmignore (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz/Chart.lock (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz/Chart.yaml (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz/INSTALL.txt (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz/LICENSE (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz/README.md (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz/charts/_ignore_me (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz/charts/alpine/Chart.yaml (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz/charts/alpine/README.md (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz/charts/alpine/charts/mast1/Chart.yaml (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz/charts/alpine/charts/mast1/values.yaml (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz/charts/alpine/charts/mast2-0.1.0.tgz (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz/charts/alpine/templates/alpine-pod.yaml (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz/charts/alpine/values.yaml (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz/charts/mariner-4.3.2.tgz (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz/docs/README.md (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz/icon.svg (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz/ignore/me.txt (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz/templates/template.tpl (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz/values.yaml (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_backslash-1.2.3.tgz (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_backslash/.helmignore (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_backslash/Chart.lock (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_backslash/Chart.yaml (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_backslash/INSTALL.txt (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_backslash/LICENSE (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_backslash/README.md (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_backslash/charts/_ignore_me (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_backslash/charts/alpine/Chart.yaml (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_backslash/charts/alpine/README.md (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_backslash/charts/alpine/charts/mast1/Chart.yaml (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_backslash/charts/alpine/charts/mast1/values.yaml (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_backslash/charts/alpine/charts/mast2-0.1.0.tgz (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_backslash/charts/alpine/templates/alpine-pod.yaml (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_backslash/charts/alpine/values.yaml (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_backslash/charts/mariner-4.3.2.tgz (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_backslash/docs/README.md (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_backslash/icon.svg (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_backslash/ignore/me.txt (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_backslash/templates/template.tpl (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_backslash/values.yaml (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_bom.tgz (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_bom/.helmignore (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_bom/Chart.lock (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_bom/Chart.yaml (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_bom/INSTALL.txt (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_bom/LICENSE (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_bom/README.md (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_bom/charts/_ignore_me (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_bom/charts/alpine/Chart.yaml (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_bom/charts/alpine/README.md (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_bom/charts/alpine/charts/mast1/Chart.yaml (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_bom/charts/alpine/charts/mast1/values.yaml (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_bom/charts/alpine/charts/mast2-0.1.0.tgz (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_bom/charts/alpine/templates/alpine-pod.yaml (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_bom/charts/alpine/values.yaml (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_bom/charts/mariner-4.3.2.tgz (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_bom/docs/README.md (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_bom/icon.svg (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_bom/ignore/me.txt (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_bom/templates/template.tpl (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_bom/values.yaml (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_dev_null/.helmignore (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_dev_null/Chart.lock (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_dev_null/Chart.yaml (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_dev_null/INSTALL.txt (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_dev_null/LICENSE (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_dev_null/README.md (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_dev_null/charts/_ignore_me (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_dev_null/charts/alpine/Chart.yaml (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_dev_null/charts/alpine/README.md (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_dev_null/charts/alpine/charts/mast1/Chart.yaml (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_dev_null/charts/alpine/charts/mast1/values.yaml (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_dev_null/charts/alpine/charts/mast2-0.1.0.tgz (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_dev_null/charts/alpine/templates/alpine-pod.yaml (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_dev_null/charts/alpine/values.yaml (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_dev_null/charts/mariner-4.3.2.tgz (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_dev_null/docs/README.md (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_dev_null/icon.svg (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_dev_null/ignore/me.txt (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_dev_null/null (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_dev_null/templates/template.tpl (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_dev_null/values.yaml (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_symlink/.helmignore (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_symlink/Chart.lock (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_symlink/Chart.yaml (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_symlink/INSTALL.txt (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_symlink/README.md (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_symlink/charts/_ignore_me (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_symlink/charts/alpine/Chart.yaml (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_symlink/charts/alpine/README.md (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_symlink/charts/alpine/charts/mast1/Chart.yaml (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_symlink/charts/alpine/charts/mast1/values.yaml (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_symlink/charts/alpine/charts/mast2-0.1.0.tgz (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_symlink/charts/alpine/templates/alpine-pod.yaml (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_symlink/charts/alpine/values.yaml (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_symlink/charts/mariner-4.3.2.tgz (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_symlink/docs/README.md (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_symlink/icon.svg (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_symlink/ignore/me.txt (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_symlink/templates/template.tpl (100%) rename pkg/chart/{ => v2}/loader/testdata/frobnitz_with_symlink/values.yaml (100%) rename pkg/chart/{ => v2}/loader/testdata/genfrob.sh (100%) rename pkg/chart/{ => v2}/loader/testdata/mariner/Chart.yaml (100%) rename pkg/chart/{ => v2}/loader/testdata/mariner/charts/albatross-0.1.0.tgz (100%) rename pkg/chart/{ => v2}/loader/testdata/mariner/templates/placeholder.tpl (100%) rename pkg/chart/{ => v2}/loader/testdata/mariner/values.yaml (100%) rename pkg/chart/{ => v2}/metadata.go (99%) rename pkg/chart/{ => v2}/metadata_test.go (99%) rename pkg/chart/{ => v2}/util/capabilities.go (100%) rename pkg/chart/{ => v2}/util/capabilities_test.go (100%) rename pkg/chart/{ => v2}/util/chartfile.go (98%) rename pkg/chart/{ => v2}/util/chartfile_test.go (98%) rename pkg/chart/{ => v2}/util/coalesce.go (99%) rename pkg/chart/{ => v2}/util/coalesce_test.go (99%) rename pkg/chart/{ => v2}/util/compatible.go (100%) rename pkg/chart/{ => v2}/util/compatible_test.go (100%) rename pkg/chart/{ => v2}/util/create.go (99%) rename pkg/chart/{ => v2}/util/create_test.go (98%) rename pkg/chart/{ => v2}/util/dependencies.go (99%) rename pkg/chart/{ => v2}/util/dependencies_test.go (99%) rename pkg/chart/{ => v2}/util/doc.go (95%) rename pkg/chart/{ => v2}/util/errors.go (100%) rename pkg/chart/{ => v2}/util/errors_test.go (100%) rename pkg/chart/{ => v2}/util/expand.go (96%) rename pkg/chart/{ => v2}/util/expand_test.go (100%) rename pkg/chart/{ => v2}/util/jsonschema.go (98%) rename pkg/chart/{ => v2}/util/jsonschema_test.go (99%) rename pkg/chart/{ => v2}/util/save.go (99%) rename pkg/chart/{ => v2}/util/save_test.go (98%) rename pkg/chart/{ => v2}/util/testdata/chartfiletest.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/coleridge.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-alias/.helmignore (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-alias/Chart.lock (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-alias/Chart.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-alias/INSTALL.txt (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-alias/LICENSE (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-alias/README.md (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-alias/charts/_ignore_me (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-alias/charts/alpine/Chart.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-alias/charts/alpine/README.md (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-alias/charts/alpine/charts/mast1/Chart.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-alias/charts/alpine/charts/mast1/values.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-alias/charts/alpine/charts/mast2-0.1.0.tgz (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-alias/charts/alpine/templates/alpine-pod.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-alias/charts/alpine/values.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-alias/charts/mariner-4.3.2.tgz (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-alias/docs/README.md (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-alias/icon.svg (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-alias/ignore/me.txt (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-alias/templates/template.tpl (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-alias/values.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-helmignore/.helmignore (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-helmignore/Chart.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-helmignore/charts/.ignore_me (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-helmignore/charts/_ignore_me (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-helmignore/charts/alpine/Chart.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-helmignore/charts/alpine/README.md (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-helmignore/charts/alpine/charts/mast1/Chart.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-helmignore/charts/alpine/charts/mast1/values.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-helmignore/charts/alpine/charts/mast2-0.1.0.tgz (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-helmignore/charts/alpine/templates/alpine-pod.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-helmignore/charts/alpine/values.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-helmignore/templates/template.tpl (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-helmignore/values.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-no-requirements-yaml/.helmignore (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-no-requirements-yaml/Chart.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-no-requirements-yaml/INSTALL.txt (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-no-requirements-yaml/LICENSE (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-no-requirements-yaml/README.md (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-no-requirements-yaml/charts/_ignore_me (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-no-requirements-yaml/charts/alpine/Chart.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-no-requirements-yaml/charts/alpine/README.md (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-no-requirements-yaml/charts/alpine/charts/mast1/Chart.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-no-requirements-yaml/charts/alpine/charts/mast1/values.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-no-requirements-yaml/charts/alpine/charts/mast2-0.1.0.tgz (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-no-requirements-yaml/charts/alpine/templates/alpine-pod.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-no-requirements-yaml/charts/alpine/values.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-no-requirements-yaml/charts/mariner-4.3.2.tgz (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-no-requirements-yaml/docs/README.md (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-no-requirements-yaml/icon.svg (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-no-requirements-yaml/ignore/me.txt (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-no-requirements-yaml/templates/template.tpl (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-no-requirements-yaml/values.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-with-all-in-requirements-yaml/.helmignore (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-with-all-in-requirements-yaml/Chart.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-with-all-in-requirements-yaml/INSTALL.txt (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-with-all-in-requirements-yaml/LICENSE (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-with-all-in-requirements-yaml/README.md (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/_ignore_me (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/Chart.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/README.md (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/charts/mast1/Chart.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/charts/mast1/values.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/charts/mast2-0.1.0.tgz (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/templates/alpine-pod.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/values.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/mariner-4.3.2.tgz (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-with-all-in-requirements-yaml/docs/README.md (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-with-all-in-requirements-yaml/icon.svg (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-with-all-in-requirements-yaml/ignore/me.txt (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-with-all-in-requirements-yaml/templates/template.tpl (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-with-all-in-requirements-yaml/values.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-with-mixed-requirements-yaml/.helmignore (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-with-mixed-requirements-yaml/Chart.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-with-mixed-requirements-yaml/INSTALL.txt (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-with-mixed-requirements-yaml/LICENSE (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-with-mixed-requirements-yaml/README.md (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/_ignore_me (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/Chart.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/README.md (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/charts/mast1/Chart.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/charts/mast1/values.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/charts/mast2-0.1.0.tgz (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/templates/alpine-pod.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/values.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/mariner-4.3.2.tgz (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-with-mixed-requirements-yaml/docs/README.md (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-with-mixed-requirements-yaml/icon.svg (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-with-mixed-requirements-yaml/ignore/me.txt (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-with-mixed-requirements-yaml/templates/template.tpl (100%) rename pkg/chart/{ => v2}/util/testdata/dependent-chart-with-mixed-requirements-yaml/values.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/frobnitz-1.2.3.tgz (100%) rename pkg/chart/{ => v2}/util/testdata/frobnitz/.helmignore (100%) rename pkg/chart/{ => v2}/util/testdata/frobnitz/Chart.lock (100%) rename pkg/chart/{ => v2}/util/testdata/frobnitz/Chart.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/frobnitz/INSTALL.txt (100%) rename pkg/chart/{ => v2}/util/testdata/frobnitz/LICENSE (100%) rename pkg/chart/{ => v2}/util/testdata/frobnitz/README.md (100%) rename pkg/chart/{ => v2}/util/testdata/frobnitz/charts/_ignore_me (100%) rename pkg/chart/{ => v2}/util/testdata/frobnitz/charts/alpine/Chart.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/frobnitz/charts/alpine/README.md (100%) rename pkg/chart/{ => v2}/util/testdata/frobnitz/charts/alpine/charts/mast1/Chart.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/frobnitz/charts/alpine/charts/mast1/values.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/frobnitz/charts/alpine/charts/mast2-0.1.0.tgz (100%) rename pkg/chart/{ => v2}/util/testdata/frobnitz/charts/alpine/templates/alpine-pod.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/frobnitz/charts/alpine/values.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/frobnitz/charts/mariner/Chart.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/frobnitz/charts/mariner/charts/albatross/Chart.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/frobnitz/charts/mariner/charts/albatross/values.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/frobnitz/charts/mariner/templates/placeholder.tpl (100%) rename pkg/chart/{ => v2}/util/testdata/frobnitz/charts/mariner/values.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/frobnitz/docs/README.md (100%) rename pkg/chart/{ => v2}/util/testdata/frobnitz/icon.svg (100%) rename pkg/chart/{ => v2}/util/testdata/frobnitz/ignore/me.txt (100%) rename pkg/chart/{ => v2}/util/testdata/frobnitz/templates/template.tpl (100%) rename pkg/chart/{ => v2}/util/testdata/frobnitz/values.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/frobnitz_backslash-1.2.3.tgz (100%) rename pkg/chart/{ => v2}/util/testdata/genfrob.sh (100%) rename pkg/chart/{ => v2}/util/testdata/import-values-from-enabled-subchart/parent-chart/Chart.lock (100%) rename pkg/chart/{ => v2}/util/testdata/import-values-from-enabled-subchart/parent-chart/Chart.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/import-values-from-enabled-subchart/parent-chart/charts/dev-v0.1.0.tgz (100%) rename pkg/chart/{ => v2}/util/testdata/import-values-from-enabled-subchart/parent-chart/charts/prod-v0.1.0.tgz (100%) rename pkg/chart/{ => v2}/util/testdata/import-values-from-enabled-subchart/parent-chart/envs/dev/Chart.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/import-values-from-enabled-subchart/parent-chart/envs/dev/values.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/import-values-from-enabled-subchart/parent-chart/envs/prod/Chart.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/import-values-from-enabled-subchart/parent-chart/envs/prod/values.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/import-values-from-enabled-subchart/parent-chart/templates/autoscaler.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/import-values-from-enabled-subchart/parent-chart/values.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/joonix/Chart.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/joonix/charts/.gitkeep (100%) rename pkg/chart/{ => v2}/util/testdata/subpop/Chart.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/subpop/README.md (100%) rename pkg/chart/{ => v2}/util/testdata/subpop/charts/subchart1/Chart.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/subpop/charts/subchart1/charts/subchartA/Chart.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/subpop/charts/subchart1/charts/subchartA/templates/service.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/subpop/charts/subchart1/charts/subchartA/values.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/subpop/charts/subchart1/charts/subchartB/Chart.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/subpop/charts/subchart1/charts/subchartB/templates/service.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/subpop/charts/subchart1/charts/subchartB/values.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/subpop/charts/subchart1/crds/crdA.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/subpop/charts/subchart1/templates/NOTES.txt (100%) rename pkg/chart/{ => v2}/util/testdata/subpop/charts/subchart1/templates/service.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/subpop/charts/subchart1/templates/subdir/role.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/subpop/charts/subchart1/templates/subdir/rolebinding.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/subpop/charts/subchart1/templates/subdir/serviceaccount.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/subpop/charts/subchart1/values.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/subpop/charts/subchart2/Chart.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/subpop/charts/subchart2/charts/subchartB/Chart.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/subpop/charts/subchart2/charts/subchartB/templates/service.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/subpop/charts/subchart2/charts/subchartB/values.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/subpop/charts/subchart2/charts/subchartC/Chart.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/subpop/charts/subchart2/charts/subchartC/templates/service.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/subpop/charts/subchart2/charts/subchartC/values.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/subpop/charts/subchart2/templates/service.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/subpop/charts/subchart2/values.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/subpop/noreqs/Chart.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/subpop/noreqs/templates/service.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/subpop/noreqs/values.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/subpop/values.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/test-values-invalid.schema.json (100%) rename pkg/chart/{ => v2}/util/testdata/test-values-negative.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/test-values.schema.json (100%) rename pkg/chart/{ => v2}/util/testdata/test-values.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/three-level-dependent-chart/README.md (100%) rename pkg/chart/{ => v2}/util/testdata/three-level-dependent-chart/umbrella/Chart.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/three-level-dependent-chart/umbrella/charts/app1/Chart.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/three-level-dependent-chart/umbrella/charts/app1/charts/library/Chart.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/three-level-dependent-chart/umbrella/charts/app1/charts/library/templates/service.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/three-level-dependent-chart/umbrella/charts/app1/charts/library/values.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/three-level-dependent-chart/umbrella/charts/app1/templates/service.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/three-level-dependent-chart/umbrella/charts/app1/values.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/three-level-dependent-chart/umbrella/charts/app2/Chart.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/three-level-dependent-chart/umbrella/charts/app2/charts/library/Chart.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/three-level-dependent-chart/umbrella/charts/app2/charts/library/templates/service.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/three-level-dependent-chart/umbrella/charts/app2/charts/library/values.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/three-level-dependent-chart/umbrella/charts/app2/templates/service.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/three-level-dependent-chart/umbrella/charts/app2/values.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/three-level-dependent-chart/umbrella/charts/app3/Chart.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/three-level-dependent-chart/umbrella/charts/app3/charts/library/Chart.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/three-level-dependent-chart/umbrella/charts/app3/charts/library/templates/service.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/three-level-dependent-chart/umbrella/charts/app3/charts/library/values.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/three-level-dependent-chart/umbrella/charts/app3/templates/service.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/three-level-dependent-chart/umbrella/charts/app3/values.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/three-level-dependent-chart/umbrella/charts/app4/Chart.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/three-level-dependent-chart/umbrella/charts/app4/charts/library/Chart.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/three-level-dependent-chart/umbrella/charts/app4/charts/library/templates/service.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/three-level-dependent-chart/umbrella/charts/app4/charts/library/values.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/three-level-dependent-chart/umbrella/charts/app4/templates/service.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/three-level-dependent-chart/umbrella/charts/app4/values.yaml (100%) rename pkg/chart/{ => v2}/util/testdata/three-level-dependent-chart/umbrella/values.yaml (100%) rename pkg/chart/{ => v2}/util/validate_name.go (100%) rename pkg/chart/{ => v2}/util/validate_name_test.go (100%) rename pkg/chart/{ => v2}/util/values.go (99%) rename pkg/chart/{ => v2}/util/values_test.go (99%) diff --git a/Makefile b/Makefile index d2c82b033..21144cf5a 100644 --- a/Makefile +++ b/Makefile @@ -65,8 +65,8 @@ K8S_MODULES_MINOR_VER=$(word 2,$(K8S_MODULES_VER)) LDFLAGS += -X helm.sh/helm/v4/pkg/lint/rules.k8sVersionMajor=$(K8S_MODULES_MAJOR_VER) LDFLAGS += -X helm.sh/helm/v4/pkg/lint/rules.k8sVersionMinor=$(K8S_MODULES_MINOR_VER) -LDFLAGS += -X helm.sh/helm/v4/pkg/chart/util.k8sVersionMajor=$(K8S_MODULES_MAJOR_VER) -LDFLAGS += -X helm.sh/helm/v4/pkg/chart/util.k8sVersionMinor=$(K8S_MODULES_MINOR_VER) +LDFLAGS += -X helm.sh/helm/v4/pkg/chart/v2/util.k8sVersionMajor=$(K8S_MODULES_MAJOR_VER) +LDFLAGS += -X helm.sh/helm/v4/pkg/chart/v2/util.k8sVersionMinor=$(K8S_MODULES_MINOR_VER) .PHONY: all all: build diff --git a/cmd/helm/completion_test.go b/cmd/helm/completion_test.go index 4dd427232..3d8383519 100644 --- a/cmd/helm/completion_test.go +++ b/cmd/helm/completion_test.go @@ -21,7 +21,7 @@ import ( "strings" "testing" - "helm.sh/helm/v4/pkg/chart" + chart "helm.sh/helm/v4/pkg/chart/v2" "helm.sh/helm/v4/pkg/release" ) diff --git a/cmd/helm/create.go b/cmd/helm/create.go index a18f2c915..11c208231 100644 --- a/cmd/helm/create.go +++ b/cmd/helm/create.go @@ -24,8 +24,8 @@ import ( "github.com/spf13/cobra" "helm.sh/helm/v4/cmd/helm/require" - "helm.sh/helm/v4/pkg/chart" - chartutil "helm.sh/helm/v4/pkg/chart/util" + chart "helm.sh/helm/v4/pkg/chart/v2" + chartutil "helm.sh/helm/v4/pkg/chart/v2/util" "helm.sh/helm/v4/pkg/helmpath" ) diff --git a/cmd/helm/create_test.go b/cmd/helm/create_test.go index 76fce804c..a8361329e 100644 --- a/cmd/helm/create_test.go +++ b/cmd/helm/create_test.go @@ -23,9 +23,9 @@ import ( "testing" "helm.sh/helm/v4/internal/test/ensure" - "helm.sh/helm/v4/pkg/chart" - "helm.sh/helm/v4/pkg/chart/loader" - chartutil "helm.sh/helm/v4/pkg/chart/util" + chart "helm.sh/helm/v4/pkg/chart/v2" + "helm.sh/helm/v4/pkg/chart/v2/loader" + chartutil "helm.sh/helm/v4/pkg/chart/v2/util" "helm.sh/helm/v4/pkg/helmpath" ) diff --git a/cmd/helm/dependency_build_test.go b/cmd/helm/dependency_build_test.go index 76c01d911..022621fe4 100644 --- a/cmd/helm/dependency_build_test.go +++ b/cmd/helm/dependency_build_test.go @@ -22,7 +22,7 @@ import ( "strings" "testing" - chartutil "helm.sh/helm/v4/pkg/chart/util" + chartutil "helm.sh/helm/v4/pkg/chart/v2/util" "helm.sh/helm/v4/pkg/provenance" "helm.sh/helm/v4/pkg/repo" "helm.sh/helm/v4/pkg/repo/repotest" diff --git a/cmd/helm/dependency_update_test.go b/cmd/helm/dependency_update_test.go index 0732ba7b5..855675f78 100644 --- a/cmd/helm/dependency_update_test.go +++ b/cmd/helm/dependency_update_test.go @@ -23,8 +23,8 @@ import ( "testing" "helm.sh/helm/v4/internal/test/ensure" - "helm.sh/helm/v4/pkg/chart" - chartutil "helm.sh/helm/v4/pkg/chart/util" + chart "helm.sh/helm/v4/pkg/chart/v2" + chartutil "helm.sh/helm/v4/pkg/chart/v2/util" "helm.sh/helm/v4/pkg/helmpath" "helm.sh/helm/v4/pkg/provenance" "helm.sh/helm/v4/pkg/repo" diff --git a/cmd/helm/flags_test.go b/cmd/helm/flags_test.go index 295f55022..3a9d7e6ef 100644 --- a/cmd/helm/flags_test.go +++ b/cmd/helm/flags_test.go @@ -20,7 +20,7 @@ import ( "fmt" "testing" - "helm.sh/helm/v4/pkg/chart" + chart "helm.sh/helm/v4/pkg/chart/v2" "helm.sh/helm/v4/pkg/release" helmtime "helm.sh/helm/v4/pkg/time" ) diff --git a/cmd/helm/helm_test.go b/cmd/helm/helm_test.go index e7a05aecf..cfffa6dc7 100644 --- a/cmd/helm/helm_test.go +++ b/cmd/helm/helm_test.go @@ -30,7 +30,7 @@ import ( "helm.sh/helm/v4/internal/test" "helm.sh/helm/v4/pkg/action" - chartutil "helm.sh/helm/v4/pkg/chart/util" + chartutil "helm.sh/helm/v4/pkg/chart/v2/util" "helm.sh/helm/v4/pkg/cli" kubefake "helm.sh/helm/v4/pkg/kube/fake" "helm.sh/helm/v4/pkg/release" diff --git a/cmd/helm/history.go b/cmd/helm/history.go index 2c929c161..a47f97688 100644 --- a/cmd/helm/history.go +++ b/cmd/helm/history.go @@ -27,7 +27,7 @@ import ( "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" - "helm.sh/helm/v4/pkg/chart" + chart "helm.sh/helm/v4/pkg/chart/v2" "helm.sh/helm/v4/pkg/cli/output" "helm.sh/helm/v4/pkg/release" releaseutil "helm.sh/helm/v4/pkg/release/util" diff --git a/cmd/helm/install.go b/cmd/helm/install.go index fe09dfc53..12f87cd20 100644 --- a/cmd/helm/install.go +++ b/cmd/helm/install.go @@ -32,8 +32,8 @@ import ( "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" - "helm.sh/helm/v4/pkg/chart" - "helm.sh/helm/v4/pkg/chart/loader" + chart "helm.sh/helm/v4/pkg/chart/v2" + "helm.sh/helm/v4/pkg/chart/v2/loader" "helm.sh/helm/v4/pkg/cli/output" "helm.sh/helm/v4/pkg/cli/values" "helm.sh/helm/v4/pkg/downloader" diff --git a/cmd/helm/lint.go b/cmd/helm/lint.go index 3e37922b2..279c5d34a 100644 --- a/cmd/helm/lint.go +++ b/cmd/helm/lint.go @@ -27,7 +27,7 @@ import ( "github.com/spf13/cobra" "helm.sh/helm/v4/pkg/action" - chartutil "helm.sh/helm/v4/pkg/chart/util" + chartutil "helm.sh/helm/v4/pkg/chart/v2/util" "helm.sh/helm/v4/pkg/cli/values" "helm.sh/helm/v4/pkg/getter" "helm.sh/helm/v4/pkg/lint/support" diff --git a/cmd/helm/list_test.go b/cmd/helm/list_test.go index 01b6d7490..6a462ee28 100644 --- a/cmd/helm/list_test.go +++ b/cmd/helm/list_test.go @@ -19,7 +19,7 @@ package main import ( "testing" - "helm.sh/helm/v4/pkg/chart" + chart "helm.sh/helm/v4/pkg/chart/v2" "helm.sh/helm/v4/pkg/release" "helm.sh/helm/v4/pkg/time" ) diff --git a/cmd/helm/package_test.go b/cmd/helm/package_test.go index 107928765..b86bae294 100644 --- a/cmd/helm/package_test.go +++ b/cmd/helm/package_test.go @@ -23,8 +23,8 @@ import ( "strings" "testing" - "helm.sh/helm/v4/pkg/chart" - "helm.sh/helm/v4/pkg/chart/loader" + chart "helm.sh/helm/v4/pkg/chart/v2" + "helm.sh/helm/v4/pkg/chart/v2/loader" ) func TestPackage(t *testing.T) { diff --git a/cmd/helm/rollback_test.go b/cmd/helm/rollback_test.go index a94327e07..88dbf6524 100644 --- a/cmd/helm/rollback_test.go +++ b/cmd/helm/rollback_test.go @@ -21,7 +21,7 @@ import ( "reflect" "testing" - "helm.sh/helm/v4/pkg/chart" + chart "helm.sh/helm/v4/pkg/chart/v2" "helm.sh/helm/v4/pkg/release" ) diff --git a/cmd/helm/search/search_test.go b/cmd/helm/search/search_test.go index 175491b36..7a4ba786b 100644 --- a/cmd/helm/search/search_test.go +++ b/cmd/helm/search/search_test.go @@ -20,7 +20,7 @@ import ( "strings" "testing" - "helm.sh/helm/v4/pkg/chart" + chart "helm.sh/helm/v4/pkg/chart/v2" "helm.sh/helm/v4/pkg/repo" ) diff --git a/cmd/helm/status.go b/cmd/helm/status.go index fd3e4ce14..727c3df9e 100644 --- a/cmd/helm/status.go +++ b/cmd/helm/status.go @@ -30,7 +30,7 @@ import ( "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" - chartutil "helm.sh/helm/v4/pkg/chart/util" + chartutil "helm.sh/helm/v4/pkg/chart/v2/util" "helm.sh/helm/v4/pkg/cli/output" "helm.sh/helm/v4/pkg/release" ) diff --git a/cmd/helm/status_test.go b/cmd/helm/status_test.go index 1973fe068..7e51849b1 100644 --- a/cmd/helm/status_test.go +++ b/cmd/helm/status_test.go @@ -20,7 +20,7 @@ import ( "testing" "time" - "helm.sh/helm/v4/pkg/chart" + chart "helm.sh/helm/v4/pkg/chart/v2" "helm.sh/helm/v4/pkg/release" helmtime "helm.sh/helm/v4/pkg/time" ) diff --git a/cmd/helm/template.go b/cmd/helm/template.go index 212664dc8..c41373337 100644 --- a/cmd/helm/template.go +++ b/cmd/helm/template.go @@ -34,7 +34,7 @@ import ( "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" - chartutil "helm.sh/helm/v4/pkg/chart/util" + chartutil "helm.sh/helm/v4/pkg/chart/v2/util" "helm.sh/helm/v4/pkg/cli/values" releaseutil "helm.sh/helm/v4/pkg/release/util" ) diff --git a/cmd/helm/upgrade.go b/cmd/helm/upgrade.go index 6684f9ebf..7d6cb33ec 100644 --- a/cmd/helm/upgrade.go +++ b/cmd/helm/upgrade.go @@ -31,7 +31,7 @@ import ( "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" - "helm.sh/helm/v4/pkg/chart/loader" + "helm.sh/helm/v4/pkg/chart/v2/loader" "helm.sh/helm/v4/pkg/cli/output" "helm.sh/helm/v4/pkg/cli/values" "helm.sh/helm/v4/pkg/downloader" diff --git a/cmd/helm/upgrade_test.go b/cmd/helm/upgrade_test.go index f97a4a26b..595ca9fc2 100644 --- a/cmd/helm/upgrade_test.go +++ b/cmd/helm/upgrade_test.go @@ -24,9 +24,9 @@ import ( "strings" "testing" - "helm.sh/helm/v4/pkg/chart" - "helm.sh/helm/v4/pkg/chart/loader" - chartutil "helm.sh/helm/v4/pkg/chart/util" + chart "helm.sh/helm/v4/pkg/chart/v2" + "helm.sh/helm/v4/pkg/chart/v2/loader" + chartutil "helm.sh/helm/v4/pkg/chart/v2/util" "helm.sh/helm/v4/pkg/release" ) diff --git a/internal/monocular/search.go b/internal/monocular/search.go index d6d454653..6912be2ce 100644 --- a/internal/monocular/search.go +++ b/internal/monocular/search.go @@ -25,7 +25,7 @@ import ( "time" "helm.sh/helm/v4/internal/version" - "helm.sh/helm/v4/pkg/chart" + chart "helm.sh/helm/v4/pkg/chart/v2" ) // SearchPath is the url path to the search API in monocular. diff --git a/internal/resolver/resolver.go b/internal/resolver/resolver.go index 74348176d..42c9de3b7 100644 --- a/internal/resolver/resolver.go +++ b/internal/resolver/resolver.go @@ -27,8 +27,8 @@ import ( "github.com/Masterminds/semver/v3" "github.com/pkg/errors" - "helm.sh/helm/v4/pkg/chart" - "helm.sh/helm/v4/pkg/chart/loader" + chart "helm.sh/helm/v4/pkg/chart/v2" + "helm.sh/helm/v4/pkg/chart/v2/loader" "helm.sh/helm/v4/pkg/helmpath" "helm.sh/helm/v4/pkg/provenance" "helm.sh/helm/v4/pkg/registry" diff --git a/internal/resolver/resolver_test.go b/internal/resolver/resolver_test.go index f7ea06fdf..1e33837a9 100644 --- a/internal/resolver/resolver_test.go +++ b/internal/resolver/resolver_test.go @@ -19,7 +19,7 @@ import ( "runtime" "testing" - "helm.sh/helm/v4/pkg/chart" + chart "helm.sh/helm/v4/pkg/chart/v2" "helm.sh/helm/v4/pkg/registry" ) diff --git a/pkg/action/action.go b/pkg/action/action.go index eeaebc15f..d91ccab51 100644 --- a/pkg/action/action.go +++ b/pkg/action/action.go @@ -33,8 +33,8 @@ import ( "k8s.io/client-go/kubernetes" "k8s.io/client-go/rest" - "helm.sh/helm/v4/pkg/chart" - chartutil "helm.sh/helm/v4/pkg/chart/util" + chart "helm.sh/helm/v4/pkg/chart/v2" + chartutil "helm.sh/helm/v4/pkg/chart/v2/util" "helm.sh/helm/v4/pkg/engine" "helm.sh/helm/v4/pkg/kube" "helm.sh/helm/v4/pkg/postrender" diff --git a/pkg/action/action_test.go b/pkg/action/action_test.go index aa5d589f8..4c78ef6c1 100644 --- a/pkg/action/action_test.go +++ b/pkg/action/action_test.go @@ -24,8 +24,8 @@ import ( "github.com/stretchr/testify/assert" fakeclientset "k8s.io/client-go/kubernetes/fake" - "helm.sh/helm/v4/pkg/chart" - chartutil "helm.sh/helm/v4/pkg/chart/util" + chart "helm.sh/helm/v4/pkg/chart/v2" + chartutil "helm.sh/helm/v4/pkg/chart/v2/util" kubefake "helm.sh/helm/v4/pkg/kube/fake" "helm.sh/helm/v4/pkg/registry" "helm.sh/helm/v4/pkg/release" diff --git a/pkg/action/dependency.go b/pkg/action/dependency.go index e0ff56cce..03c370c8e 100644 --- a/pkg/action/dependency.go +++ b/pkg/action/dependency.go @@ -26,8 +26,8 @@ import ( "github.com/Masterminds/semver/v3" "github.com/gosuri/uitable" - "helm.sh/helm/v4/pkg/chart" - "helm.sh/helm/v4/pkg/chart/loader" + chart "helm.sh/helm/v4/pkg/chart/v2" + "helm.sh/helm/v4/pkg/chart/v2/loader" ) // Dependency is the action for building a given chart's dependency tree. diff --git a/pkg/action/dependency_test.go b/pkg/action/dependency_test.go index 38f2668ae..5be7bf5a9 100644 --- a/pkg/action/dependency_test.go +++ b/pkg/action/dependency_test.go @@ -25,8 +25,8 @@ import ( "github.com/stretchr/testify/assert" "helm.sh/helm/v4/internal/test" - "helm.sh/helm/v4/pkg/chart" - chartutil "helm.sh/helm/v4/pkg/chart/util" + chart "helm.sh/helm/v4/pkg/chart/v2" + chartutil "helm.sh/helm/v4/pkg/chart/v2/util" ) func TestList(t *testing.T) { diff --git a/pkg/action/get_metadata.go b/pkg/action/get_metadata.go index 190e9ccb9..e760ae4d1 100644 --- a/pkg/action/get_metadata.go +++ b/pkg/action/get_metadata.go @@ -21,7 +21,7 @@ import ( "strings" "time" - "helm.sh/helm/v4/pkg/chart" + chart "helm.sh/helm/v4/pkg/chart/v2" ) // GetMetadata is the action for checking a given release's metadata. diff --git a/pkg/action/get_values.go b/pkg/action/get_values.go index 21253b7aa..18b8b4838 100644 --- a/pkg/action/get_values.go +++ b/pkg/action/get_values.go @@ -17,7 +17,7 @@ limitations under the License. package action import ( - chartutil "helm.sh/helm/v4/pkg/chart/util" + chartutil "helm.sh/helm/v4/pkg/chart/v2/util" ) // GetValues is the action for checking a given release's values. diff --git a/pkg/action/history.go b/pkg/action/history.go index 1c5cfa86f..e5ac16bfe 100644 --- a/pkg/action/history.go +++ b/pkg/action/history.go @@ -19,7 +19,7 @@ package action import ( "github.com/pkg/errors" - chartutil "helm.sh/helm/v4/pkg/chart/util" + chartutil "helm.sh/helm/v4/pkg/chart/v2/util" "helm.sh/helm/v4/pkg/release" ) diff --git a/pkg/action/hooks_test.go b/pkg/action/hooks_test.go index 0f4a9be34..b39ffe022 100644 --- a/pkg/action/hooks_test.go +++ b/pkg/action/hooks_test.go @@ -24,7 +24,7 @@ import ( "github.com/stretchr/testify/assert" - "helm.sh/helm/v4/pkg/chart" + chart "helm.sh/helm/v4/pkg/chart/v2" kubefake "helm.sh/helm/v4/pkg/kube/fake" "helm.sh/helm/v4/pkg/release" ) diff --git a/pkg/action/install.go b/pkg/action/install.go index 68c1848f6..ad260c361 100644 --- a/pkg/action/install.go +++ b/pkg/action/install.go @@ -39,8 +39,8 @@ import ( "k8s.io/cli-runtime/pkg/resource" "sigs.k8s.io/yaml" - "helm.sh/helm/v4/pkg/chart" - chartutil "helm.sh/helm/v4/pkg/chart/util" + chart "helm.sh/helm/v4/pkg/chart/v2" + chartutil "helm.sh/helm/v4/pkg/chart/v2/util" "helm.sh/helm/v4/pkg/cli" "helm.sh/helm/v4/pkg/downloader" "helm.sh/helm/v4/pkg/getter" diff --git a/pkg/action/install_test.go b/pkg/action/install_test.go index 9d90accc5..09715daf3 100644 --- a/pkg/action/install_test.go +++ b/pkg/action/install_test.go @@ -33,8 +33,8 @@ import ( "github.com/stretchr/testify/require" "helm.sh/helm/v4/internal/test" - "helm.sh/helm/v4/pkg/chart" - chartutil "helm.sh/helm/v4/pkg/chart/util" + chart "helm.sh/helm/v4/pkg/chart/v2" + chartutil "helm.sh/helm/v4/pkg/chart/v2/util" kubefake "helm.sh/helm/v4/pkg/kube/fake" "helm.sh/helm/v4/pkg/release" "helm.sh/helm/v4/pkg/storage/driver" diff --git a/pkg/action/lint.go b/pkg/action/lint.go index a6fd7c71c..451eb65b0 100644 --- a/pkg/action/lint.go +++ b/pkg/action/lint.go @@ -23,7 +23,7 @@ import ( "github.com/pkg/errors" - chartutil "helm.sh/helm/v4/pkg/chart/util" + chartutil "helm.sh/helm/v4/pkg/chart/v2/util" "helm.sh/helm/v4/pkg/lint" "helm.sh/helm/v4/pkg/lint/support" ) diff --git a/pkg/action/package.go b/pkg/action/package.go index 8343ba109..9ffe1722e 100644 --- a/pkg/action/package.go +++ b/pkg/action/package.go @@ -26,8 +26,8 @@ import ( "github.com/pkg/errors" "golang.org/x/term" - "helm.sh/helm/v4/pkg/chart/loader" - chartutil "helm.sh/helm/v4/pkg/chart/util" + "helm.sh/helm/v4/pkg/chart/v2/loader" + chartutil "helm.sh/helm/v4/pkg/chart/v2/util" "helm.sh/helm/v4/pkg/provenance" ) diff --git a/pkg/action/pull.go b/pkg/action/pull.go index fa85fe242..eb208ca7b 100644 --- a/pkg/action/pull.go +++ b/pkg/action/pull.go @@ -24,7 +24,7 @@ import ( "github.com/pkg/errors" - chartutil "helm.sh/helm/v4/pkg/chart/util" + chartutil "helm.sh/helm/v4/pkg/chart/v2/util" "helm.sh/helm/v4/pkg/cli" "helm.sh/helm/v4/pkg/downloader" "helm.sh/helm/v4/pkg/getter" diff --git a/pkg/action/release_testing.go b/pkg/action/release_testing.go index a2c68ad64..b4cdb47c8 100644 --- a/pkg/action/release_testing.go +++ b/pkg/action/release_testing.go @@ -27,7 +27,7 @@ import ( "github.com/pkg/errors" v1 "k8s.io/api/core/v1" - chartutil "helm.sh/helm/v4/pkg/chart/util" + chartutil "helm.sh/helm/v4/pkg/chart/v2/util" "helm.sh/helm/v4/pkg/release" ) diff --git a/pkg/action/rollback.go b/pkg/action/rollback.go index 961ef8377..0cd9d5d07 100644 --- a/pkg/action/rollback.go +++ b/pkg/action/rollback.go @@ -24,7 +24,7 @@ import ( "github.com/pkg/errors" - chartutil "helm.sh/helm/v4/pkg/chart/util" + chartutil "helm.sh/helm/v4/pkg/chart/v2/util" "helm.sh/helm/v4/pkg/release" helmtime "helm.sh/helm/v4/pkg/time" ) diff --git a/pkg/action/show.go b/pkg/action/show.go index 3b2722eef..8f9da58e9 100644 --- a/pkg/action/show.go +++ b/pkg/action/show.go @@ -25,9 +25,9 @@ import ( "k8s.io/cli-runtime/pkg/printers" "sigs.k8s.io/yaml" - "helm.sh/helm/v4/pkg/chart" - "helm.sh/helm/v4/pkg/chart/loader" - chartutil "helm.sh/helm/v4/pkg/chart/util" + chart "helm.sh/helm/v4/pkg/chart/v2" + "helm.sh/helm/v4/pkg/chart/v2/loader" + chartutil "helm.sh/helm/v4/pkg/chart/v2/util" "helm.sh/helm/v4/pkg/registry" ) diff --git a/pkg/action/show_test.go b/pkg/action/show_test.go index e8c998198..b1c5d6164 100644 --- a/pkg/action/show_test.go +++ b/pkg/action/show_test.go @@ -19,7 +19,7 @@ package action import ( "testing" - "helm.sh/helm/v4/pkg/chart" + chart "helm.sh/helm/v4/pkg/chart/v2" ) func TestShow(t *testing.T) { diff --git a/pkg/action/uninstall.go b/pkg/action/uninstall.go index 6e71197f6..bfec35fc0 100644 --- a/pkg/action/uninstall.go +++ b/pkg/action/uninstall.go @@ -24,7 +24,7 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - chartutil "helm.sh/helm/v4/pkg/chart/util" + chartutil "helm.sh/helm/v4/pkg/chart/v2/util" "helm.sh/helm/v4/pkg/kube" "helm.sh/helm/v4/pkg/release" releaseutil "helm.sh/helm/v4/pkg/release/util" diff --git a/pkg/action/upgrade.go b/pkg/action/upgrade.go index fa799ad2b..340f61585 100644 --- a/pkg/action/upgrade.go +++ b/pkg/action/upgrade.go @@ -28,8 +28,8 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/cli-runtime/pkg/resource" - "helm.sh/helm/v4/pkg/chart" - chartutil "helm.sh/helm/v4/pkg/chart/util" + chart "helm.sh/helm/v4/pkg/chart/v2" + chartutil "helm.sh/helm/v4/pkg/chart/v2/util" "helm.sh/helm/v4/pkg/kube" "helm.sh/helm/v4/pkg/postrender" "helm.sh/helm/v4/pkg/registry" diff --git a/pkg/action/upgrade_test.go b/pkg/action/upgrade_test.go index 5437490cb..069578025 100644 --- a/pkg/action/upgrade_test.go +++ b/pkg/action/upgrade_test.go @@ -23,7 +23,7 @@ import ( "testing" "time" - "helm.sh/helm/v4/pkg/chart" + chart "helm.sh/helm/v4/pkg/chart/v2" "helm.sh/helm/v4/pkg/storage/driver" "github.com/stretchr/testify/assert" diff --git a/pkg/chart/chart.go b/pkg/chart/v2/chart.go similarity index 99% rename from pkg/chart/chart.go rename to pkg/chart/v2/chart.go index a3bed63a3..dcc2a43eb 100644 --- a/pkg/chart/chart.go +++ b/pkg/chart/v2/chart.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package chart +package v2 import ( "path/filepath" diff --git a/pkg/chart/chart_test.go b/pkg/chart/v2/chart_test.go similarity index 99% rename from pkg/chart/chart_test.go rename to pkg/chart/v2/chart_test.go index 62d60765c..d6311085b 100644 --- a/pkg/chart/chart_test.go +++ b/pkg/chart/v2/chart_test.go @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ -package chart +package v2 import ( "encoding/json" diff --git a/pkg/chart/dependency.go b/pkg/chart/v2/dependency.go similarity index 99% rename from pkg/chart/dependency.go rename to pkg/chart/v2/dependency.go index eda0f5a89..8a590a036 100644 --- a/pkg/chart/dependency.go +++ b/pkg/chart/v2/dependency.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package chart +package v2 import "time" diff --git a/pkg/chart/dependency_test.go b/pkg/chart/v2/dependency_test.go similarity index 98% rename from pkg/chart/dependency_test.go rename to pkg/chart/v2/dependency_test.go index 90488a966..35919bd7a 100644 --- a/pkg/chart/dependency_test.go +++ b/pkg/chart/v2/dependency_test.go @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ -package chart +package v2 import ( "testing" diff --git a/pkg/chart/v2/doc.go b/pkg/chart/v2/doc.go new file mode 100644 index 000000000..d36ca3ec4 --- /dev/null +++ b/pkg/chart/v2/doc.go @@ -0,0 +1,23 @@ +/* +Copyright The Helm Authors. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +/* +Package v2 provides chart handling for apiVersion v1 and v2 charts + +This package and its sub-packages provide handling for apiVersion v1 and v2 charts. +The changes from v1 to v2 charts are minor and were able to be handled with minor +switches based on characteristics. +*/ +package v2 diff --git a/pkg/chart/errors.go b/pkg/chart/v2/errors.go similarity index 98% rename from pkg/chart/errors.go rename to pkg/chart/v2/errors.go index 2fad5f370..eeef75315 100644 --- a/pkg/chart/errors.go +++ b/pkg/chart/v2/errors.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package chart +package v2 import "fmt" diff --git a/pkg/chart/file.go b/pkg/chart/v2/file.go similarity index 98% rename from pkg/chart/file.go rename to pkg/chart/v2/file.go index 9dd7c08d5..a2eeb0fcd 100644 --- a/pkg/chart/file.go +++ b/pkg/chart/v2/file.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package chart +package v2 // File represents a file as a name/value pair. // diff --git a/pkg/chart/fuzz_test.go b/pkg/chart/v2/fuzz_test.go similarity index 98% rename from pkg/chart/fuzz_test.go rename to pkg/chart/v2/fuzz_test.go index f3c768444..a897ef7b9 100644 --- a/pkg/chart/fuzz_test.go +++ b/pkg/chart/v2/fuzz_test.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package chart +package v2 import ( "testing" diff --git a/pkg/chart/loader/archive.go b/pkg/chart/v2/loader/archive.go similarity index 99% rename from pkg/chart/loader/archive.go rename to pkg/chart/v2/loader/archive.go index 51dd264f7..cb6d3bfe8 100644 --- a/pkg/chart/loader/archive.go +++ b/pkg/chart/v2/loader/archive.go @@ -30,7 +30,7 @@ import ( "github.com/pkg/errors" - "helm.sh/helm/v4/pkg/chart" + chart "helm.sh/helm/v4/pkg/chart/v2" ) var drivePathPattern = regexp.MustCompile(`^[a-zA-Z]:/`) diff --git a/pkg/chart/loader/archive_test.go b/pkg/chart/v2/loader/archive_test.go similarity index 100% rename from pkg/chart/loader/archive_test.go rename to pkg/chart/v2/loader/archive_test.go diff --git a/pkg/chart/loader/directory.go b/pkg/chart/v2/loader/directory.go similarity index 98% rename from pkg/chart/loader/directory.go rename to pkg/chart/v2/loader/directory.go index 1dc30e4dc..37b24d3f9 100644 --- a/pkg/chart/loader/directory.go +++ b/pkg/chart/v2/loader/directory.go @@ -26,7 +26,7 @@ import ( "github.com/pkg/errors" "helm.sh/helm/v4/internal/sympath" - "helm.sh/helm/v4/pkg/chart" + chart "helm.sh/helm/v4/pkg/chart/v2" "helm.sh/helm/v4/pkg/ignore" ) diff --git a/pkg/chart/loader/load.go b/pkg/chart/v2/loader/load.go similarity index 99% rename from pkg/chart/loader/load.go rename to pkg/chart/v2/loader/load.go index e32094ef5..3c5463720 100644 --- a/pkg/chart/loader/load.go +++ b/pkg/chart/v2/loader/load.go @@ -30,7 +30,7 @@ import ( utilyaml "k8s.io/apimachinery/pkg/util/yaml" "sigs.k8s.io/yaml" - "helm.sh/helm/v4/pkg/chart" + chart "helm.sh/helm/v4/pkg/chart/v2" ) // ChartLoader loads a chart. diff --git a/pkg/chart/loader/load_test.go b/pkg/chart/v2/loader/load_test.go similarity index 99% rename from pkg/chart/loader/load_test.go rename to pkg/chart/v2/loader/load_test.go index e34124829..2e16b8560 100644 --- a/pkg/chart/loader/load_test.go +++ b/pkg/chart/v2/loader/load_test.go @@ -30,7 +30,7 @@ import ( "testing" "time" - "helm.sh/helm/v4/pkg/chart" + chart "helm.sh/helm/v4/pkg/chart/v2" ) func TestLoadDir(t *testing.T) { diff --git a/pkg/chart/loader/testdata/LICENSE b/pkg/chart/v2/loader/testdata/LICENSE similarity index 100% rename from pkg/chart/loader/testdata/LICENSE rename to pkg/chart/v2/loader/testdata/LICENSE diff --git a/pkg/chart/loader/testdata/albatross/Chart.yaml b/pkg/chart/v2/loader/testdata/albatross/Chart.yaml similarity index 100% rename from pkg/chart/loader/testdata/albatross/Chart.yaml rename to pkg/chart/v2/loader/testdata/albatross/Chart.yaml diff --git a/pkg/chart/loader/testdata/albatross/values.yaml b/pkg/chart/v2/loader/testdata/albatross/values.yaml similarity index 100% rename from pkg/chart/loader/testdata/albatross/values.yaml rename to pkg/chart/v2/loader/testdata/albatross/values.yaml diff --git a/pkg/chart/loader/testdata/frobnitz-1.2.3.tgz b/pkg/chart/v2/loader/testdata/frobnitz-1.2.3.tgz similarity index 100% rename from pkg/chart/loader/testdata/frobnitz-1.2.3.tgz rename to pkg/chart/v2/loader/testdata/frobnitz-1.2.3.tgz diff --git a/pkg/chart/loader/testdata/frobnitz.v1.tgz b/pkg/chart/v2/loader/testdata/frobnitz.v1.tgz similarity index 100% rename from pkg/chart/loader/testdata/frobnitz.v1.tgz rename to pkg/chart/v2/loader/testdata/frobnitz.v1.tgz diff --git a/pkg/chart/loader/testdata/frobnitz.v1/.helmignore b/pkg/chart/v2/loader/testdata/frobnitz.v1/.helmignore similarity index 100% rename from pkg/chart/loader/testdata/frobnitz.v1/.helmignore rename to pkg/chart/v2/loader/testdata/frobnitz.v1/.helmignore diff --git a/pkg/chart/loader/testdata/frobnitz.v1/Chart.lock b/pkg/chart/v2/loader/testdata/frobnitz.v1/Chart.lock similarity index 100% rename from pkg/chart/loader/testdata/frobnitz.v1/Chart.lock rename to pkg/chart/v2/loader/testdata/frobnitz.v1/Chart.lock diff --git a/pkg/chart/loader/testdata/frobnitz.v1/Chart.yaml b/pkg/chart/v2/loader/testdata/frobnitz.v1/Chart.yaml similarity index 100% rename from pkg/chart/loader/testdata/frobnitz.v1/Chart.yaml rename to pkg/chart/v2/loader/testdata/frobnitz.v1/Chart.yaml diff --git a/pkg/chart/loader/testdata/frobnitz.v1/INSTALL.txt b/pkg/chart/v2/loader/testdata/frobnitz.v1/INSTALL.txt similarity index 100% rename from pkg/chart/loader/testdata/frobnitz.v1/INSTALL.txt rename to pkg/chart/v2/loader/testdata/frobnitz.v1/INSTALL.txt diff --git a/pkg/chart/loader/testdata/frobnitz.v1/LICENSE b/pkg/chart/v2/loader/testdata/frobnitz.v1/LICENSE similarity index 100% rename from pkg/chart/loader/testdata/frobnitz.v1/LICENSE rename to pkg/chart/v2/loader/testdata/frobnitz.v1/LICENSE diff --git a/pkg/chart/loader/testdata/frobnitz.v1/README.md b/pkg/chart/v2/loader/testdata/frobnitz.v1/README.md similarity index 100% rename from pkg/chart/loader/testdata/frobnitz.v1/README.md rename to pkg/chart/v2/loader/testdata/frobnitz.v1/README.md diff --git a/pkg/chart/loader/testdata/frobnitz.v1/charts/_ignore_me b/pkg/chart/v2/loader/testdata/frobnitz.v1/charts/_ignore_me similarity index 100% rename from pkg/chart/loader/testdata/frobnitz.v1/charts/_ignore_me rename to pkg/chart/v2/loader/testdata/frobnitz.v1/charts/_ignore_me diff --git a/pkg/chart/loader/testdata/frobnitz.v1/charts/alpine/Chart.yaml b/pkg/chart/v2/loader/testdata/frobnitz.v1/charts/alpine/Chart.yaml similarity index 100% rename from pkg/chart/loader/testdata/frobnitz.v1/charts/alpine/Chart.yaml rename to pkg/chart/v2/loader/testdata/frobnitz.v1/charts/alpine/Chart.yaml diff --git a/pkg/chart/loader/testdata/frobnitz.v1/charts/alpine/README.md b/pkg/chart/v2/loader/testdata/frobnitz.v1/charts/alpine/README.md similarity index 100% rename from pkg/chart/loader/testdata/frobnitz.v1/charts/alpine/README.md rename to pkg/chart/v2/loader/testdata/frobnitz.v1/charts/alpine/README.md diff --git a/pkg/chart/loader/testdata/frobnitz.v1/charts/alpine/charts/mast1/Chart.yaml b/pkg/chart/v2/loader/testdata/frobnitz.v1/charts/alpine/charts/mast1/Chart.yaml similarity index 100% rename from pkg/chart/loader/testdata/frobnitz.v1/charts/alpine/charts/mast1/Chart.yaml rename to pkg/chart/v2/loader/testdata/frobnitz.v1/charts/alpine/charts/mast1/Chart.yaml diff --git a/pkg/chart/loader/testdata/frobnitz.v1/charts/alpine/charts/mast1/values.yaml b/pkg/chart/v2/loader/testdata/frobnitz.v1/charts/alpine/charts/mast1/values.yaml similarity index 100% rename from pkg/chart/loader/testdata/frobnitz.v1/charts/alpine/charts/mast1/values.yaml rename to pkg/chart/v2/loader/testdata/frobnitz.v1/charts/alpine/charts/mast1/values.yaml diff --git a/pkg/chart/loader/testdata/frobnitz.v1/charts/alpine/charts/mast2-0.1.0.tgz b/pkg/chart/v2/loader/testdata/frobnitz.v1/charts/alpine/charts/mast2-0.1.0.tgz similarity index 100% rename from pkg/chart/loader/testdata/frobnitz.v1/charts/alpine/charts/mast2-0.1.0.tgz rename to pkg/chart/v2/loader/testdata/frobnitz.v1/charts/alpine/charts/mast2-0.1.0.tgz diff --git a/pkg/chart/loader/testdata/frobnitz.v1/charts/alpine/templates/alpine-pod.yaml b/pkg/chart/v2/loader/testdata/frobnitz.v1/charts/alpine/templates/alpine-pod.yaml similarity index 100% rename from pkg/chart/loader/testdata/frobnitz.v1/charts/alpine/templates/alpine-pod.yaml rename to pkg/chart/v2/loader/testdata/frobnitz.v1/charts/alpine/templates/alpine-pod.yaml diff --git a/pkg/chart/loader/testdata/frobnitz.v1/charts/alpine/values.yaml b/pkg/chart/v2/loader/testdata/frobnitz.v1/charts/alpine/values.yaml similarity index 100% rename from pkg/chart/loader/testdata/frobnitz.v1/charts/alpine/values.yaml rename to pkg/chart/v2/loader/testdata/frobnitz.v1/charts/alpine/values.yaml diff --git a/pkg/chart/loader/testdata/frobnitz.v1/charts/mariner-4.3.2.tgz b/pkg/chart/v2/loader/testdata/frobnitz.v1/charts/mariner-4.3.2.tgz similarity index 100% rename from pkg/chart/loader/testdata/frobnitz.v1/charts/mariner-4.3.2.tgz rename to pkg/chart/v2/loader/testdata/frobnitz.v1/charts/mariner-4.3.2.tgz diff --git a/pkg/chart/loader/testdata/frobnitz.v1/docs/README.md b/pkg/chart/v2/loader/testdata/frobnitz.v1/docs/README.md similarity index 100% rename from pkg/chart/loader/testdata/frobnitz.v1/docs/README.md rename to pkg/chart/v2/loader/testdata/frobnitz.v1/docs/README.md diff --git a/pkg/chart/loader/testdata/frobnitz.v1/icon.svg b/pkg/chart/v2/loader/testdata/frobnitz.v1/icon.svg similarity index 100% rename from pkg/chart/loader/testdata/frobnitz.v1/icon.svg rename to pkg/chart/v2/loader/testdata/frobnitz.v1/icon.svg diff --git a/pkg/chart/loader/testdata/frobnitz.v1/ignore/me.txt b/pkg/chart/v2/loader/testdata/frobnitz.v1/ignore/me.txt similarity index 100% rename from pkg/chart/loader/testdata/frobnitz.v1/ignore/me.txt rename to pkg/chart/v2/loader/testdata/frobnitz.v1/ignore/me.txt diff --git a/pkg/chart/loader/testdata/frobnitz.v1/requirements.yaml b/pkg/chart/v2/loader/testdata/frobnitz.v1/requirements.yaml similarity index 100% rename from pkg/chart/loader/testdata/frobnitz.v1/requirements.yaml rename to pkg/chart/v2/loader/testdata/frobnitz.v1/requirements.yaml diff --git a/pkg/chart/loader/testdata/frobnitz.v1/templates/template.tpl b/pkg/chart/v2/loader/testdata/frobnitz.v1/templates/template.tpl similarity index 100% rename from pkg/chart/loader/testdata/frobnitz.v1/templates/template.tpl rename to pkg/chart/v2/loader/testdata/frobnitz.v1/templates/template.tpl diff --git a/pkg/chart/loader/testdata/frobnitz.v1/values.yaml b/pkg/chart/v2/loader/testdata/frobnitz.v1/values.yaml similarity index 100% rename from pkg/chart/loader/testdata/frobnitz.v1/values.yaml rename to pkg/chart/v2/loader/testdata/frobnitz.v1/values.yaml diff --git a/pkg/chart/loader/testdata/frobnitz.v2.reqs/.helmignore b/pkg/chart/v2/loader/testdata/frobnitz.v2.reqs/.helmignore similarity index 100% rename from pkg/chart/loader/testdata/frobnitz.v2.reqs/.helmignore rename to pkg/chart/v2/loader/testdata/frobnitz.v2.reqs/.helmignore diff --git a/pkg/chart/loader/testdata/frobnitz.v2.reqs/Chart.yaml b/pkg/chart/v2/loader/testdata/frobnitz.v2.reqs/Chart.yaml similarity index 100% rename from pkg/chart/loader/testdata/frobnitz.v2.reqs/Chart.yaml rename to pkg/chart/v2/loader/testdata/frobnitz.v2.reqs/Chart.yaml diff --git a/pkg/chart/loader/testdata/frobnitz.v2.reqs/INSTALL.txt b/pkg/chart/v2/loader/testdata/frobnitz.v2.reqs/INSTALL.txt similarity index 100% rename from pkg/chart/loader/testdata/frobnitz.v2.reqs/INSTALL.txt rename to pkg/chart/v2/loader/testdata/frobnitz.v2.reqs/INSTALL.txt diff --git a/pkg/chart/loader/testdata/frobnitz.v2.reqs/LICENSE b/pkg/chart/v2/loader/testdata/frobnitz.v2.reqs/LICENSE similarity index 100% rename from pkg/chart/loader/testdata/frobnitz.v2.reqs/LICENSE rename to pkg/chart/v2/loader/testdata/frobnitz.v2.reqs/LICENSE diff --git a/pkg/chart/loader/testdata/frobnitz.v2.reqs/README.md b/pkg/chart/v2/loader/testdata/frobnitz.v2.reqs/README.md similarity index 100% rename from pkg/chart/loader/testdata/frobnitz.v2.reqs/README.md rename to pkg/chart/v2/loader/testdata/frobnitz.v2.reqs/README.md diff --git a/pkg/chart/loader/testdata/frobnitz.v2.reqs/charts/_ignore_me b/pkg/chart/v2/loader/testdata/frobnitz.v2.reqs/charts/_ignore_me similarity index 100% rename from pkg/chart/loader/testdata/frobnitz.v2.reqs/charts/_ignore_me rename to pkg/chart/v2/loader/testdata/frobnitz.v2.reqs/charts/_ignore_me diff --git a/pkg/chart/loader/testdata/frobnitz.v2.reqs/charts/alpine/Chart.yaml b/pkg/chart/v2/loader/testdata/frobnitz.v2.reqs/charts/alpine/Chart.yaml similarity index 100% rename from pkg/chart/loader/testdata/frobnitz.v2.reqs/charts/alpine/Chart.yaml rename to pkg/chart/v2/loader/testdata/frobnitz.v2.reqs/charts/alpine/Chart.yaml diff --git a/pkg/chart/loader/testdata/frobnitz.v2.reqs/charts/alpine/README.md b/pkg/chart/v2/loader/testdata/frobnitz.v2.reqs/charts/alpine/README.md similarity index 100% rename from pkg/chart/loader/testdata/frobnitz.v2.reqs/charts/alpine/README.md rename to pkg/chart/v2/loader/testdata/frobnitz.v2.reqs/charts/alpine/README.md diff --git a/pkg/chart/loader/testdata/frobnitz.v2.reqs/charts/alpine/charts/mast1/Chart.yaml b/pkg/chart/v2/loader/testdata/frobnitz.v2.reqs/charts/alpine/charts/mast1/Chart.yaml similarity index 100% rename from pkg/chart/loader/testdata/frobnitz.v2.reqs/charts/alpine/charts/mast1/Chart.yaml rename to pkg/chart/v2/loader/testdata/frobnitz.v2.reqs/charts/alpine/charts/mast1/Chart.yaml diff --git a/pkg/chart/loader/testdata/frobnitz.v2.reqs/charts/alpine/charts/mast1/values.yaml b/pkg/chart/v2/loader/testdata/frobnitz.v2.reqs/charts/alpine/charts/mast1/values.yaml similarity index 100% rename from pkg/chart/loader/testdata/frobnitz.v2.reqs/charts/alpine/charts/mast1/values.yaml rename to pkg/chart/v2/loader/testdata/frobnitz.v2.reqs/charts/alpine/charts/mast1/values.yaml diff --git a/pkg/chart/loader/testdata/frobnitz.v2.reqs/charts/alpine/charts/mast2-0.1.0.tgz b/pkg/chart/v2/loader/testdata/frobnitz.v2.reqs/charts/alpine/charts/mast2-0.1.0.tgz similarity index 100% rename from pkg/chart/loader/testdata/frobnitz.v2.reqs/charts/alpine/charts/mast2-0.1.0.tgz rename to pkg/chart/v2/loader/testdata/frobnitz.v2.reqs/charts/alpine/charts/mast2-0.1.0.tgz diff --git a/pkg/chart/loader/testdata/frobnitz.v2.reqs/charts/alpine/templates/alpine-pod.yaml b/pkg/chart/v2/loader/testdata/frobnitz.v2.reqs/charts/alpine/templates/alpine-pod.yaml similarity index 100% rename from pkg/chart/loader/testdata/frobnitz.v2.reqs/charts/alpine/templates/alpine-pod.yaml rename to pkg/chart/v2/loader/testdata/frobnitz.v2.reqs/charts/alpine/templates/alpine-pod.yaml diff --git a/pkg/chart/loader/testdata/frobnitz.v2.reqs/charts/alpine/values.yaml b/pkg/chart/v2/loader/testdata/frobnitz.v2.reqs/charts/alpine/values.yaml similarity index 100% rename from pkg/chart/loader/testdata/frobnitz.v2.reqs/charts/alpine/values.yaml rename to pkg/chart/v2/loader/testdata/frobnitz.v2.reqs/charts/alpine/values.yaml diff --git a/pkg/chart/loader/testdata/frobnitz.v2.reqs/charts/mariner-4.3.2.tgz b/pkg/chart/v2/loader/testdata/frobnitz.v2.reqs/charts/mariner-4.3.2.tgz similarity index 100% rename from pkg/chart/loader/testdata/frobnitz.v2.reqs/charts/mariner-4.3.2.tgz rename to pkg/chart/v2/loader/testdata/frobnitz.v2.reqs/charts/mariner-4.3.2.tgz diff --git a/pkg/chart/loader/testdata/frobnitz.v2.reqs/docs/README.md b/pkg/chart/v2/loader/testdata/frobnitz.v2.reqs/docs/README.md similarity index 100% rename from pkg/chart/loader/testdata/frobnitz.v2.reqs/docs/README.md rename to pkg/chart/v2/loader/testdata/frobnitz.v2.reqs/docs/README.md diff --git a/pkg/chart/loader/testdata/frobnitz.v2.reqs/icon.svg b/pkg/chart/v2/loader/testdata/frobnitz.v2.reqs/icon.svg similarity index 100% rename from pkg/chart/loader/testdata/frobnitz.v2.reqs/icon.svg rename to pkg/chart/v2/loader/testdata/frobnitz.v2.reqs/icon.svg diff --git a/pkg/chart/loader/testdata/frobnitz.v2.reqs/ignore/me.txt b/pkg/chart/v2/loader/testdata/frobnitz.v2.reqs/ignore/me.txt similarity index 100% rename from pkg/chart/loader/testdata/frobnitz.v2.reqs/ignore/me.txt rename to pkg/chart/v2/loader/testdata/frobnitz.v2.reqs/ignore/me.txt diff --git a/pkg/chart/loader/testdata/frobnitz.v2.reqs/requirements.yaml b/pkg/chart/v2/loader/testdata/frobnitz.v2.reqs/requirements.yaml similarity index 100% rename from pkg/chart/loader/testdata/frobnitz.v2.reqs/requirements.yaml rename to pkg/chart/v2/loader/testdata/frobnitz.v2.reqs/requirements.yaml diff --git a/pkg/chart/loader/testdata/frobnitz.v2.reqs/templates/template.tpl b/pkg/chart/v2/loader/testdata/frobnitz.v2.reqs/templates/template.tpl similarity index 100% rename from pkg/chart/loader/testdata/frobnitz.v2.reqs/templates/template.tpl rename to pkg/chart/v2/loader/testdata/frobnitz.v2.reqs/templates/template.tpl diff --git a/pkg/chart/loader/testdata/frobnitz.v2.reqs/values.yaml b/pkg/chart/v2/loader/testdata/frobnitz.v2.reqs/values.yaml similarity index 100% rename from pkg/chart/loader/testdata/frobnitz.v2.reqs/values.yaml rename to pkg/chart/v2/loader/testdata/frobnitz.v2.reqs/values.yaml diff --git a/pkg/chart/loader/testdata/frobnitz/.helmignore b/pkg/chart/v2/loader/testdata/frobnitz/.helmignore similarity index 100% rename from pkg/chart/loader/testdata/frobnitz/.helmignore rename to pkg/chart/v2/loader/testdata/frobnitz/.helmignore diff --git a/pkg/chart/loader/testdata/frobnitz/Chart.lock b/pkg/chart/v2/loader/testdata/frobnitz/Chart.lock similarity index 100% rename from pkg/chart/loader/testdata/frobnitz/Chart.lock rename to pkg/chart/v2/loader/testdata/frobnitz/Chart.lock diff --git a/pkg/chart/loader/testdata/frobnitz/Chart.yaml b/pkg/chart/v2/loader/testdata/frobnitz/Chart.yaml similarity index 100% rename from pkg/chart/loader/testdata/frobnitz/Chart.yaml rename to pkg/chart/v2/loader/testdata/frobnitz/Chart.yaml diff --git a/pkg/chart/loader/testdata/frobnitz/INSTALL.txt b/pkg/chart/v2/loader/testdata/frobnitz/INSTALL.txt similarity index 100% rename from pkg/chart/loader/testdata/frobnitz/INSTALL.txt rename to pkg/chart/v2/loader/testdata/frobnitz/INSTALL.txt diff --git a/pkg/chart/loader/testdata/frobnitz/LICENSE b/pkg/chart/v2/loader/testdata/frobnitz/LICENSE similarity index 100% rename from pkg/chart/loader/testdata/frobnitz/LICENSE rename to pkg/chart/v2/loader/testdata/frobnitz/LICENSE diff --git a/pkg/chart/loader/testdata/frobnitz/README.md b/pkg/chart/v2/loader/testdata/frobnitz/README.md similarity index 100% rename from pkg/chart/loader/testdata/frobnitz/README.md rename to pkg/chart/v2/loader/testdata/frobnitz/README.md diff --git a/pkg/chart/loader/testdata/frobnitz/charts/_ignore_me b/pkg/chart/v2/loader/testdata/frobnitz/charts/_ignore_me similarity index 100% rename from pkg/chart/loader/testdata/frobnitz/charts/_ignore_me rename to pkg/chart/v2/loader/testdata/frobnitz/charts/_ignore_me diff --git a/pkg/chart/loader/testdata/frobnitz/charts/alpine/Chart.yaml b/pkg/chart/v2/loader/testdata/frobnitz/charts/alpine/Chart.yaml similarity index 100% rename from pkg/chart/loader/testdata/frobnitz/charts/alpine/Chart.yaml rename to pkg/chart/v2/loader/testdata/frobnitz/charts/alpine/Chart.yaml diff --git a/pkg/chart/loader/testdata/frobnitz/charts/alpine/README.md b/pkg/chart/v2/loader/testdata/frobnitz/charts/alpine/README.md similarity index 100% rename from pkg/chart/loader/testdata/frobnitz/charts/alpine/README.md rename to pkg/chart/v2/loader/testdata/frobnitz/charts/alpine/README.md diff --git a/pkg/chart/loader/testdata/frobnitz/charts/alpine/charts/mast1/Chart.yaml b/pkg/chart/v2/loader/testdata/frobnitz/charts/alpine/charts/mast1/Chart.yaml similarity index 100% rename from pkg/chart/loader/testdata/frobnitz/charts/alpine/charts/mast1/Chart.yaml rename to pkg/chart/v2/loader/testdata/frobnitz/charts/alpine/charts/mast1/Chart.yaml diff --git a/pkg/chart/loader/testdata/frobnitz/charts/alpine/charts/mast1/values.yaml b/pkg/chart/v2/loader/testdata/frobnitz/charts/alpine/charts/mast1/values.yaml similarity index 100% rename from pkg/chart/loader/testdata/frobnitz/charts/alpine/charts/mast1/values.yaml rename to pkg/chart/v2/loader/testdata/frobnitz/charts/alpine/charts/mast1/values.yaml diff --git a/pkg/chart/loader/testdata/frobnitz/charts/alpine/charts/mast2-0.1.0.tgz b/pkg/chart/v2/loader/testdata/frobnitz/charts/alpine/charts/mast2-0.1.0.tgz similarity index 100% rename from pkg/chart/loader/testdata/frobnitz/charts/alpine/charts/mast2-0.1.0.tgz rename to pkg/chart/v2/loader/testdata/frobnitz/charts/alpine/charts/mast2-0.1.0.tgz diff --git a/pkg/chart/loader/testdata/frobnitz/charts/alpine/templates/alpine-pod.yaml b/pkg/chart/v2/loader/testdata/frobnitz/charts/alpine/templates/alpine-pod.yaml similarity index 100% rename from pkg/chart/loader/testdata/frobnitz/charts/alpine/templates/alpine-pod.yaml rename to pkg/chart/v2/loader/testdata/frobnitz/charts/alpine/templates/alpine-pod.yaml diff --git a/pkg/chart/loader/testdata/frobnitz/charts/alpine/values.yaml b/pkg/chart/v2/loader/testdata/frobnitz/charts/alpine/values.yaml similarity index 100% rename from pkg/chart/loader/testdata/frobnitz/charts/alpine/values.yaml rename to pkg/chart/v2/loader/testdata/frobnitz/charts/alpine/values.yaml diff --git a/pkg/chart/loader/testdata/frobnitz/charts/mariner-4.3.2.tgz b/pkg/chart/v2/loader/testdata/frobnitz/charts/mariner-4.3.2.tgz similarity index 100% rename from pkg/chart/loader/testdata/frobnitz/charts/mariner-4.3.2.tgz rename to pkg/chart/v2/loader/testdata/frobnitz/charts/mariner-4.3.2.tgz diff --git a/pkg/chart/loader/testdata/frobnitz/docs/README.md b/pkg/chart/v2/loader/testdata/frobnitz/docs/README.md similarity index 100% rename from pkg/chart/loader/testdata/frobnitz/docs/README.md rename to pkg/chart/v2/loader/testdata/frobnitz/docs/README.md diff --git a/pkg/chart/loader/testdata/frobnitz/icon.svg b/pkg/chart/v2/loader/testdata/frobnitz/icon.svg similarity index 100% rename from pkg/chart/loader/testdata/frobnitz/icon.svg rename to pkg/chart/v2/loader/testdata/frobnitz/icon.svg diff --git a/pkg/chart/loader/testdata/frobnitz/ignore/me.txt b/pkg/chart/v2/loader/testdata/frobnitz/ignore/me.txt similarity index 100% rename from pkg/chart/loader/testdata/frobnitz/ignore/me.txt rename to pkg/chart/v2/loader/testdata/frobnitz/ignore/me.txt diff --git a/pkg/chart/loader/testdata/frobnitz/templates/template.tpl b/pkg/chart/v2/loader/testdata/frobnitz/templates/template.tpl similarity index 100% rename from pkg/chart/loader/testdata/frobnitz/templates/template.tpl rename to pkg/chart/v2/loader/testdata/frobnitz/templates/template.tpl diff --git a/pkg/chart/loader/testdata/frobnitz/values.yaml b/pkg/chart/v2/loader/testdata/frobnitz/values.yaml similarity index 100% rename from pkg/chart/loader/testdata/frobnitz/values.yaml rename to pkg/chart/v2/loader/testdata/frobnitz/values.yaml diff --git a/pkg/chart/loader/testdata/frobnitz_backslash-1.2.3.tgz b/pkg/chart/v2/loader/testdata/frobnitz_backslash-1.2.3.tgz similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_backslash-1.2.3.tgz rename to pkg/chart/v2/loader/testdata/frobnitz_backslash-1.2.3.tgz diff --git a/pkg/chart/loader/testdata/frobnitz_backslash/.helmignore b/pkg/chart/v2/loader/testdata/frobnitz_backslash/.helmignore similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_backslash/.helmignore rename to pkg/chart/v2/loader/testdata/frobnitz_backslash/.helmignore diff --git a/pkg/chart/loader/testdata/frobnitz_backslash/Chart.lock b/pkg/chart/v2/loader/testdata/frobnitz_backslash/Chart.lock similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_backslash/Chart.lock rename to pkg/chart/v2/loader/testdata/frobnitz_backslash/Chart.lock diff --git a/pkg/chart/loader/testdata/frobnitz_backslash/Chart.yaml b/pkg/chart/v2/loader/testdata/frobnitz_backslash/Chart.yaml similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_backslash/Chart.yaml rename to pkg/chart/v2/loader/testdata/frobnitz_backslash/Chart.yaml diff --git a/pkg/chart/loader/testdata/frobnitz_backslash/INSTALL.txt b/pkg/chart/v2/loader/testdata/frobnitz_backslash/INSTALL.txt similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_backslash/INSTALL.txt rename to pkg/chart/v2/loader/testdata/frobnitz_backslash/INSTALL.txt diff --git a/pkg/chart/loader/testdata/frobnitz_backslash/LICENSE b/pkg/chart/v2/loader/testdata/frobnitz_backslash/LICENSE similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_backslash/LICENSE rename to pkg/chart/v2/loader/testdata/frobnitz_backslash/LICENSE diff --git a/pkg/chart/loader/testdata/frobnitz_backslash/README.md b/pkg/chart/v2/loader/testdata/frobnitz_backslash/README.md similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_backslash/README.md rename to pkg/chart/v2/loader/testdata/frobnitz_backslash/README.md diff --git a/pkg/chart/loader/testdata/frobnitz_backslash/charts/_ignore_me b/pkg/chart/v2/loader/testdata/frobnitz_backslash/charts/_ignore_me similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_backslash/charts/_ignore_me rename to pkg/chart/v2/loader/testdata/frobnitz_backslash/charts/_ignore_me diff --git a/pkg/chart/loader/testdata/frobnitz_backslash/charts/alpine/Chart.yaml b/pkg/chart/v2/loader/testdata/frobnitz_backslash/charts/alpine/Chart.yaml similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_backslash/charts/alpine/Chart.yaml rename to pkg/chart/v2/loader/testdata/frobnitz_backslash/charts/alpine/Chart.yaml diff --git a/pkg/chart/loader/testdata/frobnitz_backslash/charts/alpine/README.md b/pkg/chart/v2/loader/testdata/frobnitz_backslash/charts/alpine/README.md similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_backslash/charts/alpine/README.md rename to pkg/chart/v2/loader/testdata/frobnitz_backslash/charts/alpine/README.md diff --git a/pkg/chart/loader/testdata/frobnitz_backslash/charts/alpine/charts/mast1/Chart.yaml b/pkg/chart/v2/loader/testdata/frobnitz_backslash/charts/alpine/charts/mast1/Chart.yaml similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_backslash/charts/alpine/charts/mast1/Chart.yaml rename to pkg/chart/v2/loader/testdata/frobnitz_backslash/charts/alpine/charts/mast1/Chart.yaml diff --git a/pkg/chart/loader/testdata/frobnitz_backslash/charts/alpine/charts/mast1/values.yaml b/pkg/chart/v2/loader/testdata/frobnitz_backslash/charts/alpine/charts/mast1/values.yaml similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_backslash/charts/alpine/charts/mast1/values.yaml rename to pkg/chart/v2/loader/testdata/frobnitz_backslash/charts/alpine/charts/mast1/values.yaml diff --git a/pkg/chart/loader/testdata/frobnitz_backslash/charts/alpine/charts/mast2-0.1.0.tgz b/pkg/chart/v2/loader/testdata/frobnitz_backslash/charts/alpine/charts/mast2-0.1.0.tgz similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_backslash/charts/alpine/charts/mast2-0.1.0.tgz rename to pkg/chart/v2/loader/testdata/frobnitz_backslash/charts/alpine/charts/mast2-0.1.0.tgz diff --git a/pkg/chart/loader/testdata/frobnitz_backslash/charts/alpine/templates/alpine-pod.yaml b/pkg/chart/v2/loader/testdata/frobnitz_backslash/charts/alpine/templates/alpine-pod.yaml similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_backslash/charts/alpine/templates/alpine-pod.yaml rename to pkg/chart/v2/loader/testdata/frobnitz_backslash/charts/alpine/templates/alpine-pod.yaml diff --git a/pkg/chart/loader/testdata/frobnitz_backslash/charts/alpine/values.yaml b/pkg/chart/v2/loader/testdata/frobnitz_backslash/charts/alpine/values.yaml similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_backslash/charts/alpine/values.yaml rename to pkg/chart/v2/loader/testdata/frobnitz_backslash/charts/alpine/values.yaml diff --git a/pkg/chart/loader/testdata/frobnitz_backslash/charts/mariner-4.3.2.tgz b/pkg/chart/v2/loader/testdata/frobnitz_backslash/charts/mariner-4.3.2.tgz similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_backslash/charts/mariner-4.3.2.tgz rename to pkg/chart/v2/loader/testdata/frobnitz_backslash/charts/mariner-4.3.2.tgz diff --git a/pkg/chart/loader/testdata/frobnitz_backslash/docs/README.md b/pkg/chart/v2/loader/testdata/frobnitz_backslash/docs/README.md similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_backslash/docs/README.md rename to pkg/chart/v2/loader/testdata/frobnitz_backslash/docs/README.md diff --git a/pkg/chart/loader/testdata/frobnitz_backslash/icon.svg b/pkg/chart/v2/loader/testdata/frobnitz_backslash/icon.svg similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_backslash/icon.svg rename to pkg/chart/v2/loader/testdata/frobnitz_backslash/icon.svg diff --git a/pkg/chart/loader/testdata/frobnitz_backslash/ignore/me.txt b/pkg/chart/v2/loader/testdata/frobnitz_backslash/ignore/me.txt similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_backslash/ignore/me.txt rename to pkg/chart/v2/loader/testdata/frobnitz_backslash/ignore/me.txt diff --git a/pkg/chart/loader/testdata/frobnitz_backslash/templates/template.tpl b/pkg/chart/v2/loader/testdata/frobnitz_backslash/templates/template.tpl similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_backslash/templates/template.tpl rename to pkg/chart/v2/loader/testdata/frobnitz_backslash/templates/template.tpl diff --git a/pkg/chart/loader/testdata/frobnitz_backslash/values.yaml b/pkg/chart/v2/loader/testdata/frobnitz_backslash/values.yaml similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_backslash/values.yaml rename to pkg/chart/v2/loader/testdata/frobnitz_backslash/values.yaml diff --git a/pkg/chart/loader/testdata/frobnitz_with_bom.tgz b/pkg/chart/v2/loader/testdata/frobnitz_with_bom.tgz similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_bom.tgz rename to pkg/chart/v2/loader/testdata/frobnitz_with_bom.tgz diff --git a/pkg/chart/loader/testdata/frobnitz_with_bom/.helmignore b/pkg/chart/v2/loader/testdata/frobnitz_with_bom/.helmignore similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_bom/.helmignore rename to pkg/chart/v2/loader/testdata/frobnitz_with_bom/.helmignore diff --git a/pkg/chart/loader/testdata/frobnitz_with_bom/Chart.lock b/pkg/chart/v2/loader/testdata/frobnitz_with_bom/Chart.lock similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_bom/Chart.lock rename to pkg/chart/v2/loader/testdata/frobnitz_with_bom/Chart.lock diff --git a/pkg/chart/loader/testdata/frobnitz_with_bom/Chart.yaml b/pkg/chart/v2/loader/testdata/frobnitz_with_bom/Chart.yaml similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_bom/Chart.yaml rename to pkg/chart/v2/loader/testdata/frobnitz_with_bom/Chart.yaml diff --git a/pkg/chart/loader/testdata/frobnitz_with_bom/INSTALL.txt b/pkg/chart/v2/loader/testdata/frobnitz_with_bom/INSTALL.txt similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_bom/INSTALL.txt rename to pkg/chart/v2/loader/testdata/frobnitz_with_bom/INSTALL.txt diff --git a/pkg/chart/loader/testdata/frobnitz_with_bom/LICENSE b/pkg/chart/v2/loader/testdata/frobnitz_with_bom/LICENSE similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_bom/LICENSE rename to pkg/chart/v2/loader/testdata/frobnitz_with_bom/LICENSE diff --git a/pkg/chart/loader/testdata/frobnitz_with_bom/README.md b/pkg/chart/v2/loader/testdata/frobnitz_with_bom/README.md similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_bom/README.md rename to pkg/chart/v2/loader/testdata/frobnitz_with_bom/README.md diff --git a/pkg/chart/loader/testdata/frobnitz_with_bom/charts/_ignore_me b/pkg/chart/v2/loader/testdata/frobnitz_with_bom/charts/_ignore_me similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_bom/charts/_ignore_me rename to pkg/chart/v2/loader/testdata/frobnitz_with_bom/charts/_ignore_me diff --git a/pkg/chart/loader/testdata/frobnitz_with_bom/charts/alpine/Chart.yaml b/pkg/chart/v2/loader/testdata/frobnitz_with_bom/charts/alpine/Chart.yaml similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_bom/charts/alpine/Chart.yaml rename to pkg/chart/v2/loader/testdata/frobnitz_with_bom/charts/alpine/Chart.yaml diff --git a/pkg/chart/loader/testdata/frobnitz_with_bom/charts/alpine/README.md b/pkg/chart/v2/loader/testdata/frobnitz_with_bom/charts/alpine/README.md similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_bom/charts/alpine/README.md rename to pkg/chart/v2/loader/testdata/frobnitz_with_bom/charts/alpine/README.md diff --git a/pkg/chart/loader/testdata/frobnitz_with_bom/charts/alpine/charts/mast1/Chart.yaml b/pkg/chart/v2/loader/testdata/frobnitz_with_bom/charts/alpine/charts/mast1/Chart.yaml similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_bom/charts/alpine/charts/mast1/Chart.yaml rename to pkg/chart/v2/loader/testdata/frobnitz_with_bom/charts/alpine/charts/mast1/Chart.yaml diff --git a/pkg/chart/loader/testdata/frobnitz_with_bom/charts/alpine/charts/mast1/values.yaml b/pkg/chart/v2/loader/testdata/frobnitz_with_bom/charts/alpine/charts/mast1/values.yaml similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_bom/charts/alpine/charts/mast1/values.yaml rename to pkg/chart/v2/loader/testdata/frobnitz_with_bom/charts/alpine/charts/mast1/values.yaml diff --git a/pkg/chart/loader/testdata/frobnitz_with_bom/charts/alpine/charts/mast2-0.1.0.tgz b/pkg/chart/v2/loader/testdata/frobnitz_with_bom/charts/alpine/charts/mast2-0.1.0.tgz similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_bom/charts/alpine/charts/mast2-0.1.0.tgz rename to pkg/chart/v2/loader/testdata/frobnitz_with_bom/charts/alpine/charts/mast2-0.1.0.tgz diff --git a/pkg/chart/loader/testdata/frobnitz_with_bom/charts/alpine/templates/alpine-pod.yaml b/pkg/chart/v2/loader/testdata/frobnitz_with_bom/charts/alpine/templates/alpine-pod.yaml similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_bom/charts/alpine/templates/alpine-pod.yaml rename to pkg/chart/v2/loader/testdata/frobnitz_with_bom/charts/alpine/templates/alpine-pod.yaml diff --git a/pkg/chart/loader/testdata/frobnitz_with_bom/charts/alpine/values.yaml b/pkg/chart/v2/loader/testdata/frobnitz_with_bom/charts/alpine/values.yaml similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_bom/charts/alpine/values.yaml rename to pkg/chart/v2/loader/testdata/frobnitz_with_bom/charts/alpine/values.yaml diff --git a/pkg/chart/loader/testdata/frobnitz_with_bom/charts/mariner-4.3.2.tgz b/pkg/chart/v2/loader/testdata/frobnitz_with_bom/charts/mariner-4.3.2.tgz similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_bom/charts/mariner-4.3.2.tgz rename to pkg/chart/v2/loader/testdata/frobnitz_with_bom/charts/mariner-4.3.2.tgz diff --git a/pkg/chart/loader/testdata/frobnitz_with_bom/docs/README.md b/pkg/chart/v2/loader/testdata/frobnitz_with_bom/docs/README.md similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_bom/docs/README.md rename to pkg/chart/v2/loader/testdata/frobnitz_with_bom/docs/README.md diff --git a/pkg/chart/loader/testdata/frobnitz_with_bom/icon.svg b/pkg/chart/v2/loader/testdata/frobnitz_with_bom/icon.svg similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_bom/icon.svg rename to pkg/chart/v2/loader/testdata/frobnitz_with_bom/icon.svg diff --git a/pkg/chart/loader/testdata/frobnitz_with_bom/ignore/me.txt b/pkg/chart/v2/loader/testdata/frobnitz_with_bom/ignore/me.txt similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_bom/ignore/me.txt rename to pkg/chart/v2/loader/testdata/frobnitz_with_bom/ignore/me.txt diff --git a/pkg/chart/loader/testdata/frobnitz_with_bom/templates/template.tpl b/pkg/chart/v2/loader/testdata/frobnitz_with_bom/templates/template.tpl similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_bom/templates/template.tpl rename to pkg/chart/v2/loader/testdata/frobnitz_with_bom/templates/template.tpl diff --git a/pkg/chart/loader/testdata/frobnitz_with_bom/values.yaml b/pkg/chart/v2/loader/testdata/frobnitz_with_bom/values.yaml similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_bom/values.yaml rename to pkg/chart/v2/loader/testdata/frobnitz_with_bom/values.yaml diff --git a/pkg/chart/loader/testdata/frobnitz_with_dev_null/.helmignore b/pkg/chart/v2/loader/testdata/frobnitz_with_dev_null/.helmignore similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_dev_null/.helmignore rename to pkg/chart/v2/loader/testdata/frobnitz_with_dev_null/.helmignore diff --git a/pkg/chart/loader/testdata/frobnitz_with_dev_null/Chart.lock b/pkg/chart/v2/loader/testdata/frobnitz_with_dev_null/Chart.lock similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_dev_null/Chart.lock rename to pkg/chart/v2/loader/testdata/frobnitz_with_dev_null/Chart.lock diff --git a/pkg/chart/loader/testdata/frobnitz_with_dev_null/Chart.yaml b/pkg/chart/v2/loader/testdata/frobnitz_with_dev_null/Chart.yaml similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_dev_null/Chart.yaml rename to pkg/chart/v2/loader/testdata/frobnitz_with_dev_null/Chart.yaml diff --git a/pkg/chart/loader/testdata/frobnitz_with_dev_null/INSTALL.txt b/pkg/chart/v2/loader/testdata/frobnitz_with_dev_null/INSTALL.txt similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_dev_null/INSTALL.txt rename to pkg/chart/v2/loader/testdata/frobnitz_with_dev_null/INSTALL.txt diff --git a/pkg/chart/loader/testdata/frobnitz_with_dev_null/LICENSE b/pkg/chart/v2/loader/testdata/frobnitz_with_dev_null/LICENSE similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_dev_null/LICENSE rename to pkg/chart/v2/loader/testdata/frobnitz_with_dev_null/LICENSE diff --git a/pkg/chart/loader/testdata/frobnitz_with_dev_null/README.md b/pkg/chart/v2/loader/testdata/frobnitz_with_dev_null/README.md similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_dev_null/README.md rename to pkg/chart/v2/loader/testdata/frobnitz_with_dev_null/README.md diff --git a/pkg/chart/loader/testdata/frobnitz_with_dev_null/charts/_ignore_me b/pkg/chart/v2/loader/testdata/frobnitz_with_dev_null/charts/_ignore_me similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_dev_null/charts/_ignore_me rename to pkg/chart/v2/loader/testdata/frobnitz_with_dev_null/charts/_ignore_me diff --git a/pkg/chart/loader/testdata/frobnitz_with_dev_null/charts/alpine/Chart.yaml b/pkg/chart/v2/loader/testdata/frobnitz_with_dev_null/charts/alpine/Chart.yaml similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_dev_null/charts/alpine/Chart.yaml rename to pkg/chart/v2/loader/testdata/frobnitz_with_dev_null/charts/alpine/Chart.yaml diff --git a/pkg/chart/loader/testdata/frobnitz_with_dev_null/charts/alpine/README.md b/pkg/chart/v2/loader/testdata/frobnitz_with_dev_null/charts/alpine/README.md similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_dev_null/charts/alpine/README.md rename to pkg/chart/v2/loader/testdata/frobnitz_with_dev_null/charts/alpine/README.md diff --git a/pkg/chart/loader/testdata/frobnitz_with_dev_null/charts/alpine/charts/mast1/Chart.yaml b/pkg/chart/v2/loader/testdata/frobnitz_with_dev_null/charts/alpine/charts/mast1/Chart.yaml similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_dev_null/charts/alpine/charts/mast1/Chart.yaml rename to pkg/chart/v2/loader/testdata/frobnitz_with_dev_null/charts/alpine/charts/mast1/Chart.yaml diff --git a/pkg/chart/loader/testdata/frobnitz_with_dev_null/charts/alpine/charts/mast1/values.yaml b/pkg/chart/v2/loader/testdata/frobnitz_with_dev_null/charts/alpine/charts/mast1/values.yaml similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_dev_null/charts/alpine/charts/mast1/values.yaml rename to pkg/chart/v2/loader/testdata/frobnitz_with_dev_null/charts/alpine/charts/mast1/values.yaml diff --git a/pkg/chart/loader/testdata/frobnitz_with_dev_null/charts/alpine/charts/mast2-0.1.0.tgz b/pkg/chart/v2/loader/testdata/frobnitz_with_dev_null/charts/alpine/charts/mast2-0.1.0.tgz similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_dev_null/charts/alpine/charts/mast2-0.1.0.tgz rename to pkg/chart/v2/loader/testdata/frobnitz_with_dev_null/charts/alpine/charts/mast2-0.1.0.tgz diff --git a/pkg/chart/loader/testdata/frobnitz_with_dev_null/charts/alpine/templates/alpine-pod.yaml b/pkg/chart/v2/loader/testdata/frobnitz_with_dev_null/charts/alpine/templates/alpine-pod.yaml similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_dev_null/charts/alpine/templates/alpine-pod.yaml rename to pkg/chart/v2/loader/testdata/frobnitz_with_dev_null/charts/alpine/templates/alpine-pod.yaml diff --git a/pkg/chart/loader/testdata/frobnitz_with_dev_null/charts/alpine/values.yaml b/pkg/chart/v2/loader/testdata/frobnitz_with_dev_null/charts/alpine/values.yaml similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_dev_null/charts/alpine/values.yaml rename to pkg/chart/v2/loader/testdata/frobnitz_with_dev_null/charts/alpine/values.yaml diff --git a/pkg/chart/loader/testdata/frobnitz_with_dev_null/charts/mariner-4.3.2.tgz b/pkg/chart/v2/loader/testdata/frobnitz_with_dev_null/charts/mariner-4.3.2.tgz similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_dev_null/charts/mariner-4.3.2.tgz rename to pkg/chart/v2/loader/testdata/frobnitz_with_dev_null/charts/mariner-4.3.2.tgz diff --git a/pkg/chart/loader/testdata/frobnitz_with_dev_null/docs/README.md b/pkg/chart/v2/loader/testdata/frobnitz_with_dev_null/docs/README.md similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_dev_null/docs/README.md rename to pkg/chart/v2/loader/testdata/frobnitz_with_dev_null/docs/README.md diff --git a/pkg/chart/loader/testdata/frobnitz_with_dev_null/icon.svg b/pkg/chart/v2/loader/testdata/frobnitz_with_dev_null/icon.svg similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_dev_null/icon.svg rename to pkg/chart/v2/loader/testdata/frobnitz_with_dev_null/icon.svg diff --git a/pkg/chart/loader/testdata/frobnitz_with_dev_null/ignore/me.txt b/pkg/chart/v2/loader/testdata/frobnitz_with_dev_null/ignore/me.txt similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_dev_null/ignore/me.txt rename to pkg/chart/v2/loader/testdata/frobnitz_with_dev_null/ignore/me.txt diff --git a/pkg/chart/loader/testdata/frobnitz_with_dev_null/null b/pkg/chart/v2/loader/testdata/frobnitz_with_dev_null/null similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_dev_null/null rename to pkg/chart/v2/loader/testdata/frobnitz_with_dev_null/null diff --git a/pkg/chart/loader/testdata/frobnitz_with_dev_null/templates/template.tpl b/pkg/chart/v2/loader/testdata/frobnitz_with_dev_null/templates/template.tpl similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_dev_null/templates/template.tpl rename to pkg/chart/v2/loader/testdata/frobnitz_with_dev_null/templates/template.tpl diff --git a/pkg/chart/loader/testdata/frobnitz_with_dev_null/values.yaml b/pkg/chart/v2/loader/testdata/frobnitz_with_dev_null/values.yaml similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_dev_null/values.yaml rename to pkg/chart/v2/loader/testdata/frobnitz_with_dev_null/values.yaml diff --git a/pkg/chart/loader/testdata/frobnitz_with_symlink/.helmignore b/pkg/chart/v2/loader/testdata/frobnitz_with_symlink/.helmignore similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_symlink/.helmignore rename to pkg/chart/v2/loader/testdata/frobnitz_with_symlink/.helmignore diff --git a/pkg/chart/loader/testdata/frobnitz_with_symlink/Chart.lock b/pkg/chart/v2/loader/testdata/frobnitz_with_symlink/Chart.lock similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_symlink/Chart.lock rename to pkg/chart/v2/loader/testdata/frobnitz_with_symlink/Chart.lock diff --git a/pkg/chart/loader/testdata/frobnitz_with_symlink/Chart.yaml b/pkg/chart/v2/loader/testdata/frobnitz_with_symlink/Chart.yaml similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_symlink/Chart.yaml rename to pkg/chart/v2/loader/testdata/frobnitz_with_symlink/Chart.yaml diff --git a/pkg/chart/loader/testdata/frobnitz_with_symlink/INSTALL.txt b/pkg/chart/v2/loader/testdata/frobnitz_with_symlink/INSTALL.txt similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_symlink/INSTALL.txt rename to pkg/chart/v2/loader/testdata/frobnitz_with_symlink/INSTALL.txt diff --git a/pkg/chart/loader/testdata/frobnitz_with_symlink/README.md b/pkg/chart/v2/loader/testdata/frobnitz_with_symlink/README.md similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_symlink/README.md rename to pkg/chart/v2/loader/testdata/frobnitz_with_symlink/README.md diff --git a/pkg/chart/loader/testdata/frobnitz_with_symlink/charts/_ignore_me b/pkg/chart/v2/loader/testdata/frobnitz_with_symlink/charts/_ignore_me similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_symlink/charts/_ignore_me rename to pkg/chart/v2/loader/testdata/frobnitz_with_symlink/charts/_ignore_me diff --git a/pkg/chart/loader/testdata/frobnitz_with_symlink/charts/alpine/Chart.yaml b/pkg/chart/v2/loader/testdata/frobnitz_with_symlink/charts/alpine/Chart.yaml similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_symlink/charts/alpine/Chart.yaml rename to pkg/chart/v2/loader/testdata/frobnitz_with_symlink/charts/alpine/Chart.yaml diff --git a/pkg/chart/loader/testdata/frobnitz_with_symlink/charts/alpine/README.md b/pkg/chart/v2/loader/testdata/frobnitz_with_symlink/charts/alpine/README.md similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_symlink/charts/alpine/README.md rename to pkg/chart/v2/loader/testdata/frobnitz_with_symlink/charts/alpine/README.md diff --git a/pkg/chart/loader/testdata/frobnitz_with_symlink/charts/alpine/charts/mast1/Chart.yaml b/pkg/chart/v2/loader/testdata/frobnitz_with_symlink/charts/alpine/charts/mast1/Chart.yaml similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_symlink/charts/alpine/charts/mast1/Chart.yaml rename to pkg/chart/v2/loader/testdata/frobnitz_with_symlink/charts/alpine/charts/mast1/Chart.yaml diff --git a/pkg/chart/loader/testdata/frobnitz_with_symlink/charts/alpine/charts/mast1/values.yaml b/pkg/chart/v2/loader/testdata/frobnitz_with_symlink/charts/alpine/charts/mast1/values.yaml similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_symlink/charts/alpine/charts/mast1/values.yaml rename to pkg/chart/v2/loader/testdata/frobnitz_with_symlink/charts/alpine/charts/mast1/values.yaml diff --git a/pkg/chart/loader/testdata/frobnitz_with_symlink/charts/alpine/charts/mast2-0.1.0.tgz b/pkg/chart/v2/loader/testdata/frobnitz_with_symlink/charts/alpine/charts/mast2-0.1.0.tgz similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_symlink/charts/alpine/charts/mast2-0.1.0.tgz rename to pkg/chart/v2/loader/testdata/frobnitz_with_symlink/charts/alpine/charts/mast2-0.1.0.tgz diff --git a/pkg/chart/loader/testdata/frobnitz_with_symlink/charts/alpine/templates/alpine-pod.yaml b/pkg/chart/v2/loader/testdata/frobnitz_with_symlink/charts/alpine/templates/alpine-pod.yaml similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_symlink/charts/alpine/templates/alpine-pod.yaml rename to pkg/chart/v2/loader/testdata/frobnitz_with_symlink/charts/alpine/templates/alpine-pod.yaml diff --git a/pkg/chart/loader/testdata/frobnitz_with_symlink/charts/alpine/values.yaml b/pkg/chart/v2/loader/testdata/frobnitz_with_symlink/charts/alpine/values.yaml similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_symlink/charts/alpine/values.yaml rename to pkg/chart/v2/loader/testdata/frobnitz_with_symlink/charts/alpine/values.yaml diff --git a/pkg/chart/loader/testdata/frobnitz_with_symlink/charts/mariner-4.3.2.tgz b/pkg/chart/v2/loader/testdata/frobnitz_with_symlink/charts/mariner-4.3.2.tgz similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_symlink/charts/mariner-4.3.2.tgz rename to pkg/chart/v2/loader/testdata/frobnitz_with_symlink/charts/mariner-4.3.2.tgz diff --git a/pkg/chart/loader/testdata/frobnitz_with_symlink/docs/README.md b/pkg/chart/v2/loader/testdata/frobnitz_with_symlink/docs/README.md similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_symlink/docs/README.md rename to pkg/chart/v2/loader/testdata/frobnitz_with_symlink/docs/README.md diff --git a/pkg/chart/loader/testdata/frobnitz_with_symlink/icon.svg b/pkg/chart/v2/loader/testdata/frobnitz_with_symlink/icon.svg similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_symlink/icon.svg rename to pkg/chart/v2/loader/testdata/frobnitz_with_symlink/icon.svg diff --git a/pkg/chart/loader/testdata/frobnitz_with_symlink/ignore/me.txt b/pkg/chart/v2/loader/testdata/frobnitz_with_symlink/ignore/me.txt similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_symlink/ignore/me.txt rename to pkg/chart/v2/loader/testdata/frobnitz_with_symlink/ignore/me.txt diff --git a/pkg/chart/loader/testdata/frobnitz_with_symlink/templates/template.tpl b/pkg/chart/v2/loader/testdata/frobnitz_with_symlink/templates/template.tpl similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_symlink/templates/template.tpl rename to pkg/chart/v2/loader/testdata/frobnitz_with_symlink/templates/template.tpl diff --git a/pkg/chart/loader/testdata/frobnitz_with_symlink/values.yaml b/pkg/chart/v2/loader/testdata/frobnitz_with_symlink/values.yaml similarity index 100% rename from pkg/chart/loader/testdata/frobnitz_with_symlink/values.yaml rename to pkg/chart/v2/loader/testdata/frobnitz_with_symlink/values.yaml diff --git a/pkg/chart/loader/testdata/genfrob.sh b/pkg/chart/v2/loader/testdata/genfrob.sh similarity index 100% rename from pkg/chart/loader/testdata/genfrob.sh rename to pkg/chart/v2/loader/testdata/genfrob.sh diff --git a/pkg/chart/loader/testdata/mariner/Chart.yaml b/pkg/chart/v2/loader/testdata/mariner/Chart.yaml similarity index 100% rename from pkg/chart/loader/testdata/mariner/Chart.yaml rename to pkg/chart/v2/loader/testdata/mariner/Chart.yaml diff --git a/pkg/chart/loader/testdata/mariner/charts/albatross-0.1.0.tgz b/pkg/chart/v2/loader/testdata/mariner/charts/albatross-0.1.0.tgz similarity index 100% rename from pkg/chart/loader/testdata/mariner/charts/albatross-0.1.0.tgz rename to pkg/chart/v2/loader/testdata/mariner/charts/albatross-0.1.0.tgz diff --git a/pkg/chart/loader/testdata/mariner/templates/placeholder.tpl b/pkg/chart/v2/loader/testdata/mariner/templates/placeholder.tpl similarity index 100% rename from pkg/chart/loader/testdata/mariner/templates/placeholder.tpl rename to pkg/chart/v2/loader/testdata/mariner/templates/placeholder.tpl diff --git a/pkg/chart/loader/testdata/mariner/values.yaml b/pkg/chart/v2/loader/testdata/mariner/values.yaml similarity index 100% rename from pkg/chart/loader/testdata/mariner/values.yaml rename to pkg/chart/v2/loader/testdata/mariner/values.yaml diff --git a/pkg/chart/metadata.go b/pkg/chart/v2/metadata.go similarity index 99% rename from pkg/chart/metadata.go rename to pkg/chart/v2/metadata.go index a08a97cd1..d213a3491 100644 --- a/pkg/chart/metadata.go +++ b/pkg/chart/v2/metadata.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package chart +package v2 import ( "path/filepath" diff --git a/pkg/chart/metadata_test.go b/pkg/chart/v2/metadata_test.go similarity index 99% rename from pkg/chart/metadata_test.go rename to pkg/chart/v2/metadata_test.go index 62aea7261..7892f0209 100644 --- a/pkg/chart/metadata_test.go +++ b/pkg/chart/v2/metadata_test.go @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ -package chart +package v2 import ( "testing" diff --git a/pkg/chart/util/capabilities.go b/pkg/chart/v2/util/capabilities.go similarity index 100% rename from pkg/chart/util/capabilities.go rename to pkg/chart/v2/util/capabilities.go diff --git a/pkg/chart/util/capabilities_test.go b/pkg/chart/v2/util/capabilities_test.go similarity index 100% rename from pkg/chart/util/capabilities_test.go rename to pkg/chart/v2/util/capabilities_test.go diff --git a/pkg/chart/util/chartfile.go b/pkg/chart/v2/util/chartfile.go similarity index 98% rename from pkg/chart/util/chartfile.go rename to pkg/chart/v2/util/chartfile.go index acab80d0a..87323c201 100644 --- a/pkg/chart/util/chartfile.go +++ b/pkg/chart/v2/util/chartfile.go @@ -23,7 +23,7 @@ import ( "github.com/pkg/errors" "sigs.k8s.io/yaml" - "helm.sh/helm/v4/pkg/chart" + chart "helm.sh/helm/v4/pkg/chart/v2" ) // LoadChartfile loads a Chart.yaml file into a *chart.Metadata. diff --git a/pkg/chart/util/chartfile_test.go b/pkg/chart/v2/util/chartfile_test.go similarity index 98% rename from pkg/chart/util/chartfile_test.go rename to pkg/chart/v2/util/chartfile_test.go index 6eb599680..a2896b235 100644 --- a/pkg/chart/util/chartfile_test.go +++ b/pkg/chart/v2/util/chartfile_test.go @@ -19,7 +19,7 @@ package util import ( "testing" - "helm.sh/helm/v4/pkg/chart" + chart "helm.sh/helm/v4/pkg/chart/v2" ) const testfile = "testdata/chartfiletest.yaml" diff --git a/pkg/chart/util/coalesce.go b/pkg/chart/v2/util/coalesce.go similarity index 99% rename from pkg/chart/util/coalesce.go rename to pkg/chart/v2/util/coalesce.go index 9ab5c1015..33d2d2833 100644 --- a/pkg/chart/util/coalesce.go +++ b/pkg/chart/v2/util/coalesce.go @@ -23,7 +23,7 @@ import ( "github.com/mitchellh/copystructure" "github.com/pkg/errors" - "helm.sh/helm/v4/pkg/chart" + chart "helm.sh/helm/v4/pkg/chart/v2" ) func concatPrefix(a, b string) string { diff --git a/pkg/chart/util/coalesce_test.go b/pkg/chart/v2/util/coalesce_test.go similarity index 99% rename from pkg/chart/util/coalesce_test.go rename to pkg/chart/v2/util/coalesce_test.go index 5a8dfe94a..3d4ee4fa8 100644 --- a/pkg/chart/util/coalesce_test.go +++ b/pkg/chart/v2/util/coalesce_test.go @@ -23,7 +23,7 @@ import ( "github.com/stretchr/testify/assert" - "helm.sh/helm/v4/pkg/chart" + chart "helm.sh/helm/v4/pkg/chart/v2" ) // ref: http://www.yaml.org/spec/1.2/spec.html#id2803362 diff --git a/pkg/chart/util/compatible.go b/pkg/chart/v2/util/compatible.go similarity index 100% rename from pkg/chart/util/compatible.go rename to pkg/chart/v2/util/compatible.go diff --git a/pkg/chart/util/compatible_test.go b/pkg/chart/v2/util/compatible_test.go similarity index 100% rename from pkg/chart/util/compatible_test.go rename to pkg/chart/v2/util/compatible_test.go diff --git a/pkg/chart/util/create.go b/pkg/chart/v2/util/create.go similarity index 99% rename from pkg/chart/util/create.go rename to pkg/chart/v2/util/create.go index dfb5099f2..7eb3398f5 100644 --- a/pkg/chart/util/create.go +++ b/pkg/chart/v2/util/create.go @@ -27,8 +27,8 @@ import ( "github.com/pkg/errors" "sigs.k8s.io/yaml" - "helm.sh/helm/v4/pkg/chart" - "helm.sh/helm/v4/pkg/chart/loader" + chart "helm.sh/helm/v4/pkg/chart/v2" + "helm.sh/helm/v4/pkg/chart/v2/loader" ) // chartName is a regular expression for testing the supplied name of a chart. diff --git a/pkg/chart/util/create_test.go b/pkg/chart/v2/util/create_test.go similarity index 98% rename from pkg/chart/util/create_test.go rename to pkg/chart/v2/util/create_test.go index e67ce3e1f..086c4e5c8 100644 --- a/pkg/chart/util/create_test.go +++ b/pkg/chart/v2/util/create_test.go @@ -22,8 +22,8 @@ import ( "path/filepath" "testing" - "helm.sh/helm/v4/pkg/chart" - "helm.sh/helm/v4/pkg/chart/loader" + chart "helm.sh/helm/v4/pkg/chart/v2" + "helm.sh/helm/v4/pkg/chart/v2/loader" ) func TestCreate(t *testing.T) { diff --git a/pkg/chart/util/dependencies.go b/pkg/chart/v2/util/dependencies.go similarity index 99% rename from pkg/chart/util/dependencies.go rename to pkg/chart/v2/util/dependencies.go index fb9052d71..78ed46517 100644 --- a/pkg/chart/util/dependencies.go +++ b/pkg/chart/v2/util/dependencies.go @@ -21,7 +21,7 @@ import ( "github.com/mitchellh/copystructure" - "helm.sh/helm/v4/pkg/chart" + chart "helm.sh/helm/v4/pkg/chart/v2" ) // ProcessDependencies checks through this chart's dependencies, processing accordingly. diff --git a/pkg/chart/util/dependencies_test.go b/pkg/chart/v2/util/dependencies_test.go similarity index 99% rename from pkg/chart/util/dependencies_test.go rename to pkg/chart/v2/util/dependencies_test.go index 10fca265e..5bd332990 100644 --- a/pkg/chart/util/dependencies_test.go +++ b/pkg/chart/v2/util/dependencies_test.go @@ -22,8 +22,8 @@ import ( "strconv" "testing" - "helm.sh/helm/v4/pkg/chart" - "helm.sh/helm/v4/pkg/chart/loader" + chart "helm.sh/helm/v4/pkg/chart/v2" + "helm.sh/helm/v4/pkg/chart/v2/loader" ) func loadChart(t *testing.T, path string) *chart.Chart { diff --git a/pkg/chart/util/doc.go b/pkg/chart/v2/util/doc.go similarity index 95% rename from pkg/chart/util/doc.go rename to pkg/chart/v2/util/doc.go index 587fcaeb1..141062074 100644 --- a/pkg/chart/util/doc.go +++ b/pkg/chart/v2/util/doc.go @@ -42,4 +42,4 @@ into a Chart. When creating charts in memory, use the 'helm.sh/helm/pkg/chart' package directly. */ -package util // import chartutil "helm.sh/helm/v4/pkg/chart/util" +package util // import chartutil "helm.sh/helm/v4/pkg/chart/v2/util" diff --git a/pkg/chart/util/errors.go b/pkg/chart/v2/util/errors.go similarity index 100% rename from pkg/chart/util/errors.go rename to pkg/chart/v2/util/errors.go diff --git a/pkg/chart/util/errors_test.go b/pkg/chart/v2/util/errors_test.go similarity index 100% rename from pkg/chart/util/errors_test.go rename to pkg/chart/v2/util/errors_test.go diff --git a/pkg/chart/util/expand.go b/pkg/chart/v2/util/expand.go similarity index 96% rename from pkg/chart/util/expand.go rename to pkg/chart/v2/util/expand.go index 4b83bf584..e05a1a984 100644 --- a/pkg/chart/util/expand.go +++ b/pkg/chart/v2/util/expand.go @@ -25,8 +25,8 @@ import ( "github.com/pkg/errors" "sigs.k8s.io/yaml" - "helm.sh/helm/v4/pkg/chart" - "helm.sh/helm/v4/pkg/chart/loader" + chart "helm.sh/helm/v4/pkg/chart/v2" + "helm.sh/helm/v4/pkg/chart/v2/loader" ) // Expand uncompresses and extracts a chart into the specified directory. diff --git a/pkg/chart/util/expand_test.go b/pkg/chart/v2/util/expand_test.go similarity index 100% rename from pkg/chart/util/expand_test.go rename to pkg/chart/v2/util/expand_test.go diff --git a/pkg/chart/util/jsonschema.go b/pkg/chart/v2/util/jsonschema.go similarity index 98% rename from pkg/chart/util/jsonschema.go rename to pkg/chart/v2/util/jsonschema.go index 616c6d444..615dc5320 100644 --- a/pkg/chart/util/jsonschema.go +++ b/pkg/chart/v2/util/jsonschema.go @@ -25,7 +25,7 @@ import ( "github.com/xeipuuv/gojsonschema" "sigs.k8s.io/yaml" - "helm.sh/helm/v4/pkg/chart" + chart "helm.sh/helm/v4/pkg/chart/v2" ) // ValidateAgainstSchema checks that values does not violate the structure laid out in schema diff --git a/pkg/chart/util/jsonschema_test.go b/pkg/chart/v2/util/jsonschema_test.go similarity index 99% rename from pkg/chart/util/jsonschema_test.go rename to pkg/chart/v2/util/jsonschema_test.go index c5600044a..3e3315732 100644 --- a/pkg/chart/util/jsonschema_test.go +++ b/pkg/chart/v2/util/jsonschema_test.go @@ -20,7 +20,7 @@ import ( "os" "testing" - "helm.sh/helm/v4/pkg/chart" + chart "helm.sh/helm/v4/pkg/chart/v2" ) func TestValidateAgainstSingleSchema(t *testing.T) { diff --git a/pkg/chart/util/save.go b/pkg/chart/v2/util/save.go similarity index 99% rename from pkg/chart/util/save.go rename to pkg/chart/v2/util/save.go index 635ff7944..e1285ac88 100644 --- a/pkg/chart/util/save.go +++ b/pkg/chart/v2/util/save.go @@ -28,7 +28,7 @@ import ( "github.com/pkg/errors" "sigs.k8s.io/yaml" - "helm.sh/helm/v4/pkg/chart" + chart "helm.sh/helm/v4/pkg/chart/v2" ) var headerBytes = []byte("+aHR0cHM6Ly95b3V0dS5iZS96OVV6MWljandyTQo=") diff --git a/pkg/chart/util/save_test.go b/pkg/chart/v2/util/save_test.go similarity index 98% rename from pkg/chart/util/save_test.go rename to pkg/chart/v2/util/save_test.go index a7338c8d7..ff96331b5 100644 --- a/pkg/chart/util/save_test.go +++ b/pkg/chart/v2/util/save_test.go @@ -29,8 +29,8 @@ import ( "testing" "time" - "helm.sh/helm/v4/pkg/chart" - "helm.sh/helm/v4/pkg/chart/loader" + chart "helm.sh/helm/v4/pkg/chart/v2" + "helm.sh/helm/v4/pkg/chart/v2/loader" ) func TestSave(t *testing.T) { diff --git a/pkg/chart/util/testdata/chartfiletest.yaml b/pkg/chart/v2/util/testdata/chartfiletest.yaml similarity index 100% rename from pkg/chart/util/testdata/chartfiletest.yaml rename to pkg/chart/v2/util/testdata/chartfiletest.yaml diff --git a/pkg/chart/util/testdata/coleridge.yaml b/pkg/chart/v2/util/testdata/coleridge.yaml similarity index 100% rename from pkg/chart/util/testdata/coleridge.yaml rename to pkg/chart/v2/util/testdata/coleridge.yaml diff --git a/pkg/chart/util/testdata/dependent-chart-alias/.helmignore b/pkg/chart/v2/util/testdata/dependent-chart-alias/.helmignore similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-alias/.helmignore rename to pkg/chart/v2/util/testdata/dependent-chart-alias/.helmignore diff --git a/pkg/chart/util/testdata/dependent-chart-alias/Chart.lock b/pkg/chart/v2/util/testdata/dependent-chart-alias/Chart.lock similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-alias/Chart.lock rename to pkg/chart/v2/util/testdata/dependent-chart-alias/Chart.lock diff --git a/pkg/chart/util/testdata/dependent-chart-alias/Chart.yaml b/pkg/chart/v2/util/testdata/dependent-chart-alias/Chart.yaml similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-alias/Chart.yaml rename to pkg/chart/v2/util/testdata/dependent-chart-alias/Chart.yaml diff --git a/pkg/chart/util/testdata/dependent-chart-alias/INSTALL.txt b/pkg/chart/v2/util/testdata/dependent-chart-alias/INSTALL.txt similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-alias/INSTALL.txt rename to pkg/chart/v2/util/testdata/dependent-chart-alias/INSTALL.txt diff --git a/pkg/chart/util/testdata/dependent-chart-alias/LICENSE b/pkg/chart/v2/util/testdata/dependent-chart-alias/LICENSE similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-alias/LICENSE rename to pkg/chart/v2/util/testdata/dependent-chart-alias/LICENSE diff --git a/pkg/chart/util/testdata/dependent-chart-alias/README.md b/pkg/chart/v2/util/testdata/dependent-chart-alias/README.md similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-alias/README.md rename to pkg/chart/v2/util/testdata/dependent-chart-alias/README.md diff --git a/pkg/chart/util/testdata/dependent-chart-alias/charts/_ignore_me b/pkg/chart/v2/util/testdata/dependent-chart-alias/charts/_ignore_me similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-alias/charts/_ignore_me rename to pkg/chart/v2/util/testdata/dependent-chart-alias/charts/_ignore_me diff --git a/pkg/chart/util/testdata/dependent-chart-alias/charts/alpine/Chart.yaml b/pkg/chart/v2/util/testdata/dependent-chart-alias/charts/alpine/Chart.yaml similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-alias/charts/alpine/Chart.yaml rename to pkg/chart/v2/util/testdata/dependent-chart-alias/charts/alpine/Chart.yaml diff --git a/pkg/chart/util/testdata/dependent-chart-alias/charts/alpine/README.md b/pkg/chart/v2/util/testdata/dependent-chart-alias/charts/alpine/README.md similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-alias/charts/alpine/README.md rename to pkg/chart/v2/util/testdata/dependent-chart-alias/charts/alpine/README.md diff --git a/pkg/chart/util/testdata/dependent-chart-alias/charts/alpine/charts/mast1/Chart.yaml b/pkg/chart/v2/util/testdata/dependent-chart-alias/charts/alpine/charts/mast1/Chart.yaml similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-alias/charts/alpine/charts/mast1/Chart.yaml rename to pkg/chart/v2/util/testdata/dependent-chart-alias/charts/alpine/charts/mast1/Chart.yaml diff --git a/pkg/chart/util/testdata/dependent-chart-alias/charts/alpine/charts/mast1/values.yaml b/pkg/chart/v2/util/testdata/dependent-chart-alias/charts/alpine/charts/mast1/values.yaml similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-alias/charts/alpine/charts/mast1/values.yaml rename to pkg/chart/v2/util/testdata/dependent-chart-alias/charts/alpine/charts/mast1/values.yaml diff --git a/pkg/chart/util/testdata/dependent-chart-alias/charts/alpine/charts/mast2-0.1.0.tgz b/pkg/chart/v2/util/testdata/dependent-chart-alias/charts/alpine/charts/mast2-0.1.0.tgz similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-alias/charts/alpine/charts/mast2-0.1.0.tgz rename to pkg/chart/v2/util/testdata/dependent-chart-alias/charts/alpine/charts/mast2-0.1.0.tgz diff --git a/pkg/chart/util/testdata/dependent-chart-alias/charts/alpine/templates/alpine-pod.yaml b/pkg/chart/v2/util/testdata/dependent-chart-alias/charts/alpine/templates/alpine-pod.yaml similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-alias/charts/alpine/templates/alpine-pod.yaml rename to pkg/chart/v2/util/testdata/dependent-chart-alias/charts/alpine/templates/alpine-pod.yaml diff --git a/pkg/chart/util/testdata/dependent-chart-alias/charts/alpine/values.yaml b/pkg/chart/v2/util/testdata/dependent-chart-alias/charts/alpine/values.yaml similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-alias/charts/alpine/values.yaml rename to pkg/chart/v2/util/testdata/dependent-chart-alias/charts/alpine/values.yaml diff --git a/pkg/chart/util/testdata/dependent-chart-alias/charts/mariner-4.3.2.tgz b/pkg/chart/v2/util/testdata/dependent-chart-alias/charts/mariner-4.3.2.tgz similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-alias/charts/mariner-4.3.2.tgz rename to pkg/chart/v2/util/testdata/dependent-chart-alias/charts/mariner-4.3.2.tgz diff --git a/pkg/chart/util/testdata/dependent-chart-alias/docs/README.md b/pkg/chart/v2/util/testdata/dependent-chart-alias/docs/README.md similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-alias/docs/README.md rename to pkg/chart/v2/util/testdata/dependent-chart-alias/docs/README.md diff --git a/pkg/chart/util/testdata/dependent-chart-alias/icon.svg b/pkg/chart/v2/util/testdata/dependent-chart-alias/icon.svg similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-alias/icon.svg rename to pkg/chart/v2/util/testdata/dependent-chart-alias/icon.svg diff --git a/pkg/chart/util/testdata/dependent-chart-alias/ignore/me.txt b/pkg/chart/v2/util/testdata/dependent-chart-alias/ignore/me.txt similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-alias/ignore/me.txt rename to pkg/chart/v2/util/testdata/dependent-chart-alias/ignore/me.txt diff --git a/pkg/chart/util/testdata/dependent-chart-alias/templates/template.tpl b/pkg/chart/v2/util/testdata/dependent-chart-alias/templates/template.tpl similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-alias/templates/template.tpl rename to pkg/chart/v2/util/testdata/dependent-chart-alias/templates/template.tpl diff --git a/pkg/chart/util/testdata/dependent-chart-alias/values.yaml b/pkg/chart/v2/util/testdata/dependent-chart-alias/values.yaml similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-alias/values.yaml rename to pkg/chart/v2/util/testdata/dependent-chart-alias/values.yaml diff --git a/pkg/chart/util/testdata/dependent-chart-helmignore/.helmignore b/pkg/chart/v2/util/testdata/dependent-chart-helmignore/.helmignore similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-helmignore/.helmignore rename to pkg/chart/v2/util/testdata/dependent-chart-helmignore/.helmignore diff --git a/pkg/chart/util/testdata/dependent-chart-helmignore/Chart.yaml b/pkg/chart/v2/util/testdata/dependent-chart-helmignore/Chart.yaml similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-helmignore/Chart.yaml rename to pkg/chart/v2/util/testdata/dependent-chart-helmignore/Chart.yaml diff --git a/pkg/chart/util/testdata/dependent-chart-helmignore/charts/.ignore_me b/pkg/chart/v2/util/testdata/dependent-chart-helmignore/charts/.ignore_me similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-helmignore/charts/.ignore_me rename to pkg/chart/v2/util/testdata/dependent-chart-helmignore/charts/.ignore_me diff --git a/pkg/chart/util/testdata/dependent-chart-helmignore/charts/_ignore_me b/pkg/chart/v2/util/testdata/dependent-chart-helmignore/charts/_ignore_me similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-helmignore/charts/_ignore_me rename to pkg/chart/v2/util/testdata/dependent-chart-helmignore/charts/_ignore_me diff --git a/pkg/chart/util/testdata/dependent-chart-helmignore/charts/alpine/Chart.yaml b/pkg/chart/v2/util/testdata/dependent-chart-helmignore/charts/alpine/Chart.yaml similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-helmignore/charts/alpine/Chart.yaml rename to pkg/chart/v2/util/testdata/dependent-chart-helmignore/charts/alpine/Chart.yaml diff --git a/pkg/chart/util/testdata/dependent-chart-helmignore/charts/alpine/README.md b/pkg/chart/v2/util/testdata/dependent-chart-helmignore/charts/alpine/README.md similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-helmignore/charts/alpine/README.md rename to pkg/chart/v2/util/testdata/dependent-chart-helmignore/charts/alpine/README.md diff --git a/pkg/chart/util/testdata/dependent-chart-helmignore/charts/alpine/charts/mast1/Chart.yaml b/pkg/chart/v2/util/testdata/dependent-chart-helmignore/charts/alpine/charts/mast1/Chart.yaml similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-helmignore/charts/alpine/charts/mast1/Chart.yaml rename to pkg/chart/v2/util/testdata/dependent-chart-helmignore/charts/alpine/charts/mast1/Chart.yaml diff --git a/pkg/chart/util/testdata/dependent-chart-helmignore/charts/alpine/charts/mast1/values.yaml b/pkg/chart/v2/util/testdata/dependent-chart-helmignore/charts/alpine/charts/mast1/values.yaml similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-helmignore/charts/alpine/charts/mast1/values.yaml rename to pkg/chart/v2/util/testdata/dependent-chart-helmignore/charts/alpine/charts/mast1/values.yaml diff --git a/pkg/chart/util/testdata/dependent-chart-helmignore/charts/alpine/charts/mast2-0.1.0.tgz b/pkg/chart/v2/util/testdata/dependent-chart-helmignore/charts/alpine/charts/mast2-0.1.0.tgz similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-helmignore/charts/alpine/charts/mast2-0.1.0.tgz rename to pkg/chart/v2/util/testdata/dependent-chart-helmignore/charts/alpine/charts/mast2-0.1.0.tgz diff --git a/pkg/chart/util/testdata/dependent-chart-helmignore/charts/alpine/templates/alpine-pod.yaml b/pkg/chart/v2/util/testdata/dependent-chart-helmignore/charts/alpine/templates/alpine-pod.yaml similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-helmignore/charts/alpine/templates/alpine-pod.yaml rename to pkg/chart/v2/util/testdata/dependent-chart-helmignore/charts/alpine/templates/alpine-pod.yaml diff --git a/pkg/chart/util/testdata/dependent-chart-helmignore/charts/alpine/values.yaml b/pkg/chart/v2/util/testdata/dependent-chart-helmignore/charts/alpine/values.yaml similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-helmignore/charts/alpine/values.yaml rename to pkg/chart/v2/util/testdata/dependent-chart-helmignore/charts/alpine/values.yaml diff --git a/pkg/chart/util/testdata/dependent-chart-helmignore/templates/template.tpl b/pkg/chart/v2/util/testdata/dependent-chart-helmignore/templates/template.tpl similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-helmignore/templates/template.tpl rename to pkg/chart/v2/util/testdata/dependent-chart-helmignore/templates/template.tpl diff --git a/pkg/chart/util/testdata/dependent-chart-helmignore/values.yaml b/pkg/chart/v2/util/testdata/dependent-chart-helmignore/values.yaml similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-helmignore/values.yaml rename to pkg/chart/v2/util/testdata/dependent-chart-helmignore/values.yaml diff --git a/pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/.helmignore b/pkg/chart/v2/util/testdata/dependent-chart-no-requirements-yaml/.helmignore similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/.helmignore rename to pkg/chart/v2/util/testdata/dependent-chart-no-requirements-yaml/.helmignore diff --git a/pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/Chart.yaml b/pkg/chart/v2/util/testdata/dependent-chart-no-requirements-yaml/Chart.yaml similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/Chart.yaml rename to pkg/chart/v2/util/testdata/dependent-chart-no-requirements-yaml/Chart.yaml diff --git a/pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/INSTALL.txt b/pkg/chart/v2/util/testdata/dependent-chart-no-requirements-yaml/INSTALL.txt similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/INSTALL.txt rename to pkg/chart/v2/util/testdata/dependent-chart-no-requirements-yaml/INSTALL.txt diff --git a/pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/LICENSE b/pkg/chart/v2/util/testdata/dependent-chart-no-requirements-yaml/LICENSE similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/LICENSE rename to pkg/chart/v2/util/testdata/dependent-chart-no-requirements-yaml/LICENSE diff --git a/pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/README.md b/pkg/chart/v2/util/testdata/dependent-chart-no-requirements-yaml/README.md similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/README.md rename to pkg/chart/v2/util/testdata/dependent-chart-no-requirements-yaml/README.md diff --git a/pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/charts/_ignore_me b/pkg/chart/v2/util/testdata/dependent-chart-no-requirements-yaml/charts/_ignore_me similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/charts/_ignore_me rename to pkg/chart/v2/util/testdata/dependent-chart-no-requirements-yaml/charts/_ignore_me diff --git a/pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/charts/alpine/Chart.yaml b/pkg/chart/v2/util/testdata/dependent-chart-no-requirements-yaml/charts/alpine/Chart.yaml similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/charts/alpine/Chart.yaml rename to pkg/chart/v2/util/testdata/dependent-chart-no-requirements-yaml/charts/alpine/Chart.yaml diff --git a/pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/charts/alpine/README.md b/pkg/chart/v2/util/testdata/dependent-chart-no-requirements-yaml/charts/alpine/README.md similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/charts/alpine/README.md rename to pkg/chart/v2/util/testdata/dependent-chart-no-requirements-yaml/charts/alpine/README.md diff --git a/pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/charts/alpine/charts/mast1/Chart.yaml b/pkg/chart/v2/util/testdata/dependent-chart-no-requirements-yaml/charts/alpine/charts/mast1/Chart.yaml similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/charts/alpine/charts/mast1/Chart.yaml rename to pkg/chart/v2/util/testdata/dependent-chart-no-requirements-yaml/charts/alpine/charts/mast1/Chart.yaml diff --git a/pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/charts/alpine/charts/mast1/values.yaml b/pkg/chart/v2/util/testdata/dependent-chart-no-requirements-yaml/charts/alpine/charts/mast1/values.yaml similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/charts/alpine/charts/mast1/values.yaml rename to pkg/chart/v2/util/testdata/dependent-chart-no-requirements-yaml/charts/alpine/charts/mast1/values.yaml diff --git a/pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/charts/alpine/charts/mast2-0.1.0.tgz b/pkg/chart/v2/util/testdata/dependent-chart-no-requirements-yaml/charts/alpine/charts/mast2-0.1.0.tgz similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/charts/alpine/charts/mast2-0.1.0.tgz rename to pkg/chart/v2/util/testdata/dependent-chart-no-requirements-yaml/charts/alpine/charts/mast2-0.1.0.tgz diff --git a/pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/charts/alpine/templates/alpine-pod.yaml b/pkg/chart/v2/util/testdata/dependent-chart-no-requirements-yaml/charts/alpine/templates/alpine-pod.yaml similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/charts/alpine/templates/alpine-pod.yaml rename to pkg/chart/v2/util/testdata/dependent-chart-no-requirements-yaml/charts/alpine/templates/alpine-pod.yaml diff --git a/pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/charts/alpine/values.yaml b/pkg/chart/v2/util/testdata/dependent-chart-no-requirements-yaml/charts/alpine/values.yaml similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/charts/alpine/values.yaml rename to pkg/chart/v2/util/testdata/dependent-chart-no-requirements-yaml/charts/alpine/values.yaml diff --git a/pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/charts/mariner-4.3.2.tgz b/pkg/chart/v2/util/testdata/dependent-chart-no-requirements-yaml/charts/mariner-4.3.2.tgz similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/charts/mariner-4.3.2.tgz rename to pkg/chart/v2/util/testdata/dependent-chart-no-requirements-yaml/charts/mariner-4.3.2.tgz diff --git a/pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/docs/README.md b/pkg/chart/v2/util/testdata/dependent-chart-no-requirements-yaml/docs/README.md similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/docs/README.md rename to pkg/chart/v2/util/testdata/dependent-chart-no-requirements-yaml/docs/README.md diff --git a/pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/icon.svg b/pkg/chart/v2/util/testdata/dependent-chart-no-requirements-yaml/icon.svg similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/icon.svg rename to pkg/chart/v2/util/testdata/dependent-chart-no-requirements-yaml/icon.svg diff --git a/pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/ignore/me.txt b/pkg/chart/v2/util/testdata/dependent-chart-no-requirements-yaml/ignore/me.txt similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/ignore/me.txt rename to pkg/chart/v2/util/testdata/dependent-chart-no-requirements-yaml/ignore/me.txt diff --git a/pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/templates/template.tpl b/pkg/chart/v2/util/testdata/dependent-chart-no-requirements-yaml/templates/template.tpl similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/templates/template.tpl rename to pkg/chart/v2/util/testdata/dependent-chart-no-requirements-yaml/templates/template.tpl diff --git a/pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/values.yaml b/pkg/chart/v2/util/testdata/dependent-chart-no-requirements-yaml/values.yaml similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-no-requirements-yaml/values.yaml rename to pkg/chart/v2/util/testdata/dependent-chart-no-requirements-yaml/values.yaml diff --git a/pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/.helmignore b/pkg/chart/v2/util/testdata/dependent-chart-with-all-in-requirements-yaml/.helmignore similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/.helmignore rename to pkg/chart/v2/util/testdata/dependent-chart-with-all-in-requirements-yaml/.helmignore diff --git a/pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/Chart.yaml b/pkg/chart/v2/util/testdata/dependent-chart-with-all-in-requirements-yaml/Chart.yaml similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/Chart.yaml rename to pkg/chart/v2/util/testdata/dependent-chart-with-all-in-requirements-yaml/Chart.yaml diff --git a/pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/INSTALL.txt b/pkg/chart/v2/util/testdata/dependent-chart-with-all-in-requirements-yaml/INSTALL.txt similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/INSTALL.txt rename to pkg/chart/v2/util/testdata/dependent-chart-with-all-in-requirements-yaml/INSTALL.txt diff --git a/pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/LICENSE b/pkg/chart/v2/util/testdata/dependent-chart-with-all-in-requirements-yaml/LICENSE similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/LICENSE rename to pkg/chart/v2/util/testdata/dependent-chart-with-all-in-requirements-yaml/LICENSE diff --git a/pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/README.md b/pkg/chart/v2/util/testdata/dependent-chart-with-all-in-requirements-yaml/README.md similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/README.md rename to pkg/chart/v2/util/testdata/dependent-chart-with-all-in-requirements-yaml/README.md diff --git a/pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/_ignore_me b/pkg/chart/v2/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/_ignore_me similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/_ignore_me rename to pkg/chart/v2/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/_ignore_me diff --git a/pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/Chart.yaml b/pkg/chart/v2/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/Chart.yaml similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/Chart.yaml rename to pkg/chart/v2/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/Chart.yaml diff --git a/pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/README.md b/pkg/chart/v2/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/README.md similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/README.md rename to pkg/chart/v2/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/README.md diff --git a/pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/charts/mast1/Chart.yaml b/pkg/chart/v2/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/charts/mast1/Chart.yaml similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/charts/mast1/Chart.yaml rename to pkg/chart/v2/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/charts/mast1/Chart.yaml diff --git a/pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/charts/mast1/values.yaml b/pkg/chart/v2/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/charts/mast1/values.yaml similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/charts/mast1/values.yaml rename to pkg/chart/v2/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/charts/mast1/values.yaml diff --git a/pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/charts/mast2-0.1.0.tgz b/pkg/chart/v2/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/charts/mast2-0.1.0.tgz similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/charts/mast2-0.1.0.tgz rename to pkg/chart/v2/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/charts/mast2-0.1.0.tgz diff --git a/pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/templates/alpine-pod.yaml b/pkg/chart/v2/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/templates/alpine-pod.yaml similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/templates/alpine-pod.yaml rename to pkg/chart/v2/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/templates/alpine-pod.yaml diff --git a/pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/values.yaml b/pkg/chart/v2/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/values.yaml similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/values.yaml rename to pkg/chart/v2/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/alpine/values.yaml diff --git a/pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/mariner-4.3.2.tgz b/pkg/chart/v2/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/mariner-4.3.2.tgz similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/mariner-4.3.2.tgz rename to pkg/chart/v2/util/testdata/dependent-chart-with-all-in-requirements-yaml/charts/mariner-4.3.2.tgz diff --git a/pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/docs/README.md b/pkg/chart/v2/util/testdata/dependent-chart-with-all-in-requirements-yaml/docs/README.md similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/docs/README.md rename to pkg/chart/v2/util/testdata/dependent-chart-with-all-in-requirements-yaml/docs/README.md diff --git a/pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/icon.svg b/pkg/chart/v2/util/testdata/dependent-chart-with-all-in-requirements-yaml/icon.svg similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/icon.svg rename to pkg/chart/v2/util/testdata/dependent-chart-with-all-in-requirements-yaml/icon.svg diff --git a/pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/ignore/me.txt b/pkg/chart/v2/util/testdata/dependent-chart-with-all-in-requirements-yaml/ignore/me.txt similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/ignore/me.txt rename to pkg/chart/v2/util/testdata/dependent-chart-with-all-in-requirements-yaml/ignore/me.txt diff --git a/pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/templates/template.tpl b/pkg/chart/v2/util/testdata/dependent-chart-with-all-in-requirements-yaml/templates/template.tpl similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/templates/template.tpl rename to pkg/chart/v2/util/testdata/dependent-chart-with-all-in-requirements-yaml/templates/template.tpl diff --git a/pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/values.yaml b/pkg/chart/v2/util/testdata/dependent-chart-with-all-in-requirements-yaml/values.yaml similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-with-all-in-requirements-yaml/values.yaml rename to pkg/chart/v2/util/testdata/dependent-chart-with-all-in-requirements-yaml/values.yaml diff --git a/pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/.helmignore b/pkg/chart/v2/util/testdata/dependent-chart-with-mixed-requirements-yaml/.helmignore similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/.helmignore rename to pkg/chart/v2/util/testdata/dependent-chart-with-mixed-requirements-yaml/.helmignore diff --git a/pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/Chart.yaml b/pkg/chart/v2/util/testdata/dependent-chart-with-mixed-requirements-yaml/Chart.yaml similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/Chart.yaml rename to pkg/chart/v2/util/testdata/dependent-chart-with-mixed-requirements-yaml/Chart.yaml diff --git a/pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/INSTALL.txt b/pkg/chart/v2/util/testdata/dependent-chart-with-mixed-requirements-yaml/INSTALL.txt similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/INSTALL.txt rename to pkg/chart/v2/util/testdata/dependent-chart-with-mixed-requirements-yaml/INSTALL.txt diff --git a/pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/LICENSE b/pkg/chart/v2/util/testdata/dependent-chart-with-mixed-requirements-yaml/LICENSE similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/LICENSE rename to pkg/chart/v2/util/testdata/dependent-chart-with-mixed-requirements-yaml/LICENSE diff --git a/pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/README.md b/pkg/chart/v2/util/testdata/dependent-chart-with-mixed-requirements-yaml/README.md similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/README.md rename to pkg/chart/v2/util/testdata/dependent-chart-with-mixed-requirements-yaml/README.md diff --git a/pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/_ignore_me b/pkg/chart/v2/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/_ignore_me similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/_ignore_me rename to pkg/chart/v2/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/_ignore_me diff --git a/pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/Chart.yaml b/pkg/chart/v2/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/Chart.yaml similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/Chart.yaml rename to pkg/chart/v2/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/Chart.yaml diff --git a/pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/README.md b/pkg/chart/v2/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/README.md similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/README.md rename to pkg/chart/v2/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/README.md diff --git a/pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/charts/mast1/Chart.yaml b/pkg/chart/v2/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/charts/mast1/Chart.yaml similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/charts/mast1/Chart.yaml rename to pkg/chart/v2/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/charts/mast1/Chart.yaml diff --git a/pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/charts/mast1/values.yaml b/pkg/chart/v2/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/charts/mast1/values.yaml similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/charts/mast1/values.yaml rename to pkg/chart/v2/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/charts/mast1/values.yaml diff --git a/pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/charts/mast2-0.1.0.tgz b/pkg/chart/v2/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/charts/mast2-0.1.0.tgz similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/charts/mast2-0.1.0.tgz rename to pkg/chart/v2/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/charts/mast2-0.1.0.tgz diff --git a/pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/templates/alpine-pod.yaml b/pkg/chart/v2/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/templates/alpine-pod.yaml similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/templates/alpine-pod.yaml rename to pkg/chart/v2/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/templates/alpine-pod.yaml diff --git a/pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/values.yaml b/pkg/chart/v2/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/values.yaml similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/values.yaml rename to pkg/chart/v2/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/alpine/values.yaml diff --git a/pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/mariner-4.3.2.tgz b/pkg/chart/v2/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/mariner-4.3.2.tgz similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/mariner-4.3.2.tgz rename to pkg/chart/v2/util/testdata/dependent-chart-with-mixed-requirements-yaml/charts/mariner-4.3.2.tgz diff --git a/pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/docs/README.md b/pkg/chart/v2/util/testdata/dependent-chart-with-mixed-requirements-yaml/docs/README.md similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/docs/README.md rename to pkg/chart/v2/util/testdata/dependent-chart-with-mixed-requirements-yaml/docs/README.md diff --git a/pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/icon.svg b/pkg/chart/v2/util/testdata/dependent-chart-with-mixed-requirements-yaml/icon.svg similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/icon.svg rename to pkg/chart/v2/util/testdata/dependent-chart-with-mixed-requirements-yaml/icon.svg diff --git a/pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/ignore/me.txt b/pkg/chart/v2/util/testdata/dependent-chart-with-mixed-requirements-yaml/ignore/me.txt similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/ignore/me.txt rename to pkg/chart/v2/util/testdata/dependent-chart-with-mixed-requirements-yaml/ignore/me.txt diff --git a/pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/templates/template.tpl b/pkg/chart/v2/util/testdata/dependent-chart-with-mixed-requirements-yaml/templates/template.tpl similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/templates/template.tpl rename to pkg/chart/v2/util/testdata/dependent-chart-with-mixed-requirements-yaml/templates/template.tpl diff --git a/pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/values.yaml b/pkg/chart/v2/util/testdata/dependent-chart-with-mixed-requirements-yaml/values.yaml similarity index 100% rename from pkg/chart/util/testdata/dependent-chart-with-mixed-requirements-yaml/values.yaml rename to pkg/chart/v2/util/testdata/dependent-chart-with-mixed-requirements-yaml/values.yaml diff --git a/pkg/chart/util/testdata/frobnitz-1.2.3.tgz b/pkg/chart/v2/util/testdata/frobnitz-1.2.3.tgz similarity index 100% rename from pkg/chart/util/testdata/frobnitz-1.2.3.tgz rename to pkg/chart/v2/util/testdata/frobnitz-1.2.3.tgz diff --git a/pkg/chart/util/testdata/frobnitz/.helmignore b/pkg/chart/v2/util/testdata/frobnitz/.helmignore similarity index 100% rename from pkg/chart/util/testdata/frobnitz/.helmignore rename to pkg/chart/v2/util/testdata/frobnitz/.helmignore diff --git a/pkg/chart/util/testdata/frobnitz/Chart.lock b/pkg/chart/v2/util/testdata/frobnitz/Chart.lock similarity index 100% rename from pkg/chart/util/testdata/frobnitz/Chart.lock rename to pkg/chart/v2/util/testdata/frobnitz/Chart.lock diff --git a/pkg/chart/util/testdata/frobnitz/Chart.yaml b/pkg/chart/v2/util/testdata/frobnitz/Chart.yaml similarity index 100% rename from pkg/chart/util/testdata/frobnitz/Chart.yaml rename to pkg/chart/v2/util/testdata/frobnitz/Chart.yaml diff --git a/pkg/chart/util/testdata/frobnitz/INSTALL.txt b/pkg/chart/v2/util/testdata/frobnitz/INSTALL.txt similarity index 100% rename from pkg/chart/util/testdata/frobnitz/INSTALL.txt rename to pkg/chart/v2/util/testdata/frobnitz/INSTALL.txt diff --git a/pkg/chart/util/testdata/frobnitz/LICENSE b/pkg/chart/v2/util/testdata/frobnitz/LICENSE similarity index 100% rename from pkg/chart/util/testdata/frobnitz/LICENSE rename to pkg/chart/v2/util/testdata/frobnitz/LICENSE diff --git a/pkg/chart/util/testdata/frobnitz/README.md b/pkg/chart/v2/util/testdata/frobnitz/README.md similarity index 100% rename from pkg/chart/util/testdata/frobnitz/README.md rename to pkg/chart/v2/util/testdata/frobnitz/README.md diff --git a/pkg/chart/util/testdata/frobnitz/charts/_ignore_me b/pkg/chart/v2/util/testdata/frobnitz/charts/_ignore_me similarity index 100% rename from pkg/chart/util/testdata/frobnitz/charts/_ignore_me rename to pkg/chart/v2/util/testdata/frobnitz/charts/_ignore_me diff --git a/pkg/chart/util/testdata/frobnitz/charts/alpine/Chart.yaml b/pkg/chart/v2/util/testdata/frobnitz/charts/alpine/Chart.yaml similarity index 100% rename from pkg/chart/util/testdata/frobnitz/charts/alpine/Chart.yaml rename to pkg/chart/v2/util/testdata/frobnitz/charts/alpine/Chart.yaml diff --git a/pkg/chart/util/testdata/frobnitz/charts/alpine/README.md b/pkg/chart/v2/util/testdata/frobnitz/charts/alpine/README.md similarity index 100% rename from pkg/chart/util/testdata/frobnitz/charts/alpine/README.md rename to pkg/chart/v2/util/testdata/frobnitz/charts/alpine/README.md diff --git a/pkg/chart/util/testdata/frobnitz/charts/alpine/charts/mast1/Chart.yaml b/pkg/chart/v2/util/testdata/frobnitz/charts/alpine/charts/mast1/Chart.yaml similarity index 100% rename from pkg/chart/util/testdata/frobnitz/charts/alpine/charts/mast1/Chart.yaml rename to pkg/chart/v2/util/testdata/frobnitz/charts/alpine/charts/mast1/Chart.yaml diff --git a/pkg/chart/util/testdata/frobnitz/charts/alpine/charts/mast1/values.yaml b/pkg/chart/v2/util/testdata/frobnitz/charts/alpine/charts/mast1/values.yaml similarity index 100% rename from pkg/chart/util/testdata/frobnitz/charts/alpine/charts/mast1/values.yaml rename to pkg/chart/v2/util/testdata/frobnitz/charts/alpine/charts/mast1/values.yaml diff --git a/pkg/chart/util/testdata/frobnitz/charts/alpine/charts/mast2-0.1.0.tgz b/pkg/chart/v2/util/testdata/frobnitz/charts/alpine/charts/mast2-0.1.0.tgz similarity index 100% rename from pkg/chart/util/testdata/frobnitz/charts/alpine/charts/mast2-0.1.0.tgz rename to pkg/chart/v2/util/testdata/frobnitz/charts/alpine/charts/mast2-0.1.0.tgz diff --git a/pkg/chart/util/testdata/frobnitz/charts/alpine/templates/alpine-pod.yaml b/pkg/chart/v2/util/testdata/frobnitz/charts/alpine/templates/alpine-pod.yaml similarity index 100% rename from pkg/chart/util/testdata/frobnitz/charts/alpine/templates/alpine-pod.yaml rename to pkg/chart/v2/util/testdata/frobnitz/charts/alpine/templates/alpine-pod.yaml diff --git a/pkg/chart/util/testdata/frobnitz/charts/alpine/values.yaml b/pkg/chart/v2/util/testdata/frobnitz/charts/alpine/values.yaml similarity index 100% rename from pkg/chart/util/testdata/frobnitz/charts/alpine/values.yaml rename to pkg/chart/v2/util/testdata/frobnitz/charts/alpine/values.yaml diff --git a/pkg/chart/util/testdata/frobnitz/charts/mariner/Chart.yaml b/pkg/chart/v2/util/testdata/frobnitz/charts/mariner/Chart.yaml similarity index 100% rename from pkg/chart/util/testdata/frobnitz/charts/mariner/Chart.yaml rename to pkg/chart/v2/util/testdata/frobnitz/charts/mariner/Chart.yaml diff --git a/pkg/chart/util/testdata/frobnitz/charts/mariner/charts/albatross/Chart.yaml b/pkg/chart/v2/util/testdata/frobnitz/charts/mariner/charts/albatross/Chart.yaml similarity index 100% rename from pkg/chart/util/testdata/frobnitz/charts/mariner/charts/albatross/Chart.yaml rename to pkg/chart/v2/util/testdata/frobnitz/charts/mariner/charts/albatross/Chart.yaml diff --git a/pkg/chart/util/testdata/frobnitz/charts/mariner/charts/albatross/values.yaml b/pkg/chart/v2/util/testdata/frobnitz/charts/mariner/charts/albatross/values.yaml similarity index 100% rename from pkg/chart/util/testdata/frobnitz/charts/mariner/charts/albatross/values.yaml rename to pkg/chart/v2/util/testdata/frobnitz/charts/mariner/charts/albatross/values.yaml diff --git a/pkg/chart/util/testdata/frobnitz/charts/mariner/templates/placeholder.tpl b/pkg/chart/v2/util/testdata/frobnitz/charts/mariner/templates/placeholder.tpl similarity index 100% rename from pkg/chart/util/testdata/frobnitz/charts/mariner/templates/placeholder.tpl rename to pkg/chart/v2/util/testdata/frobnitz/charts/mariner/templates/placeholder.tpl diff --git a/pkg/chart/util/testdata/frobnitz/charts/mariner/values.yaml b/pkg/chart/v2/util/testdata/frobnitz/charts/mariner/values.yaml similarity index 100% rename from pkg/chart/util/testdata/frobnitz/charts/mariner/values.yaml rename to pkg/chart/v2/util/testdata/frobnitz/charts/mariner/values.yaml diff --git a/pkg/chart/util/testdata/frobnitz/docs/README.md b/pkg/chart/v2/util/testdata/frobnitz/docs/README.md similarity index 100% rename from pkg/chart/util/testdata/frobnitz/docs/README.md rename to pkg/chart/v2/util/testdata/frobnitz/docs/README.md diff --git a/pkg/chart/util/testdata/frobnitz/icon.svg b/pkg/chart/v2/util/testdata/frobnitz/icon.svg similarity index 100% rename from pkg/chart/util/testdata/frobnitz/icon.svg rename to pkg/chart/v2/util/testdata/frobnitz/icon.svg diff --git a/pkg/chart/util/testdata/frobnitz/ignore/me.txt b/pkg/chart/v2/util/testdata/frobnitz/ignore/me.txt similarity index 100% rename from pkg/chart/util/testdata/frobnitz/ignore/me.txt rename to pkg/chart/v2/util/testdata/frobnitz/ignore/me.txt diff --git a/pkg/chart/util/testdata/frobnitz/templates/template.tpl b/pkg/chart/v2/util/testdata/frobnitz/templates/template.tpl similarity index 100% rename from pkg/chart/util/testdata/frobnitz/templates/template.tpl rename to pkg/chart/v2/util/testdata/frobnitz/templates/template.tpl diff --git a/pkg/chart/util/testdata/frobnitz/values.yaml b/pkg/chart/v2/util/testdata/frobnitz/values.yaml similarity index 100% rename from pkg/chart/util/testdata/frobnitz/values.yaml rename to pkg/chart/v2/util/testdata/frobnitz/values.yaml diff --git a/pkg/chart/util/testdata/frobnitz_backslash-1.2.3.tgz b/pkg/chart/v2/util/testdata/frobnitz_backslash-1.2.3.tgz similarity index 100% rename from pkg/chart/util/testdata/frobnitz_backslash-1.2.3.tgz rename to pkg/chart/v2/util/testdata/frobnitz_backslash-1.2.3.tgz diff --git a/pkg/chart/util/testdata/genfrob.sh b/pkg/chart/v2/util/testdata/genfrob.sh similarity index 100% rename from pkg/chart/util/testdata/genfrob.sh rename to pkg/chart/v2/util/testdata/genfrob.sh diff --git a/pkg/chart/util/testdata/import-values-from-enabled-subchart/parent-chart/Chart.lock b/pkg/chart/v2/util/testdata/import-values-from-enabled-subchart/parent-chart/Chart.lock similarity index 100% rename from pkg/chart/util/testdata/import-values-from-enabled-subchart/parent-chart/Chart.lock rename to pkg/chart/v2/util/testdata/import-values-from-enabled-subchart/parent-chart/Chart.lock diff --git a/pkg/chart/util/testdata/import-values-from-enabled-subchart/parent-chart/Chart.yaml b/pkg/chart/v2/util/testdata/import-values-from-enabled-subchart/parent-chart/Chart.yaml similarity index 100% rename from pkg/chart/util/testdata/import-values-from-enabled-subchart/parent-chart/Chart.yaml rename to pkg/chart/v2/util/testdata/import-values-from-enabled-subchart/parent-chart/Chart.yaml diff --git a/pkg/chart/util/testdata/import-values-from-enabled-subchart/parent-chart/charts/dev-v0.1.0.tgz b/pkg/chart/v2/util/testdata/import-values-from-enabled-subchart/parent-chart/charts/dev-v0.1.0.tgz similarity index 100% rename from pkg/chart/util/testdata/import-values-from-enabled-subchart/parent-chart/charts/dev-v0.1.0.tgz rename to pkg/chart/v2/util/testdata/import-values-from-enabled-subchart/parent-chart/charts/dev-v0.1.0.tgz diff --git a/pkg/chart/util/testdata/import-values-from-enabled-subchart/parent-chart/charts/prod-v0.1.0.tgz b/pkg/chart/v2/util/testdata/import-values-from-enabled-subchart/parent-chart/charts/prod-v0.1.0.tgz similarity index 100% rename from pkg/chart/util/testdata/import-values-from-enabled-subchart/parent-chart/charts/prod-v0.1.0.tgz rename to pkg/chart/v2/util/testdata/import-values-from-enabled-subchart/parent-chart/charts/prod-v0.1.0.tgz diff --git a/pkg/chart/util/testdata/import-values-from-enabled-subchart/parent-chart/envs/dev/Chart.yaml b/pkg/chart/v2/util/testdata/import-values-from-enabled-subchart/parent-chart/envs/dev/Chart.yaml similarity index 100% rename from pkg/chart/util/testdata/import-values-from-enabled-subchart/parent-chart/envs/dev/Chart.yaml rename to pkg/chart/v2/util/testdata/import-values-from-enabled-subchart/parent-chart/envs/dev/Chart.yaml diff --git a/pkg/chart/util/testdata/import-values-from-enabled-subchart/parent-chart/envs/dev/values.yaml b/pkg/chart/v2/util/testdata/import-values-from-enabled-subchart/parent-chart/envs/dev/values.yaml similarity index 100% rename from pkg/chart/util/testdata/import-values-from-enabled-subchart/parent-chart/envs/dev/values.yaml rename to pkg/chart/v2/util/testdata/import-values-from-enabled-subchart/parent-chart/envs/dev/values.yaml diff --git a/pkg/chart/util/testdata/import-values-from-enabled-subchart/parent-chart/envs/prod/Chart.yaml b/pkg/chart/v2/util/testdata/import-values-from-enabled-subchart/parent-chart/envs/prod/Chart.yaml similarity index 100% rename from pkg/chart/util/testdata/import-values-from-enabled-subchart/parent-chart/envs/prod/Chart.yaml rename to pkg/chart/v2/util/testdata/import-values-from-enabled-subchart/parent-chart/envs/prod/Chart.yaml diff --git a/pkg/chart/util/testdata/import-values-from-enabled-subchart/parent-chart/envs/prod/values.yaml b/pkg/chart/v2/util/testdata/import-values-from-enabled-subchart/parent-chart/envs/prod/values.yaml similarity index 100% rename from pkg/chart/util/testdata/import-values-from-enabled-subchart/parent-chart/envs/prod/values.yaml rename to pkg/chart/v2/util/testdata/import-values-from-enabled-subchart/parent-chart/envs/prod/values.yaml diff --git a/pkg/chart/util/testdata/import-values-from-enabled-subchart/parent-chart/templates/autoscaler.yaml b/pkg/chart/v2/util/testdata/import-values-from-enabled-subchart/parent-chart/templates/autoscaler.yaml similarity index 100% rename from pkg/chart/util/testdata/import-values-from-enabled-subchart/parent-chart/templates/autoscaler.yaml rename to pkg/chart/v2/util/testdata/import-values-from-enabled-subchart/parent-chart/templates/autoscaler.yaml diff --git a/pkg/chart/util/testdata/import-values-from-enabled-subchart/parent-chart/values.yaml b/pkg/chart/v2/util/testdata/import-values-from-enabled-subchart/parent-chart/values.yaml similarity index 100% rename from pkg/chart/util/testdata/import-values-from-enabled-subchart/parent-chart/values.yaml rename to pkg/chart/v2/util/testdata/import-values-from-enabled-subchart/parent-chart/values.yaml diff --git a/pkg/chart/util/testdata/joonix/Chart.yaml b/pkg/chart/v2/util/testdata/joonix/Chart.yaml similarity index 100% rename from pkg/chart/util/testdata/joonix/Chart.yaml rename to pkg/chart/v2/util/testdata/joonix/Chart.yaml diff --git a/pkg/chart/util/testdata/joonix/charts/.gitkeep b/pkg/chart/v2/util/testdata/joonix/charts/.gitkeep similarity index 100% rename from pkg/chart/util/testdata/joonix/charts/.gitkeep rename to pkg/chart/v2/util/testdata/joonix/charts/.gitkeep diff --git a/pkg/chart/util/testdata/subpop/Chart.yaml b/pkg/chart/v2/util/testdata/subpop/Chart.yaml similarity index 100% rename from pkg/chart/util/testdata/subpop/Chart.yaml rename to pkg/chart/v2/util/testdata/subpop/Chart.yaml diff --git a/pkg/chart/util/testdata/subpop/README.md b/pkg/chart/v2/util/testdata/subpop/README.md similarity index 100% rename from pkg/chart/util/testdata/subpop/README.md rename to pkg/chart/v2/util/testdata/subpop/README.md diff --git a/pkg/chart/util/testdata/subpop/charts/subchart1/Chart.yaml b/pkg/chart/v2/util/testdata/subpop/charts/subchart1/Chart.yaml similarity index 100% rename from pkg/chart/util/testdata/subpop/charts/subchart1/Chart.yaml rename to pkg/chart/v2/util/testdata/subpop/charts/subchart1/Chart.yaml diff --git a/pkg/chart/util/testdata/subpop/charts/subchart1/charts/subchartA/Chart.yaml b/pkg/chart/v2/util/testdata/subpop/charts/subchart1/charts/subchartA/Chart.yaml similarity index 100% rename from pkg/chart/util/testdata/subpop/charts/subchart1/charts/subchartA/Chart.yaml rename to pkg/chart/v2/util/testdata/subpop/charts/subchart1/charts/subchartA/Chart.yaml diff --git a/pkg/chart/util/testdata/subpop/charts/subchart1/charts/subchartA/templates/service.yaml b/pkg/chart/v2/util/testdata/subpop/charts/subchart1/charts/subchartA/templates/service.yaml similarity index 100% rename from pkg/chart/util/testdata/subpop/charts/subchart1/charts/subchartA/templates/service.yaml rename to pkg/chart/v2/util/testdata/subpop/charts/subchart1/charts/subchartA/templates/service.yaml diff --git a/pkg/chart/util/testdata/subpop/charts/subchart1/charts/subchartA/values.yaml b/pkg/chart/v2/util/testdata/subpop/charts/subchart1/charts/subchartA/values.yaml similarity index 100% rename from pkg/chart/util/testdata/subpop/charts/subchart1/charts/subchartA/values.yaml rename to pkg/chart/v2/util/testdata/subpop/charts/subchart1/charts/subchartA/values.yaml diff --git a/pkg/chart/util/testdata/subpop/charts/subchart1/charts/subchartB/Chart.yaml b/pkg/chart/v2/util/testdata/subpop/charts/subchart1/charts/subchartB/Chart.yaml similarity index 100% rename from pkg/chart/util/testdata/subpop/charts/subchart1/charts/subchartB/Chart.yaml rename to pkg/chart/v2/util/testdata/subpop/charts/subchart1/charts/subchartB/Chart.yaml diff --git a/pkg/chart/util/testdata/subpop/charts/subchart1/charts/subchartB/templates/service.yaml b/pkg/chart/v2/util/testdata/subpop/charts/subchart1/charts/subchartB/templates/service.yaml similarity index 100% rename from pkg/chart/util/testdata/subpop/charts/subchart1/charts/subchartB/templates/service.yaml rename to pkg/chart/v2/util/testdata/subpop/charts/subchart1/charts/subchartB/templates/service.yaml diff --git a/pkg/chart/util/testdata/subpop/charts/subchart1/charts/subchartB/values.yaml b/pkg/chart/v2/util/testdata/subpop/charts/subchart1/charts/subchartB/values.yaml similarity index 100% rename from pkg/chart/util/testdata/subpop/charts/subchart1/charts/subchartB/values.yaml rename to pkg/chart/v2/util/testdata/subpop/charts/subchart1/charts/subchartB/values.yaml diff --git a/pkg/chart/util/testdata/subpop/charts/subchart1/crds/crdA.yaml b/pkg/chart/v2/util/testdata/subpop/charts/subchart1/crds/crdA.yaml similarity index 100% rename from pkg/chart/util/testdata/subpop/charts/subchart1/crds/crdA.yaml rename to pkg/chart/v2/util/testdata/subpop/charts/subchart1/crds/crdA.yaml diff --git a/pkg/chart/util/testdata/subpop/charts/subchart1/templates/NOTES.txt b/pkg/chart/v2/util/testdata/subpop/charts/subchart1/templates/NOTES.txt similarity index 100% rename from pkg/chart/util/testdata/subpop/charts/subchart1/templates/NOTES.txt rename to pkg/chart/v2/util/testdata/subpop/charts/subchart1/templates/NOTES.txt diff --git a/pkg/chart/util/testdata/subpop/charts/subchart1/templates/service.yaml b/pkg/chart/v2/util/testdata/subpop/charts/subchart1/templates/service.yaml similarity index 100% rename from pkg/chart/util/testdata/subpop/charts/subchart1/templates/service.yaml rename to pkg/chart/v2/util/testdata/subpop/charts/subchart1/templates/service.yaml diff --git a/pkg/chart/util/testdata/subpop/charts/subchart1/templates/subdir/role.yaml b/pkg/chart/v2/util/testdata/subpop/charts/subchart1/templates/subdir/role.yaml similarity index 100% rename from pkg/chart/util/testdata/subpop/charts/subchart1/templates/subdir/role.yaml rename to pkg/chart/v2/util/testdata/subpop/charts/subchart1/templates/subdir/role.yaml diff --git a/pkg/chart/util/testdata/subpop/charts/subchart1/templates/subdir/rolebinding.yaml b/pkg/chart/v2/util/testdata/subpop/charts/subchart1/templates/subdir/rolebinding.yaml similarity index 100% rename from pkg/chart/util/testdata/subpop/charts/subchart1/templates/subdir/rolebinding.yaml rename to pkg/chart/v2/util/testdata/subpop/charts/subchart1/templates/subdir/rolebinding.yaml diff --git a/pkg/chart/util/testdata/subpop/charts/subchart1/templates/subdir/serviceaccount.yaml b/pkg/chart/v2/util/testdata/subpop/charts/subchart1/templates/subdir/serviceaccount.yaml similarity index 100% rename from pkg/chart/util/testdata/subpop/charts/subchart1/templates/subdir/serviceaccount.yaml rename to pkg/chart/v2/util/testdata/subpop/charts/subchart1/templates/subdir/serviceaccount.yaml diff --git a/pkg/chart/util/testdata/subpop/charts/subchart1/values.yaml b/pkg/chart/v2/util/testdata/subpop/charts/subchart1/values.yaml similarity index 100% rename from pkg/chart/util/testdata/subpop/charts/subchart1/values.yaml rename to pkg/chart/v2/util/testdata/subpop/charts/subchart1/values.yaml diff --git a/pkg/chart/util/testdata/subpop/charts/subchart2/Chart.yaml b/pkg/chart/v2/util/testdata/subpop/charts/subchart2/Chart.yaml similarity index 100% rename from pkg/chart/util/testdata/subpop/charts/subchart2/Chart.yaml rename to pkg/chart/v2/util/testdata/subpop/charts/subchart2/Chart.yaml diff --git a/pkg/chart/util/testdata/subpop/charts/subchart2/charts/subchartB/Chart.yaml b/pkg/chart/v2/util/testdata/subpop/charts/subchart2/charts/subchartB/Chart.yaml similarity index 100% rename from pkg/chart/util/testdata/subpop/charts/subchart2/charts/subchartB/Chart.yaml rename to pkg/chart/v2/util/testdata/subpop/charts/subchart2/charts/subchartB/Chart.yaml diff --git a/pkg/chart/util/testdata/subpop/charts/subchart2/charts/subchartB/templates/service.yaml b/pkg/chart/v2/util/testdata/subpop/charts/subchart2/charts/subchartB/templates/service.yaml similarity index 100% rename from pkg/chart/util/testdata/subpop/charts/subchart2/charts/subchartB/templates/service.yaml rename to pkg/chart/v2/util/testdata/subpop/charts/subchart2/charts/subchartB/templates/service.yaml diff --git a/pkg/chart/util/testdata/subpop/charts/subchart2/charts/subchartB/values.yaml b/pkg/chart/v2/util/testdata/subpop/charts/subchart2/charts/subchartB/values.yaml similarity index 100% rename from pkg/chart/util/testdata/subpop/charts/subchart2/charts/subchartB/values.yaml rename to pkg/chart/v2/util/testdata/subpop/charts/subchart2/charts/subchartB/values.yaml diff --git a/pkg/chart/util/testdata/subpop/charts/subchart2/charts/subchartC/Chart.yaml b/pkg/chart/v2/util/testdata/subpop/charts/subchart2/charts/subchartC/Chart.yaml similarity index 100% rename from pkg/chart/util/testdata/subpop/charts/subchart2/charts/subchartC/Chart.yaml rename to pkg/chart/v2/util/testdata/subpop/charts/subchart2/charts/subchartC/Chart.yaml diff --git a/pkg/chart/util/testdata/subpop/charts/subchart2/charts/subchartC/templates/service.yaml b/pkg/chart/v2/util/testdata/subpop/charts/subchart2/charts/subchartC/templates/service.yaml similarity index 100% rename from pkg/chart/util/testdata/subpop/charts/subchart2/charts/subchartC/templates/service.yaml rename to pkg/chart/v2/util/testdata/subpop/charts/subchart2/charts/subchartC/templates/service.yaml diff --git a/pkg/chart/util/testdata/subpop/charts/subchart2/charts/subchartC/values.yaml b/pkg/chart/v2/util/testdata/subpop/charts/subchart2/charts/subchartC/values.yaml similarity index 100% rename from pkg/chart/util/testdata/subpop/charts/subchart2/charts/subchartC/values.yaml rename to pkg/chart/v2/util/testdata/subpop/charts/subchart2/charts/subchartC/values.yaml diff --git a/pkg/chart/util/testdata/subpop/charts/subchart2/templates/service.yaml b/pkg/chart/v2/util/testdata/subpop/charts/subchart2/templates/service.yaml similarity index 100% rename from pkg/chart/util/testdata/subpop/charts/subchart2/templates/service.yaml rename to pkg/chart/v2/util/testdata/subpop/charts/subchart2/templates/service.yaml diff --git a/pkg/chart/util/testdata/subpop/charts/subchart2/values.yaml b/pkg/chart/v2/util/testdata/subpop/charts/subchart2/values.yaml similarity index 100% rename from pkg/chart/util/testdata/subpop/charts/subchart2/values.yaml rename to pkg/chart/v2/util/testdata/subpop/charts/subchart2/values.yaml diff --git a/pkg/chart/util/testdata/subpop/noreqs/Chart.yaml b/pkg/chart/v2/util/testdata/subpop/noreqs/Chart.yaml similarity index 100% rename from pkg/chart/util/testdata/subpop/noreqs/Chart.yaml rename to pkg/chart/v2/util/testdata/subpop/noreqs/Chart.yaml diff --git a/pkg/chart/util/testdata/subpop/noreqs/templates/service.yaml b/pkg/chart/v2/util/testdata/subpop/noreqs/templates/service.yaml similarity index 100% rename from pkg/chart/util/testdata/subpop/noreqs/templates/service.yaml rename to pkg/chart/v2/util/testdata/subpop/noreqs/templates/service.yaml diff --git a/pkg/chart/util/testdata/subpop/noreqs/values.yaml b/pkg/chart/v2/util/testdata/subpop/noreqs/values.yaml similarity index 100% rename from pkg/chart/util/testdata/subpop/noreqs/values.yaml rename to pkg/chart/v2/util/testdata/subpop/noreqs/values.yaml diff --git a/pkg/chart/util/testdata/subpop/values.yaml b/pkg/chart/v2/util/testdata/subpop/values.yaml similarity index 100% rename from pkg/chart/util/testdata/subpop/values.yaml rename to pkg/chart/v2/util/testdata/subpop/values.yaml diff --git a/pkg/chart/util/testdata/test-values-invalid.schema.json b/pkg/chart/v2/util/testdata/test-values-invalid.schema.json similarity index 100% rename from pkg/chart/util/testdata/test-values-invalid.schema.json rename to pkg/chart/v2/util/testdata/test-values-invalid.schema.json diff --git a/pkg/chart/util/testdata/test-values-negative.yaml b/pkg/chart/v2/util/testdata/test-values-negative.yaml similarity index 100% rename from pkg/chart/util/testdata/test-values-negative.yaml rename to pkg/chart/v2/util/testdata/test-values-negative.yaml diff --git a/pkg/chart/util/testdata/test-values.schema.json b/pkg/chart/v2/util/testdata/test-values.schema.json similarity index 100% rename from pkg/chart/util/testdata/test-values.schema.json rename to pkg/chart/v2/util/testdata/test-values.schema.json diff --git a/pkg/chart/util/testdata/test-values.yaml b/pkg/chart/v2/util/testdata/test-values.yaml similarity index 100% rename from pkg/chart/util/testdata/test-values.yaml rename to pkg/chart/v2/util/testdata/test-values.yaml diff --git a/pkg/chart/util/testdata/three-level-dependent-chart/README.md b/pkg/chart/v2/util/testdata/three-level-dependent-chart/README.md similarity index 100% rename from pkg/chart/util/testdata/three-level-dependent-chart/README.md rename to pkg/chart/v2/util/testdata/three-level-dependent-chart/README.md diff --git a/pkg/chart/util/testdata/three-level-dependent-chart/umbrella/Chart.yaml b/pkg/chart/v2/util/testdata/three-level-dependent-chart/umbrella/Chart.yaml similarity index 100% rename from pkg/chart/util/testdata/three-level-dependent-chart/umbrella/Chart.yaml rename to pkg/chart/v2/util/testdata/three-level-dependent-chart/umbrella/Chart.yaml diff --git a/pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app1/Chart.yaml b/pkg/chart/v2/util/testdata/three-level-dependent-chart/umbrella/charts/app1/Chart.yaml similarity index 100% rename from pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app1/Chart.yaml rename to pkg/chart/v2/util/testdata/three-level-dependent-chart/umbrella/charts/app1/Chart.yaml diff --git a/pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app1/charts/library/Chart.yaml b/pkg/chart/v2/util/testdata/three-level-dependent-chart/umbrella/charts/app1/charts/library/Chart.yaml similarity index 100% rename from pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app1/charts/library/Chart.yaml rename to pkg/chart/v2/util/testdata/three-level-dependent-chart/umbrella/charts/app1/charts/library/Chart.yaml diff --git a/pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app1/charts/library/templates/service.yaml b/pkg/chart/v2/util/testdata/three-level-dependent-chart/umbrella/charts/app1/charts/library/templates/service.yaml similarity index 100% rename from pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app1/charts/library/templates/service.yaml rename to pkg/chart/v2/util/testdata/three-level-dependent-chart/umbrella/charts/app1/charts/library/templates/service.yaml diff --git a/pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app1/charts/library/values.yaml b/pkg/chart/v2/util/testdata/three-level-dependent-chart/umbrella/charts/app1/charts/library/values.yaml similarity index 100% rename from pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app1/charts/library/values.yaml rename to pkg/chart/v2/util/testdata/three-level-dependent-chart/umbrella/charts/app1/charts/library/values.yaml diff --git a/pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app1/templates/service.yaml b/pkg/chart/v2/util/testdata/three-level-dependent-chart/umbrella/charts/app1/templates/service.yaml similarity index 100% rename from pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app1/templates/service.yaml rename to pkg/chart/v2/util/testdata/three-level-dependent-chart/umbrella/charts/app1/templates/service.yaml diff --git a/pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app1/values.yaml b/pkg/chart/v2/util/testdata/three-level-dependent-chart/umbrella/charts/app1/values.yaml similarity index 100% rename from pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app1/values.yaml rename to pkg/chart/v2/util/testdata/three-level-dependent-chart/umbrella/charts/app1/values.yaml diff --git a/pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app2/Chart.yaml b/pkg/chart/v2/util/testdata/three-level-dependent-chart/umbrella/charts/app2/Chart.yaml similarity index 100% rename from pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app2/Chart.yaml rename to pkg/chart/v2/util/testdata/three-level-dependent-chart/umbrella/charts/app2/Chart.yaml diff --git a/pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app2/charts/library/Chart.yaml b/pkg/chart/v2/util/testdata/three-level-dependent-chart/umbrella/charts/app2/charts/library/Chart.yaml similarity index 100% rename from pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app2/charts/library/Chart.yaml rename to pkg/chart/v2/util/testdata/three-level-dependent-chart/umbrella/charts/app2/charts/library/Chart.yaml diff --git a/pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app2/charts/library/templates/service.yaml b/pkg/chart/v2/util/testdata/three-level-dependent-chart/umbrella/charts/app2/charts/library/templates/service.yaml similarity index 100% rename from pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app2/charts/library/templates/service.yaml rename to pkg/chart/v2/util/testdata/three-level-dependent-chart/umbrella/charts/app2/charts/library/templates/service.yaml diff --git a/pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app2/charts/library/values.yaml b/pkg/chart/v2/util/testdata/three-level-dependent-chart/umbrella/charts/app2/charts/library/values.yaml similarity index 100% rename from pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app2/charts/library/values.yaml rename to pkg/chart/v2/util/testdata/three-level-dependent-chart/umbrella/charts/app2/charts/library/values.yaml diff --git a/pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app2/templates/service.yaml b/pkg/chart/v2/util/testdata/three-level-dependent-chart/umbrella/charts/app2/templates/service.yaml similarity index 100% rename from pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app2/templates/service.yaml rename to pkg/chart/v2/util/testdata/three-level-dependent-chart/umbrella/charts/app2/templates/service.yaml diff --git a/pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app2/values.yaml b/pkg/chart/v2/util/testdata/three-level-dependent-chart/umbrella/charts/app2/values.yaml similarity index 100% rename from pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app2/values.yaml rename to pkg/chart/v2/util/testdata/three-level-dependent-chart/umbrella/charts/app2/values.yaml diff --git a/pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app3/Chart.yaml b/pkg/chart/v2/util/testdata/three-level-dependent-chart/umbrella/charts/app3/Chart.yaml similarity index 100% rename from pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app3/Chart.yaml rename to pkg/chart/v2/util/testdata/three-level-dependent-chart/umbrella/charts/app3/Chart.yaml diff --git a/pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app3/charts/library/Chart.yaml b/pkg/chart/v2/util/testdata/three-level-dependent-chart/umbrella/charts/app3/charts/library/Chart.yaml similarity index 100% rename from pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app3/charts/library/Chart.yaml rename to pkg/chart/v2/util/testdata/three-level-dependent-chart/umbrella/charts/app3/charts/library/Chart.yaml diff --git a/pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app3/charts/library/templates/service.yaml b/pkg/chart/v2/util/testdata/three-level-dependent-chart/umbrella/charts/app3/charts/library/templates/service.yaml similarity index 100% rename from pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app3/charts/library/templates/service.yaml rename to pkg/chart/v2/util/testdata/three-level-dependent-chart/umbrella/charts/app3/charts/library/templates/service.yaml diff --git a/pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app3/charts/library/values.yaml b/pkg/chart/v2/util/testdata/three-level-dependent-chart/umbrella/charts/app3/charts/library/values.yaml similarity index 100% rename from pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app3/charts/library/values.yaml rename to pkg/chart/v2/util/testdata/three-level-dependent-chart/umbrella/charts/app3/charts/library/values.yaml diff --git a/pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app3/templates/service.yaml b/pkg/chart/v2/util/testdata/three-level-dependent-chart/umbrella/charts/app3/templates/service.yaml similarity index 100% rename from pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app3/templates/service.yaml rename to pkg/chart/v2/util/testdata/three-level-dependent-chart/umbrella/charts/app3/templates/service.yaml diff --git a/pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app3/values.yaml b/pkg/chart/v2/util/testdata/three-level-dependent-chart/umbrella/charts/app3/values.yaml similarity index 100% rename from pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app3/values.yaml rename to pkg/chart/v2/util/testdata/three-level-dependent-chart/umbrella/charts/app3/values.yaml diff --git a/pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app4/Chart.yaml b/pkg/chart/v2/util/testdata/three-level-dependent-chart/umbrella/charts/app4/Chart.yaml similarity index 100% rename from pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app4/Chart.yaml rename to pkg/chart/v2/util/testdata/three-level-dependent-chart/umbrella/charts/app4/Chart.yaml diff --git a/pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app4/charts/library/Chart.yaml b/pkg/chart/v2/util/testdata/three-level-dependent-chart/umbrella/charts/app4/charts/library/Chart.yaml similarity index 100% rename from pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app4/charts/library/Chart.yaml rename to pkg/chart/v2/util/testdata/three-level-dependent-chart/umbrella/charts/app4/charts/library/Chart.yaml diff --git a/pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app4/charts/library/templates/service.yaml b/pkg/chart/v2/util/testdata/three-level-dependent-chart/umbrella/charts/app4/charts/library/templates/service.yaml similarity index 100% rename from pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app4/charts/library/templates/service.yaml rename to pkg/chart/v2/util/testdata/three-level-dependent-chart/umbrella/charts/app4/charts/library/templates/service.yaml diff --git a/pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app4/charts/library/values.yaml b/pkg/chart/v2/util/testdata/three-level-dependent-chart/umbrella/charts/app4/charts/library/values.yaml similarity index 100% rename from pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app4/charts/library/values.yaml rename to pkg/chart/v2/util/testdata/three-level-dependent-chart/umbrella/charts/app4/charts/library/values.yaml diff --git a/pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app4/templates/service.yaml b/pkg/chart/v2/util/testdata/three-level-dependent-chart/umbrella/charts/app4/templates/service.yaml similarity index 100% rename from pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app4/templates/service.yaml rename to pkg/chart/v2/util/testdata/three-level-dependent-chart/umbrella/charts/app4/templates/service.yaml diff --git a/pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app4/values.yaml b/pkg/chart/v2/util/testdata/three-level-dependent-chart/umbrella/charts/app4/values.yaml similarity index 100% rename from pkg/chart/util/testdata/three-level-dependent-chart/umbrella/charts/app4/values.yaml rename to pkg/chart/v2/util/testdata/three-level-dependent-chart/umbrella/charts/app4/values.yaml diff --git a/pkg/chart/util/testdata/three-level-dependent-chart/umbrella/values.yaml b/pkg/chart/v2/util/testdata/three-level-dependent-chart/umbrella/values.yaml similarity index 100% rename from pkg/chart/util/testdata/three-level-dependent-chart/umbrella/values.yaml rename to pkg/chart/v2/util/testdata/three-level-dependent-chart/umbrella/values.yaml diff --git a/pkg/chart/util/validate_name.go b/pkg/chart/v2/util/validate_name.go similarity index 100% rename from pkg/chart/util/validate_name.go rename to pkg/chart/v2/util/validate_name.go diff --git a/pkg/chart/util/validate_name_test.go b/pkg/chart/v2/util/validate_name_test.go similarity index 100% rename from pkg/chart/util/validate_name_test.go rename to pkg/chart/v2/util/validate_name_test.go diff --git a/pkg/chart/util/values.go b/pkg/chart/v2/util/values.go similarity index 99% rename from pkg/chart/util/values.go rename to pkg/chart/v2/util/values.go index 46952c079..404ba9842 100644 --- a/pkg/chart/util/values.go +++ b/pkg/chart/v2/util/values.go @@ -26,7 +26,7 @@ import ( "github.com/pkg/errors" "sigs.k8s.io/yaml" - "helm.sh/helm/v4/pkg/chart" + chart "helm.sh/helm/v4/pkg/chart/v2" ) // GlobalKey is the name of the Values key that is used for storing global vars. diff --git a/pkg/chart/util/values_test.go b/pkg/chart/v2/util/values_test.go similarity index 99% rename from pkg/chart/util/values_test.go rename to pkg/chart/v2/util/values_test.go index 660b7e4ed..6a5400f78 100644 --- a/pkg/chart/util/values_test.go +++ b/pkg/chart/v2/util/values_test.go @@ -22,7 +22,7 @@ import ( "testing" "text/template" - "helm.sh/helm/v4/pkg/chart" + chart "helm.sh/helm/v4/pkg/chart/v2" ) func TestReadValues(t *testing.T) { diff --git a/pkg/cli/values/options.go b/pkg/cli/values/options.go index 2c3706b84..461db3cc2 100644 --- a/pkg/cli/values/options.go +++ b/pkg/cli/values/options.go @@ -26,7 +26,7 @@ import ( "github.com/pkg/errors" - "helm.sh/helm/v4/pkg/chart/loader" + "helm.sh/helm/v4/pkg/chart/v2/loader" "helm.sh/helm/v4/pkg/getter" "helm.sh/helm/v4/pkg/strvals" ) diff --git a/pkg/downloader/manager.go b/pkg/downloader/manager.go index e5dac8b10..d38509311 100644 --- a/pkg/downloader/manager.go +++ b/pkg/downloader/manager.go @@ -36,9 +36,9 @@ import ( "helm.sh/helm/v4/internal/resolver" "helm.sh/helm/v4/internal/third_party/dep/fs" "helm.sh/helm/v4/internal/urlutil" - "helm.sh/helm/v4/pkg/chart" - "helm.sh/helm/v4/pkg/chart/loader" - chartutil "helm.sh/helm/v4/pkg/chart/util" + chart "helm.sh/helm/v4/pkg/chart/v2" + "helm.sh/helm/v4/pkg/chart/v2/loader" + chartutil "helm.sh/helm/v4/pkg/chart/v2/util" "helm.sh/helm/v4/pkg/getter" "helm.sh/helm/v4/pkg/helmpath" "helm.sh/helm/v4/pkg/registry" diff --git a/pkg/downloader/manager_test.go b/pkg/downloader/manager_test.go index 8731fb003..b8b009f1b 100644 --- a/pkg/downloader/manager_test.go +++ b/pkg/downloader/manager_test.go @@ -24,9 +24,9 @@ import ( "github.com/stretchr/testify/assert" - "helm.sh/helm/v4/pkg/chart" - "helm.sh/helm/v4/pkg/chart/loader" - chartutil "helm.sh/helm/v4/pkg/chart/util" + chart "helm.sh/helm/v4/pkg/chart/v2" + "helm.sh/helm/v4/pkg/chart/v2/loader" + chartutil "helm.sh/helm/v4/pkg/chart/v2/util" "helm.sh/helm/v4/pkg/getter" "helm.sh/helm/v4/pkg/repo" "helm.sh/helm/v4/pkg/repo/repotest" diff --git a/pkg/engine/engine.go b/pkg/engine/engine.go index 0229b1833..0d0a398be 100644 --- a/pkg/engine/engine.go +++ b/pkg/engine/engine.go @@ -29,8 +29,8 @@ import ( "github.com/pkg/errors" "k8s.io/client-go/rest" - "helm.sh/helm/v4/pkg/chart" - chartutil "helm.sh/helm/v4/pkg/chart/util" + chart "helm.sh/helm/v4/pkg/chart/v2" + chartutil "helm.sh/helm/v4/pkg/chart/v2/util" ) // Engine is an implementation of the Helm rendering implementation for templates. diff --git a/pkg/engine/engine_test.go b/pkg/engine/engine_test.go index 4c28c2965..a54e99cad 100644 --- a/pkg/engine/engine_test.go +++ b/pkg/engine/engine_test.go @@ -30,8 +30,8 @@ import ( "k8s.io/client-go/dynamic" "k8s.io/client-go/dynamic/fake" - "helm.sh/helm/v4/pkg/chart" - chartutil "helm.sh/helm/v4/pkg/chart/util" + chart "helm.sh/helm/v4/pkg/chart/v2" + chartutil "helm.sh/helm/v4/pkg/chart/v2/util" ) func TestSortTemplates(t *testing.T) { diff --git a/pkg/engine/files.go b/pkg/engine/files.go index dc6a67de8..87166728c 100644 --- a/pkg/engine/files.go +++ b/pkg/engine/files.go @@ -23,7 +23,7 @@ import ( "github.com/gobwas/glob" - "helm.sh/helm/v4/pkg/chart" + chart "helm.sh/helm/v4/pkg/chart/v2" ) // files is a map of files in a chart that can be accessed from a template. diff --git a/pkg/lint/lint.go b/pkg/lint/lint.go index b53400c87..a61d5e43f 100644 --- a/pkg/lint/lint.go +++ b/pkg/lint/lint.go @@ -19,7 +19,7 @@ package lint // import "helm.sh/helm/v4/pkg/lint" import ( "path/filepath" - chartutil "helm.sh/helm/v4/pkg/chart/util" + chartutil "helm.sh/helm/v4/pkg/chart/v2/util" "helm.sh/helm/v4/pkg/lint/rules" "helm.sh/helm/v4/pkg/lint/support" ) diff --git a/pkg/lint/lint_test.go b/pkg/lint/lint_test.go index bba024d59..067d140f6 100644 --- a/pkg/lint/lint_test.go +++ b/pkg/lint/lint_test.go @@ -21,7 +21,7 @@ import ( "testing" "time" - chartutil "helm.sh/helm/v4/pkg/chart/util" + chartutil "helm.sh/helm/v4/pkg/chart/v2/util" "helm.sh/helm/v4/pkg/lint/support" ) diff --git a/pkg/lint/rules/chartfile.go b/pkg/lint/rules/chartfile.go index a1e08b58d..598557a97 100644 --- a/pkg/lint/rules/chartfile.go +++ b/pkg/lint/rules/chartfile.go @@ -26,8 +26,8 @@ import ( "github.com/pkg/errors" "sigs.k8s.io/yaml" - "helm.sh/helm/v4/pkg/chart" - chartutil "helm.sh/helm/v4/pkg/chart/util" + chart "helm.sh/helm/v4/pkg/chart/v2" + chartutil "helm.sh/helm/v4/pkg/chart/v2/util" "helm.sh/helm/v4/pkg/lint/support" ) diff --git a/pkg/lint/rules/chartfile_test.go b/pkg/lint/rules/chartfile_test.go index 6d709790a..061d90e33 100644 --- a/pkg/lint/rules/chartfile_test.go +++ b/pkg/lint/rules/chartfile_test.go @@ -24,8 +24,8 @@ import ( "github.com/pkg/errors" - "helm.sh/helm/v4/pkg/chart" - chartutil "helm.sh/helm/v4/pkg/chart/util" + chart "helm.sh/helm/v4/pkg/chart/v2" + chartutil "helm.sh/helm/v4/pkg/chart/v2/util" "helm.sh/helm/v4/pkg/lint/support" ) diff --git a/pkg/lint/rules/dependencies.go b/pkg/lint/rules/dependencies.go index 5f71dd144..2ab56eca5 100644 --- a/pkg/lint/rules/dependencies.go +++ b/pkg/lint/rules/dependencies.go @@ -22,8 +22,8 @@ import ( "github.com/pkg/errors" - "helm.sh/helm/v4/pkg/chart" - "helm.sh/helm/v4/pkg/chart/loader" + chart "helm.sh/helm/v4/pkg/chart/v2" + "helm.sh/helm/v4/pkg/chart/v2/loader" "helm.sh/helm/v4/pkg/lint/support" ) diff --git a/pkg/lint/rules/dependencies_test.go b/pkg/lint/rules/dependencies_test.go index e946b1c01..1369b2372 100644 --- a/pkg/lint/rules/dependencies_test.go +++ b/pkg/lint/rules/dependencies_test.go @@ -19,8 +19,8 @@ import ( "path/filepath" "testing" - "helm.sh/helm/v4/pkg/chart" - chartutil "helm.sh/helm/v4/pkg/chart/util" + chart "helm.sh/helm/v4/pkg/chart/v2" + chartutil "helm.sh/helm/v4/pkg/chart/v2/util" "helm.sh/helm/v4/pkg/lint/support" ) diff --git a/pkg/lint/rules/deprecations.go b/pkg/lint/rules/deprecations.go index 0a8e642c9..bd4a4436a 100644 --- a/pkg/lint/rules/deprecations.go +++ b/pkg/lint/rules/deprecations.go @@ -25,7 +25,7 @@ import ( "k8s.io/apiserver/pkg/endpoints/deprecation" kscheme "k8s.io/client-go/kubernetes/scheme" - chartutil "helm.sh/helm/v4/pkg/chart/util" + chartutil "helm.sh/helm/v4/pkg/chart/v2/util" ) var ( diff --git a/pkg/lint/rules/template.go b/pkg/lint/rules/template.go index ec434aba5..287968340 100644 --- a/pkg/lint/rules/template.go +++ b/pkg/lint/rules/template.go @@ -33,8 +33,8 @@ import ( "k8s.io/apimachinery/pkg/util/validation/field" "k8s.io/apimachinery/pkg/util/yaml" - "helm.sh/helm/v4/pkg/chart/loader" - chartutil "helm.sh/helm/v4/pkg/chart/util" + "helm.sh/helm/v4/pkg/chart/v2/loader" + chartutil "helm.sh/helm/v4/pkg/chart/v2/util" "helm.sh/helm/v4/pkg/engine" "helm.sh/helm/v4/pkg/lint/support" ) diff --git a/pkg/lint/rules/template_test.go b/pkg/lint/rules/template_test.go index d3185d8c8..7205ace6d 100644 --- a/pkg/lint/rules/template_test.go +++ b/pkg/lint/rules/template_test.go @@ -23,8 +23,8 @@ import ( "strings" "testing" - "helm.sh/helm/v4/pkg/chart" - chartutil "helm.sh/helm/v4/pkg/chart/util" + chart "helm.sh/helm/v4/pkg/chart/v2" + chartutil "helm.sh/helm/v4/pkg/chart/v2/util" "helm.sh/helm/v4/pkg/lint/support" ) diff --git a/pkg/lint/rules/values.go b/pkg/lint/rules/values.go index f430178c3..8aae250c6 100644 --- a/pkg/lint/rules/values.go +++ b/pkg/lint/rules/values.go @@ -22,7 +22,7 @@ import ( "github.com/pkg/errors" - chartutil "helm.sh/helm/v4/pkg/chart/util" + chartutil "helm.sh/helm/v4/pkg/chart/v2/util" "helm.sh/helm/v4/pkg/lint/support" ) diff --git a/pkg/provenance/sign.go b/pkg/provenance/sign.go index bbb68322f..cd7664edd 100644 --- a/pkg/provenance/sign.go +++ b/pkg/provenance/sign.go @@ -30,8 +30,8 @@ import ( "golang.org/x/crypto/openpgp/packet" //nolint "sigs.k8s.io/yaml" - hapi "helm.sh/helm/v4/pkg/chart" - "helm.sh/helm/v4/pkg/chart/loader" + hapi "helm.sh/helm/v4/pkg/chart/v2" + "helm.sh/helm/v4/pkg/chart/v2/loader" ) var defaultPGPConfig = packet.Config{ diff --git a/pkg/pusher/ocipusher.go b/pkg/pusher/ocipusher.go index a5149d1c7..5cea78a44 100644 --- a/pkg/pusher/ocipusher.go +++ b/pkg/pusher/ocipusher.go @@ -27,7 +27,7 @@ import ( "github.com/pkg/errors" "helm.sh/helm/v4/internal/tlsutil" - "helm.sh/helm/v4/pkg/chart/loader" + "helm.sh/helm/v4/pkg/chart/v2/loader" "helm.sh/helm/v4/pkg/registry" "helm.sh/helm/v4/pkg/time/ctime" ) diff --git a/pkg/registry/client.go b/pkg/registry/client.go index 01e5dff7b..ecc7a0d04 100644 --- a/pkg/registry/client.go +++ b/pkg/registry/client.go @@ -45,7 +45,7 @@ import ( "oras.land/oras-go/v2/registry/remote/retry" "helm.sh/helm/v4/internal/version" - "helm.sh/helm/v4/pkg/chart" + chart "helm.sh/helm/v4/pkg/chart/v2" "helm.sh/helm/v4/pkg/helmpath" ) diff --git a/pkg/registry/util.go b/pkg/registry/util.go index 8c0106fb9..1a96b0768 100644 --- a/pkg/registry/util.go +++ b/pkg/registry/util.go @@ -25,8 +25,8 @@ import ( "time" "helm.sh/helm/v4/internal/tlsutil" - "helm.sh/helm/v4/pkg/chart" - "helm.sh/helm/v4/pkg/chart/loader" + chart "helm.sh/helm/v4/pkg/chart/v2" + "helm.sh/helm/v4/pkg/chart/v2/loader" helmtime "helm.sh/helm/v4/pkg/time" "github.com/Masterminds/semver/v3" diff --git a/pkg/registry/util_test.go b/pkg/registry/util_test.go index 93a11a998..c8ce4e4a4 100644 --- a/pkg/registry/util_test.go +++ b/pkg/registry/util_test.go @@ -23,7 +23,7 @@ import ( ocispec "github.com/opencontainers/image-spec/specs-go/v1" - "helm.sh/helm/v4/pkg/chart" + chart "helm.sh/helm/v4/pkg/chart/v2" helmtime "helm.sh/helm/v4/pkg/time" ) diff --git a/pkg/release/mock.go b/pkg/release/mock.go index ab21d3cf2..94b4d01f3 100644 --- a/pkg/release/mock.go +++ b/pkg/release/mock.go @@ -20,7 +20,7 @@ import ( "fmt" "math/rand" - "helm.sh/helm/v4/pkg/chart" + chart "helm.sh/helm/v4/pkg/chart/v2" "helm.sh/helm/v4/pkg/time" ) diff --git a/pkg/release/release.go b/pkg/release/release.go index 2a4963d9b..1a7c7b18c 100644 --- a/pkg/release/release.go +++ b/pkg/release/release.go @@ -15,7 +15,9 @@ limitations under the License. package release -import "helm.sh/helm/v4/pkg/chart" +import ( + chart "helm.sh/helm/v4/pkg/chart/v2" +) // Release describes a deployment of a chart, together with the chart // and the variables used to deploy that chart. diff --git a/pkg/release/util/manifest_sorter.go b/pkg/release/util/manifest_sorter.go index a598743a6..c4ad62161 100644 --- a/pkg/release/util/manifest_sorter.go +++ b/pkg/release/util/manifest_sorter.go @@ -26,7 +26,7 @@ import ( "github.com/pkg/errors" "sigs.k8s.io/yaml" - chartutil "helm.sh/helm/v4/pkg/chart/util" + chartutil "helm.sh/helm/v4/pkg/chart/v2/util" "helm.sh/helm/v4/pkg/release" ) diff --git a/pkg/repo/chartrepo.go b/pkg/repo/chartrepo.go index 3629bd24b..52f81be57 100644 --- a/pkg/repo/chartrepo.go +++ b/pkg/repo/chartrepo.go @@ -31,7 +31,7 @@ import ( "github.com/pkg/errors" "sigs.k8s.io/yaml" - "helm.sh/helm/v4/pkg/chart/loader" + "helm.sh/helm/v4/pkg/chart/v2/loader" "helm.sh/helm/v4/pkg/getter" "helm.sh/helm/v4/pkg/helmpath" "helm.sh/helm/v4/pkg/provenance" diff --git a/pkg/repo/chartrepo_test.go b/pkg/repo/chartrepo_test.go index e3330b8eb..42d00e0ee 100644 --- a/pkg/repo/chartrepo_test.go +++ b/pkg/repo/chartrepo_test.go @@ -30,7 +30,7 @@ import ( "sigs.k8s.io/yaml" - "helm.sh/helm/v4/pkg/chart" + chart "helm.sh/helm/v4/pkg/chart/v2" "helm.sh/helm/v4/pkg/cli" "helm.sh/helm/v4/pkg/getter" ) diff --git a/pkg/repo/index.go b/pkg/repo/index.go index 2526cba1b..c5f808229 100644 --- a/pkg/repo/index.go +++ b/pkg/repo/index.go @@ -33,8 +33,8 @@ import ( "helm.sh/helm/v4/internal/fileutil" "helm.sh/helm/v4/internal/urlutil" - "helm.sh/helm/v4/pkg/chart" - "helm.sh/helm/v4/pkg/chart/loader" + chart "helm.sh/helm/v4/pkg/chart/v2" + "helm.sh/helm/v4/pkg/chart/v2/loader" "helm.sh/helm/v4/pkg/provenance" ) diff --git a/pkg/repo/index_test.go b/pkg/repo/index_test.go index 8c22bdc3e..f50c7e65e 100644 --- a/pkg/repo/index_test.go +++ b/pkg/repo/index_test.go @@ -28,7 +28,7 @@ import ( "strings" "testing" - "helm.sh/helm/v4/pkg/chart" + chart "helm.sh/helm/v4/pkg/chart/v2" "helm.sh/helm/v4/pkg/cli" "helm.sh/helm/v4/pkg/getter" "helm.sh/helm/v4/pkg/helmpath" diff --git a/pkg/repo/repotest/server.go b/pkg/repo/repotest/server.go index 7b004dbc3..709a6f5fd 100644 --- a/pkg/repo/repotest/server.go +++ b/pkg/repo/repotest/server.go @@ -34,9 +34,9 @@ import ( "golang.org/x/crypto/bcrypt" "sigs.k8s.io/yaml" - "helm.sh/helm/v4/pkg/chart" - "helm.sh/helm/v4/pkg/chart/loader" - chartutil "helm.sh/helm/v4/pkg/chart/util" + chart "helm.sh/helm/v4/pkg/chart/v2" + "helm.sh/helm/v4/pkg/chart/v2/loader" + chartutil "helm.sh/helm/v4/pkg/chart/v2/util" ociRegistry "helm.sh/helm/v4/pkg/registry" "helm.sh/helm/v4/pkg/repo" ) From 0d5e64c1f28d0ef5e1d24e4bbb268a435f5cfcd6 Mon Sep 17 00:00:00 2001 From: Yarden Shoham Date: Tue, 25 Feb 2025 22:34:50 +0200 Subject: [PATCH 61/68] Fix formatting Signed-off-by: Yarden Shoham --- cmd/helm/flags_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/helm/flags_test.go b/cmd/helm/flags_test.go index fbdc597d6..e55c51ce4 100644 --- a/cmd/helm/flags_test.go +++ b/cmd/helm/flags_test.go @@ -21,6 +21,7 @@ import ( "testing" "github.com/stretchr/testify/require" + "helm.sh/helm/v4/pkg/action" chart "helm.sh/helm/v4/pkg/chart/v2" "helm.sh/helm/v4/pkg/release" From f04c456bd67a758f99443a735d933f6f735ed4d1 Mon Sep 17 00:00:00 2001 From: Austin Abro Date: Wed, 26 Feb 2025 13:21:00 +0000 Subject: [PATCH 62/68] gofmt Signed-off-by: Austin Abro --- pkg/cmd/create.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/cmd/create.go b/pkg/cmd/create.go index f6938d660..435c8ca82 100644 --- a/pkg/cmd/create.go +++ b/pkg/cmd/create.go @@ -23,9 +23,9 @@ import ( "github.com/spf13/cobra" - "helm.sh/helm/v4/pkg/cmd/require" chart "helm.sh/helm/v4/pkg/chart/v2" chartutil "helm.sh/helm/v4/pkg/chart/v2/util" + "helm.sh/helm/v4/pkg/cmd/require" "helm.sh/helm/v4/pkg/helmpath" ) From e7114889705644bb2db8ca2e8ab317e28ffd48c1 Mon Sep 17 00:00:00 2001 From: Matt Farina Date: Wed, 26 Feb 2025 09:04:32 -0500 Subject: [PATCH 63/68] Move pkg/release to pkg/release/v1 to support v3 charts This is part of HIP 20 which provides a means to have v3 charts that live alongside v2 charts while having breaking changes. The plan is to have a different release object for v3 chart instances for at least a couple reasons: 1. So that the chart object on the release can be fundamentally different. 2. So that Helm v3 does not detect or try to work with instances of charts whose apiVersion it does not know about. Note: it is expected that Helm v3 usage will be used long after the Helm project no longer supports it. 5 years after Helm v2 had reached end-of-life there was still usage of it. Note: The release util package is separate from the versioned elements as it is planned to use generics to handle multiple release object versions. Signed-off-by: Matt Farina --- cmd/helm/completion_test.go | 2 +- cmd/helm/flags_test.go | 2 +- cmd/helm/get_all_test.go | 2 +- cmd/helm/get_hooks_test.go | 2 +- cmd/helm/get_manifest_test.go | 2 +- cmd/helm/get_metadata_test.go | 2 +- cmd/helm/get_notes_test.go | 2 +- cmd/helm/get_values_test.go | 2 +- cmd/helm/helm.go | 2 +- cmd/helm/helm_test.go | 2 +- cmd/helm/history.go | 2 +- cmd/helm/history_test.go | 2 +- cmd/helm/install.go | 2 +- cmd/helm/list.go | 2 +- cmd/helm/list_test.go | 2 +- cmd/helm/plugin_test.go | 2 +- cmd/helm/rollback_test.go | 2 +- cmd/helm/status.go | 2 +- cmd/helm/status_test.go | 2 +- cmd/helm/template.go | 2 +- cmd/helm/uninstall_test.go | 2 +- cmd/helm/upgrade.go | 2 +- cmd/helm/upgrade_test.go | 2 +- pkg/action/action.go | 2 +- pkg/action/action_test.go | 2 +- pkg/action/get.go | 2 +- pkg/action/history.go | 2 +- pkg/action/hooks.go | 2 +- pkg/action/hooks_test.go | 2 +- pkg/action/install.go | 2 +- pkg/action/install_test.go | 2 +- pkg/action/list.go | 2 +- pkg/action/list_test.go | 2 +- pkg/action/release_testing.go | 2 +- pkg/action/rollback.go | 2 +- pkg/action/status.go | 2 +- pkg/action/uninstall.go | 2 +- pkg/action/uninstall_test.go | 2 +- pkg/action/upgrade.go | 2 +- pkg/action/upgrade_test.go | 2 +- pkg/release/util/filter.go | 2 +- pkg/release/util/filter_test.go | 2 +- pkg/release/util/kind_sorter.go | 2 +- pkg/release/util/kind_sorter_test.go | 2 +- pkg/release/util/manifest_sorter.go | 2 +- pkg/release/util/manifest_sorter_test.go | 2 +- pkg/release/util/sorter.go | 2 +- pkg/release/util/sorter_test.go | 2 +- pkg/release/{ => v1}/hook.go | 2 +- pkg/release/{ => v1}/info.go | 2 +- pkg/release/{ => v1}/mock.go | 2 +- pkg/release/{ => v1}/release.go | 2 +- pkg/release/{ => v1}/responses.go | 2 +- pkg/release/{ => v1}/status.go | 2 +- pkg/storage/driver/cfgmaps.go | 2 +- pkg/storage/driver/cfgmaps_test.go | 2 +- pkg/storage/driver/driver.go | 2 +- pkg/storage/driver/memory.go | 2 +- pkg/storage/driver/memory_test.go | 2 +- pkg/storage/driver/mock_test.go | 2 +- pkg/storage/driver/records.go | 2 +- pkg/storage/driver/records_test.go | 2 +- pkg/storage/driver/secrets.go | 2 +- pkg/storage/driver/secrets_test.go | 2 +- pkg/storage/driver/sql.go | 2 +- pkg/storage/driver/sql_test.go | 2 +- pkg/storage/driver/util.go | 2 +- pkg/storage/storage.go | 2 +- pkg/storage/storage_test.go | 2 +- 69 files changed, 69 insertions(+), 69 deletions(-) rename pkg/release/{ => v1}/hook.go (99%) rename pkg/release/{ => v1}/info.go (98%) rename pkg/release/{ => v1}/mock.go (99%) rename pkg/release/{ => v1}/release.go (99%) rename pkg/release/{ => v1}/responses.go (98%) rename pkg/release/{ => v1}/status.go (99%) diff --git a/cmd/helm/completion_test.go b/cmd/helm/completion_test.go index 3d8383519..b1089596b 100644 --- a/cmd/helm/completion_test.go +++ b/cmd/helm/completion_test.go @@ -22,7 +22,7 @@ import ( "testing" chart "helm.sh/helm/v4/pkg/chart/v2" - "helm.sh/helm/v4/pkg/release" + release "helm.sh/helm/v4/pkg/release/v1" ) // Check if file completion should be performed according to parameter 'shouldBePerformed' diff --git a/cmd/helm/flags_test.go b/cmd/helm/flags_test.go index e55c51ce4..62a6fdcd4 100644 --- a/cmd/helm/flags_test.go +++ b/cmd/helm/flags_test.go @@ -24,7 +24,7 @@ import ( "helm.sh/helm/v4/pkg/action" chart "helm.sh/helm/v4/pkg/chart/v2" - "helm.sh/helm/v4/pkg/release" + release "helm.sh/helm/v4/pkg/release/v1" helmtime "helm.sh/helm/v4/pkg/time" ) diff --git a/cmd/helm/get_all_test.go b/cmd/helm/get_all_test.go index 60ea1161d..5de01bfcf 100644 --- a/cmd/helm/get_all_test.go +++ b/cmd/helm/get_all_test.go @@ -19,7 +19,7 @@ package main import ( "testing" - "helm.sh/helm/v4/pkg/release" + release "helm.sh/helm/v4/pkg/release/v1" ) func TestGetCmd(t *testing.T) { diff --git a/cmd/helm/get_hooks_test.go b/cmd/helm/get_hooks_test.go index 75cf448cc..fa18204e3 100644 --- a/cmd/helm/get_hooks_test.go +++ b/cmd/helm/get_hooks_test.go @@ -19,7 +19,7 @@ package main import ( "testing" - "helm.sh/helm/v4/pkg/release" + release "helm.sh/helm/v4/pkg/release/v1" ) func TestGetHooks(t *testing.T) { diff --git a/cmd/helm/get_manifest_test.go b/cmd/helm/get_manifest_test.go index b266620e7..96da50b75 100644 --- a/cmd/helm/get_manifest_test.go +++ b/cmd/helm/get_manifest_test.go @@ -19,7 +19,7 @@ package main import ( "testing" - "helm.sh/helm/v4/pkg/release" + release "helm.sh/helm/v4/pkg/release/v1" ) func TestGetManifest(t *testing.T) { diff --git a/cmd/helm/get_metadata_test.go b/cmd/helm/get_metadata_test.go index 28c3c3649..29ca77253 100644 --- a/cmd/helm/get_metadata_test.go +++ b/cmd/helm/get_metadata_test.go @@ -19,7 +19,7 @@ package main import ( "testing" - "helm.sh/helm/v4/pkg/release" + release "helm.sh/helm/v4/pkg/release/v1" ) func TestGetMetadataCmd(t *testing.T) { diff --git a/cmd/helm/get_notes_test.go b/cmd/helm/get_notes_test.go index 4ddd4c7a8..88d9584b8 100644 --- a/cmd/helm/get_notes_test.go +++ b/cmd/helm/get_notes_test.go @@ -19,7 +19,7 @@ package main import ( "testing" - "helm.sh/helm/v4/pkg/release" + release "helm.sh/helm/v4/pkg/release/v1" ) func TestGetNotesCmd(t *testing.T) { diff --git a/cmd/helm/get_values_test.go b/cmd/helm/get_values_test.go index 44610c103..0fe141cf7 100644 --- a/cmd/helm/get_values_test.go +++ b/cmd/helm/get_values_test.go @@ -19,7 +19,7 @@ package main import ( "testing" - "helm.sh/helm/v4/pkg/release" + release "helm.sh/helm/v4/pkg/release/v1" ) func TestGetValuesCmd(t *testing.T) { diff --git a/cmd/helm/helm.go b/cmd/helm/helm.go index c8de18796..7cce9436f 100644 --- a/cmd/helm/helm.go +++ b/cmd/helm/helm.go @@ -34,7 +34,7 @@ import ( "helm.sh/helm/v4/pkg/cli" "helm.sh/helm/v4/pkg/kube" kubefake "helm.sh/helm/v4/pkg/kube/fake" - "helm.sh/helm/v4/pkg/release" + release "helm.sh/helm/v4/pkg/release/v1" "helm.sh/helm/v4/pkg/storage/driver" ) diff --git a/cmd/helm/helm_test.go b/cmd/helm/helm_test.go index cfffa6dc7..a1d2b8505 100644 --- a/cmd/helm/helm_test.go +++ b/cmd/helm/helm_test.go @@ -33,7 +33,7 @@ import ( chartutil "helm.sh/helm/v4/pkg/chart/v2/util" "helm.sh/helm/v4/pkg/cli" kubefake "helm.sh/helm/v4/pkg/kube/fake" - "helm.sh/helm/v4/pkg/release" + release "helm.sh/helm/v4/pkg/release/v1" "helm.sh/helm/v4/pkg/storage" "helm.sh/helm/v4/pkg/storage/driver" "helm.sh/helm/v4/pkg/time" diff --git a/cmd/helm/history.go b/cmd/helm/history.go index a47f97688..86fad4b04 100644 --- a/cmd/helm/history.go +++ b/cmd/helm/history.go @@ -29,8 +29,8 @@ import ( "helm.sh/helm/v4/pkg/action" chart "helm.sh/helm/v4/pkg/chart/v2" "helm.sh/helm/v4/pkg/cli/output" - "helm.sh/helm/v4/pkg/release" releaseutil "helm.sh/helm/v4/pkg/release/util" + release "helm.sh/helm/v4/pkg/release/v1" helmtime "helm.sh/helm/v4/pkg/time" ) diff --git a/cmd/helm/history_test.go b/cmd/helm/history_test.go index 07f5134c6..0df64cd1c 100644 --- a/cmd/helm/history_test.go +++ b/cmd/helm/history_test.go @@ -20,7 +20,7 @@ import ( "fmt" "testing" - "helm.sh/helm/v4/pkg/release" + release "helm.sh/helm/v4/pkg/release/v1" ) func TestHistoryCmd(t *testing.T) { diff --git a/cmd/helm/install.go b/cmd/helm/install.go index 12f87cd20..3e8d04cb2 100644 --- a/cmd/helm/install.go +++ b/cmd/helm/install.go @@ -38,7 +38,7 @@ import ( "helm.sh/helm/v4/pkg/cli/values" "helm.sh/helm/v4/pkg/downloader" "helm.sh/helm/v4/pkg/getter" - "helm.sh/helm/v4/pkg/release" + release "helm.sh/helm/v4/pkg/release/v1" ) const installDesc = ` diff --git a/cmd/helm/list.go b/cmd/helm/list.go index 67da22cdf..9bbe580a2 100644 --- a/cmd/helm/list.go +++ b/cmd/helm/list.go @@ -28,7 +28,7 @@ import ( "helm.sh/helm/v4/cmd/helm/require" "helm.sh/helm/v4/pkg/action" "helm.sh/helm/v4/pkg/cli/output" - "helm.sh/helm/v4/pkg/release" + release "helm.sh/helm/v4/pkg/release/v1" ) var listHelp = ` diff --git a/cmd/helm/list_test.go b/cmd/helm/list_test.go index 6a462ee28..6f9754459 100644 --- a/cmd/helm/list_test.go +++ b/cmd/helm/list_test.go @@ -20,7 +20,7 @@ import ( "testing" chart "helm.sh/helm/v4/pkg/chart/v2" - "helm.sh/helm/v4/pkg/release" + release "helm.sh/helm/v4/pkg/release/v1" "helm.sh/helm/v4/pkg/time" ) diff --git a/cmd/helm/plugin_test.go b/cmd/helm/plugin_test.go index 4d2aa1a59..cbaf05321 100644 --- a/cmd/helm/plugin_test.go +++ b/cmd/helm/plugin_test.go @@ -26,7 +26,7 @@ import ( "github.com/spf13/cobra" "github.com/spf13/pflag" - "helm.sh/helm/v4/pkg/release" + release "helm.sh/helm/v4/pkg/release/v1" ) func TestManuallyProcessArgs(t *testing.T) { diff --git a/cmd/helm/rollback_test.go b/cmd/helm/rollback_test.go index 88dbf6524..a3bad2ef7 100644 --- a/cmd/helm/rollback_test.go +++ b/cmd/helm/rollback_test.go @@ -22,7 +22,7 @@ import ( "testing" chart "helm.sh/helm/v4/pkg/chart/v2" - "helm.sh/helm/v4/pkg/release" + release "helm.sh/helm/v4/pkg/release/v1" ) func TestRollbackCmd(t *testing.T) { diff --git a/cmd/helm/status.go b/cmd/helm/status.go index 727c3df9e..d1e25dd45 100644 --- a/cmd/helm/status.go +++ b/cmd/helm/status.go @@ -32,7 +32,7 @@ import ( "helm.sh/helm/v4/pkg/action" chartutil "helm.sh/helm/v4/pkg/chart/v2/util" "helm.sh/helm/v4/pkg/cli/output" - "helm.sh/helm/v4/pkg/release" + release "helm.sh/helm/v4/pkg/release/v1" ) // NOTE: Keep the list of statuses up-to-date with pkg/release/status.go. diff --git a/cmd/helm/status_test.go b/cmd/helm/status_test.go index 7e51849b1..7063e203f 100644 --- a/cmd/helm/status_test.go +++ b/cmd/helm/status_test.go @@ -21,7 +21,7 @@ import ( "time" chart "helm.sh/helm/v4/pkg/chart/v2" - "helm.sh/helm/v4/pkg/release" + release "helm.sh/helm/v4/pkg/release/v1" helmtime "helm.sh/helm/v4/pkg/time" ) diff --git a/cmd/helm/template.go b/cmd/helm/template.go index c41373337..4c07dac98 100644 --- a/cmd/helm/template.go +++ b/cmd/helm/template.go @@ -28,7 +28,7 @@ import ( "sort" "strings" - "helm.sh/helm/v4/pkg/release" + release "helm.sh/helm/v4/pkg/release/v1" "github.com/spf13/cobra" diff --git a/cmd/helm/uninstall_test.go b/cmd/helm/uninstall_test.go index f9bc71ec2..852823591 100644 --- a/cmd/helm/uninstall_test.go +++ b/cmd/helm/uninstall_test.go @@ -19,7 +19,7 @@ package main import ( "testing" - "helm.sh/helm/v4/pkg/release" + release "helm.sh/helm/v4/pkg/release/v1" ) func TestUninstall(t *testing.T) { diff --git a/cmd/helm/upgrade.go b/cmd/helm/upgrade.go index 7d6cb33ec..929051306 100644 --- a/cmd/helm/upgrade.go +++ b/cmd/helm/upgrade.go @@ -36,7 +36,7 @@ import ( "helm.sh/helm/v4/pkg/cli/values" "helm.sh/helm/v4/pkg/downloader" "helm.sh/helm/v4/pkg/getter" - "helm.sh/helm/v4/pkg/release" + release "helm.sh/helm/v4/pkg/release/v1" "helm.sh/helm/v4/pkg/storage/driver" ) diff --git a/cmd/helm/upgrade_test.go b/cmd/helm/upgrade_test.go index 595ca9fc2..9b414c90a 100644 --- a/cmd/helm/upgrade_test.go +++ b/cmd/helm/upgrade_test.go @@ -27,7 +27,7 @@ import ( chart "helm.sh/helm/v4/pkg/chart/v2" "helm.sh/helm/v4/pkg/chart/v2/loader" chartutil "helm.sh/helm/v4/pkg/chart/v2/util" - "helm.sh/helm/v4/pkg/release" + release "helm.sh/helm/v4/pkg/release/v1" ) func TestUpgradeCmd(t *testing.T) { diff --git a/pkg/action/action.go b/pkg/action/action.go index d91ccab51..ea2dc0dd7 100644 --- a/pkg/action/action.go +++ b/pkg/action/action.go @@ -39,8 +39,8 @@ import ( "helm.sh/helm/v4/pkg/kube" "helm.sh/helm/v4/pkg/postrender" "helm.sh/helm/v4/pkg/registry" - "helm.sh/helm/v4/pkg/release" releaseutil "helm.sh/helm/v4/pkg/release/util" + release "helm.sh/helm/v4/pkg/release/v1" "helm.sh/helm/v4/pkg/storage" "helm.sh/helm/v4/pkg/storage/driver" "helm.sh/helm/v4/pkg/time" diff --git a/pkg/action/action_test.go b/pkg/action/action_test.go index 4c78ef6c1..b1cf20597 100644 --- a/pkg/action/action_test.go +++ b/pkg/action/action_test.go @@ -28,7 +28,7 @@ import ( chartutil "helm.sh/helm/v4/pkg/chart/v2/util" kubefake "helm.sh/helm/v4/pkg/kube/fake" "helm.sh/helm/v4/pkg/registry" - "helm.sh/helm/v4/pkg/release" + release "helm.sh/helm/v4/pkg/release/v1" "helm.sh/helm/v4/pkg/storage" "helm.sh/helm/v4/pkg/storage/driver" "helm.sh/helm/v4/pkg/time" diff --git a/pkg/action/get.go b/pkg/action/get.go index 4c0683f3e..dbe5f4cb3 100644 --- a/pkg/action/get.go +++ b/pkg/action/get.go @@ -17,7 +17,7 @@ limitations under the License. package action import ( - "helm.sh/helm/v4/pkg/release" + release "helm.sh/helm/v4/pkg/release/v1" ) // Get is the action for checking a given release's information. diff --git a/pkg/action/history.go b/pkg/action/history.go index e5ac16bfe..04743f4cd 100644 --- a/pkg/action/history.go +++ b/pkg/action/history.go @@ -20,7 +20,7 @@ import ( "github.com/pkg/errors" chartutil "helm.sh/helm/v4/pkg/chart/v2/util" - "helm.sh/helm/v4/pkg/release" + release "helm.sh/helm/v4/pkg/release/v1" ) // History is the action for checking the release's ledger. diff --git a/pkg/action/hooks.go b/pkg/action/hooks.go index b6c505807..230e9ec81 100644 --- a/pkg/action/hooks.go +++ b/pkg/action/hooks.go @@ -30,7 +30,7 @@ import ( "github.com/pkg/errors" "gopkg.in/yaml.v3" - "helm.sh/helm/v4/pkg/release" + release "helm.sh/helm/v4/pkg/release/v1" helmtime "helm.sh/helm/v4/pkg/time" ) diff --git a/pkg/action/hooks_test.go b/pkg/action/hooks_test.go index b39ffe022..38f25d9ab 100644 --- a/pkg/action/hooks_test.go +++ b/pkg/action/hooks_test.go @@ -26,7 +26,7 @@ import ( chart "helm.sh/helm/v4/pkg/chart/v2" kubefake "helm.sh/helm/v4/pkg/kube/fake" - "helm.sh/helm/v4/pkg/release" + release "helm.sh/helm/v4/pkg/release/v1" ) func podManifestWithOutputLogs(hookDefinitions []release.HookOutputLogPolicy) string { diff --git a/pkg/action/install.go b/pkg/action/install.go index ad260c361..f1896351e 100644 --- a/pkg/action/install.go +++ b/pkg/action/install.go @@ -48,8 +48,8 @@ import ( kubefake "helm.sh/helm/v4/pkg/kube/fake" "helm.sh/helm/v4/pkg/postrender" "helm.sh/helm/v4/pkg/registry" - "helm.sh/helm/v4/pkg/release" releaseutil "helm.sh/helm/v4/pkg/release/util" + release "helm.sh/helm/v4/pkg/release/v1" "helm.sh/helm/v4/pkg/repo" "helm.sh/helm/v4/pkg/storage" "helm.sh/helm/v4/pkg/storage/driver" diff --git a/pkg/action/install_test.go b/pkg/action/install_test.go index 09715daf3..869055657 100644 --- a/pkg/action/install_test.go +++ b/pkg/action/install_test.go @@ -36,7 +36,7 @@ import ( chart "helm.sh/helm/v4/pkg/chart/v2" chartutil "helm.sh/helm/v4/pkg/chart/v2/util" kubefake "helm.sh/helm/v4/pkg/kube/fake" - "helm.sh/helm/v4/pkg/release" + release "helm.sh/helm/v4/pkg/release/v1" "helm.sh/helm/v4/pkg/storage/driver" helmtime "helm.sh/helm/v4/pkg/time" ) diff --git a/pkg/action/list.go b/pkg/action/list.go index 5c2b1e8a1..82500582f 100644 --- a/pkg/action/list.go +++ b/pkg/action/list.go @@ -22,8 +22,8 @@ import ( "k8s.io/apimachinery/pkg/labels" - "helm.sh/helm/v4/pkg/release" releaseutil "helm.sh/helm/v4/pkg/release/util" + release "helm.sh/helm/v4/pkg/release/v1" ) // ListStates represents zero or more status codes that a list item may have set diff --git a/pkg/action/list_test.go b/pkg/action/list_test.go index a7eb8a920..e41949310 100644 --- a/pkg/action/list_test.go +++ b/pkg/action/list_test.go @@ -21,7 +21,7 @@ import ( "github.com/stretchr/testify/assert" - "helm.sh/helm/v4/pkg/release" + release "helm.sh/helm/v4/pkg/release/v1" "helm.sh/helm/v4/pkg/storage" ) diff --git a/pkg/action/release_testing.go b/pkg/action/release_testing.go index b4cdb47c8..c6374523e 100644 --- a/pkg/action/release_testing.go +++ b/pkg/action/release_testing.go @@ -28,7 +28,7 @@ import ( v1 "k8s.io/api/core/v1" chartutil "helm.sh/helm/v4/pkg/chart/v2/util" - "helm.sh/helm/v4/pkg/release" + release "helm.sh/helm/v4/pkg/release/v1" ) const ( diff --git a/pkg/action/rollback.go b/pkg/action/rollback.go index 0cd9d5d07..4006f565f 100644 --- a/pkg/action/rollback.go +++ b/pkg/action/rollback.go @@ -25,7 +25,7 @@ import ( "github.com/pkg/errors" chartutil "helm.sh/helm/v4/pkg/chart/v2/util" - "helm.sh/helm/v4/pkg/release" + release "helm.sh/helm/v4/pkg/release/v1" helmtime "helm.sh/helm/v4/pkg/time" ) diff --git a/pkg/action/status.go b/pkg/action/status.go index db9a3b3f0..509c52cd9 100644 --- a/pkg/action/status.go +++ b/pkg/action/status.go @@ -21,7 +21,7 @@ import ( "errors" "helm.sh/helm/v4/pkg/kube" - "helm.sh/helm/v4/pkg/release" + release "helm.sh/helm/v4/pkg/release/v1" ) // Status is the action for checking the deployment status of releases. diff --git a/pkg/action/uninstall.go b/pkg/action/uninstall.go index bfec35fc0..fdbeb5dc8 100644 --- a/pkg/action/uninstall.go +++ b/pkg/action/uninstall.go @@ -26,8 +26,8 @@ import ( chartutil "helm.sh/helm/v4/pkg/chart/v2/util" "helm.sh/helm/v4/pkg/kube" - "helm.sh/helm/v4/pkg/release" releaseutil "helm.sh/helm/v4/pkg/release/util" + release "helm.sh/helm/v4/pkg/release/v1" helmtime "helm.sh/helm/v4/pkg/time" ) diff --git a/pkg/action/uninstall_test.go b/pkg/action/uninstall_test.go index eca9e6ad8..071b76943 100644 --- a/pkg/action/uninstall_test.go +++ b/pkg/action/uninstall_test.go @@ -23,7 +23,7 @@ import ( "github.com/stretchr/testify/assert" kubefake "helm.sh/helm/v4/pkg/kube/fake" - "helm.sh/helm/v4/pkg/release" + release "helm.sh/helm/v4/pkg/release/v1" ) func uninstallAction(t *testing.T) *Uninstall { diff --git a/pkg/action/upgrade.go b/pkg/action/upgrade.go index 340f61585..e32c8dcaf 100644 --- a/pkg/action/upgrade.go +++ b/pkg/action/upgrade.go @@ -33,8 +33,8 @@ import ( "helm.sh/helm/v4/pkg/kube" "helm.sh/helm/v4/pkg/postrender" "helm.sh/helm/v4/pkg/registry" - "helm.sh/helm/v4/pkg/release" releaseutil "helm.sh/helm/v4/pkg/release/util" + release "helm.sh/helm/v4/pkg/release/v1" "helm.sh/helm/v4/pkg/storage/driver" ) diff --git a/pkg/action/upgrade_test.go b/pkg/action/upgrade_test.go index 069578025..303f49e70 100644 --- a/pkg/action/upgrade_test.go +++ b/pkg/action/upgrade_test.go @@ -30,7 +30,7 @@ import ( "github.com/stretchr/testify/require" kubefake "helm.sh/helm/v4/pkg/kube/fake" - "helm.sh/helm/v4/pkg/release" + release "helm.sh/helm/v4/pkg/release/v1" helmtime "helm.sh/helm/v4/pkg/time" ) diff --git a/pkg/release/util/filter.go b/pkg/release/util/filter.go index e56752f86..f0a082cfd 100644 --- a/pkg/release/util/filter.go +++ b/pkg/release/util/filter.go @@ -16,7 +16,7 @@ limitations under the License. package util // import "helm.sh/helm/v4/pkg/release/util" -import rspb "helm.sh/helm/v4/pkg/release" +import rspb "helm.sh/helm/v4/pkg/release/v1" // FilterFunc returns true if the release object satisfies // the predicate of the underlying filter func. diff --git a/pkg/release/util/filter_test.go b/pkg/release/util/filter_test.go index 2037ef157..5d2564619 100644 --- a/pkg/release/util/filter_test.go +++ b/pkg/release/util/filter_test.go @@ -19,7 +19,7 @@ package util // import "helm.sh/helm/v4/pkg/release/util" import ( "testing" - rspb "helm.sh/helm/v4/pkg/release" + rspb "helm.sh/helm/v4/pkg/release/v1" ) func TestFilterAny(t *testing.T) { diff --git a/pkg/release/util/kind_sorter.go b/pkg/release/util/kind_sorter.go index 130b2c831..22795733c 100644 --- a/pkg/release/util/kind_sorter.go +++ b/pkg/release/util/kind_sorter.go @@ -19,7 +19,7 @@ package util import ( "sort" - "helm.sh/helm/v4/pkg/release" + release "helm.sh/helm/v4/pkg/release/v1" ) // KindSortOrder is an ordering of Kinds. diff --git a/pkg/release/util/kind_sorter_test.go b/pkg/release/util/kind_sorter_test.go index cd40fe459..00d80ecf2 100644 --- a/pkg/release/util/kind_sorter_test.go +++ b/pkg/release/util/kind_sorter_test.go @@ -20,7 +20,7 @@ import ( "bytes" "testing" - "helm.sh/helm/v4/pkg/release" + release "helm.sh/helm/v4/pkg/release/v1" ) func TestKindSorter(t *testing.T) { diff --git a/pkg/release/util/manifest_sorter.go b/pkg/release/util/manifest_sorter.go index c4ad62161..15eb76174 100644 --- a/pkg/release/util/manifest_sorter.go +++ b/pkg/release/util/manifest_sorter.go @@ -27,7 +27,7 @@ import ( "sigs.k8s.io/yaml" chartutil "helm.sh/helm/v4/pkg/chart/v2/util" - "helm.sh/helm/v4/pkg/release" + release "helm.sh/helm/v4/pkg/release/v1" ) // Manifest represents a manifest file, which has a name and some content. diff --git a/pkg/release/util/manifest_sorter_test.go b/pkg/release/util/manifest_sorter_test.go index 281f24924..4360013e5 100644 --- a/pkg/release/util/manifest_sorter_test.go +++ b/pkg/release/util/manifest_sorter_test.go @@ -22,7 +22,7 @@ import ( "sigs.k8s.io/yaml" - "helm.sh/helm/v4/pkg/release" + release "helm.sh/helm/v4/pkg/release/v1" ) func TestSortManifests(t *testing.T) { diff --git a/pkg/release/util/sorter.go b/pkg/release/util/sorter.go index 8b1c89aa3..949adbda9 100644 --- a/pkg/release/util/sorter.go +++ b/pkg/release/util/sorter.go @@ -19,7 +19,7 @@ package util // import "helm.sh/helm/v4/pkg/release/util" import ( "sort" - rspb "helm.sh/helm/v4/pkg/release" + rspb "helm.sh/helm/v4/pkg/release/v1" ) type list []*rspb.Release diff --git a/pkg/release/util/sorter_test.go b/pkg/release/util/sorter_test.go index 6e92eef5c..8a766efc9 100644 --- a/pkg/release/util/sorter_test.go +++ b/pkg/release/util/sorter_test.go @@ -20,7 +20,7 @@ import ( "testing" "time" - rspb "helm.sh/helm/v4/pkg/release" + rspb "helm.sh/helm/v4/pkg/release/v1" helmtime "helm.sh/helm/v4/pkg/time" ) diff --git a/pkg/release/hook.go b/pkg/release/v1/hook.go similarity index 99% rename from pkg/release/hook.go rename to pkg/release/v1/hook.go index 5ff61fdaa..1ef5c1eb8 100644 --- a/pkg/release/hook.go +++ b/pkg/release/v1/hook.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package release +package v1 import ( "helm.sh/helm/v4/pkg/time" diff --git a/pkg/release/info.go b/pkg/release/v1/info.go similarity index 98% rename from pkg/release/info.go rename to pkg/release/v1/info.go index 514807a35..ff98ab63e 100644 --- a/pkg/release/info.go +++ b/pkg/release/v1/info.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package release +package v1 import ( "k8s.io/apimachinery/pkg/runtime" diff --git a/pkg/release/mock.go b/pkg/release/v1/mock.go similarity index 99% rename from pkg/release/mock.go rename to pkg/release/v1/mock.go index 94b4d01f3..9ca57284c 100644 --- a/pkg/release/mock.go +++ b/pkg/release/v1/mock.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package release +package v1 import ( "fmt" diff --git a/pkg/release/release.go b/pkg/release/v1/release.go similarity index 99% rename from pkg/release/release.go rename to pkg/release/v1/release.go index 1a7c7b18c..74e834f7b 100644 --- a/pkg/release/release.go +++ b/pkg/release/v1/release.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package release +package v1 import ( chart "helm.sh/helm/v4/pkg/chart/v2" diff --git a/pkg/release/responses.go b/pkg/release/v1/responses.go similarity index 98% rename from pkg/release/responses.go rename to pkg/release/v1/responses.go index 7ee1fc2ee..2a5608c67 100644 --- a/pkg/release/responses.go +++ b/pkg/release/v1/responses.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package release +package v1 // UninstallReleaseResponse represents a successful response to an uninstall request. type UninstallReleaseResponse struct { diff --git a/pkg/release/status.go b/pkg/release/v1/status.go similarity index 99% rename from pkg/release/status.go rename to pkg/release/v1/status.go index edd27a5f1..8d6459013 100644 --- a/pkg/release/status.go +++ b/pkg/release/v1/status.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package release +package v1 // Status is the status of a release type Status string diff --git a/pkg/storage/driver/cfgmaps.go b/pkg/storage/driver/cfgmaps.go index 48edc3172..2b84b7f82 100644 --- a/pkg/storage/driver/cfgmaps.go +++ b/pkg/storage/driver/cfgmaps.go @@ -31,7 +31,7 @@ import ( "k8s.io/apimachinery/pkg/util/validation" corev1 "k8s.io/client-go/kubernetes/typed/core/v1" - rspb "helm.sh/helm/v4/pkg/release" + rspb "helm.sh/helm/v4/pkg/release/v1" ) var _ Driver = (*ConfigMaps)(nil) diff --git a/pkg/storage/driver/cfgmaps_test.go b/pkg/storage/driver/cfgmaps_test.go index c93ef8ea4..8ba6832fa 100644 --- a/pkg/storage/driver/cfgmaps_test.go +++ b/pkg/storage/driver/cfgmaps_test.go @@ -21,7 +21,7 @@ import ( v1 "k8s.io/api/core/v1" - rspb "helm.sh/helm/v4/pkg/release" + rspb "helm.sh/helm/v4/pkg/release/v1" ) func TestConfigMapName(t *testing.T) { diff --git a/pkg/storage/driver/driver.go b/pkg/storage/driver/driver.go index 2987ba38e..661c32e52 100644 --- a/pkg/storage/driver/driver.go +++ b/pkg/storage/driver/driver.go @@ -21,7 +21,7 @@ import ( "github.com/pkg/errors" - rspb "helm.sh/helm/v4/pkg/release" + rspb "helm.sh/helm/v4/pkg/release/v1" ) var ( diff --git a/pkg/storage/driver/memory.go b/pkg/storage/driver/memory.go index 430ab215f..79e7f090e 100644 --- a/pkg/storage/driver/memory.go +++ b/pkg/storage/driver/memory.go @@ -21,7 +21,7 @@ import ( "strings" "sync" - rspb "helm.sh/helm/v4/pkg/release" + rspb "helm.sh/helm/v4/pkg/release/v1" ) var _ Driver = (*Memory)(nil) diff --git a/pkg/storage/driver/memory_test.go b/pkg/storage/driver/memory_test.go index 999649635..ee547b58b 100644 --- a/pkg/storage/driver/memory_test.go +++ b/pkg/storage/driver/memory_test.go @@ -21,7 +21,7 @@ import ( "reflect" "testing" - rspb "helm.sh/helm/v4/pkg/release" + rspb "helm.sh/helm/v4/pkg/release/v1" ) func TestMemoryName(t *testing.T) { diff --git a/pkg/storage/driver/mock_test.go b/pkg/storage/driver/mock_test.go index 359f2d079..199da6505 100644 --- a/pkg/storage/driver/mock_test.go +++ b/pkg/storage/driver/mock_test.go @@ -31,7 +31,7 @@ import ( kblabels "k8s.io/apimachinery/pkg/labels" corev1 "k8s.io/client-go/kubernetes/typed/core/v1" - rspb "helm.sh/helm/v4/pkg/release" + rspb "helm.sh/helm/v4/pkg/release/v1" ) func releaseStub(name string, vers int, namespace string, status rspb.Status) *rspb.Release { diff --git a/pkg/storage/driver/records.go b/pkg/storage/driver/records.go index 3b8f078fd..6b4efef3a 100644 --- a/pkg/storage/driver/records.go +++ b/pkg/storage/driver/records.go @@ -20,7 +20,7 @@ import ( "sort" "strconv" - rspb "helm.sh/helm/v4/pkg/release" + rspb "helm.sh/helm/v4/pkg/release/v1" ) // records holds a list of in-memory release records diff --git a/pkg/storage/driver/records_test.go b/pkg/storage/driver/records_test.go index b1bb051d5..34b2fb80c 100644 --- a/pkg/storage/driver/records_test.go +++ b/pkg/storage/driver/records_test.go @@ -20,7 +20,7 @@ import ( "reflect" "testing" - rspb "helm.sh/helm/v4/pkg/release" + rspb "helm.sh/helm/v4/pkg/release/v1" ) func TestRecordsAdd(t *testing.T) { diff --git a/pkg/storage/driver/secrets.go b/pkg/storage/driver/secrets.go index eb215a755..2ab128c6b 100644 --- a/pkg/storage/driver/secrets.go +++ b/pkg/storage/driver/secrets.go @@ -31,7 +31,7 @@ import ( "k8s.io/apimachinery/pkg/util/validation" corev1 "k8s.io/client-go/kubernetes/typed/core/v1" - rspb "helm.sh/helm/v4/pkg/release" + rspb "helm.sh/helm/v4/pkg/release/v1" ) var _ Driver = (*Secrets)(nil) diff --git a/pkg/storage/driver/secrets_test.go b/pkg/storage/driver/secrets_test.go index 37ecc20dd..7affc81ab 100644 --- a/pkg/storage/driver/secrets_test.go +++ b/pkg/storage/driver/secrets_test.go @@ -21,7 +21,7 @@ import ( v1 "k8s.io/api/core/v1" - rspb "helm.sh/helm/v4/pkg/release" + rspb "helm.sh/helm/v4/pkg/release/v1" ) func TestSecretName(t *testing.T) { diff --git a/pkg/storage/driver/sql.go b/pkg/storage/driver/sql.go index d5ab6b0a1..12bdd3ff4 100644 --- a/pkg/storage/driver/sql.go +++ b/pkg/storage/driver/sql.go @@ -30,7 +30,7 @@ import ( // Import pq for postgres dialect _ "github.com/lib/pq" - rspb "helm.sh/helm/v4/pkg/release" + rspb "helm.sh/helm/v4/pkg/release/v1" ) var _ Driver = (*SQL)(nil) diff --git a/pkg/storage/driver/sql_test.go b/pkg/storage/driver/sql_test.go index 8d7b88475..bd2918aad 100644 --- a/pkg/storage/driver/sql_test.go +++ b/pkg/storage/driver/sql_test.go @@ -23,7 +23,7 @@ import ( sqlmock "github.com/DATA-DOG/go-sqlmock" migrate "github.com/rubenv/sql-migrate" - rspb "helm.sh/helm/v4/pkg/release" + rspb "helm.sh/helm/v4/pkg/release/v1" ) func TestSQLName(t *testing.T) { diff --git a/pkg/storage/driver/util.go b/pkg/storage/driver/util.go index 7f1bc716c..0abbe41b2 100644 --- a/pkg/storage/driver/util.go +++ b/pkg/storage/driver/util.go @@ -23,7 +23,7 @@ import ( "encoding/json" "io" - rspb "helm.sh/helm/v4/pkg/release" + rspb "helm.sh/helm/v4/pkg/release/v1" ) var b64 = base64.StdEncoding diff --git a/pkg/storage/storage.go b/pkg/storage/storage.go index 6a77cbae6..5e8718ea0 100644 --- a/pkg/storage/storage.go +++ b/pkg/storage/storage.go @@ -22,8 +22,8 @@ import ( "github.com/pkg/errors" - rspb "helm.sh/helm/v4/pkg/release" relutil "helm.sh/helm/v4/pkg/release/util" + rspb "helm.sh/helm/v4/pkg/release/v1" "helm.sh/helm/v4/pkg/storage/driver" ) diff --git a/pkg/storage/storage_test.go b/pkg/storage/storage_test.go index 80011520e..056b7f5f5 100644 --- a/pkg/storage/storage_test.go +++ b/pkg/storage/storage_test.go @@ -23,7 +23,7 @@ import ( "github.com/pkg/errors" - rspb "helm.sh/helm/v4/pkg/release" + rspb "helm.sh/helm/v4/pkg/release/v1" "helm.sh/helm/v4/pkg/storage/driver" ) From 48f03d316b81b2f9d2d10e2e411c93930d349ff5 Mon Sep 17 00:00:00 2001 From: Robert Sirchia Date: Wed, 26 Feb 2025 15:21:47 -0500 Subject: [PATCH 64/68] changing from log to slog Signed-off-by: Robert Sirchia --- pkg/repo/index.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/repo/index.go b/pkg/repo/index.go index c5f808229..3e063becf 100644 --- a/pkg/repo/index.go +++ b/pkg/repo/index.go @@ -19,7 +19,7 @@ package repo import ( "bytes" "encoding/json" - "log" + "log/slog" "os" "path" "path/filepath" @@ -154,7 +154,7 @@ func (i IndexFile) MustAdd(md *chart.Metadata, filename, baseURL, digest string) // Deprecated: Use index.MustAdd instead. func (i IndexFile) Add(md *chart.Metadata, filename, baseURL, digest string) { if err := i.MustAdd(md, filename, baseURL, digest); err != nil { - log.Printf("skipping loading invalid entry for chart %q %q from %s: %s", md.Name, md.Version, filename, err) + slog.Error("skipping loading invalid entry for chart %q %q from %s: %s", md.Name, md.Version, filename, err) } } @@ -356,7 +356,7 @@ func loadIndex(data []byte, source string) (*IndexFile, error) { for name, cvs := range i.Entries { for idx := len(cvs) - 1; idx >= 0; idx-- { if cvs[idx] == nil { - log.Printf("skipping loading invalid entry for chart %q from %s: empty entry", name, source) + slog.Info("skipping loading invalid entry for chart %q from %s: empty entry", name, source) continue } // When metadata section missing, initialize with no data @@ -367,7 +367,7 @@ func loadIndex(data []byte, source string) (*IndexFile, error) { cvs[idx].APIVersion = chart.APIVersionV1 } if err := cvs[idx].Validate(); ignoreSkippableChartValidationError(err) != nil { - log.Printf("skipping loading invalid entry for chart %q %q from %s: %s", name, cvs[idx].Version, source, err) + slog.Error("skipping loading invalid entry for chart %q %q from %s: %s", name, cvs[idx].Version, source, err) cvs = append(cvs[:idx], cvs[idx+1:]...) } } From a11f4c00265bdef681d2a84d3c7dfa4bb81d4812 Mon Sep 17 00:00:00 2001 From: Robert Sirchia Date: Thu, 27 Feb 2025 12:56:52 -0500 Subject: [PATCH 65/68] changing info to error Signed-off-by: Robert Sirchia --- pkg/repo/index.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/repo/index.go b/pkg/repo/index.go index 3e063becf..954d7486c 100644 --- a/pkg/repo/index.go +++ b/pkg/repo/index.go @@ -356,7 +356,7 @@ func loadIndex(data []byte, source string) (*IndexFile, error) { for name, cvs := range i.Entries { for idx := len(cvs) - 1; idx >= 0; idx-- { if cvs[idx] == nil { - slog.Info("skipping loading invalid entry for chart %q from %s: empty entry", name, source) + slog.Error("skipping loading invalid entry for chart %q from %s: empty entry", name, source) continue } // When metadata section missing, initialize with no data From 5a8058dc31a8326691f52533e9b08b41cfd0b5f1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 27 Feb 2025 21:29:19 +0000 Subject: [PATCH 66/68] build(deps): bump github.com/containerd/containerd from 1.7.25 to 1.7.26 Bumps [github.com/containerd/containerd](https://github.com/containerd/containerd) from 1.7.25 to 1.7.26. - [Release notes](https://github.com/containerd/containerd/releases) - [Changelog](https://github.com/containerd/containerd/blob/main/RELEASES.md) - [Commits](https://github.com/containerd/containerd/compare/v1.7.25...v1.7.26) --- updated-dependencies: - dependency-name: github.com/containerd/containerd dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 0b2836b06..7aaff78cc 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/Masterminds/squirrel v1.5.4 github.com/Masterminds/vcs v1.13.3 github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 - github.com/containerd/containerd v1.7.25 + github.com/containerd/containerd v1.7.26 github.com/cyphar/filepath-securejoin v0.4.1 github.com/distribution/distribution/v3 v3.0.0-rc.3 github.com/evanphx/json-patch v5.9.11+incompatible diff --git a/go.sum b/go.sum index 467cef72f..874bde217 100644 --- a/go.sum +++ b/go.sum @@ -48,8 +48,8 @@ github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UF github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chai2010/gettext-go v1.0.2 h1:1Lwwip6Q2QGsAdl/ZKPCwTe9fe0CjlUbqj5bFNSjIRk= github.com/chai2010/gettext-go v1.0.2/go.mod h1:y+wnP2cHYaVj19NZhYKAwEMH2CI1gNHeQQ+5AjwawxA= -github.com/containerd/containerd v1.7.25 h1:khEQOAXOEJalRO228yzVsuASLH42vT7DIo9Ss+9SMFQ= -github.com/containerd/containerd v1.7.25/go.mod h1:tWfHzVI0azhw4CT2vaIjsb2CoV4LJ9PrMPaULAr21Ok= +github.com/containerd/containerd v1.7.26 h1:3cs8K2RHlMQaPifLqgRyI4VBkoldNdEw62cb7qQga7k= +github.com/containerd/containerd v1.7.26/go.mod h1:m4JU0E+h0ebbo9yXD7Hyt+sWnc8tChm7MudCjj4jRvQ= github.com/containerd/errdefs v0.3.0 h1:FSZgGOeK4yuT/+DnF07/Olde/q4KBoMsaamhXxIMDp4= github.com/containerd/errdefs v0.3.0/go.mod h1:+YBYIdtsnF4Iw6nWZhJcqGSg/dwvV7tyJ/kCkyJ2k+M= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= From f50547bf51aab27966b332fa10d80ac62873b85c Mon Sep 17 00:00:00 2001 From: Robert Sirchia Date: Fri, 28 Feb 2025 15:22:47 -0500 Subject: [PATCH 67/68] changing error to warn as requested by Matt Signed-off-by: Robert Sirchia --- pkg/repo/index.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/repo/index.go b/pkg/repo/index.go index 954d7486c..4f0266ca6 100644 --- a/pkg/repo/index.go +++ b/pkg/repo/index.go @@ -356,7 +356,7 @@ func loadIndex(data []byte, source string) (*IndexFile, error) { for name, cvs := range i.Entries { for idx := len(cvs) - 1; idx >= 0; idx-- { if cvs[idx] == nil { - slog.Error("skipping loading invalid entry for chart %q from %s: empty entry", name, source) + slog.Warn("skipping loading invalid entry for chart %q from %s: empty entry", name, source) continue } // When metadata section missing, initialize with no data @@ -367,7 +367,7 @@ func loadIndex(data []byte, source string) (*IndexFile, error) { cvs[idx].APIVersion = chart.APIVersionV1 } if err := cvs[idx].Validate(); ignoreSkippableChartValidationError(err) != nil { - slog.Error("skipping loading invalid entry for chart %q %q from %s: %s", name, cvs[idx].Version, source, err) + slog.Warn("skipping loading invalid entry for chart %q %q from %s: %s", name, cvs[idx].Version, source, err) cvs = append(cvs[:idx], cvs[idx+1:]...) } } From 12b8eb8b618a8faa309fce42d1bfa9006b9a0214 Mon Sep 17 00:00:00 2001 From: Rongrong Liu Date: Wed, 26 Feb 2025 09:16:39 -0800 Subject: [PATCH 68/68] fix:add proxy support when mTLS configured Signed-off-by: Rongrong Liu --- pkg/cmd/root.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/cmd/root.go b/pkg/cmd/root.go index ff4dcecbc..942060896 100644 --- a/pkg/cmd/root.go +++ b/pkg/cmd/root.go @@ -339,6 +339,7 @@ func newRegistryClientWithTLS( registry.ClientOptHTTPClient(&http.Client{ Transport: &http.Transport{ TLSClientConfig: tlsConf, + Proxy: http.ProxyFromEnvironment, }, }), registry.ClientOptBasicAuth(username, password),