From 17c9e220b01672615ba461a367aa750d78a9ec97 Mon Sep 17 00:00:00 2001 From: Gergo Huszty Date: Fri, 10 Feb 2017 10:33:02 +0000 Subject: [PATCH] Fixes #1898: Proposal: move downloader and resolver package to /pkg --- cmd/helm/dependency_build.go | 2 +- cmd/helm/dependency_update.go | 2 +- cmd/helm/fetch.go | 2 +- cmd/helm/install.go | 2 +- cmd/helm/verify.go | 2 +- {cmd/helm => pkg}/downloader/chart_downloader.go | 0 .../downloader/chart_downloader_test.go | 0 {cmd/helm => pkg}/downloader/doc.go | 0 {cmd/helm => pkg}/downloader/manager.go | 2 +- {cmd/helm => pkg}/downloader/manager_test.go | 0 .../downloader/testdata/helm-test-key.pub | Bin .../downloader/testdata/helm-test-key.secret | Bin .../repository/cache/kubernetes-charts-index.yaml | 0 .../helmhome/repository/cache/local-index.yaml | 0 .../repository/cache/testing-basicauth-index.yaml | 0 .../repository/cache/testing-https-index.yaml | 0 .../helmhome/repository/cache/testing-index.yaml | 0 .../testdata/helmhome/repository/local/index.yaml | 0 .../testdata/helmhome/repository/repositories.yaml | 0 .../downloader/testdata/signtest-0.1.0.tgz | Bin .../downloader/testdata/signtest-0.1.0.tgz.prov | 0 .../downloader/testdata/signtest/.helmignore | 0 .../downloader/testdata/signtest/Chart.yaml | 0 .../downloader/testdata/signtest/alpine/Chart.yaml | 0 .../downloader/testdata/signtest/alpine/README.md | 0 .../signtest/alpine/templates/alpine-pod.yaml | 0 .../downloader/testdata/signtest/alpine/values.yaml | 0 .../downloader/testdata/signtest/templates/pod.yaml | 0 .../downloader/testdata/signtest/values.yaml | 0 {cmd/helm => pkg}/resolver/resolver.go | 0 {cmd/helm => pkg}/resolver/resolver_test.go | 0 .../repository/cache/kubernetes-charts-index.yaml | 0 32 files changed, 6 insertions(+), 6 deletions(-) rename {cmd/helm => pkg}/downloader/chart_downloader.go (100%) rename {cmd/helm => pkg}/downloader/chart_downloader_test.go (100%) rename {cmd/helm => pkg}/downloader/doc.go (100%) rename {cmd/helm => pkg}/downloader/manager.go (99%) rename {cmd/helm => pkg}/downloader/manager_test.go (100%) rename {cmd/helm => pkg}/downloader/testdata/helm-test-key.pub (100%) rename {cmd/helm => pkg}/downloader/testdata/helm-test-key.secret (100%) rename {cmd/helm => pkg}/downloader/testdata/helmhome/repository/cache/kubernetes-charts-index.yaml (100%) rename {cmd/helm => pkg}/downloader/testdata/helmhome/repository/cache/local-index.yaml (100%) rename {cmd/helm => pkg}/downloader/testdata/helmhome/repository/cache/testing-basicauth-index.yaml (100%) rename {cmd/helm => pkg}/downloader/testdata/helmhome/repository/cache/testing-https-index.yaml (100%) rename {cmd/helm => pkg}/downloader/testdata/helmhome/repository/cache/testing-index.yaml (100%) rename {cmd/helm => pkg}/downloader/testdata/helmhome/repository/local/index.yaml (100%) rename {cmd/helm => pkg}/downloader/testdata/helmhome/repository/repositories.yaml (100%) rename {cmd/helm => pkg}/downloader/testdata/signtest-0.1.0.tgz (100%) rename {cmd/helm => pkg}/downloader/testdata/signtest-0.1.0.tgz.prov (100%) rename {cmd/helm => pkg}/downloader/testdata/signtest/.helmignore (100%) rename {cmd/helm => pkg}/downloader/testdata/signtest/Chart.yaml (100%) rename {cmd/helm => pkg}/downloader/testdata/signtest/alpine/Chart.yaml (100%) rename {cmd/helm => pkg}/downloader/testdata/signtest/alpine/README.md (100%) rename {cmd/helm => pkg}/downloader/testdata/signtest/alpine/templates/alpine-pod.yaml (100%) rename {cmd/helm => pkg}/downloader/testdata/signtest/alpine/values.yaml (100%) rename {cmd/helm => pkg}/downloader/testdata/signtest/templates/pod.yaml (100%) rename {cmd/helm => pkg}/downloader/testdata/signtest/values.yaml (100%) rename {cmd/helm => pkg}/resolver/resolver.go (100%) rename {cmd/helm => pkg}/resolver/resolver_test.go (100%) rename {cmd/helm => pkg}/resolver/testdata/helmhome/repository/cache/kubernetes-charts-index.yaml (100%) diff --git a/cmd/helm/dependency_build.go b/cmd/helm/dependency_build.go index 326435de2..9be3674a2 100644 --- a/cmd/helm/dependency_build.go +++ b/cmd/helm/dependency_build.go @@ -20,8 +20,8 @@ import ( "github.com/spf13/cobra" - "k8s.io/helm/cmd/helm/downloader" "k8s.io/helm/cmd/helm/helmpath" + "k8s.io/helm/pkg/downloader" ) const dependencyBuildDesc = ` diff --git a/cmd/helm/dependency_update.go b/cmd/helm/dependency_update.go index b80b632dd..0d4f61181 100644 --- a/cmd/helm/dependency_update.go +++ b/cmd/helm/dependency_update.go @@ -20,8 +20,8 @@ import ( "path/filepath" "github.com/spf13/cobra" - "k8s.io/helm/cmd/helm/downloader" "k8s.io/helm/cmd/helm/helmpath" + "k8s.io/helm/pkg/downloader" ) const dependencyUpDesc = ` diff --git a/cmd/helm/fetch.go b/cmd/helm/fetch.go index a29b0d2ea..b4fd83142 100644 --- a/cmd/helm/fetch.go +++ b/cmd/helm/fetch.go @@ -24,9 +24,9 @@ import ( "path/filepath" "github.com/spf13/cobra" - "k8s.io/helm/cmd/helm/downloader" "k8s.io/helm/cmd/helm/helmpath" "k8s.io/helm/pkg/chartutil" + "k8s.io/helm/pkg/downloader" ) const fetchDesc = ` diff --git a/cmd/helm/install.go b/cmd/helm/install.go index 6917a6e6a..1049450ad 100644 --- a/cmd/helm/install.go +++ b/cmd/helm/install.go @@ -32,9 +32,9 @@ import ( "github.com/ghodss/yaml" "github.com/spf13/cobra" - "k8s.io/helm/cmd/helm/downloader" "k8s.io/helm/cmd/helm/helmpath" "k8s.io/helm/cmd/helm/strvals" + "k8s.io/helm/pkg/downloader" "k8s.io/helm/pkg/helm" "k8s.io/helm/pkg/kube" "k8s.io/helm/pkg/proto/hapi/release" diff --git a/cmd/helm/verify.go b/cmd/helm/verify.go index d401e129a..e82eb4e33 100644 --- a/cmd/helm/verify.go +++ b/cmd/helm/verify.go @@ -21,7 +21,7 @@ import ( "github.com/spf13/cobra" - "k8s.io/helm/cmd/helm/downloader" + "k8s.io/helm/pkg/downloader" ) const verifyDesc = ` diff --git a/cmd/helm/downloader/chart_downloader.go b/pkg/downloader/chart_downloader.go similarity index 100% rename from cmd/helm/downloader/chart_downloader.go rename to pkg/downloader/chart_downloader.go diff --git a/cmd/helm/downloader/chart_downloader_test.go b/pkg/downloader/chart_downloader_test.go similarity index 100% rename from cmd/helm/downloader/chart_downloader_test.go rename to pkg/downloader/chart_downloader_test.go diff --git a/cmd/helm/downloader/doc.go b/pkg/downloader/doc.go similarity index 100% rename from cmd/helm/downloader/doc.go rename to pkg/downloader/doc.go diff --git a/cmd/helm/downloader/manager.go b/pkg/downloader/manager.go similarity index 99% rename from cmd/helm/downloader/manager.go rename to pkg/downloader/manager.go index a29dad99b..8475b0d88 100644 --- a/cmd/helm/downloader/manager.go +++ b/pkg/downloader/manager.go @@ -31,10 +31,10 @@ import ( "github.com/ghodss/yaml" "k8s.io/helm/cmd/helm/helmpath" - "k8s.io/helm/cmd/helm/resolver" "k8s.io/helm/pkg/chartutil" "k8s.io/helm/pkg/proto/hapi/chart" "k8s.io/helm/pkg/repo" + "k8s.io/helm/pkg/resolver" "k8s.io/helm/pkg/urlutil" ) diff --git a/cmd/helm/downloader/manager_test.go b/pkg/downloader/manager_test.go similarity index 100% rename from cmd/helm/downloader/manager_test.go rename to pkg/downloader/manager_test.go diff --git a/cmd/helm/downloader/testdata/helm-test-key.pub b/pkg/downloader/testdata/helm-test-key.pub similarity index 100% rename from cmd/helm/downloader/testdata/helm-test-key.pub rename to pkg/downloader/testdata/helm-test-key.pub diff --git a/cmd/helm/downloader/testdata/helm-test-key.secret b/pkg/downloader/testdata/helm-test-key.secret similarity index 100% rename from cmd/helm/downloader/testdata/helm-test-key.secret rename to pkg/downloader/testdata/helm-test-key.secret diff --git a/cmd/helm/downloader/testdata/helmhome/repository/cache/kubernetes-charts-index.yaml b/pkg/downloader/testdata/helmhome/repository/cache/kubernetes-charts-index.yaml similarity index 100% rename from cmd/helm/downloader/testdata/helmhome/repository/cache/kubernetes-charts-index.yaml rename to pkg/downloader/testdata/helmhome/repository/cache/kubernetes-charts-index.yaml diff --git a/cmd/helm/downloader/testdata/helmhome/repository/cache/local-index.yaml b/pkg/downloader/testdata/helmhome/repository/cache/local-index.yaml similarity index 100% rename from cmd/helm/downloader/testdata/helmhome/repository/cache/local-index.yaml rename to pkg/downloader/testdata/helmhome/repository/cache/local-index.yaml diff --git a/cmd/helm/downloader/testdata/helmhome/repository/cache/testing-basicauth-index.yaml b/pkg/downloader/testdata/helmhome/repository/cache/testing-basicauth-index.yaml similarity index 100% rename from cmd/helm/downloader/testdata/helmhome/repository/cache/testing-basicauth-index.yaml rename to pkg/downloader/testdata/helmhome/repository/cache/testing-basicauth-index.yaml diff --git a/cmd/helm/downloader/testdata/helmhome/repository/cache/testing-https-index.yaml b/pkg/downloader/testdata/helmhome/repository/cache/testing-https-index.yaml similarity index 100% rename from cmd/helm/downloader/testdata/helmhome/repository/cache/testing-https-index.yaml rename to pkg/downloader/testdata/helmhome/repository/cache/testing-https-index.yaml diff --git a/cmd/helm/downloader/testdata/helmhome/repository/cache/testing-index.yaml b/pkg/downloader/testdata/helmhome/repository/cache/testing-index.yaml similarity index 100% rename from cmd/helm/downloader/testdata/helmhome/repository/cache/testing-index.yaml rename to pkg/downloader/testdata/helmhome/repository/cache/testing-index.yaml diff --git a/cmd/helm/downloader/testdata/helmhome/repository/local/index.yaml b/pkg/downloader/testdata/helmhome/repository/local/index.yaml similarity index 100% rename from cmd/helm/downloader/testdata/helmhome/repository/local/index.yaml rename to pkg/downloader/testdata/helmhome/repository/local/index.yaml diff --git a/cmd/helm/downloader/testdata/helmhome/repository/repositories.yaml b/pkg/downloader/testdata/helmhome/repository/repositories.yaml similarity index 100% rename from cmd/helm/downloader/testdata/helmhome/repository/repositories.yaml rename to pkg/downloader/testdata/helmhome/repository/repositories.yaml diff --git a/cmd/helm/downloader/testdata/signtest-0.1.0.tgz b/pkg/downloader/testdata/signtest-0.1.0.tgz similarity index 100% rename from cmd/helm/downloader/testdata/signtest-0.1.0.tgz rename to pkg/downloader/testdata/signtest-0.1.0.tgz diff --git a/cmd/helm/downloader/testdata/signtest-0.1.0.tgz.prov b/pkg/downloader/testdata/signtest-0.1.0.tgz.prov similarity index 100% rename from cmd/helm/downloader/testdata/signtest-0.1.0.tgz.prov rename to pkg/downloader/testdata/signtest-0.1.0.tgz.prov diff --git a/cmd/helm/downloader/testdata/signtest/.helmignore b/pkg/downloader/testdata/signtest/.helmignore similarity index 100% rename from cmd/helm/downloader/testdata/signtest/.helmignore rename to pkg/downloader/testdata/signtest/.helmignore diff --git a/cmd/helm/downloader/testdata/signtest/Chart.yaml b/pkg/downloader/testdata/signtest/Chart.yaml similarity index 100% rename from cmd/helm/downloader/testdata/signtest/Chart.yaml rename to pkg/downloader/testdata/signtest/Chart.yaml diff --git a/cmd/helm/downloader/testdata/signtest/alpine/Chart.yaml b/pkg/downloader/testdata/signtest/alpine/Chart.yaml similarity index 100% rename from cmd/helm/downloader/testdata/signtest/alpine/Chart.yaml rename to pkg/downloader/testdata/signtest/alpine/Chart.yaml diff --git a/cmd/helm/downloader/testdata/signtest/alpine/README.md b/pkg/downloader/testdata/signtest/alpine/README.md similarity index 100% rename from cmd/helm/downloader/testdata/signtest/alpine/README.md rename to pkg/downloader/testdata/signtest/alpine/README.md diff --git a/cmd/helm/downloader/testdata/signtest/alpine/templates/alpine-pod.yaml b/pkg/downloader/testdata/signtest/alpine/templates/alpine-pod.yaml similarity index 100% rename from cmd/helm/downloader/testdata/signtest/alpine/templates/alpine-pod.yaml rename to pkg/downloader/testdata/signtest/alpine/templates/alpine-pod.yaml diff --git a/cmd/helm/downloader/testdata/signtest/alpine/values.yaml b/pkg/downloader/testdata/signtest/alpine/values.yaml similarity index 100% rename from cmd/helm/downloader/testdata/signtest/alpine/values.yaml rename to pkg/downloader/testdata/signtest/alpine/values.yaml diff --git a/cmd/helm/downloader/testdata/signtest/templates/pod.yaml b/pkg/downloader/testdata/signtest/templates/pod.yaml similarity index 100% rename from cmd/helm/downloader/testdata/signtest/templates/pod.yaml rename to pkg/downloader/testdata/signtest/templates/pod.yaml diff --git a/cmd/helm/downloader/testdata/signtest/values.yaml b/pkg/downloader/testdata/signtest/values.yaml similarity index 100% rename from cmd/helm/downloader/testdata/signtest/values.yaml rename to pkg/downloader/testdata/signtest/values.yaml diff --git a/cmd/helm/resolver/resolver.go b/pkg/resolver/resolver.go similarity index 100% rename from cmd/helm/resolver/resolver.go rename to pkg/resolver/resolver.go diff --git a/cmd/helm/resolver/resolver_test.go b/pkg/resolver/resolver_test.go similarity index 100% rename from cmd/helm/resolver/resolver_test.go rename to pkg/resolver/resolver_test.go diff --git a/cmd/helm/resolver/testdata/helmhome/repository/cache/kubernetes-charts-index.yaml b/pkg/resolver/testdata/helmhome/repository/cache/kubernetes-charts-index.yaml similarity index 100% rename from cmd/helm/resolver/testdata/helmhome/repository/cache/kubernetes-charts-index.yaml rename to pkg/resolver/testdata/helmhome/repository/cache/kubernetes-charts-index.yaml