From ceeb75eb67b9e16cd29c0f5f2e5b6fa0a4808cb6 Mon Sep 17 00:00:00 2001 From: Matthew Fisher Date: Thu, 14 Mar 2019 13:20:50 -0700 Subject: [PATCH] ref(cmd): migrate to pkg/cli This commit migrates all of the content over to pkg/cli, making it all consumable by third parties. Signed-off-by: Matthew Fisher --- cmd/helm/helm.go | 79 +---- cmd/helm/root.go | 118 -------- .../dependency-list-no-requirements-linux.txt | 1 - go.mod | 123 ++++++++ go.sum | 271 ++++++++++++++++++ internal/test/test.go | 2 +- pkg/action/install.go | 8 +- pkg/action/lint_test.go | 10 +- pkg/action/pull.go | 4 +- pkg/action/show_test.go | 10 +- {cmd/helm => pkg/cli}/chart.go | 16 +- {cmd/helm => pkg/cli}/chart_export.go | 6 +- {cmd/helm => pkg/cli}/chart_list.go | 4 +- {cmd/helm => pkg/cli}/chart_pull.go | 6 +- {cmd/helm => pkg/cli}/chart_push.go | 6 +- {cmd/helm => pkg/cli}/chart_remove.go | 6 +- {cmd/helm => pkg/cli}/chart_save.go | 6 +- pkg/cli/cli.go | 193 +++++++++++++ {cmd/helm => pkg/cli}/completion.go | 4 +- {cmd/helm => pkg/cli}/create.go | 6 +- {cmd/helm => pkg/cli}/create_test.go | 2 +- {cmd/helm => pkg/cli}/dependency.go | 14 +- {cmd/helm => pkg/cli}/dependency_build.go | 6 +- .../helm => pkg/cli}/dependency_build_test.go | 4 +- {cmd/helm => pkg/cli}/dependency_test.go | 8 +- {cmd/helm => pkg/cli}/dependency_update.go | 6 +- .../cli}/dependency_update_test.go | 8 +- {cmd/helm => pkg/cli}/docs.go | 6 +- pkg/cli/{ => environment}/environment.go | 12 +- pkg/cli/{ => environment}/environment_test.go | 6 +- {cmd/helm => pkg/cli}/get.go | 12 +- {cmd/helm => pkg/cli}/get_hooks.go | 6 +- {cmd/helm => pkg/cli}/get_hooks_test.go | 2 +- {cmd/helm => pkg/cli}/get_manifest.go | 6 +- {cmd/helm => pkg/cli}/get_manifest_test.go | 2 +- {cmd/helm => pkg/cli}/get_test.go | 2 +- {cmd/helm => pkg/cli}/get_values.go | 6 +- {cmd/helm => pkg/cli}/get_values_test.go | 2 +- {cmd/helm => pkg/cli}/helm_test.go | 4 +- {cmd/helm => pkg/cli}/history.go | 6 +- {cmd/helm => pkg/cli}/history_test.go | 2 +- {cmd/helm => pkg/cli}/home.go | 6 +- {cmd/helm => pkg/cli}/init.go | 10 +- {cmd/helm => pkg/cli}/init_test.go | 4 +- {cmd/helm => pkg/cli}/install.go | 6 +- {cmd/helm => pkg/cli}/install_test.go | 38 +-- {cmd/helm => pkg/cli}/lint.go | 4 +- {cmd/helm => pkg/cli}/list.go | 8 +- {cmd/helm => pkg/cli}/load_plugins.go | 2 +- {cmd/helm => pkg/cli}/package.go | 4 +- {cmd/helm => pkg/cli}/package_test.go | 54 ++-- {cmd/helm => pkg/cli}/plugin.go | 12 +- {cmd/helm => pkg/cli}/plugin_install.go | 6 +- {cmd/helm => pkg/cli}/plugin_list.go | 4 +- {cmd/helm => pkg/cli}/plugin_remove.go | 4 +- {cmd/helm => pkg/cli}/plugin_test.go | 8 +- {cmd/helm => pkg/cli}/plugin_update.go | 4 +- {cmd/helm => pkg/cli}/printer.go | 2 +- {cmd/helm => pkg/cli}/pull.go | 6 +- {cmd/helm => pkg/cli}/pull_test.go | 10 +- {cmd/helm => pkg/cli}/release_testing.go | 6 +- {cmd/helm => pkg/cli}/release_testing_test.go | 2 +- {cmd/helm => pkg/cli}/repo.go | 16 +- {cmd/helm => pkg/cli}/repo_add.go | 6 +- {cmd/helm => pkg/cli}/repo_add_test.go | 6 +- {cmd/helm => pkg/cli}/repo_index.go | 6 +- {cmd/helm => pkg/cli}/repo_index_test.go | 12 +- {cmd/helm => pkg/cli}/repo_list.go | 6 +- {cmd/helm => pkg/cli}/repo_remove.go | 6 +- {cmd/helm => pkg/cli}/repo_remove_test.go | 4 +- {cmd/helm => pkg/cli}/repo_update.go | 6 +- {cmd/helm => pkg/cli}/repo_update_test.go | 4 +- {cmd/helm => pkg/cli}/require/args.go | 0 {cmd/helm => pkg/cli}/require/args_test.go | 0 {cmd/helm => pkg/cli}/rollback.go | 6 +- {cmd/helm => pkg/cli}/rollback_test.go | 2 +- {cmd/helm => pkg/cli}/root_test.go | 2 +- {cmd/helm => pkg/cli}/search.go | 6 +- {cmd/helm => pkg/cli}/search/search.go | 0 {cmd/helm => pkg/cli}/search/search_test.go | 0 {cmd/helm => pkg/cli}/search_test.go | 4 +- {cmd/helm => pkg/cli}/show.go | 6 +- {cmd/helm => pkg/cli}/status.go | 6 +- {cmd/helm => pkg/cli}/status_test.go | 2 +- {cmd/helm => pkg/cli}/template.go | 6 +- {cmd/helm => pkg/cli}/template_test.go | 8 +- {cmd/helm => pkg/cli}/uninstall.go | 6 +- {cmd/helm => pkg/cli}/uninstall_test.go | 2 +- {cmd/helm => pkg/cli}/upgrade.go | 6 +- {cmd/helm => pkg/cli}/upgrade_test.go | 6 +- {cmd/helm => pkg/cli}/verify.go | 6 +- {cmd/helm => pkg/cli}/verify_test.go | 10 +- {cmd/helm => pkg/cli}/version.go | 6 +- {cmd/helm => pkg/cli}/version_test.go | 2 +- pkg/downloader/chart_downloader_test.go | 12 +- pkg/getter/getter.go | 6 +- pkg/getter/plugingetter.go | 8 +- pkg/getter/plugingetter_test.go | 6 +- pkg/plugin/installer/http_installer.go | 4 +- pkg/plugin/plugin.go | 4 +- pkg/repo/chartrepo_test.go | 18 +- pkg/repo/index_test.go | 4 +- pkg/resolver/resolver_test.go | 4 +- .../testdata => testdata}/helm-test-key.pub | Bin .../helm-test-key.secret | Bin .../helmhome/plugins/args/args.sh | 0 .../helmhome/plugins/args/plugin.yaml | 0 .../helmhome/plugins/echo/plugin.yaml | 0 .../helmhome/plugins/env/plugin.yaml | 0 .../helmhome/plugins/fullenv/fullenv.sh | 0 .../helmhome/plugins/fullenv/plugin.yaml | 0 .../repository/cache/testing-index.yaml | 0 .../helmhome/repository/local/index.yaml | 0 .../helmhome/repository/repositories.yaml | 0 .../output/dependency-list-archive.txt | 0 .../output/dependency-list-no-chart-linux.txt | 0 .../dependency-list-no-requirements-linux.txt | 1 + .../output/dependency-list.txt | 0 .../output/get-hooks-no-args.txt | 0 .../output/get-hooks.txt | 0 .../output/get-manifest-no-args.txt | 0 .../output/get-manifest.txt | 0 .../output/get-no-args.txt | 0 .../output/get-release.txt | 0 .../output/get-values-args.txt | 0 .../output/get-values.txt | 0 .../output/history-limit.txt | 0 .../testdata => testdata}/output/history.json | 0 .../testdata => testdata}/output/history.txt | 0 .../testdata => testdata}/output/history.yaml | 0 .../output/install-and-replace.txt | 0 .../output/install-chart-bad-type.txt | 0 .../output/install-name-template.txt | 0 .../output/install-no-args.txt | 0 .../output/install-no-hooks.txt | 0 .../install-with-multiple-values-files.txt | 0 .../output/install-with-multiple-values.txt | 0 .../output/install-with-timeout.txt | 0 .../output/install-with-values-file.txt | 0 .../output/install-with-values.txt | 0 .../output/install-with-wait.txt | 0 .../testdata => testdata}/output/install.txt | 0 .../testdata => testdata}/output/repo-add.txt | 0 .../output/rollback-no-args.txt | 0 .../output/rollback-timeout.txt | 0 .../output/rollback-wait.txt | 0 .../testdata => testdata}/output/rollback.txt | 0 .../output/search-constraint-single.txt | 0 .../output/search-constraint.txt | 0 .../search-multiple-versions-constraints.txt | 0 .../output/search-multiple-versions.txt | 0 .../output/search-multiple.txt | 0 .../output/search-not-found.txt | 0 .../output/search-regex.txt | 0 .../output/search-single.txt | 0 .../output/search-versions-constraint.txt | 0 .../output/status-with-notes.txt | 0 .../output/status-with-resource.txt | 0 .../output/status-with-test-suite.txt | 0 .../testdata => testdata}/output/status.json | 0 .../testdata => testdata}/output/status.txt | 0 .../testdata => testdata}/output/status.yaml | 0 .../output/template-lib-chart.txt | 0 .../output/template-name-template.txt | 0 .../output/template-no-args.txt | 0 .../output/template-set.txt | 0 .../output/template-values-files.txt | 0 .../testdata => testdata}/output/template.txt | 0 .../output/test-failure.txt | 0 .../output/test-no-tests.txt | 0 .../output/test-running.txt | 0 .../output/test-success.txt | 0 .../output/test-unknown.txt | 0 .../output/uninstall-no-args.txt | 0 .../output/uninstall-no-hooks.txt | 0 .../output/uninstall-purge.txt | 0 .../output/uninstall-timeout.txt | 0 .../output/uninstall.txt | 0 .../output/upgrade-with-bad-dependencies.txt | 0 .../output/upgrade-with-install-timeout.txt | 0 .../output/upgrade-with-install.txt | 0 .../upgrade-with-missing-dependencies.txt | 0 .../output/upgrade-with-reset-values.txt | 0 .../output/upgrade-with-reset-values2.txt | 0 .../output/upgrade-with-timeout.txt | 0 .../output/upgrade-with-wait.txt | 0 .../testdata => testdata}/output/upgrade.txt | 0 .../output/version-template.txt | 0 .../testdata => testdata}/output/version.txt | 0 {cmd/helm/testdata => testdata}/plugins.yaml | 2 +- .../testdata => testdata}/repositories.yaml | 0 .../testcharts/alpine/Chart.yaml | 0 .../testcharts/alpine/README.md | 0 .../testcharts/alpine/extra_values.yaml | 0 .../testcharts/alpine/more_values.yaml | 0 .../alpine/templates/alpine-pod.yaml | 0 .../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 .../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 .../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 .../testcharts/decompressedchart/.helmignore | 0 .../testcharts/decompressedchart/Chart.yaml | 0 .../testcharts/decompressedchart/values.yaml | 0 .../testcharts/empty/Chart.yaml | 0 .../testcharts/empty/README.md | 0 .../testcharts/empty/templates/empty.yaml | 0 .../testcharts/empty/values.yaml | 0 .../testcharts/issue1979/Chart.yaml | 0 .../testcharts/issue1979/README.md | 0 .../testcharts/issue1979/extra_values.yaml | 0 .../testcharts/issue1979/more_values.yaml | 0 .../issue1979/templates/alpine-pod.yaml | 0 .../testcharts/issue1979/values.yaml | 0 .../testcharts/lib-chart/.helmignore | 0 .../testcharts/lib-chart/Chart.yaml | 0 .../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 .../testcharts/lib-chart/values.yaml | 0 .../testcharts/novals/Chart.yaml | 0 .../testcharts/novals/README.md | 0 .../novals/templates/alpine-pod.yaml | 0 .../testcharts/reqtest-0.1.0.tgz | Bin .../testcharts/reqtest/.helmignore | 0 .../testcharts/reqtest/Chart.lock | 0 .../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 .../testcharts/reqtest/values.yaml | 0 .../testcharts/signtest-0.1.0.tgz | Bin .../testcharts/signtest-0.1.0.tgz.prov | 0 .../testcharts/signtest/.helmignore | 0 .../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 .../testcharts/signtest/values.yaml | 0 .../testplugin/plugin.yaml | 0 .../testserver/index.yaml | 0 .../testserver/repository/repositories.yaml | 0 289 files changed, 914 insertions(+), 520 deletions(-) delete mode 100644 cmd/helm/root.go delete mode 100644 cmd/helm/testdata/output/dependency-list-no-requirements-linux.txt create mode 100644 go.mod create mode 100644 go.sum rename {cmd/helm => pkg/cli}/chart.go (81%) rename {cmd/helm => pkg/cli}/chart_export.go (91%) rename {cmd/helm => pkg/cli}/chart_list.go (92%) rename {cmd/helm => pkg/cli}/chart_pull.go (90%) rename {cmd/helm => pkg/cli}/chart_push.go (91%) rename {cmd/helm => pkg/cli}/chart_remove.go (91%) rename {cmd/helm => pkg/cli}/chart_save.go (91%) create mode 100644 pkg/cli/cli.go rename {cmd/helm => pkg/cli}/completion.go (98%) rename {cmd/helm => pkg/cli}/create.go (96%) rename {cmd/helm => pkg/cli}/create_test.go (99%) rename {cmd/helm => pkg/cli}/dependency.go (91%) rename {cmd/helm => pkg/cli}/dependency_build.go (95%) rename {cmd/helm => pkg/cli}/dependency_build_test.go (96%) rename {cmd/helm => pkg/cli}/dependency_test.go (86%) rename {cmd/helm => pkg/cli}/dependency_update.go (95%) rename {cmd/helm => pkg/cli}/dependency_update_test.go (96%) rename {cmd/helm => pkg/cli}/docs.go (95%) rename pkg/cli/{ => environment}/environment.go (91%) rename pkg/cli/{ => environment}/environment_test.go (97%) rename {cmd/helm => pkg/cli}/get.go (86%) rename {cmd/helm => pkg/cli}/get_hooks.go (92%) rename {cmd/helm => pkg/cli}/get_hooks_test.go (98%) rename {cmd/helm => pkg/cli}/get_manifest.go (93%) rename {cmd/helm => pkg/cli}/get_manifest_test.go (98%) rename {cmd/helm => pkg/cli}/get_test.go (98%) rename {cmd/helm => pkg/cli}/get_values.go (92%) rename {cmd/helm => pkg/cli}/get_values_test.go (98%) rename {cmd/helm => pkg/cli}/helm_test.go (98%) rename {cmd/helm => pkg/cli}/history.go (95%) rename {cmd/helm => pkg/cli}/history_test.go (99%) rename {cmd/helm => pkg/cli}/home.go (93%) rename {cmd/helm => pkg/cli}/init.go (95%) rename {cmd/helm => pkg/cli}/init_test.go (96%) rename {cmd/helm => pkg/cli}/install.go (98%) rename {cmd/helm => pkg/cli}/install_test.go (64%) rename {cmd/helm => pkg/cli}/lint.go (97%) rename {cmd/helm => pkg/cli}/list.go (95%) rename {cmd/helm => pkg/cli}/load_plugins.go (99%) rename {cmd/helm => pkg/cli}/package.go (98%) rename {cmd/helm => pkg/cli}/package_test.go (83%) rename {cmd/helm => pkg/cli}/plugin.go (90%) rename {cmd/helm => pkg/cli}/plugin_install.go (95%) rename {cmd/helm => pkg/cli}/plugin_list.go (95%) rename {cmd/helm => pkg/cli}/plugin_remove.go (97%) rename {cmd/helm => pkg/cli}/plugin_test.go (96%) rename {cmd/helm => pkg/cli}/plugin_update.go (97%) rename {cmd/helm => pkg/cli}/printer.go (99%) rename {cmd/helm => pkg/cli}/pull.go (96%) rename {cmd/helm => pkg/cli}/pull_test.go (90%) rename {cmd/helm => pkg/cli}/release_testing.go (94%) rename {cmd/helm => pkg/cli}/release_testing_test.go (99%) rename {cmd/helm => pkg/cli}/repo.go (78%) rename {cmd/helm => pkg/cli}/repo_add.go (96%) rename {cmd/helm => pkg/cli}/repo_add_test.go (92%) rename {cmd/helm => pkg/cli}/repo_index.go (96%) rename {cmd/helm => pkg/cli}/repo_index_test.go (87%) rename {cmd/helm => pkg/cli}/repo_list.go (93%) rename {cmd/helm => pkg/cli}/repo_remove.go (95%) rename {cmd/helm => pkg/cli}/repo_remove_test.go (95%) rename {cmd/helm => pkg/cli}/repo_update.go (96%) rename {cmd/helm => pkg/cli}/repo_update_test.go (96%) rename {cmd/helm => pkg/cli}/require/args.go (100%) rename {cmd/helm => pkg/cli}/require/args_test.go (100%) rename {cmd/helm => pkg/cli}/rollback.go (95%) rename {cmd/helm => pkg/cli}/rollback_test.go (99%) rename {cmd/helm => pkg/cli}/root_test.go (99%) rename {cmd/helm => pkg/cli}/search.go (97%) rename {cmd/helm => pkg/cli}/search/search.go (100%) rename {cmd/helm => pkg/cli}/search/search_test.go (100%) rename {cmd/helm => pkg/cli}/search_test.go (97%) rename {cmd/helm => pkg/cli}/show.go (97%) rename {cmd/helm => pkg/cli}/status.go (95%) rename {cmd/helm => pkg/cli}/status_test.go (99%) rename {cmd/helm => pkg/cli}/template.go (95%) rename {cmd/helm => pkg/cli}/template_test.go (87%) rename {cmd/helm => pkg/cli}/uninstall.go (95%) rename {cmd/helm => pkg/cli}/uninstall_test.go (99%) rename {cmd/helm => pkg/cli}/upgrade.go (98%) rename {cmd/helm => pkg/cli}/upgrade_test.go (96%) rename {cmd/helm => pkg/cli}/verify.go (93%) rename {cmd/helm => pkg/cli}/verify_test.go (82%) rename {cmd/helm => pkg/cli}/version.go (95%) rename {cmd/helm => pkg/cli}/version_test.go (98%) rename {cmd/helm/testdata => testdata}/helm-test-key.pub (100%) rename {cmd/helm/testdata => testdata}/helm-test-key.secret (100%) rename {cmd/helm/testdata => testdata}/helmhome/plugins/args/args.sh (100%) rename {cmd/helm/testdata => testdata}/helmhome/plugins/args/plugin.yaml (100%) rename {cmd/helm/testdata => testdata}/helmhome/plugins/echo/plugin.yaml (100%) rename {cmd/helm/testdata => testdata}/helmhome/plugins/env/plugin.yaml (100%) rename {cmd/helm/testdata => testdata}/helmhome/plugins/fullenv/fullenv.sh (100%) rename {cmd/helm/testdata => testdata}/helmhome/plugins/fullenv/plugin.yaml (100%) rename {cmd/helm/testdata => testdata}/helmhome/repository/cache/testing-index.yaml (100%) rename {cmd/helm/testdata => testdata}/helmhome/repository/local/index.yaml (100%) rename {cmd/helm/testdata => testdata}/helmhome/repository/repositories.yaml (100%) rename {cmd/helm/testdata => testdata}/output/dependency-list-archive.txt (100%) rename {cmd/helm/testdata => testdata}/output/dependency-list-no-chart-linux.txt (100%) create mode 100644 testdata/output/dependency-list-no-requirements-linux.txt rename {cmd/helm/testdata => testdata}/output/dependency-list.txt (100%) rename {cmd/helm/testdata => testdata}/output/get-hooks-no-args.txt (100%) rename {cmd/helm/testdata => testdata}/output/get-hooks.txt (100%) rename {cmd/helm/testdata => testdata}/output/get-manifest-no-args.txt (100%) rename {cmd/helm/testdata => testdata}/output/get-manifest.txt (100%) rename {cmd/helm/testdata => testdata}/output/get-no-args.txt (100%) rename {cmd/helm/testdata => testdata}/output/get-release.txt (100%) rename {cmd/helm/testdata => testdata}/output/get-values-args.txt (100%) rename {cmd/helm/testdata => testdata}/output/get-values.txt (100%) rename {cmd/helm/testdata => testdata}/output/history-limit.txt (100%) rename {cmd/helm/testdata => testdata}/output/history.json (100%) rename {cmd/helm/testdata => testdata}/output/history.txt (100%) rename {cmd/helm/testdata => testdata}/output/history.yaml (100%) rename {cmd/helm/testdata => testdata}/output/install-and-replace.txt (100%) rename {cmd/helm/testdata => testdata}/output/install-chart-bad-type.txt (100%) rename {cmd/helm/testdata => testdata}/output/install-name-template.txt (100%) rename {cmd/helm/testdata => testdata}/output/install-no-args.txt (100%) rename {cmd/helm/testdata => testdata}/output/install-no-hooks.txt (100%) rename {cmd/helm/testdata => testdata}/output/install-with-multiple-values-files.txt (100%) rename {cmd/helm/testdata => testdata}/output/install-with-multiple-values.txt (100%) rename {cmd/helm/testdata => testdata}/output/install-with-timeout.txt (100%) rename {cmd/helm/testdata => testdata}/output/install-with-values-file.txt (100%) rename {cmd/helm/testdata => testdata}/output/install-with-values.txt (100%) rename {cmd/helm/testdata => testdata}/output/install-with-wait.txt (100%) rename {cmd/helm/testdata => testdata}/output/install.txt (100%) rename {cmd/helm/testdata => testdata}/output/repo-add.txt (100%) rename {cmd/helm/testdata => testdata}/output/rollback-no-args.txt (100%) rename {cmd/helm/testdata => testdata}/output/rollback-timeout.txt (100%) rename {cmd/helm/testdata => testdata}/output/rollback-wait.txt (100%) rename {cmd/helm/testdata => testdata}/output/rollback.txt (100%) rename {cmd/helm/testdata => testdata}/output/search-constraint-single.txt (100%) rename {cmd/helm/testdata => testdata}/output/search-constraint.txt (100%) rename {cmd/helm/testdata => testdata}/output/search-multiple-versions-constraints.txt (100%) rename {cmd/helm/testdata => testdata}/output/search-multiple-versions.txt (100%) rename {cmd/helm/testdata => testdata}/output/search-multiple.txt (100%) rename {cmd/helm/testdata => testdata}/output/search-not-found.txt (100%) rename {cmd/helm/testdata => testdata}/output/search-regex.txt (100%) rename {cmd/helm/testdata => testdata}/output/search-single.txt (100%) rename {cmd/helm/testdata => testdata}/output/search-versions-constraint.txt (100%) rename {cmd/helm/testdata => testdata}/output/status-with-notes.txt (100%) rename {cmd/helm/testdata => testdata}/output/status-with-resource.txt (100%) rename {cmd/helm/testdata => testdata}/output/status-with-test-suite.txt (100%) rename {cmd/helm/testdata => testdata}/output/status.json (100%) rename {cmd/helm/testdata => testdata}/output/status.txt (100%) rename {cmd/helm/testdata => testdata}/output/status.yaml (100%) rename {cmd/helm/testdata => testdata}/output/template-lib-chart.txt (100%) rename {cmd/helm/testdata => testdata}/output/template-name-template.txt (100%) rename {cmd/helm/testdata => testdata}/output/template-no-args.txt (100%) rename {cmd/helm/testdata => testdata}/output/template-set.txt (100%) rename {cmd/helm/testdata => testdata}/output/template-values-files.txt (100%) rename {cmd/helm/testdata => testdata}/output/template.txt (100%) rename {cmd/helm/testdata => testdata}/output/test-failure.txt (100%) rename {cmd/helm/testdata => testdata}/output/test-no-tests.txt (100%) rename {cmd/helm/testdata => testdata}/output/test-running.txt (100%) rename {cmd/helm/testdata => testdata}/output/test-success.txt (100%) rename {cmd/helm/testdata => testdata}/output/test-unknown.txt (100%) rename {cmd/helm/testdata => testdata}/output/uninstall-no-args.txt (100%) rename {cmd/helm/testdata => testdata}/output/uninstall-no-hooks.txt (100%) rename {cmd/helm/testdata => testdata}/output/uninstall-purge.txt (100%) rename {cmd/helm/testdata => testdata}/output/uninstall-timeout.txt (100%) rename {cmd/helm/testdata => testdata}/output/uninstall.txt (100%) rename {cmd/helm/testdata => testdata}/output/upgrade-with-bad-dependencies.txt (100%) rename {cmd/helm/testdata => testdata}/output/upgrade-with-install-timeout.txt (100%) rename {cmd/helm/testdata => testdata}/output/upgrade-with-install.txt (100%) rename {cmd/helm/testdata => testdata}/output/upgrade-with-missing-dependencies.txt (100%) rename {cmd/helm/testdata => testdata}/output/upgrade-with-reset-values.txt (100%) rename {cmd/helm/testdata => testdata}/output/upgrade-with-reset-values2.txt (100%) rename {cmd/helm/testdata => testdata}/output/upgrade-with-timeout.txt (100%) rename {cmd/helm/testdata => testdata}/output/upgrade-with-wait.txt (100%) rename {cmd/helm/testdata => testdata}/output/upgrade.txt (100%) rename {cmd/helm/testdata => testdata}/output/version-template.txt (100%) rename {cmd/helm/testdata => testdata}/output/version.txt (100%) rename {cmd/helm/testdata => testdata}/plugins.yaml (50%) rename {cmd/helm/testdata => testdata}/repositories.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/alpine/Chart.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/alpine/README.md (100%) rename {cmd/helm/testdata => testdata}/testcharts/alpine/extra_values.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/alpine/more_values.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/alpine/templates/alpine-pod.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/alpine/values.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/chart-bad-requirements/.helmignore (100%) rename {cmd/helm/testdata => testdata}/testcharts/chart-bad-requirements/Chart.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/chart-bad-requirements/charts/reqsubchart/.helmignore (100%) rename {cmd/helm/testdata => testdata}/testcharts/chart-bad-requirements/charts/reqsubchart/Chart.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/chart-bad-requirements/charts/reqsubchart/values.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/chart-bad-requirements/values.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/chart-bad-type/Chart.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/chart-bad-type/README.md (100%) rename {cmd/helm/testdata => testdata}/testcharts/chart-bad-type/extra_values.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/chart-bad-type/more_values.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/chart-bad-type/templates/alpine-pod.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/chart-bad-type/values.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/chart-missing-deps/.helmignore (100%) rename {cmd/helm/testdata => testdata}/testcharts/chart-missing-deps/Chart.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/chart-missing-deps/charts/reqsubchart/.helmignore (100%) rename {cmd/helm/testdata => testdata}/testcharts/chart-missing-deps/charts/reqsubchart/Chart.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/chart-missing-deps/charts/reqsubchart/values.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/chart-missing-deps/values.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/chart-with-lib-dep/.helmignore (100%) rename {cmd/helm/testdata => testdata}/testcharts/chart-with-lib-dep/Chart.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/chart-with-lib-dep/charts/common-0.0.5.tgz (100%) rename {cmd/helm/testdata => testdata}/testcharts/chart-with-lib-dep/templates/NOTES.txt (100%) rename {cmd/helm/testdata => testdata}/testcharts/chart-with-lib-dep/templates/_helpers.tpl (100%) rename {cmd/helm/testdata => testdata}/testcharts/chart-with-lib-dep/templates/deployment.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/chart-with-lib-dep/templates/ingress.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/chart-with-lib-dep/templates/service.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/chart-with-lib-dep/values.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/compressedchart-0.1.0.tgz (100%) rename {cmd/helm/testdata => testdata}/testcharts/compressedchart-0.2.0.tgz (100%) rename {cmd/helm/testdata => testdata}/testcharts/compressedchart-0.3.0.tgz (100%) rename {cmd/helm/testdata => testdata}/testcharts/compressedchart-with-hyphens-0.1.0.tgz (100%) rename {cmd/helm/testdata => testdata}/testcharts/decompressedchart/.helmignore (100%) rename {cmd/helm/testdata => testdata}/testcharts/decompressedchart/Chart.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/decompressedchart/values.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/empty/Chart.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/empty/README.md (100%) rename {cmd/helm/testdata => testdata}/testcharts/empty/templates/empty.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/empty/values.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/issue1979/Chart.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/issue1979/README.md (100%) rename {cmd/helm/testdata => testdata}/testcharts/issue1979/extra_values.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/issue1979/more_values.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/issue1979/templates/alpine-pod.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/issue1979/values.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/lib-chart/.helmignore (100%) rename {cmd/helm/testdata => testdata}/testcharts/lib-chart/Chart.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/lib-chart/README.md (100%) rename {cmd/helm/testdata => testdata}/testcharts/lib-chart/templates/_chartref.tpl (100%) rename {cmd/helm/testdata => testdata}/testcharts/lib-chart/templates/_configmap.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/lib-chart/templates/_container.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/lib-chart/templates/_deployment.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/lib-chart/templates/_envvar.tpl (100%) rename {cmd/helm/testdata => testdata}/testcharts/lib-chart/templates/_fullname.tpl (100%) rename {cmd/helm/testdata => testdata}/testcharts/lib-chart/templates/_ingress.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/lib-chart/templates/_metadata.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/lib-chart/templates/_metadata_annotations.tpl (100%) rename {cmd/helm/testdata => testdata}/testcharts/lib-chart/templates/_metadata_labels.tpl (100%) rename {cmd/helm/testdata => testdata}/testcharts/lib-chart/templates/_name.tpl (100%) rename {cmd/helm/testdata => testdata}/testcharts/lib-chart/templates/_persistentvolumeclaim.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/lib-chart/templates/_secret.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/lib-chart/templates/_service.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/lib-chart/templates/_util.tpl (100%) rename {cmd/helm/testdata => testdata}/testcharts/lib-chart/templates/_volume.tpl (100%) rename {cmd/helm/testdata => testdata}/testcharts/lib-chart/values.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/novals/Chart.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/novals/README.md (100%) rename {cmd/helm/testdata => testdata}/testcharts/novals/templates/alpine-pod.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/reqtest-0.1.0.tgz (100%) rename {cmd/helm/testdata => testdata}/testcharts/reqtest/.helmignore (100%) rename {cmd/helm/testdata => testdata}/testcharts/reqtest/Chart.lock (100%) rename {cmd/helm/testdata => testdata}/testcharts/reqtest/Chart.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/reqtest/charts/reqsubchart/.helmignore (100%) rename {cmd/helm/testdata => testdata}/testcharts/reqtest/charts/reqsubchart/Chart.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/reqtest/charts/reqsubchart/values.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/reqtest/charts/reqsubchart2/.helmignore (100%) rename {cmd/helm/testdata => testdata}/testcharts/reqtest/charts/reqsubchart2/Chart.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/reqtest/charts/reqsubchart2/values.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/reqtest/charts/reqsubchart3-0.2.0.tgz (100%) rename {cmd/helm/testdata => testdata}/testcharts/reqtest/values.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/signtest-0.1.0.tgz (100%) rename {cmd/helm/testdata => testdata}/testcharts/signtest-0.1.0.tgz.prov (100%) rename {cmd/helm/testdata => testdata}/testcharts/signtest/.helmignore (100%) rename {cmd/helm/testdata => testdata}/testcharts/signtest/Chart.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/signtest/alpine/Chart.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/signtest/alpine/README.md (100%) rename {cmd/helm/testdata => testdata}/testcharts/signtest/alpine/templates/alpine-pod.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/signtest/alpine/values.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/signtest/templates/pod.yaml (100%) rename {cmd/helm/testdata => testdata}/testcharts/signtest/values.yaml (100%) rename {cmd/helm/testdata => testdata}/testplugin/plugin.yaml (100%) rename {cmd/helm/testdata => testdata}/testserver/index.yaml (100%) rename {cmd/helm/testdata => testdata}/testserver/repository/repositories.yaml (100%) diff --git a/cmd/helm/helm.go b/cmd/helm/helm.go index b50bd152b..2fe570a58 100644 --- a/cmd/helm/helm.go +++ b/cmd/helm/helm.go @@ -17,96 +17,19 @@ limitations under the License. package main // import "k8s.io/helm/cmd/helm" import ( - "fmt" "log" "os" - "sync" - // Import to initialize client auth plugins. - "k8s.io/cli-runtime/pkg/genericclioptions" - _ "k8s.io/client-go/plugin/pkg/client/auth" - - "k8s.io/helm/pkg/action" "k8s.io/helm/pkg/cli" - "k8s.io/helm/pkg/kube" - "k8s.io/helm/pkg/storage" - "k8s.io/helm/pkg/storage/driver" -) - -var ( - settings cli.EnvSettings - config genericclioptions.RESTClientGetter - configOnce sync.Once ) func init() { log.SetFlags(log.Lshortfile) } -func logf(format string, v ...interface{}) { - if settings.Debug { - format = fmt.Sprintf("[debug] %s\n", format) - log.Output(2, fmt.Sprintf(format, v...)) - } -} - func main() { - cmd := newRootCmd(newActionConfig(false), os.Stdout, os.Args[1:]) + cmd := cli.New(cli.NewActionConfig(false), os.Stdout, os.Args[1:]) if err := cmd.Execute(); err != nil { - logf("%+v", err) os.Exit(1) } } - -func newActionConfig(allNamespaces bool) *action.Configuration { - kc := kube.New(kubeConfig()) - kc.Log = logf - - clientset, err := kc.KubernetesClientSet() - if err != nil { - // TODO return error - log.Fatal(err) - } - var namespace string - if !allNamespaces { - namespace = getNamespace() - } - - var store *storage.Storage - switch os.Getenv("HELM_DRIVER") { - case "secret", "secrets", "": - d := driver.NewSecrets(clientset.CoreV1().Secrets(namespace)) - d.Log = logf - store = storage.Init(d) - case "configmap", "configmaps": - d := driver.NewConfigMaps(clientset.CoreV1().ConfigMaps(namespace)) - d.Log = logf - store = storage.Init(d) - case "memory": - d := driver.NewMemory() - store = storage.Init(d) - default: - // Not sure what to do here. - panic("Unknown driver in HELM_DRIVER: " + os.Getenv("HELM_DRIVER")) - } - - return &action.Configuration{ - KubeClient: kc, - Releases: store, - Discovery: clientset.Discovery(), - } -} - -func kubeConfig() genericclioptions.RESTClientGetter { - configOnce.Do(func() { - config = kube.GetConfig(settings.KubeConfig, settings.KubeContext, settings.Namespace) - }) - return config -} - -func getNamespace() string { - if ns, _, err := kubeConfig().ToRawKubeConfigLoader().Namespace(); err == nil { - return ns - } - return "default" -} diff --git a/cmd/helm/root.go b/cmd/helm/root.go deleted file mode 100644 index d1ef58a05..000000000 --- a/cmd/helm/root.go +++ /dev/null @@ -1,118 +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 "k8s.io/helm/cmd/helm" - -import ( - "io" - - "github.com/containerd/containerd/remotes/docker" - "github.com/spf13/cobra" - - "k8s.io/helm/cmd/helm/require" - "k8s.io/helm/pkg/action" - "k8s.io/helm/pkg/registry" -) - -var globalUsage = `The Kubernetes package manager - -To begin working with Helm, run the 'helm init' command: - - $ helm init - -This will set up any necessary local configuration. - -Common actions from this point include: - -- helm search: search for charts -- helm fetch: download a chart to your local directory to view -- helm install: upload the chart to Kubernetes -- helm list: list releases of charts - -Environment: - $HELM_HOME set an alternative location for Helm files. By default, these are stored in ~/.helm - $HELM_DRIVER set the backend storage driver. Values are: configmap, secret, memory - $HELM_NO_PLUGINS disable plugins. Set HELM_NO_PLUGINS=1 to disable plugins. - $KUBECONFIG set an alternative Kubernetes configuration file (default "~/.kube/config") -` - -func newRootCmd(actionConfig *action.Configuration, out io.Writer, args []string) *cobra.Command { - cmd := &cobra.Command{ - Use: "helm", - Short: "The Helm package manager for Kubernetes.", - Long: globalUsage, - SilenceUsage: true, - Args: require.NoArgs, - } - flags := cmd.PersistentFlags() - - settings.AddFlags(flags) - - flags.Parse(args) - - // set defaults from environment - settings.Init(flags) - - // Add the registry client based on settings - // TODO: Move this elsewhere (first, settings.Init() must move) - actionConfig.RegistryClient = registry.NewClient(®istry.ClientOptions{ - Out: out, - Resolver: registry.Resolver{ - Resolver: docker.NewResolver(docker.ResolverOptions{}), - }, - CacheRootDir: settings.Home.Registry(), - }) - - cmd.AddCommand( - // chart commands - newCreateCmd(out), - newDependencyCmd(out), - newPullCmd(out), - newShowCmd(out), - newLintCmd(out), - newPackageCmd(out), - newRepoCmd(out), - newSearchCmd(out), - newVerifyCmd(out), - newChartCmd(actionConfig, out), - - // release commands - newGetCmd(actionConfig, out), - newHistoryCmd(actionConfig, out), - newInstallCmd(actionConfig, out), - newListCmd(actionConfig, out), - newReleaseTestCmd(actionConfig, out), - newRollbackCmd(actionConfig, out), - newStatusCmd(actionConfig, out), - newUninstallCmd(actionConfig, out), - newUpgradeCmd(actionConfig, out), - - newCompletionCmd(out), - newHomeCmd(out), - newInitCmd(out), - newPluginCmd(out), - newTemplateCmd(out), - newVersionCmd(out), - - // Hidden documentation generator command: 'helm docs' - newDocsCmd(out), - ) - - // Find and add plugins - loadPlugins(cmd, out) - - return cmd -} diff --git a/cmd/helm/testdata/output/dependency-list-no-requirements-linux.txt b/cmd/helm/testdata/output/dependency-list-no-requirements-linux.txt deleted file mode 100644 index 35fe1d2e3..000000000 --- a/cmd/helm/testdata/output/dependency-list-no-requirements-linux.txt +++ /dev/null @@ -1 +0,0 @@ -WARNING: no dependencies at testdata/testcharts/alpine/charts diff --git a/go.mod b/go.mod new file mode 100644 index 000000000..b662dc1b3 --- /dev/null +++ b/go.mod @@ -0,0 +1,123 @@ +module k8s.io/helm + +go 1.12 + +require ( + cloud.google.com/go v0.34.0 + contrib.go.opencensus.io/exporter/ocagent v0.2.0 + github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 + github.com/Azure/go-autorest v11.2.8+incompatible + github.com/BurntSushi/toml v0.3.1 + github.com/MakeNowJust/heredoc v0.0.0-20171113091838-e9091a26100e + github.com/Masterminds/semver v1.4.2 + github.com/Masterminds/sprig v2.16.0+incompatible + github.com/Masterminds/vcs v1.13.0 + github.com/PuerkitoBio/purell v1.1.0 + github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 + github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d + github.com/aokoli/goutils v1.0.1 + github.com/asaskevich/govalidator v0.0.0-20180315120708-ccb8e960c48f + github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 + github.com/bshuster-repo/logrus-logstash-hook v0.4.1 + github.com/bugsnag/bugsnag-go v1.3.2 + github.com/bugsnag/panicwrap v1.2.0 + github.com/census-instrumentation/opencensus-proto v0.1.0 + github.com/chai2010/gettext-go v0.0.0-20170215093142-bf70f2a70fb1 + github.com/containerd/containerd v1.2.1 + github.com/cpuguy83/go-md2man v1.0.8 + github.com/davecgh/go-spew v1.1.1 + github.com/deislabs/oras v0.3.3 + github.com/dgrijalva/jwt-go v3.2.0+incompatible + github.com/docker/distribution v2.7.0+incompatible + github.com/docker/docker v0.0.0-20181221150755-2cb26cfe9cbf + github.com/docker/go-metrics v0.0.0-20181218153428-b84716841b82 + github.com/docker/go-units v0.3.3 + github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7 + github.com/docker/spdystream v0.0.0-20181023171402-6480d4af844c + github.com/emicklei/go-restful v2.8.0+incompatible + github.com/evanphx/json-patch v3.0.0+incompatible + github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d + github.com/fatih/camelcase v1.0.0 + github.com/garyburd/redigo v1.6.0 + github.com/ghodss/yaml v1.0.0 + github.com/go-openapi/jsonpointer v0.17.2 + github.com/go-openapi/jsonreference v0.17.2 + github.com/go-openapi/spec v0.17.2 + github.com/go-openapi/swag v0.17.2 + github.com/gobwas/glob v0.2.3 + github.com/gogo/protobuf v1.2.0 + github.com/golang/groupcache v0.0.0-20181024230925-c65c006176ff + github.com/golang/protobuf v1.2.0 + github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c + github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf + github.com/google/uuid v1.1.0 + github.com/googleapis/gnostic v0.2.0 + github.com/gophercloud/gophercloud v0.0.0-20181221023737-94924357ebf6 + github.com/gorilla/handlers v1.4.0 + github.com/gorilla/mux v1.7.0 + github.com/gosuri/uitable v0.0.0-20160404203958-36ee7e946282 + github.com/gregjones/httpcache v0.0.0-20181110185634-c63ab54fda8f + github.com/hashicorp/golang-lru v0.5.0 + github.com/huandu/xstrings v1.2.0 + github.com/imdario/mergo v0.3.6 + github.com/inconshreveable/mousetrap v1.0.0 + github.com/json-iterator/go v1.1.5 + github.com/kardianos/osext v0.0.0-20170510131534-ae77be60afb1 + github.com/konsorten/go-windows-terminal-sequences v1.0.1 + github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329 + github.com/mattn/go-runewidth v0.0.4 + github.com/mattn/go-shellwords v1.0.3 + github.com/matttproud/golang_protobuf_extensions v1.0.1 + github.com/miekg/dns v0.0.0-20181005163659-0d29b283ac0f + github.com/mitchellh/go-wordwrap v1.0.0 + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd + github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742 + github.com/opencontainers/go-digest v1.0.0-rc1 + github.com/opencontainers/image-spec v1.0.1 + github.com/petar/GoLLRB v0.0.0-20130427215148-53be0d36a84c + github.com/peterbourgon/diskv v2.0.1+incompatible + github.com/pkg/errors v0.8.0 + github.com/pmezard/go-difflib v1.0.0 + github.com/prometheus/client_golang v0.9.2 + github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 + github.com/prometheus/common v0.2.0 + github.com/prometheus/procfs v0.0.0-20190129233650-316cf8ccfec5 + github.com/russross/blackfriday v1.5.2 + github.com/sirupsen/logrus v1.2.0 + github.com/spf13/cobra v0.0.3 + github.com/spf13/pflag v1.0.3 + github.com/stretchr/testify v1.3.0 + github.com/xenolf/lego v0.0.0-20160613233155-a9d8cec0e656 + github.com/yvasiyarov/go-metrics v0.0.0-20150112132944-c25f46c4b940 + github.com/yvasiyarov/gorelic v0.0.6 + github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f + go.opencensus.io v0.18.0 + golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9 + golang.org/x/net v0.0.0-20181220203305-927f97764cc3 + golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890 + golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 + golang.org/x/sys v0.0.0-20181221143128-b4a75ba826a6 + golang.org/x/text v0.3.0 + golang.org/x/time v0.0.0-20181108054448-85acf8d2951c + google.golang.org/api v0.0.0-20181221000618-65a46cafb132 + google.golang.org/appengine v1.4.0 + google.golang.org/genproto v0.0.0-20181221175505-bd9b4fb69e2f + google.golang.org/grpc v1.17.0 + gopkg.in/inf.v0 v0.9.1 + gopkg.in/square/go-jose.v1 v1.1.2 + gopkg.in/square/go-jose.v2 v2.3.0 + gopkg.in/yaml.v2 v2.2.2 + k8s.io/api v0.0.0-20190222213804-5cb15d344471 + k8s.io/apiextensions-apiserver v0.0.0-20190221221350-bfb440be4b87 + k8s.io/apimachinery v0.0.0-20190221213512-86fb29eff628 + k8s.io/apiserver v0.0.0-20190221215341-5838f549963b + k8s.io/cli-runtime v0.0.0-20181221202950-8abb1aeb8307 + k8s.io/client-go v0.0.0-20190228174230-b40b2a5939e4 + k8s.io/klog v0.1.0 + k8s.io/kube-openapi v0.0.0-20181114233023-0317810137be + k8s.io/kubernetes v0.0.0-20190305150815-6c1e64b94a3e + k8s.io/utils v0.0.0-20181221173059-8a16e7dd8fb6 + sigs.k8s.io/kustomize v1.0.11 + sigs.k8s.io/yaml v1.1.0 + vbom.ml/util v0.0.0-20180919145318-efcd4e0f9787 +) diff --git a/go.sum b/go.sum new file mode 100644 index 000000000..7322c1e0a --- /dev/null +++ b/go.sum @@ -0,0 +1,271 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0 h1:eOI3/cP2VTU6uZLDYAoic+eyzzB9YyGmJ7eIjl8rOPg= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +contrib.go.opencensus.io/exporter/ocagent v0.2.0 h1:Q/jXnVbliDYozuWJni9452xsSUuo+y8yrioxRgofBhE= +contrib.go.opencensus.io/exporter/ocagent v0.2.0/go.mod h1:0fnkYHF+ORKj7HWzOExKkUHeFX79gXSKUQbpnAM+wzo= +git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= +github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/Azure/go-autorest v11.2.8+incompatible h1:Q2feRPMlcfVcqz3pF87PJzkm5lZrL+x6BDtzhODzNJM= +github.com/Azure/go-autorest v11.2.8+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= +github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/MakeNowJust/heredoc v0.0.0-20171113091838-e9091a26100e h1:eb0Pzkt15Bm7f2FFYv7sjY7NPFi3cPkS3tv1CcrFBWA= +github.com/MakeNowJust/heredoc v0.0.0-20171113091838-e9091a26100e/go.mod h1:64YHyfSL2R96J44Nlwm39UHepQbyR5q10x7iYa1ks2E= +github.com/Masterminds/semver v1.4.2 h1:WBLTQ37jOCzSLtXNdoo8bNM8876KhNqOKvrlGITgsTc= +github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= +github.com/Masterminds/sprig v2.16.0+incompatible h1:QZbMUPxRQ50EKAq3LFMnxddMu88/EUUG3qmxwtDmPsY= +github.com/Masterminds/sprig v2.16.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= +github.com/Masterminds/vcs v1.13.0 h1:USF5TvZGYgIpcbNAEMLfFhHqP08tFZVlUVrmTSpqnyA= +github.com/Masterminds/vcs v1.13.0/go.mod h1:N09YCmOQr6RLxC6UNHzuVwAdodYbbnycGHSmwVJjcKA= +github.com/PuerkitoBio/purell v1.1.0 h1:rmGxhojJlM0tuKtfdvliR84CFHljx9ag64t2xmVkjK4= +github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/aokoli/goutils v1.0.1 h1:7fpzNGoJ3VA8qcrm++XEE1QUe0mIwNeLa02Nwq7RDkg= +github.com/aokoli/goutils v1.0.1/go.mod h1:SijmP0QR8LtwsmDs8Yii5Z/S4trXFGFC2oO5g9DP+DQ= +github.com/asaskevich/govalidator v0.0.0-20180315120708-ccb8e960c48f h1:y2hSFdXeA1y5z5f0vfNO0Dg5qVY036qzlz3Pds0B92o= +github.com/asaskevich/govalidator v0.0.0-20180315120708-ccb8e960c48f/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= +github.com/bugsnag/bugsnag-go v1.3.2/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= +github.com/bugsnag/panicwrap v1.2.0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= +github.com/census-instrumentation/opencensus-proto v0.0.2-0.20180913191712-f303ae3f8d6a/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/census-instrumentation/opencensus-proto v0.1.0 h1:VwZ9smxzX8u14/125wHIX7ARV+YhR+L4JADswwxWK0Y= +github.com/census-instrumentation/opencensus-proto v0.1.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/chai2010/gettext-go v0.0.0-20170215093142-bf70f2a70fb1 h1:HD4PLRzjuCVW79mQ0/pdsalOLHJ+FaEoqJLxfltpb2U= +github.com/chai2010/gettext-go v0.0.0-20170215093142-bf70f2a70fb1/go.mod h1:/iP1qXHoty45bqomnu2LM+VVyAEdWN+vtSHGlQgyxbw= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/containerd/containerd v1.2.1 h1:rG4/dK9V2qa5a9ly/E3CtG6/FBXfmSkDo8An3ea2Yt8= +github.com/containerd/containerd v1.2.1/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/cpuguy83/go-md2man v1.0.8 h1:DwoNytLphI8hzS2Af4D0dfaEaiSq2bN05mEm4R6vf8M= +github.com/cpuguy83/go-md2man v1.0.8/go.mod h1:N6JayAiVKtlHSnuTCeuLSQVs75hb8q+dYQLjr7cDsKY= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/deislabs/oras v0.3.3 h1:vZdf6n0eDBHsVoP8Ha/CZN2U2KjaF/eQJ3AEtU7H+vs= +github.com/deislabs/oras v0.3.3/go.mod h1:SXwPnImOu69FofPWaqgB+cPKKQRBmao5i+9xQRdcOiM= +github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/docker/distribution v2.7.0+incompatible h1:neUDAlf3wX6Ml4HdqTrbcOHXtfRN0TFIwt6YFL7N9RU= +github.com/docker/distribution v2.7.0+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/docker v0.0.0-20181221150755-2cb26cfe9cbf h1:UUNoLGt3UNi06Zuad3kyUStUnaW5OJ4VHmQ5QlTOKxo= +github.com/docker/docker v0.0.0-20181221150755-2cb26cfe9cbf/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-metrics v0.0.0-20181218153428-b84716841b82/go.mod h1:/u0gXw0Gay3ceNrsHubL3BtdOL2fHf93USgMTe0W5dI= +github.com/docker/go-units v0.3.3 h1:Xk8S3Xj5sLGlG5g67hJmYMmUgXv5N4PhkjJHHqrwnTk= +github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= +github.com/docker/spdystream v0.0.0-20181023171402-6480d4af844c h1:ZfSZ3P3BedhKGUhzj7BQlPSU4OvT6tfOKe3DVHzOA7s= +github.com/docker/spdystream v0.0.0-20181023171402-6480d4af844c/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= +github.com/emicklei/go-restful v2.8.0+incompatible h1:wN8GCRDPGHguIynsnBartv5GUgGUg1LAU7+xnSn1j7Q= +github.com/emicklei/go-restful v2.8.0+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/evanphx/json-patch v3.0.0+incompatible h1:l91aby7TzBXBdmF8heZqjskeH9f3g7ZOL8/sSe+vTlU= +github.com/evanphx/json-patch v3.0.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d h1:105gxyaGwCFad8crR9dcMQWvV9Hvulu6hwUh4tWPJnM= +github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZMPRZwes7CROmyNKgQzC3XPs6L/G2EJLHddWejkmf4= +github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= +github.com/garyburd/redigo v1.6.0/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= +github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= +github.com/go-openapi/jsonpointer v0.17.2 h1:3ekBy41gar/iJi2KSh/au/PrC2vpLr85upF/UZmm3W0= +github.com/go-openapi/jsonpointer v0.17.2/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= +github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= +github.com/go-openapi/jsonreference v0.17.2 h1:lF3z7AH8dd0IKXc1zEBi1dj0B4XgVb5cVjn39dCK3Ls= +github.com/go-openapi/jsonreference v0.17.2/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= +github.com/go-openapi/spec v0.17.2 h1:eb2NbuCnoe8cWAxhtK6CfMWUYmiFEZJ9Hx3Z2WRwJ5M= +github.com/go-openapi/spec v0.17.2/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= +github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= +github.com/go-openapi/swag v0.17.2 h1:K/ycE/XTUDFltNHSO32cGRUhrVGJD64o8WgAIZNyc3k= +github.com/go-openapi/swag v0.17.2/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= +github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.0 h1:xU6/SpYbvkNYiptHJYEDRseDLvYE7wSqhYYNy0QSUzI= +github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20181024230925-c65c006176ff h1:kOkM9whyQYodu09SJ6W3NCsHG7crFaJILQ22Gozp3lg= +github.com/golang/groupcache v0.0.0-20181024230925-c65c006176ff/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c h1:964Od4U6p2jUkFxvCydnIczKteheJEzHRToSGK3Bnlw= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf h1:+RRA9JqSOZFfKrOeqr2z77+8R2RKyh8PG66dcu1V0ck= +github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= +github.com/google/uuid v1.1.0 h1:Jf4mxPC/ziBnoPIdpQdPJ9OeiomAUHLvxmPRSPH9m4s= +github.com/google/uuid v1.1.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gnostic v0.2.0 h1:l6N3VoaVzTncYYW+9yOz2LJJammFZGBO13sqgEhpy9g= +github.com/googleapis/gnostic v0.2.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= +github.com/gophercloud/gophercloud v0.0.0-20181221023737-94924357ebf6 h1:4/heZnxONZh0s2O5wg6R0nPBs2ikXQ8nHKGuSBNWqx8= +github.com/gophercloud/gophercloud v0.0.0-20181221023737-94924357ebf6/go.mod h1:3WdhXV3rUYy9p6AUW8d94kr+HS62Y4VL9mBnFxsD8q4= +github.com/gorilla/handlers v1.4.0/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= +github.com/gorilla/mux v1.7.0/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gosuri/uitable v0.0.0-20160404203958-36ee7e946282 h1:KFqmdzEPbU7Uck2tn50t+HQXZNVkxe8M9qRb/ZoSHaE= +github.com/gosuri/uitable v0.0.0-20160404203958-36ee7e946282/go.mod h1:tKR86bXuXPZazfOTG1FIzvjIdXzd0mo4Vtn16vt0PJo= +github.com/gregjones/httpcache v0.0.0-20181110185634-c63ab54fda8f h1:ShTPMJQes6tubcjzGMODIVG5hlrCeImaBnZzKF2N8SM= +github.com/gregjones/httpcache v0.0.0-20181110185634-c63ab54fda8f/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/grpc-ecosystem/grpc-gateway v1.5.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= +github.com/hashicorp/golang-lru v0.5.0 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCOH9wdo= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/huandu/xstrings v1.2.0 h1:yPeWdRnmynF7p+lLYz0H2tthW9lqhMJrQV/U7yy4wX0= +github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4= +github.com/imdario/mergo v0.3.6 h1:xTNEAn+kxVO7dTZGu0CegyqKZmoWFI0rF8UxjlB2d28= +github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/json-iterator/go v1.1.5 h1:gL2yXlmiIo4+t+y32d4WGwOjKGYcGOuyrg46vadswDE= +github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/kardianos/osext v0.0.0-20170510131534-ae77be60afb1/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329 h1:2gxZ0XQIU/5z3Z3bUBu+FXuk2pFbkN6tcwi/pjyaDic= +github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mattn/go-runewidth v0.0.4 h1:2BvfKmzob6Bmd4YsL0zygOqfdFnK7GR4QL06Do4/p7Y= +github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-shellwords v1.0.3 h1:K/VxK7SZ+cvuPgFSLKi5QPI9Vr/ipOf4C1gN+ntueUk= +github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/miekg/dns v0.0.0-20181005163659-0d29b283ac0f/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/mitchellh/go-wordwrap v1.0.0 h1:6GlHJ/LTGMrIJbwgdqdl2eEH8o+Exx/0m8ir9Gns0u4= +github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742 h1:Esafd1046DLDQ0W1YjYsBW+p8U2u7vzgW2SQVmlNazg= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/opencontainers/go-digest v1.0.0-rc1 h1:WzifXhOVOEOuFYOJAW6aQqW0TooG2iki3E3Ii+WN7gQ= +github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/image-spec v1.0.1 h1:JMemWkRwHx4Zj+fVxWoMCFm/8sYGGrUVojFA6h/TRcI= +github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= +github.com/petar/GoLLRB v0.0.0-20130427215148-53be0d36a84c/go.mod h1:HUpKUBZnpzkdx0kD/+Yfuft+uD3zHGtXF/XJB14TUr4= +github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= +github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190129233650-316cf8ccfec5/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= +github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/sirupsen/logrus v1.2.0 h1:juTguoYk5qI21pwyTXY3B3Y5cOTH3ZUyZCg1v/mihuo= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/spf13/cobra v0.0.3 h1:ZlrZ4XsMRm04Fr5pSFxBgfND2EBVa1nLpiy1stUsX/8= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/xenolf/lego v0.0.0-20160613233155-a9d8cec0e656/go.mod h1:fwiGnfsIjG7OHPfOvgK7Y/Qo6+2Ox0iozjNTkZICKbY= +github.com/yvasiyarov/go-metrics v0.0.0-20150112132944-c25f46c4b940/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs= +github.com/yvasiyarov/gorelic v0.0.6/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA= +github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg= +go.opencensus.io v0.17.0/go.mod h1:mp1VrMQxhlqqDpKvH4UcQUa4YwlzNmymAjPrDdfxNpI= +go.opencensus.io v0.18.0 h1:Mk5rgZcggtbvtAun5aJzAtjKKN/t0R3jJPlWILlv938= +go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9 h1:mKdxBk7AujPs8kU4m80U72y/zjbZ3UcXC7dClwKbUI0= +golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181106065722-10aee1819953/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3 h1:eH6Eip3UpmR+yM/qI9Ijluzb1bNv/cAU/n+6l8tRSis= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890 h1:uESlIz09WIHT2I+pasSXcpLYqYK8wHcdCetU3VuMBJE= +golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181221143128-b4a75ba826a6 h1:IcgEB62HYgAhX0Nd/QrVgZlxlcyxbGQHElLUhW2X4Fo= +golang.org/x/sys v0.0.0-20181221143128-b4a75ba826a6/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c h1:fqgJT0MGcGpPgpWU7VRdRjuArfcOvC4AoJmILihzhDg= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= +google.golang.org/api v0.0.0-20181221000618-65a46cafb132 h1:SLcC5l+3o5vwvXAbdm936WwLkHteUZpo1RULZD7YvQ4= +google.golang.org/api v0.0.0-20181221000618-65a46cafb132/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20181221175505-bd9b4fb69e2f h1:eT3B0O2ghdSPzjAOznr3oOLyN1HFeYUncYl7FRwg4VI= +google.golang.org/genproto v0.0.0-20181221175505-bd9b4fb69e2f/go.mod h1:7Ep/1NZk928CDR8SjdVbjWNpdIf6nzjE3BTgJDr2Atg= +google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/grpc v1.15.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= +google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= +google.golang.org/grpc v1.17.0 h1:TRJYBgMclJvGYn2rIMjj+h9KtMt5r1Ij7ODVRIZkwhk= +google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/square/go-jose.v1 v1.1.2/go.mod h1:QpYS+a4WhS+DTlyQIi6Ka7MS3SuR9a055rgXNEe6EiA= +gopkg.in/square/go-jose.v2 v2.3.0 h1:nLzhkFyl5bkblqYBoiWJUt5JkWOzmiaBtCxdJAqJd3U= +gopkg.in/square/go-jose.v2 v2.3.0/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +k8s.io/api v0.0.0-20190222213804-5cb15d344471 h1:MzQGt8qWQCR+39kbYRd0uQqsvSidpYqJLFeWiJ9l4OE= +k8s.io/api v0.0.0-20190222213804-5cb15d344471/go.mod h1:iuAfoD4hCxJ8Onx9kaTIt30j7jUFS00AXQi6QMi99vA= +k8s.io/apiextensions-apiserver v0.0.0-20190221221350-bfb440be4b87 h1:BMfPZfi3CkPd9e9Qbm+/AFgE6qXWQcbzUvC91LR3m7w= +k8s.io/apiextensions-apiserver v0.0.0-20190221221350-bfb440be4b87/go.mod h1:IxkesAMoaCRoLrPJdZNZUQp9NfZnzqaVzLhb2VEQzXE= +k8s.io/apimachinery v0.0.0-20190221213512-86fb29eff628 h1:UYfHH+KEF88OTg+GojQUwFTNxbxwmoktLwutUzR0GPg= +k8s.io/apimachinery v0.0.0-20190221213512-86fb29eff628/go.mod h1:ccL7Eh7zubPUSh9A3USN90/OzHNSVN6zxzde07TDCL0= +k8s.io/apiserver v0.0.0-20190221215341-5838f549963b h1:yFFYCR/UVj6hsYX6yRbY3CJ3917NF7tn0hwcdUil1aI= +k8s.io/apiserver v0.0.0-20190221215341-5838f549963b/go.mod h1:6bqaTSOSJavUIXUtfaR9Os9JtTCm8ZqH2SUl2S60C4w= +k8s.io/cli-runtime v0.0.0-20181221202950-8abb1aeb8307 h1:x8ssI66Rojl2Q5vd9CvgZkwJBWiauDioKu8F3V9nBas= +k8s.io/cli-runtime v0.0.0-20181221202950-8abb1aeb8307/go.mod h1:qWnH3/b8sp/l7EvlDh7ulDU3UWA4P4N1NFbEEP791tM= +k8s.io/client-go v0.0.0-20190228174230-b40b2a5939e4 h1:aE8wOCKuoRs2aU0OP/Rz8SXiAB0FTTku3VtGhhrkSmc= +k8s.io/client-go v0.0.0-20190228174230-b40b2a5939e4/go.mod h1:7vJpHMYJwNQCWgzmNV+VYUl1zCObLyodBc8nIyt8L5s= +k8s.io/klog v0.1.0 h1:I5HMfc/DtuVaGR1KPwUrTc476K8NCqNBldC7H4dYEzk= +k8s.io/klog v0.1.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= +k8s.io/kube-openapi v0.0.0-20181114233023-0317810137be h1:aWEq4nbj7HRJ0mtKYjNSk/7X28Tl6TI6FeG8gKF+r7Q= +k8s.io/kube-openapi v0.0.0-20181114233023-0317810137be/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= +k8s.io/kubernetes v0.0.0-20190305150815-6c1e64b94a3e h1:lAr5aJET0QryOW5/uvVyF7uMkjob+/2b82PaPK4K7Hs= +k8s.io/kubernetes v0.0.0-20190305150815-6c1e64b94a3e/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= +k8s.io/utils v0.0.0-20181221173059-8a16e7dd8fb6 h1:+jRzzMyx+I9J18BvwHYmZ5hpPwoZfh6g39WfNlsMCkY= +k8s.io/utils v0.0.0-20181221173059-8a16e7dd8fb6/go.mod h1:8k8uAuAQ0rXslZKaEWd0c3oVhZz7sSzSiPnVZayjIX0= +sigs.k8s.io/kustomize v1.0.11 h1:Yb+6DDt9+aR2AvQApvUaKS/ugteeG4MPyoFeUHiPOjk= +sigs.k8s.io/kustomize v1.0.11/go.mod h1:MkjgH3RdOWrievjo6c9T245dYlB5QeXV4WCbnt/PEpU= +sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs= +sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +vbom.ml/util v0.0.0-20180919145318-efcd4e0f9787 h1:O69FD9pJA4WUZlEwYatBEEkRWKQ5cKodWpdKTrCS/iQ= +vbom.ml/util v0.0.0-20180919145318-efcd4e0f9787/go.mod h1:so/NYdZXCz+E3ZpW0uAoCj6uzU2+8OWDFv/HxUSs7kI= diff --git a/internal/test/test.go b/internal/test/test.go index 319ec1557..6fbcc5d4e 100644 --- a/internal/test/test.go +++ b/internal/test/test.go @@ -62,7 +62,7 @@ func path(filename string) string { if filepath.IsAbs(filename) { return filename } - return filepath.Join("testdata", filename) + return filepath.Join("..", "..", "testdata", filename) } func compare(actual []byte, filename string) error { diff --git a/pkg/action/install.go b/pkg/action/install.go index b3cb92d04..169269566 100644 --- a/pkg/action/install.go +++ b/pkg/action/install.go @@ -36,7 +36,7 @@ import ( "k8s.io/helm/pkg/chart" "k8s.io/helm/pkg/chartutil" - "k8s.io/helm/pkg/cli" + "k8s.io/helm/pkg/cli/environment" "k8s.io/helm/pkg/downloader" "k8s.io/helm/pkg/engine" "k8s.io/helm/pkg/getter" @@ -532,7 +532,7 @@ OUTER: // - URL // // If 'verify' is true, this will attempt to also verify the chart. -func (c *ChartPathOptions) LocateChart(name string, settings cli.EnvSettings) (string, error) { +func (c *ChartPathOptions) LocateChart(name string, settings environment.Settings) (string, error) { name = strings.TrimSpace(name) version := strings.TrimSpace(c.Version) @@ -597,7 +597,7 @@ func (c *ChartPathOptions) LocateChart(name string, settings cli.EnvSettings) (s // MergeValues merges values from files specified via -f/--values and // directly via --set or --set-string, marshaling them to YAML -func (v *ValueOptions) MergeValues(settings cli.EnvSettings) error { +func (v *ValueOptions) MergeValues(settings environment.Settings) error { base := map[string]interface{}{} // User specified a values files via -f/--values @@ -662,7 +662,7 @@ func MergeValues(dest, src map[string]interface{}) map[string]interface{} { } // readFile load a file from stdin, the local directory, or a remote file with a url. -func readFile(filePath string, settings cli.EnvSettings) ([]byte, error) { +func readFile(filePath string, settings environment.Settings) ([]byte, error) { if strings.TrimSpace(filePath) == "-" { return ioutil.ReadAll(os.Stdin) } diff --git a/pkg/action/lint_test.go b/pkg/action/lint_test.go index c442be344..7a3799ca7 100644 --- a/pkg/action/lint_test.go +++ b/pkg/action/lint_test.go @@ -24,11 +24,11 @@ var ( values = make(map[string]interface{}) namespace = "testNamespace" strict = false - archivedChartPath = "../../cmd/helm/testdata/testcharts/compressedchart-0.1.0.tgz" - archivedChartPathWithHyphens = "../../cmd/helm/testdata/testcharts/compressedchart-with-hyphens-0.1.0.tgz" - invalidArchivedChartPath = "../../cmd/helm/testdata/testcharts/invalidcompressedchart0.1.0.tgz" - chartDirPath = "../../cmd/helm/testdata/testcharts/decompressedchart/" - chartMissingManifest = "../../cmd/helm/testdata/testcharts/chart-missing-manifest" + archivedChartPath = "../../testdata/testcharts/compressedchart-0.1.0.tgz" + archivedChartPathWithHyphens = "../../testdata/testcharts/compressedchart-with-hyphens-0.1.0.tgz" + invalidArchivedChartPath = "../../testdata/testcharts/invalidcompressedchart0.1.0.tgz" + chartDirPath = "../../testdata/testcharts/decompressedchart/" + chartMissingManifest = "../../testdata/testcharts/chart-missing-manifest" ) func TestLintChart(t *testing.T) { diff --git a/pkg/action/pull.go b/pkg/action/pull.go index 0c23941ca..768efdc0b 100644 --- a/pkg/action/pull.go +++ b/pkg/action/pull.go @@ -26,7 +26,7 @@ import ( "github.com/pkg/errors" "k8s.io/helm/pkg/chartutil" - "k8s.io/helm/pkg/cli" + "k8s.io/helm/pkg/cli/environment" "k8s.io/helm/pkg/downloader" "k8s.io/helm/pkg/getter" "k8s.io/helm/pkg/repo" @@ -38,7 +38,7 @@ import ( type Pull struct { ChartPathOptions - Settings cli.EnvSettings // TODO: refactor this out of pkg/action + Settings environment.Settings // TODO: refactor this out of pkg/action Devel bool Untar bool diff --git a/pkg/action/show_test.go b/pkg/action/show_test.go index 02fb5d042..5b948f380 100644 --- a/pkg/action/show_test.go +++ b/pkg/action/show_test.go @@ -25,21 +25,21 @@ import ( func TestShow(t *testing.T) { client := NewShow(ShowAll) - output, err := client.Run("../../cmd/helm/testdata/testcharts/alpine") + output, err := client.Run("../../testdata/testcharts/alpine") if err != nil { t.Fatal(err) } // Load the data from the textfixture directly. - cdata, err := ioutil.ReadFile("../../cmd/helm/testdata/testcharts/alpine/Chart.yaml") + cdata, err := ioutil.ReadFile("../../testdata/testcharts/alpine/Chart.yaml") if err != nil { t.Fatal(err) } - data, err := ioutil.ReadFile("../../cmd/helm/testdata/testcharts/alpine/values.yaml") + data, err := ioutil.ReadFile("../../testdata/testcharts/alpine/values.yaml") if err != nil { t.Fatal(err) } - readmeData, err := ioutil.ReadFile("../../cmd/helm/testdata/testcharts/alpine/README.md") + readmeData, err := ioutil.ReadFile("../../testdata/testcharts/alpine/README.md") if err != nil { t.Fatal(err) } @@ -65,7 +65,7 @@ func TestShow(t *testing.T) { // Regression tests for missing values. See issue #1024. client.OutputFormat = ShowValues - output, err = client.Run("../../cmd/helm/testdata/testcharts/novals") + output, err = client.Run("../../testdata/testcharts/novals") if err != nil { t.Fatal(err) } diff --git a/cmd/helm/chart.go b/pkg/cli/chart.go similarity index 81% rename from cmd/helm/chart.go rename to pkg/cli/chart.go index 8cfed8801..252503c8d 100644 --- a/cmd/helm/chart.go +++ b/pkg/cli/chart.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "io" @@ -32,19 +32,19 @@ Example usage: $ helm chart pull [URL] ` -func newChartCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { +func NewChartCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { cmd := &cobra.Command{ Use: "chart", Short: "push, pull, tag, or remove Helm charts", Long: chartHelp, } cmd.AddCommand( - newChartListCmd(cfg, out), - newChartExportCmd(cfg, out), - newChartPullCmd(cfg, out), - newChartPushCmd(cfg, out), - newChartRemoveCmd(cfg, out), - newChartSaveCmd(cfg, out), + NewChartListCmd(cfg, out), + NewChartExportCmd(cfg, out), + NewChartPullCmd(cfg, out), + NewChartPushCmd(cfg, out), + NewChartRemoveCmd(cfg, out), + NewChartSaveCmd(cfg, out), ) return cmd } diff --git a/cmd/helm/chart_export.go b/pkg/cli/chart_export.go similarity index 91% rename from cmd/helm/chart_export.go rename to pkg/cli/chart_export.go index cf57f0668..a2568ea07 100644 --- a/cmd/helm/chart_export.go +++ b/pkg/cli/chart_export.go @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "io" "github.com/spf13/cobra" - "k8s.io/helm/cmd/helm/require" "k8s.io/helm/pkg/action" + "k8s.io/helm/pkg/cli/require" ) const chartExportDesc = ` @@ -33,7 +33,7 @@ the chart, in a format that developers can modify and check into source control if desired. ` -func newChartExportCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { +func NewChartExportCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { return &cobra.Command{ Use: "export [ref]", Short: "export a chart to directory", diff --git a/cmd/helm/chart_list.go b/pkg/cli/chart_list.go similarity index 92% rename from cmd/helm/chart_list.go rename to pkg/cli/chart_list.go index f3ac4e5f2..c9715228e 100644 --- a/cmd/helm/chart_list.go +++ b/pkg/cli/chart_list.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "io" @@ -30,7 +30,7 @@ List all charts in the local registry cache. Charts are sorted by ref name, alphabetically. ` -func newChartListCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { +func NewChartListCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { return &cobra.Command{ Use: "list", Aliases: []string{"ls"}, diff --git a/cmd/helm/chart_pull.go b/pkg/cli/chart_pull.go similarity index 90% rename from cmd/helm/chart_pull.go rename to pkg/cli/chart_pull.go index af6c82318..d7593e0c4 100644 --- a/cmd/helm/chart_pull.go +++ b/pkg/cli/chart_pull.go @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "io" "github.com/spf13/cobra" - "k8s.io/helm/cmd/helm/require" "k8s.io/helm/pkg/action" + "k8s.io/helm/pkg/cli/require" ) const chartPullDesc = ` @@ -31,7 +31,7 @@ Download a chart from a remote registry. This will store the chart in the local registry cache to be used later. ` -func newChartPullCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { +func NewChartPullCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { return &cobra.Command{ Use: "pull [ref]", Short: "pull a chart from remote", diff --git a/cmd/helm/chart_push.go b/pkg/cli/chart_push.go similarity index 91% rename from cmd/helm/chart_push.go rename to pkg/cli/chart_push.go index eb6d8325a..57bd1b9d7 100644 --- a/cmd/helm/chart_push.go +++ b/pkg/cli/chart_push.go @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "io" "github.com/spf13/cobra" - "k8s.io/helm/cmd/helm/require" "k8s.io/helm/pkg/action" + "k8s.io/helm/pkg/cli/require" ) const chartPushDesc = ` @@ -33,7 +33,7 @@ Note: the ref must already exist in the local registry cache. Must first run "helm chart save" or "helm chart pull". ` -func newChartPushCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { +func NewChartPushCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { return &cobra.Command{ Use: "push [ref]", Short: "push a chart to remote", diff --git a/cmd/helm/chart_remove.go b/pkg/cli/chart_remove.go similarity index 91% rename from cmd/helm/chart_remove.go rename to pkg/cli/chart_remove.go index 672799d6c..03e106c1c 100644 --- a/cmd/helm/chart_remove.go +++ b/pkg/cli/chart_remove.go @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "io" "github.com/spf13/cobra" - "k8s.io/helm/cmd/helm/require" "k8s.io/helm/pkg/action" + "k8s.io/helm/pkg/cli/require" ) const chartRemoveDesc = ` @@ -34,7 +34,7 @@ but it will no longer appear in "helm chart list". To remove all unlinked content, please run "helm chart prune". (TODO) ` -func newChartRemoveCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { +func NewChartRemoveCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { return &cobra.Command{ Use: "remove [ref]", Aliases: []string{"rm"}, diff --git a/cmd/helm/chart_save.go b/pkg/cli/chart_save.go similarity index 91% rename from cmd/helm/chart_save.go rename to pkg/cli/chart_save.go index 0bd451587..783c2bf42 100644 --- a/cmd/helm/chart_save.go +++ b/pkg/cli/chart_save.go @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "io" "github.com/spf13/cobra" - "k8s.io/helm/cmd/helm/require" "k8s.io/helm/pkg/action" + "k8s.io/helm/pkg/cli/require" ) const chartSaveDesc = ` @@ -32,7 +32,7 @@ Note: modifying the chart after this operation will not change the item as it exists in the cache. ` -func newChartSaveCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { +func NewChartSaveCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { return &cobra.Command{ Use: "save [path] [ref]", Short: "save a chart directory", diff --git a/pkg/cli/cli.go b/pkg/cli/cli.go new file mode 100644 index 000000000..8c930c9d8 --- /dev/null +++ b/pkg/cli/cli.go @@ -0,0 +1,193 @@ +/* +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 cli + +import ( + "fmt" + "io" + "log" + "os" + "sync" + + "github.com/containerd/containerd/remotes/docker" + "github.com/spf13/cobra" + "k8s.io/cli-runtime/pkg/genericclioptions" + _ "k8s.io/client-go/plugin/pkg/client/auth" // initialize kubernetes client auth plugins + + "k8s.io/helm/pkg/action" + "k8s.io/helm/pkg/cli/environment" + "k8s.io/helm/pkg/cli/require" + "k8s.io/helm/pkg/kube" + "k8s.io/helm/pkg/registry" + "k8s.io/helm/pkg/storage" + "k8s.io/helm/pkg/storage/driver" +) + +const globalUsage = `The Kubernetes package manager + +To begin working with Helm, run the 'helm init' command: + + $ helm init + +This will set up any necessary local configuration. + +Common actions from this point include: + +- helm search: search for charts +- helm fetch: download a chart to your local directory to view +- helm install: upload the chart to Kubernetes +- helm list: list releases of charts + +Environment: + $HELM_HOME set an alternative location for Helm files. By default, these are stored in ~/.helm + $HELM_DRIVER set the backend storage driver. Values are: configmap, secret, memory + $HELM_NO_PLUGINS disable plugins. Set HELM_NO_PLUGINS=1 to disable plugins. + $KUBECONFIG set an alternative Kubernetes configuration file (default "~/.kube/config") +` + +var ( + settings environment.Settings + config genericclioptions.RESTClientGetter + configOnce sync.Once +) + +func New(actionConfig *action.Configuration, out io.Writer, args []string) *cobra.Command { + cmd := &cobra.Command{ + Use: "helm", + Short: "The Helm package manager for Kubernetes.", + Long: globalUsage, + SilenceUsage: true, + Args: require.NoArgs, + } + flags := cmd.PersistentFlags() + + settings.AddFlags(flags) + + flags.Parse(args) + + // set defaults from environment + settings.Init(flags) + + // Add the registry client based on settings + // TODO: Move this elsewhere (first, settings.Init() must move) + actionConfig.RegistryClient = registry.NewClient(®istry.ClientOptions{ + Out: out, + Resolver: registry.Resolver{ + Resolver: docker.NewResolver(docker.ResolverOptions{}), + }, + CacheRootDir: settings.Home.Registry(), + }) + + cmd.AddCommand( + // chart commands + NewCreateCmd(out), + NewDependencyCmd(out), + NewPullCmd(out), + NewShowCmd(out), + NewLintCmd(out), + NewPackageCmd(out), + NewRepoCmd(out), + NewSearchCmd(out), + NewVerifyCmd(out), + NewChartCmd(actionConfig, out), + + // release commands + NewGetCmd(actionConfig, out), + NewHistoryCmd(actionConfig, out), + NewInstallCmd(actionConfig, out), + NewListCmd(actionConfig, out), + NewReleaseTestCmd(actionConfig, out), + NewRollbackCmd(actionConfig, out), + NewStatusCmd(actionConfig, out), + NewUninstallCmd(actionConfig, out), + NewUpgradeCmd(actionConfig, out), + + NewCompletionCmd(out), + NewHomeCmd(out), + NewInitCmd(out), + NewPluginCmd(out), + NewTemplateCmd(out), + NewVersionCmd(out), + + // Hidden documentation generator command: 'helm docs' + NewDocsCmd(out), + ) + + // Find and add plugins + loadPlugins(cmd, out) + + return cmd +} + +func logf(format string, v ...interface{}) { + if settings.Debug { + format = fmt.Sprintf("[debug] %s\n", format) + log.Output(2, fmt.Sprintf(format, v...)) + } +} + +func NewActionConfig(allNamespaces bool) *action.Configuration { + kc := kube.New(kubeConfig()) + kc.Log = logf + + clientset, err := kc.KubernetesClientSet() + if err != nil { + // TODO return error + log.Fatal(err) + } + var namespace string + if !allNamespaces { + namespace = getNamespace() + } + + var store *storage.Storage + switch os.Getenv("HELM_DRIVER") { + case "secret", "secrets", "": + d := driver.NewSecrets(clientset.CoreV1().Secrets(namespace)) + d.Log = logf + store = storage.Init(d) + case "configmap", "configmaps": + d := driver.NewConfigMaps(clientset.CoreV1().ConfigMaps(namespace)) + d.Log = logf + store = storage.Init(d) + case "memory": + d := driver.NewMemory() + store = storage.Init(d) + default: + // Not sure what to do here. + panic("Unknown driver in HELM_DRIVER: " + os.Getenv("HELM_DRIVER")) + } + + return &action.Configuration{ + KubeClient: kc, + Releases: store, + Discovery: clientset.Discovery(), + } +} + +func kubeConfig() genericclioptions.RESTClientGetter { + configOnce.Do(func() { + config = kube.GetConfig(settings.KubeConfig, settings.KubeContext, settings.Namespace) + }) + return config +} + +func getNamespace() string { + if ns, _, err := kubeConfig().ToRawKubeConfigLoader().Namespace(); err == nil { + return ns + } + return "default" +} diff --git a/cmd/helm/completion.go b/pkg/cli/completion.go similarity index 98% rename from cmd/helm/completion.go rename to pkg/cli/completion.go index 310b48fd9..b70707f46 100644 --- a/cmd/helm/completion.go +++ b/pkg/cli/completion.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "bytes" @@ -42,7 +42,7 @@ var ( } ) -func newCompletionCmd(out io.Writer) *cobra.Command { +func NewCompletionCmd(out io.Writer) *cobra.Command { shells := []string{} for s := range completionShells { shells = append(shells, s) diff --git a/cmd/helm/create.go b/pkg/cli/create.go similarity index 96% rename from cmd/helm/create.go rename to pkg/cli/create.go index 2e4ddebc5..c2533095e 100644 --- a/cmd/helm/create.go +++ b/pkg/cli/create.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "fmt" @@ -23,9 +23,9 @@ import ( "github.com/spf13/cobra" - "k8s.io/helm/cmd/helm/require" "k8s.io/helm/pkg/chart" "k8s.io/helm/pkg/chartutil" + "k8s.io/helm/pkg/cli/require" ) const createDesc = ` @@ -53,7 +53,7 @@ type createOptions struct { name string } -func newCreateCmd(out io.Writer) *cobra.Command { +func NewCreateCmd(out io.Writer) *cobra.Command { o := &createOptions{} cmd := &cobra.Command{ diff --git a/cmd/helm/create_test.go b/pkg/cli/create_test.go similarity index 99% rename from cmd/helm/create_test.go rename to pkg/cli/create_test.go index a97f34efd..9c199a673 100644 --- a/cmd/helm/create_test.go +++ b/pkg/cli/create_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "fmt" diff --git a/cmd/helm/dependency.go b/pkg/cli/dependency.go similarity index 91% rename from cmd/helm/dependency.go rename to pkg/cli/dependency.go index e497158aa..36ab04d0c 100644 --- a/cmd/helm/dependency.go +++ b/pkg/cli/dependency.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "io" @@ -21,8 +21,8 @@ import ( "github.com/spf13/cobra" - "k8s.io/helm/cmd/helm/require" "k8s.io/helm/pkg/action" + "k8s.io/helm/pkg/cli/require" ) const dependencyDesc = ` @@ -82,7 +82,7 @@ the contents of a chart. This will produce an error if the chart cannot be loaded. ` -func newDependencyCmd(out io.Writer) *cobra.Command { +func NewDependencyCmd(out io.Writer) *cobra.Command { cmd := &cobra.Command{ Use: "dependency update|build|list", Aliases: []string{"dep", "dependencies"}, @@ -91,14 +91,14 @@ func newDependencyCmd(out io.Writer) *cobra.Command { Args: require.NoArgs, } - cmd.AddCommand(newDependencyListCmd(out)) - cmd.AddCommand(newDependencyUpdateCmd(out)) - cmd.AddCommand(newDependencyBuildCmd(out)) + cmd.AddCommand(NewDependencyListCmd(out)) + cmd.AddCommand(NewDependencyUpdateCmd(out)) + cmd.AddCommand(NewDependencyBuildCmd(out)) return cmd } -func newDependencyListCmd(out io.Writer) *cobra.Command { +func NewDependencyListCmd(out io.Writer) *cobra.Command { client := action.NewDependency() cmd := &cobra.Command{ diff --git a/cmd/helm/dependency_build.go b/pkg/cli/dependency_build.go similarity index 95% rename from cmd/helm/dependency_build.go rename to pkg/cli/dependency_build.go index 2b05b355e..93cfd67c3 100644 --- a/cmd/helm/dependency_build.go +++ b/pkg/cli/dependency_build.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "io" @@ -23,8 +23,8 @@ import ( "github.com/spf13/cobra" "k8s.io/client-go/util/homedir" - "k8s.io/helm/cmd/helm/require" "k8s.io/helm/pkg/action" + "k8s.io/helm/pkg/cli/require" "k8s.io/helm/pkg/downloader" "k8s.io/helm/pkg/getter" ) @@ -40,7 +40,7 @@ If no lock file is found, 'helm dependency build' will mirror the behavior of 'helm dependency update'. ` -func newDependencyBuildCmd(out io.Writer) *cobra.Command { +func NewDependencyBuildCmd(out io.Writer) *cobra.Command { client := action.NewDependency() cmd := &cobra.Command{ diff --git a/cmd/helm/dependency_build_test.go b/pkg/cli/dependency_build_test.go similarity index 96% rename from cmd/helm/dependency_build_test.go rename to pkg/cli/dependency_build_test.go index 67dc0db91..296218d6b 100644 --- a/cmd/helm/dependency_build_test.go +++ b/pkg/cli/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 cli import ( "fmt" @@ -34,7 +34,7 @@ func TestDependencyBuildCmd(t *testing.T) { srv := repotest.NewServer(hh.String()) defer srv.Stop() - if _, err := srv.CopyCharts("testdata/testcharts/*.tgz"); err != nil { + if _, err := srv.CopyCharts("../../testdata/testcharts/*.tgz"); err != nil { t.Fatal(err) } diff --git a/cmd/helm/dependency_test.go b/pkg/cli/dependency_test.go similarity index 86% rename from cmd/helm/dependency_test.go rename to pkg/cli/dependency_test.go index 80b357a77..c6ee9fffd 100644 --- a/cmd/helm/dependency_test.go +++ b/pkg/cli/dependency_test.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "runtime" @@ -30,7 +30,7 @@ func TestDependencyListCmd(t *testing.T) { noDependencies := cmdTestCase{ name: "No dependencies", - cmd: "dependency list testdata/testcharts/alpine", + cmd: "dependency list ../../testdata/testcharts/alpine", golden: "output/dependency-list-no-requirements-linux.txt", } @@ -42,11 +42,11 @@ func TestDependencyListCmd(t *testing.T) { tests := []cmdTestCase{noSuchChart, noDependencies, { name: "Dependencies in chart dir", - cmd: "dependency list testdata/testcharts/reqtest", + cmd: "dependency list ../../testdata/testcharts/reqtest", golden: "output/dependency-list.txt", }, { name: "Dependencies in chart archive", - cmd: "dependency list testdata/testcharts/reqtest-0.1.0.tgz", + cmd: "dependency list ../../testdata/testcharts/reqtest-0.1.0.tgz", golden: "output/dependency-list-archive.txt", }} runTestCmd(t, tests) diff --git a/cmd/helm/dependency_update.go b/pkg/cli/dependency_update.go similarity index 95% rename from cmd/helm/dependency_update.go rename to pkg/cli/dependency_update.go index bad61e709..7ba43415c 100644 --- a/cmd/helm/dependency_update.go +++ b/pkg/cli/dependency_update.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "io" @@ -21,8 +21,8 @@ import ( "github.com/spf13/cobra" - "k8s.io/helm/cmd/helm/require" "k8s.io/helm/pkg/action" + "k8s.io/helm/pkg/cli/require" "k8s.io/helm/pkg/downloader" "k8s.io/helm/pkg/getter" ) @@ -43,7 +43,7 @@ in the Chart.yaml file, but (b) at the wrong version. ` // newDependencyUpdateCmd creates a new dependency update command. -func newDependencyUpdateCmd(out io.Writer) *cobra.Command { +func NewDependencyUpdateCmd(out io.Writer) *cobra.Command { client := action.NewDependency() cmd := &cobra.Command{ diff --git a/cmd/helm/dependency_update_test.go b/pkg/cli/dependency_update_test.go similarity index 96% rename from cmd/helm/dependency_update_test.go rename to pkg/cli/dependency_update_test.go index 1cbe5979b..591279f6f 100644 --- a/cmd/helm/dependency_update_test.go +++ b/pkg/cli/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 cli import ( "fmt" @@ -38,7 +38,7 @@ func TestDependencyUpdateCmd(t *testing.T) { srv := repotest.NewServer(hh.String()) defer srv.Stop() - copied, err := srv.CopyCharts("testdata/testcharts/*.tgz") + copied, err := srv.CopyCharts("../../testdata/testcharts/*.tgz") if err != nil { t.Fatal(err) } @@ -120,7 +120,7 @@ func TestDependencyUpdateCmd_SkipRefresh(t *testing.T) { srv := repotest.NewServer(hh.String()) defer srv.Stop() - copied, err := srv.CopyCharts("testdata/testcharts/*.tgz") + copied, err := srv.CopyCharts("../../testdata/testcharts/*.tgz") if err != nil { t.Fatal(err) } @@ -151,7 +151,7 @@ func TestDependencyUpdateCmd_DontDeleteOldChartsOnError(t *testing.T) { srv := repotest.NewServer(hh.String()) defer srv.Stop() - copied, err := srv.CopyCharts("testdata/testcharts/*.tgz") + copied, err := srv.CopyCharts("../../testdata/testcharts/*.tgz") if err != nil { t.Fatal(err) } diff --git a/cmd/helm/docs.go b/pkg/cli/docs.go similarity index 95% rename from cmd/helm/docs.go rename to pkg/cli/docs.go index fb219d490..c76750d0c 100644 --- a/cmd/helm/docs.go +++ b/pkg/cli/docs.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "io" @@ -23,7 +23,7 @@ import ( "github.com/spf13/cobra" "github.com/spf13/cobra/doc" - "k8s.io/helm/cmd/helm/require" + "k8s.io/helm/pkg/cli/require" ) const docsDesc = ` @@ -45,7 +45,7 @@ type docsOptions struct { topCmd *cobra.Command } -func newDocsCmd(out io.Writer) *cobra.Command { +func NewDocsCmd(out io.Writer) *cobra.Command { o := &docsOptions{} cmd := &cobra.Command{ diff --git a/pkg/cli/environment.go b/pkg/cli/environment/environment.go similarity index 91% rename from pkg/cli/environment.go rename to pkg/cli/environment/environment.go index a3f65643c..a015d2c4a 100644 --- a/pkg/cli/environment.go +++ b/pkg/cli/environment/environment.go @@ -20,7 +20,7 @@ Helm's environment encapsulates all of the service dependencies Helm has. These dependencies are expressed as interfaces so that alternate implementations (mocks, etc.) can be easily generated. */ -package cli +package environment import ( "os" @@ -35,8 +35,8 @@ import ( // defaultHelmHome is the default HELM_HOME. var defaultHelmHome = filepath.Join(homedir.HomeDir(), ".helm") -// EnvSettings describes all of the environment settings. -type EnvSettings struct { +// Settings describes all of the environment settings. +type Settings struct { // Home is the local path to the Helm home directory. Home helmpath.Home // Namespace is the namespace scope. @@ -50,7 +50,7 @@ type EnvSettings struct { } // AddFlags binds flags to the given flagset. -func (s *EnvSettings) AddFlags(fs *pflag.FlagSet) { +func (s *Settings) AddFlags(fs *pflag.FlagSet) { fs.StringVar((*string)(&s.Home), "home", defaultHelmHome, "location of your Helm config. Overrides $HELM_HOME") fs.StringVarP(&s.Namespace, "namespace", "n", "", "namespace scope for this request") fs.StringVar(&s.KubeConfig, "kubeconfig", "", "path to the kubeconfig file") @@ -59,14 +59,14 @@ func (s *EnvSettings) AddFlags(fs *pflag.FlagSet) { } // Init sets values from the environment. -func (s *EnvSettings) Init(fs *pflag.FlagSet) { +func (s *Settings) Init(fs *pflag.FlagSet) { for name, envar := range envMap { setFlagFromEnv(name, envar, fs) } } // PluginDirs is the path to the plugin directories. -func (s EnvSettings) PluginDirs() string { +func (s Settings) PluginDirs() string { if d, ok := os.LookupEnv("HELM_PLUGIN"); ok { return d } diff --git a/pkg/cli/environment_test.go b/pkg/cli/environment/environment_test.go similarity index 97% rename from pkg/cli/environment_test.go rename to pkg/cli/environment/environment_test.go index e5411406f..5f9b9df12 100644 --- a/pkg/cli/environment_test.go +++ b/pkg/cli/environment/environment_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package cli +package environment import ( "os" @@ -26,7 +26,7 @@ import ( "k8s.io/helm/pkg/helmpath" ) -func TestEnvSettings(t *testing.T) { +func TestSettings(t *testing.T) { tests := []struct { name string @@ -81,7 +81,7 @@ func TestEnvSettings(t *testing.T) { flags := pflag.NewFlagSet("testing", pflag.ContinueOnError) - settings := &EnvSettings{} + settings := &Settings{} settings.AddFlags(flags) flags.Parse(strings.Split(tt.args, " ")) diff --git a/cmd/helm/get.go b/pkg/cli/get.go similarity index 86% rename from cmd/helm/get.go rename to pkg/cli/get.go index e6e853305..0709ef4f1 100644 --- a/cmd/helm/get.go +++ b/pkg/cli/get.go @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "io" "github.com/spf13/cobra" - "k8s.io/helm/cmd/helm/require" "k8s.io/helm/pkg/action" + "k8s.io/helm/pkg/cli/require" ) var getHelp = ` @@ -38,7 +38,7 @@ By default, this prints a human readable collection of information about the chart, the supplied values, and the generated manifest file. ` -func newGetCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { +func NewGetCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { client := action.NewGet(cfg) cmd := &cobra.Command{ @@ -57,9 +57,9 @@ func newGetCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { cmd.Flags().IntVar(&client.Version, "revision", 0, "get the named release with revision") - cmd.AddCommand(newGetValuesCmd(cfg, out)) - cmd.AddCommand(newGetManifestCmd(cfg, out)) - cmd.AddCommand(newGetHooksCmd(cfg, out)) + cmd.AddCommand(NewGetValuesCmd(cfg, out)) + cmd.AddCommand(NewGetManifestCmd(cfg, out)) + cmd.AddCommand(NewGetHooksCmd(cfg, out)) return cmd } diff --git a/cmd/helm/get_hooks.go b/pkg/cli/get_hooks.go similarity index 92% rename from cmd/helm/get_hooks.go rename to pkg/cli/get_hooks.go index 6ac8aed6a..077470d79 100644 --- a/cmd/helm/get_hooks.go +++ b/pkg/cli/get_hooks.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "fmt" @@ -22,8 +22,8 @@ import ( "github.com/spf13/cobra" - "k8s.io/helm/cmd/helm/require" "k8s.io/helm/pkg/action" + "k8s.io/helm/pkg/cli/require" ) const getHooksHelp = ` @@ -32,7 +32,7 @@ This command downloads hooks for a given release. Hooks are formatted in YAML and separated by the YAML '---\n' separator. ` -func newGetHooksCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { +func NewGetHooksCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { client := action.NewGet(cfg) cmd := &cobra.Command{ diff --git a/cmd/helm/get_hooks_test.go b/pkg/cli/get_hooks_test.go similarity index 98% rename from cmd/helm/get_hooks_test.go rename to pkg/cli/get_hooks_test.go index 6b58ee3f1..9ed9d5535 100644 --- a/cmd/helm/get_hooks_test.go +++ b/pkg/cli/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 cli import ( "testing" diff --git a/cmd/helm/get_manifest.go b/pkg/cli/get_manifest.go similarity index 93% rename from cmd/helm/get_manifest.go rename to pkg/cli/get_manifest.go index 8a76c7f2e..752f5d197 100644 --- a/cmd/helm/get_manifest.go +++ b/pkg/cli/get_manifest.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "fmt" @@ -22,8 +22,8 @@ import ( "github.com/spf13/cobra" - "k8s.io/helm/cmd/helm/require" "k8s.io/helm/pkg/action" + "k8s.io/helm/pkg/cli/require" ) var getManifestHelp = ` @@ -34,7 +34,7 @@ were generated from this release's chart(s). If a chart is dependent on other charts, those resources will also be included in the manifest. ` -func newGetManifestCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { +func NewGetManifestCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { client := action.NewGet(cfg) cmd := &cobra.Command{ diff --git a/cmd/helm/get_manifest_test.go b/pkg/cli/get_manifest_test.go similarity index 98% rename from cmd/helm/get_manifest_test.go rename to pkg/cli/get_manifest_test.go index 28a0ec1f0..6f23a4b02 100644 --- a/cmd/helm/get_manifest_test.go +++ b/pkg/cli/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 cli import ( "testing" diff --git a/cmd/helm/get_test.go b/pkg/cli/get_test.go similarity index 98% rename from cmd/helm/get_test.go rename to pkg/cli/get_test.go index 0cecd6802..e6622bbe4 100644 --- a/cmd/helm/get_test.go +++ b/pkg/cli/get_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "testing" diff --git a/cmd/helm/get_values.go b/pkg/cli/get_values.go similarity index 92% rename from cmd/helm/get_values.go rename to pkg/cli/get_values.go index f29f6c865..66d2f8fa8 100644 --- a/cmd/helm/get_values.go +++ b/pkg/cli/get_values.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "fmt" @@ -22,15 +22,15 @@ import ( "github.com/spf13/cobra" - "k8s.io/helm/cmd/helm/require" "k8s.io/helm/pkg/action" + "k8s.io/helm/pkg/cli/require" ) var getValuesHelp = ` This command downloads a values file for a given release. ` -func newGetValuesCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { +func NewGetValuesCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { client := action.NewGetValues(cfg) cmd := &cobra.Command{ diff --git a/cmd/helm/get_values_test.go b/pkg/cli/get_values_test.go similarity index 98% rename from cmd/helm/get_values_test.go rename to pkg/cli/get_values_test.go index 56b247032..1fdfab6c1 100644 --- a/cmd/helm/get_values_test.go +++ b/pkg/cli/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 cli import ( "testing" diff --git a/cmd/helm/helm_test.go b/pkg/cli/helm_test.go similarity index 98% rename from cmd/helm/helm_test.go rename to pkg/cli/helm_test.go index f5b39cbb6..eea9649f2 100644 --- a/cmd/helm/helm_test.go +++ b/pkg/cli/helm_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "bytes" @@ -121,7 +121,7 @@ func executeActionCommandC(store *storage.Storage, cmd string) (*cobra.Command, Log: func(format string, v ...interface{}) {}, } - root := newRootCmd(actionConfig, buf, args) + root := New(actionConfig, buf, args) root.SetOutput(buf) root.SetArgs(args) diff --git a/cmd/helm/history.go b/pkg/cli/history.go similarity index 95% rename from cmd/helm/history.go rename to pkg/cli/history.go index b16f6c8d0..57310b474 100644 --- a/cmd/helm/history.go +++ b/pkg/cli/history.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "fmt" @@ -22,8 +22,8 @@ import ( "github.com/spf13/cobra" - "k8s.io/helm/cmd/helm/require" "k8s.io/helm/pkg/action" + "k8s.io/helm/pkg/cli/require" ) var historyHelp = ` @@ -42,7 +42,7 @@ The historical release set is printed as a formatted table, e.g: 4 Mon Oct 3 10:15:13 2016 deployed alpine-0.1.0 Upgraded successfully ` -func newHistoryCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { +func NewHistoryCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { client := action.NewHistory(cfg) cmd := &cobra.Command{ diff --git a/cmd/helm/history_test.go b/pkg/cli/history_test.go similarity index 99% rename from cmd/helm/history_test.go rename to pkg/cli/history_test.go index b04b8109f..cbbc541ee 100644 --- a/cmd/helm/history_test.go +++ b/pkg/cli/history_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "testing" diff --git a/cmd/helm/home.go b/pkg/cli/home.go similarity index 93% rename from cmd/helm/home.go rename to pkg/cli/home.go index 24d0a40a2..92ebf2997 100644 --- a/cmd/helm/home.go +++ b/pkg/cli/home.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "fmt" @@ -22,7 +22,7 @@ import ( "github.com/spf13/cobra" - "k8s.io/helm/cmd/helm/require" + "k8s.io/helm/pkg/cli/require" ) var longHomeHelp = ` @@ -30,7 +30,7 @@ This command displays the location of HELM_HOME. This is where any helm configuration files live. ` -func newHomeCmd(out io.Writer) *cobra.Command { +func NewHomeCmd(out io.Writer) *cobra.Command { cmd := &cobra.Command{ Use: "home", Short: "displays the location of HELM_HOME", diff --git a/cmd/helm/init.go b/pkg/cli/init.go similarity index 95% rename from cmd/helm/init.go rename to pkg/cli/init.go index 57f562b74..99be365a4 100644 --- a/cmd/helm/init.go +++ b/pkg/cli/init.go @@ -14,20 +14,21 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "fmt" "io" "io/ioutil" "os" + "path/filepath" "github.com/Masterminds/semver" "github.com/ghodss/yaml" "github.com/pkg/errors" "github.com/spf13/cobra" - "k8s.io/helm/cmd/helm/require" + "k8s.io/helm/pkg/cli/require" "k8s.io/helm/pkg/getter" "k8s.io/helm/pkg/helmpath" "k8s.io/helm/pkg/plugin" @@ -61,7 +62,7 @@ type pluginsFile struct { Plugins []*pluginsFileEntry `json:"plugins"` } -func newInitCmd(out io.Writer) *cobra.Command { +func NewInitCmd(out io.Writer) *cobra.Command { o := &initOptions{} cmd := &cobra.Command{ @@ -206,7 +207,8 @@ func ensurePluginsInstalled(pluginsFilename string, out io.Writer) error { } func ensurePluginInstalled(requiredPlugin *pluginsFileEntry, pluginsFilename string, out io.Writer) error { - i, err := installer.NewForSource(requiredPlugin.URL, requiredPlugin.Version, settings.Home) + fmt.Println(filepath.Join(filepath.Dir(pluginsFilename), requiredPlugin.URL)) + i, err := installer.NewForSource(filepath.Join(filepath.Dir(pluginsFilename), requiredPlugin.URL), requiredPlugin.Version, settings.Home) if err != nil { return err } diff --git a/cmd/helm/init_test.go b/pkg/cli/init_test.go similarity index 96% rename from cmd/helm/init_test.go rename to pkg/cli/init_test.go index 964846c4f..0704277ae 100644 --- a/cmd/helm/init_test.go +++ b/pkg/cli/init_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "bytes" @@ -24,7 +24,7 @@ import ( "k8s.io/helm/pkg/helmpath" ) -const testPluginsFile = "testdata/plugins.yaml" +const testPluginsFile = "../../testdata/plugins.yaml" func TestEnsureHome(t *testing.T) { hh := helmpath.Home(testTempDir(t)) diff --git a/cmd/helm/install.go b/pkg/cli/install.go similarity index 98% rename from cmd/helm/install.go rename to pkg/cli/install.go index de20f0f68..25136f487 100644 --- a/cmd/helm/install.go +++ b/pkg/cli/install.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "io" @@ -24,10 +24,10 @@ import ( "github.com/spf13/cobra" "github.com/spf13/pflag" - "k8s.io/helm/cmd/helm/require" "k8s.io/helm/pkg/action" "k8s.io/helm/pkg/chart/loader" "k8s.io/helm/pkg/chartutil" + "k8s.io/helm/pkg/cli/require" "k8s.io/helm/pkg/downloader" "k8s.io/helm/pkg/getter" ) @@ -94,7 +94,7 @@ To see the list of chart repositories, use 'helm repo list'. To search for charts in a repository, use 'helm search'. ` -func newInstallCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { +func NewInstallCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { client := action.NewInstall(cfg) cmd := &cobra.Command{ diff --git a/cmd/helm/install_test.go b/pkg/cli/install_test.go similarity index 64% rename from cmd/helm/install_test.go rename to pkg/cli/install_test.go index 38464b585..149822037 100644 --- a/cmd/helm/install_test.go +++ b/pkg/cli/install_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "testing" @@ -25,38 +25,38 @@ func TestInstall(t *testing.T) { // Install, base case { name: "basic install", - cmd: "install aeneas testdata/testcharts/empty", + cmd: "install aeneas ../../testdata/testcharts/empty", golden: "output/install.txt", }, // Install, values from cli { name: "install with values", - cmd: "install virgil testdata/testcharts/alpine --set test.Name=bar", + cmd: "install virgil ../../testdata/testcharts/alpine --set test.Name=bar", golden: "output/install-with-values.txt", }, // Install, values from cli via multiple --set { name: "install with multiple values", - cmd: "install virgil testdata/testcharts/alpine --set test.Color=yellow --set test.Name=banana", + cmd: "install virgil ../../testdata/testcharts/alpine --set test.Color=yellow --set test.Name=banana", golden: "output/install-with-multiple-values.txt", }, // Install, values from yaml { name: "install with values file", - cmd: "install virgil testdata/testcharts/alpine -f testdata/testcharts/alpine/extra_values.yaml", + cmd: "install virgil ../../testdata/testcharts/alpine -f ../../testdata/testcharts/alpine/extra_values.yaml", golden: "output/install-with-values-file.txt", }, // Install, no hooks { name: "install without hooks", - cmd: "install aeneas testdata/testcharts/alpine --no-hooks --set test.Name=hello", + cmd: "install aeneas ../../testdata/testcharts/alpine --no-hooks --set test.Name=hello", golden: "output/install-no-hooks.txt", }, // Install, values from multiple yaml { name: "install with values", - cmd: "install virgil testdata/testcharts/alpine -f testdata/testcharts/alpine/extra_values.yaml -f testdata/testcharts/alpine/more_values.yaml", + cmd: "install virgil ../../testdata/testcharts/alpine -f ../../testdata/testcharts/alpine/extra_values.yaml -f ../../testdata/testcharts/alpine/more_values.yaml", golden: "output/install-with-multiple-values-files.txt", }, // Install, no charts @@ -69,70 +69,70 @@ func TestInstall(t *testing.T) { // Install, re-use name { name: "install and replace release", - cmd: "install aeneas testdata/testcharts/empty --replace", + cmd: "install aeneas ../../testdata/testcharts/empty --replace", golden: "output/install-and-replace.txt", }, // Install, with timeout { name: "install with a timeout", - cmd: "install foobar testdata/testcharts/empty --timeout 120", + cmd: "install foobar ../../testdata/testcharts/empty --timeout 120", golden: "output/install-with-timeout.txt", }, // Install, with wait { name: "install with a wait", - cmd: "install apollo testdata/testcharts/empty --wait", + cmd: "install apollo ../../testdata/testcharts/empty --wait", golden: "output/install-with-wait.txt", }, // Install, using the name-template { name: "install with name-template", - cmd: "install testdata/testcharts/empty --name-template '{{upper \"foobar\"}}'", + cmd: "install ../../testdata/testcharts/empty --name-template '{{upper \"foobar\"}}'", golden: "output/install-name-template.txt", }, // Install, perform chart verification along the way. { name: "install with verification, missing provenance", - cmd: "install bogus testdata/testcharts/compressedchart-0.1.0.tgz --verify --keyring testdata/helm-test-key.pub", + cmd: "install bogus ../../testdata/testcharts/compressedchart-0.1.0.tgz --verify --keyring ../../testdata/helm-test-key.pub", wantError: true, }, { name: "install with verification, directory instead of file", - cmd: "install bogus testdata/testcharts/signtest --verify --keyring testdata/helm-test-key.pub", + cmd: "install bogus ../../testdata/testcharts/signtest --verify --keyring ../../testdata/helm-test-key.pub", wantError: true, }, { name: "install with verification, valid", - cmd: "install signtest testdata/testcharts/signtest-0.1.0.tgz --verify --keyring testdata/helm-test-key.pub", + cmd: "install signtest ../../testdata/testcharts/signtest-0.1.0.tgz --verify --keyring ../../testdata/helm-test-key.pub", }, // Install, chart with missing dependencies in /charts { name: "install chart with missing dependencies", - cmd: "install nodeps testdata/testcharts/chart-missing-deps", + cmd: "install nodeps ../../testdata/testcharts/chart-missing-deps", wantError: true, }, // Install, chart with bad dependencies in Chart.yaml in /charts { name: "install chart with bad dependencies in Chart.yaml", - cmd: "install badreq testdata/testcharts/chart-bad-requirements", + cmd: "install badreq ../../testdata/testcharts/chart-bad-requirements", wantError: true, }, // Install, chart with library chart dependency { name: "install chart with library chart dependency", - cmd: "install withlibchartp testdata/testcharts/chart-with-lib-dep", + cmd: "install withlibchartp ../../testdata/testcharts/chart-with-lib-dep", }, // Install, library chart { name: "install library chart", - cmd: "install libchart testdata/testcharts/lib-chart", + cmd: "install libchart ../../testdata/testcharts/lib-chart", wantError: true, golden: "output/template-lib-chart.txt", }, // Install, chart with bad type { name: "install chart with bad type", - cmd: "install badtype testdata/testcharts/chart-bad-type", + cmd: "install badtype ../../testdata/testcharts/chart-bad-type", wantError: true, golden: "output/install-chart-bad-type.txt", }, diff --git a/cmd/helm/lint.go b/pkg/cli/lint.go similarity index 97% rename from cmd/helm/lint.go rename to pkg/cli/lint.go index eb6c7402a..13b7ee09d 100644 --- a/cmd/helm/lint.go +++ b/pkg/cli/lint.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "fmt" @@ -36,7 +36,7 @@ it will emit [ERROR] messages. If it encounters issues that break with conventio or recommendation, it will emit [WARNING] messages. ` -func newLintCmd(out io.Writer) *cobra.Command { +func NewLintCmd(out io.Writer) *cobra.Command { client := action.NewLint() cmd := &cobra.Command{ diff --git a/cmd/helm/list.go b/pkg/cli/list.go similarity index 95% rename from cmd/helm/list.go rename to pkg/cli/list.go index 2c3a89cfb..879f81358 100644 --- a/cmd/helm/list.go +++ b/pkg/cli/list.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "fmt" @@ -22,8 +22,8 @@ import ( "github.com/spf13/cobra" - "k8s.io/helm/cmd/helm/require" "k8s.io/helm/pkg/action" + "k8s.io/helm/pkg/cli/require" ) var listHelp = ` @@ -53,7 +53,7 @@ server's default, which may be much higher than 256. Pairing the '--max' flag with the '--offset' flag allows you to page through results. ` -func newListCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { +func NewListCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { client := action.NewList(cfg) cmd := &cobra.Command{ @@ -64,7 +64,7 @@ func newListCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { Args: require.NoArgs, RunE: func(cmd *cobra.Command, args []string) error { if client.AllNamespaces { - client.SetConfiguration(newActionConfig(true)) + client.SetConfiguration(NewActionConfig(true)) } client.All = client.Limit == -1 client.SetStateMask() diff --git a/cmd/helm/load_plugins.go b/pkg/cli/load_plugins.go similarity index 99% rename from cmd/helm/load_plugins.go rename to pkg/cli/load_plugins.go index 309fad3c1..62c5c21ee 100644 --- a/cmd/helm/load_plugins.go +++ b/pkg/cli/load_plugins.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "fmt" diff --git a/cmd/helm/package.go b/pkg/cli/package.go similarity index 98% rename from cmd/helm/package.go rename to pkg/cli/package.go index efd35b067..e302eedf7 100644 --- a/cmd/helm/package.go +++ b/pkg/cli/package.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "fmt" @@ -42,7 +42,7 @@ Chart.yaml file, and (if found) build the current directory into a chart. Versioned chart archives are used by Helm package repositories. ` -func newPackageCmd(out io.Writer) *cobra.Command { +func NewPackageCmd(out io.Writer) *cobra.Command { client := action.NewPackage() cmd := &cobra.Command{ diff --git a/cmd/helm/package_test.go b/pkg/cli/package_test.go similarity index 83% rename from cmd/helm/package_test.go rename to pkg/cli/package_test.go index d83b02c05..7c9331a9a 100644 --- a/cmd/helm/package_test.go +++ b/pkg/cli/package_test.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "bytes" @@ -61,74 +61,74 @@ func TestPackage(t *testing.T) { }, { name: "package --sign, no --key", - args: []string{"testdata/testcharts/alpine"}, + args: []string{"../../testdata/testcharts/alpine"}, flags: map[string]string{"sign": "1"}, expect: "key is required for signing a package", err: true, }, { name: "package --sign, no --keyring", - args: []string{"testdata/testcharts/alpine"}, + args: []string{"../../testdata/testcharts/alpine"}, flags: map[string]string{"sign": "1", "key": "nosuchkey", "keyring": ""}, expect: "keyring is required for signing a package", err: true, }, { - name: "package testdata/testcharts/alpine, no save", - args: []string{"testdata/testcharts/alpine"}, + name: "package ../../testdata/testcharts/alpine, no save", + args: []string{"../../testdata/testcharts/alpine"}, flags: map[string]string{"save": "0"}, expect: "", hasfile: "alpine-0.1.0.tgz", }, { - name: "package testdata/testcharts/alpine", - args: []string{"testdata/testcharts/alpine"}, + name: "package ../../testdata/testcharts/alpine", + args: []string{"../../testdata/testcharts/alpine"}, expect: "", hasfile: "alpine-0.1.0.tgz", }, { - name: "package testdata/testcharts/issue1979", - args: []string{"testdata/testcharts/issue1979"}, + name: "package ../../testdata/testcharts/issue1979", + args: []string{"../../testdata/testcharts/issue1979"}, expect: "", hasfile: "alpine-0.1.0.tgz", }, { name: "package --destination toot", - args: []string{"testdata/testcharts/alpine"}, + args: []string{"../../testdata/testcharts/alpine"}, flags: map[string]string{"destination": "toot"}, expect: "", hasfile: "toot/alpine-0.1.0.tgz", }, { name: "package --destination does-not-exist", - args: []string{"testdata/testcharts/alpine"}, + args: []string{"../../testdata/testcharts/alpine"}, flags: map[string]string{"destination": "does-not-exist"}, expect: fmt.Sprintf("failed to save: %s does-not-exist: %s", statExe, statFileMsg), err: true, }, { - name: "package --sign --key=KEY --keyring=KEYRING testdata/testcharts/alpine", - args: []string{"testdata/testcharts/alpine"}, - flags: map[string]string{"sign": "1", "keyring": "testdata/helm-test-key.secret", "key": "helm-test"}, + name: "package --sign --key=KEY --keyring=KEYRING ../../testdata/testcharts/alpine", + args: []string{"../../testdata/testcharts/alpine"}, + flags: map[string]string{"sign": "1", "keyring": "../../testdata/helm-test-key.secret", "key": "helm-test"}, expect: "", hasfile: "alpine-0.1.0.tgz", }, { - name: "package testdata/testcharts/chart-missing-deps", - args: []string{"testdata/testcharts/chart-missing-deps"}, + name: "package ../../testdata/testcharts/chart-missing-deps", + args: []string{"../../testdata/testcharts/chart-missing-deps"}, hasfile: "chart-missing-deps-0.1.0.tgz", err: true, }, { name: "package --values does-not-exist", - args: []string{"testdata/testcharts/alpine"}, + args: []string{"../../testdata/testcharts/alpine"}, flags: map[string]string{"values": "does-not-exist"}, expect: fmt.Sprintf("does-not-exist: %s", statFileMsg), err: true, }, { - name: "package testdata/testcharts/chart-bad-type", - args: []string{"testdata/testcharts/chart-bad-type"}, + name: "package ../../testdata/testcharts/chart-bad-type", + args: []string{"../../testdata/testcharts/chart-bad-type"}, err: true, }, } @@ -152,7 +152,7 @@ func TestPackage(t *testing.T) { for _, tt := range tests { buf := bytes.NewBuffer(nil) - c := newPackageCmd(buf) + c := NewPackageCmd(buf) // This is an unfortunate byproduct of the tmpdir if v, ok := tt.flags["keyring"]; ok && len(v) > 0 { @@ -208,13 +208,13 @@ func TestSetAppVersion(t *testing.T) { hh := testHelmHome(t) settings.Home = hh - c := newPackageCmd(&bytes.Buffer{}) + c := NewPackageCmd(&bytes.Buffer{}) flags := map[string]string{ "destination": tmp, "app-version": expectedAppVersion, } setFlags(c, flags) - if err := c.RunE(c, []string{"testdata/testcharts/alpine"}); err != nil { + if err := c.RunE(c, []string{"../../testdata/testcharts/alpine"}); err != nil { t.Errorf("unexpected error %q", err) } @@ -245,25 +245,25 @@ func TestPackageValues(t *testing.T) { }{ { desc: "helm package, single values file", - args: []string{"testdata/testcharts/alpine"}, + args: []string{"../../testdata/testcharts/alpine"}, valuefilesContents: []string{"Name: chart-name-foo"}, expected: []string{"Name: chart-name-foo"}, }, { desc: "helm package, multiple values files", - args: []string{"testdata/testcharts/alpine"}, + args: []string{"../../testdata/testcharts/alpine"}, valuefilesContents: []string{"Name: chart-name-foo", "foo: bar"}, expected: []string{"Name: chart-name-foo", "foo: bar"}, }, { desc: "helm package, with set option", - args: []string{"testdata/testcharts/alpine"}, + args: []string{"../../testdata/testcharts/alpine"}, flags: map[string]string{"set": "Name=chart-name-foo"}, expected: []string{"Name: chart-name-foo"}, }, { desc: "helm package, set takes precedence over value file", - args: []string{"testdata/testcharts/alpine"}, + args: []string{"../../testdata/testcharts/alpine"}, valuefilesContents: []string{"Name: chart-name-foo"}, flags: map[string]string{"set": "Name=chart-name-bar"}, expected: []string{"Name: chart-name-bar"}, @@ -303,7 +303,7 @@ func runAndVerifyPackageCommandValues(t *testing.T, args []string, flags map[str flags["values"] = valueFiles } - cmd := newPackageCmd(&bytes.Buffer{}) + cmd := NewPackageCmd(&bytes.Buffer{}) setFlags(cmd, flags) if err := cmd.RunE(cmd, args); err != nil { t.Errorf("unexpected error: %q", err) diff --git a/cmd/helm/plugin.go b/pkg/cli/plugin.go similarity index 90% rename from cmd/helm/plugin.go rename to pkg/cli/plugin.go index e5f8d1f11..9ea56733e 100644 --- a/cmd/helm/plugin.go +++ b/pkg/cli/plugin.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "io" @@ -30,17 +30,17 @@ const pluginHelp = ` Manage client-side Helm plugins. ` -func newPluginCmd(out io.Writer) *cobra.Command { +func NewPluginCmd(out io.Writer) *cobra.Command { cmd := &cobra.Command{ Use: "plugin", Short: "add, list, or remove Helm plugins", Long: pluginHelp, } cmd.AddCommand( - newPluginInstallCmd(out), - newPluginListCmd(out), - newPluginRemoveCmd(out), - newPluginUpdateCmd(out), + NewPluginInstallCmd(out), + NewPluginListCmd(out), + NewPluginRemoveCmd(out), + NewPluginUpdateCmd(out), ) return cmd } diff --git a/cmd/helm/plugin_install.go b/pkg/cli/plugin_install.go similarity index 95% rename from cmd/helm/plugin_install.go rename to pkg/cli/plugin_install.go index ca054b618..c3f179c33 100644 --- a/cmd/helm/plugin_install.go +++ b/pkg/cli/plugin_install.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "fmt" @@ -21,7 +21,7 @@ import ( "github.com/spf13/cobra" - "k8s.io/helm/cmd/helm/require" + "k8s.io/helm/pkg/cli/require" "k8s.io/helm/pkg/helmpath" "k8s.io/helm/pkg/plugin" "k8s.io/helm/pkg/plugin/installer" @@ -40,7 +40,7 @@ Example usage: $ helm plugin install https://github.com/technosophos/helm-template ` -func newPluginInstallCmd(out io.Writer) *cobra.Command { +func NewPluginInstallCmd(out io.Writer) *cobra.Command { o := &pluginInstallOptions{} cmd := &cobra.Command{ Use: "install [options] ...", diff --git a/cmd/helm/plugin_list.go b/pkg/cli/plugin_list.go similarity index 95% rename from cmd/helm/plugin_list.go rename to pkg/cli/plugin_list.go index b9f7f545f..e5f330ff7 100644 --- a/cmd/helm/plugin_list.go +++ b/pkg/cli/plugin_list.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "fmt" @@ -29,7 +29,7 @@ type pluginListOptions struct { home helmpath.Home } -func newPluginListCmd(out io.Writer) *cobra.Command { +func NewPluginListCmd(out io.Writer) *cobra.Command { o := &pluginListOptions{} cmd := &cobra.Command{ Use: "list", diff --git a/cmd/helm/plugin_remove.go b/pkg/cli/plugin_remove.go similarity index 97% rename from cmd/helm/plugin_remove.go rename to pkg/cli/plugin_remove.go index 82e863bdc..496a0fbcc 100644 --- a/cmd/helm/plugin_remove.go +++ b/pkg/cli/plugin_remove.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "fmt" @@ -33,7 +33,7 @@ type pluginRemoveOptions struct { home helmpath.Home } -func newPluginRemoveCmd(out io.Writer) *cobra.Command { +func NewPluginRemoveCmd(out io.Writer) *cobra.Command { o := &pluginRemoveOptions{} cmd := &cobra.Command{ Use: "remove ...", diff --git a/cmd/helm/plugin_test.go b/pkg/cli/plugin_test.go similarity index 96% rename from cmd/helm/plugin_test.go rename to pkg/cli/plugin_test.go index dd4742449..8e5267bfa 100644 --- a/cmd/helm/plugin_test.go +++ b/pkg/cli/plugin_test.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "bytes" @@ -64,7 +64,7 @@ func TestManuallyProcessArgs(t *testing.T) { func TestLoadPlugins(t *testing.T) { defer resetEnv()() - settings.Home = "testdata/helmhome" + settings.Home = "../../testdata/helmhome" os.Setenv("HELM_HOME", settings.Home.String()) hh := settings.Home @@ -134,7 +134,7 @@ func TestLoadPlugins(t *testing.T) { func TestLoadPlugins_HelmNoPlugins(t *testing.T) { defer resetEnv()() - settings.Home = "testdata/helmhome" + settings.Home = "../../testdata/helmhome" os.Setenv("HELM_NO_PLUGINS", "1") @@ -151,7 +151,7 @@ func TestLoadPlugins_HelmNoPlugins(t *testing.T) { func TestSetupEnv(t *testing.T) { defer resetEnv()() name := "pequod" - settings.Home = helmpath.Home("testdata/helmhome") + settings.Home = helmpath.Home("../../testdata/helmhome") base := filepath.Join(settings.Home.Plugins(), name) settings.Debug = true defer func() { diff --git a/cmd/helm/plugin_update.go b/pkg/cli/plugin_update.go similarity index 97% rename from cmd/helm/plugin_update.go rename to pkg/cli/plugin_update.go index 13c9bff06..176fe88d8 100644 --- a/cmd/helm/plugin_update.go +++ b/pkg/cli/plugin_update.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "fmt" @@ -34,7 +34,7 @@ type pluginUpdateOptions struct { home helmpath.Home } -func newPluginUpdateCmd(out io.Writer) *cobra.Command { +func NewPluginUpdateCmd(out io.Writer) *cobra.Command { o := &pluginUpdateOptions{} cmd := &cobra.Command{ Use: "update ...", diff --git a/cmd/helm/printer.go b/pkg/cli/printer.go similarity index 99% rename from cmd/helm/printer.go rename to pkg/cli/printer.go index 8f7677930..345c9a7db 100644 --- a/cmd/helm/printer.go +++ b/pkg/cli/printer.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "io" diff --git a/cmd/helm/pull.go b/pkg/cli/pull.go similarity index 96% rename from cmd/helm/pull.go rename to pkg/cli/pull.go index cd1adf8c2..2b3bd39bb 100644 --- a/cmd/helm/pull.go +++ b/pkg/cli/pull.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "fmt" @@ -22,8 +22,8 @@ import ( "github.com/spf13/cobra" - "k8s.io/helm/cmd/helm/require" "k8s.io/helm/pkg/action" + "k8s.io/helm/pkg/cli/require" ) const pullDesc = ` @@ -41,7 +41,7 @@ file, and MUST pass the verification process. Failure in any part of this will result in an error, and the chart will not be saved locally. ` -func newPullCmd(out io.Writer) *cobra.Command { +func NewPullCmd(out io.Writer) *cobra.Command { client := action.NewPull() cmd := &cobra.Command{ diff --git a/cmd/helm/pull_test.go b/pkg/cli/pull_test.go similarity index 90% rename from cmd/helm/pull_test.go rename to pkg/cli/pull_test.go index feba9fe5c..096cf5303 100644 --- a/cmd/helm/pull_test.go +++ b/pkg/cli/pull_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "fmt" @@ -70,13 +70,13 @@ func TestPullCmd(t *testing.T) { }, { name: "Fetch and verify", - args: []string{"test/signtest --verify --keyring testdata/helm-test-key.pub"}, + args: []string{"test/signtest --verify --keyring ../../testdata/helm-test-key.pub"}, expectFile: "./signtest-0.1.0.tgz", expectVerify: true, }, { name: "Fetch and fail verify", - args: []string{"test/reqtest --verify --keyring testdata/helm-test-key.pub"}, + args: []string{"test/reqtest --verify --keyring ../../testdata/helm-test-key.pub"}, failExpect: "Failed to fetch provenance", wantError: true, }, @@ -88,7 +88,7 @@ func TestPullCmd(t *testing.T) { }, { name: "Fetch, verify, untar", - args: []string{"test/signtest --verify --keyring=testdata/helm-test-key.pub --untar --untardir signtest"}, + args: []string{"test/signtest --verify --keyring=../../testdata/helm-test-key.pub --untar --untardir signtest"}, expectFile: "./signtest", expectDir: true, expectVerify: true, @@ -117,7 +117,7 @@ func TestPullCmd(t *testing.T) { }, } - if _, err := srv.CopyCharts("testdata/testcharts/*.tgz*"); err != nil { + if _, err := srv.CopyCharts("../../testdata/testcharts/*.tgz*"); err != nil { t.Fatal(err) } if err := srv.LinkIndices(); err != nil { diff --git a/cmd/helm/release_testing.go b/pkg/cli/release_testing.go similarity index 94% rename from cmd/helm/release_testing.go rename to pkg/cli/release_testing.go index bd27a618d..55725d71b 100644 --- a/cmd/helm/release_testing.go +++ b/pkg/cli/release_testing.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "fmt" @@ -23,8 +23,8 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" - "k8s.io/helm/cmd/helm/require" "k8s.io/helm/pkg/action" + "k8s.io/helm/pkg/cli/require" "k8s.io/helm/pkg/release" ) @@ -35,7 +35,7 @@ The argument this command takes is the name of a deployed release. The tests to be run are defined in the chart that was installed. ` -func newReleaseTestCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { +func NewReleaseTestCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { client := action.NewReleaseTesting(cfg) cmd := &cobra.Command{ diff --git a/cmd/helm/release_testing_test.go b/pkg/cli/release_testing_test.go similarity index 99% rename from cmd/helm/release_testing_test.go rename to pkg/cli/release_testing_test.go index d228f175b..498501291 100644 --- a/cmd/helm/release_testing_test.go +++ b/pkg/cli/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 cli import ( "testing" diff --git a/cmd/helm/repo.go b/pkg/cli/repo.go similarity index 78% rename from cmd/helm/repo.go rename to pkg/cli/repo.go index 1868ba4dd..0cf1549cc 100644 --- a/cmd/helm/repo.go +++ b/pkg/cli/repo.go @@ -14,14 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "io" "github.com/spf13/cobra" - "k8s.io/helm/cmd/helm/require" + "k8s.io/helm/pkg/cli/require" ) var repoHelm = ` @@ -32,7 +32,7 @@ Example usage: $ helm repo add [NAME] [REPO_URL] ` -func newRepoCmd(out io.Writer) *cobra.Command { +func NewRepoCmd(out io.Writer) *cobra.Command { cmd := &cobra.Command{ Use: "repo add|remove|list|index|update [ARGS]", Short: "add, list, remove, update, and index chart repositories", @@ -40,11 +40,11 @@ func newRepoCmd(out io.Writer) *cobra.Command { Args: require.NoArgs, } - cmd.AddCommand(newRepoAddCmd(out)) - cmd.AddCommand(newRepoListCmd(out)) - cmd.AddCommand(newRepoRemoveCmd(out)) - cmd.AddCommand(newRepoIndexCmd(out)) - cmd.AddCommand(newRepoUpdateCmd(out)) + cmd.AddCommand(NewRepoAddCmd(out)) + cmd.AddCommand(NewRepoListCmd(out)) + cmd.AddCommand(NewRepoRemoveCmd(out)) + cmd.AddCommand(NewRepoIndexCmd(out)) + cmd.AddCommand(NewRepoUpdateCmd(out)) return cmd } diff --git a/cmd/helm/repo_add.go b/pkg/cli/repo_add.go similarity index 96% rename from cmd/helm/repo_add.go rename to pkg/cli/repo_add.go index ad43f3430..e6124e950 100644 --- a/cmd/helm/repo_add.go +++ b/pkg/cli/repo_add.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "fmt" @@ -23,7 +23,7 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" - "k8s.io/helm/cmd/helm/require" + "k8s.io/helm/pkg/cli/require" "k8s.io/helm/pkg/getter" "k8s.io/helm/pkg/helmpath" "k8s.io/helm/pkg/repo" @@ -42,7 +42,7 @@ type repoAddOptions struct { caFile string } -func newRepoAddCmd(out io.Writer) *cobra.Command { +func NewRepoAddCmd(out io.Writer) *cobra.Command { o := &repoAddOptions{} cmd := &cobra.Command{ diff --git a/cmd/helm/repo_add_test.go b/pkg/cli/repo_add_test.go similarity index 92% rename from cmd/helm/repo_add_test.go rename to pkg/cli/repo_add_test.go index be320bc7c..e7bbaffb1 100644 --- a/cmd/helm/repo_add_test.go +++ b/pkg/cli/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 cli import ( "fmt" @@ -28,7 +28,7 @@ import ( func TestRepoAddCmd(t *testing.T) { defer resetEnv()() - srv, hh, err := repotest.NewTempServer("testdata/testserver/*.*") + srv, hh, err := repotest.NewTempServer("../../testdata/testserver/*.*") if err != nil { t.Fatal(err) } @@ -52,7 +52,7 @@ func TestRepoAddCmd(t *testing.T) { func TestRepoAdd(t *testing.T) { defer resetEnv()() - ts, hh, err := repotest.NewTempServer("testdata/testserver/*.*") + ts, hh, err := repotest.NewTempServer("../../testdata/testserver/*.*") if err != nil { t.Fatal(err) } diff --git a/cmd/helm/repo_index.go b/pkg/cli/repo_index.go similarity index 96% rename from cmd/helm/repo_index.go rename to pkg/cli/repo_index.go index e7ebbce23..8396d4d19 100644 --- a/cmd/helm/repo_index.go +++ b/pkg/cli/repo_index.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "io" @@ -24,7 +24,7 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" - "k8s.io/helm/cmd/helm/require" + "k8s.io/helm/pkg/cli/require" "k8s.io/helm/pkg/repo" ) @@ -45,7 +45,7 @@ type repoIndexOptions struct { merge string } -func newRepoIndexCmd(out io.Writer) *cobra.Command { +func NewRepoIndexCmd(out io.Writer) *cobra.Command { o := &repoIndexOptions{} cmd := &cobra.Command{ diff --git a/cmd/helm/repo_index_test.go b/pkg/cli/repo_index_test.go similarity index 87% rename from cmd/helm/repo_index_test.go rename to pkg/cli/repo_index_test.go index 7b2e8e275..97d6e95e3 100644 --- a/cmd/helm/repo_index_test.go +++ b/pkg/cli/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 cli import ( "bytes" @@ -31,16 +31,16 @@ func TestRepoIndexCmd(t *testing.T) { dir := testTempDir(t) comp := filepath.Join(dir, "compressedchart-0.1.0.tgz") - if err := linkOrCopy("testdata/testcharts/compressedchart-0.1.0.tgz", comp); err != nil { + if err := linkOrCopy("../../testdata/testcharts/compressedchart-0.1.0.tgz", comp); err != nil { t.Fatal(err) } comp2 := filepath.Join(dir, "compressedchart-0.2.0.tgz") - if err := linkOrCopy("testdata/testcharts/compressedchart-0.2.0.tgz", comp2); err != nil { + if err := linkOrCopy("../../testdata/testcharts/compressedchart-0.2.0.tgz", comp2); err != nil { t.Fatal(err) } buf := bytes.NewBuffer(nil) - c := newRepoIndexCmd(buf) + c := NewRepoIndexCmd(buf) if err := c.RunE(c, []string{dir}); err != nil { t.Error(err) @@ -77,10 +77,10 @@ func TestRepoIndexCmd(t *testing.T) { t.Fatal(err) } // Add a new chart and a new version of an existing chart - if err := linkOrCopy("testdata/testcharts/reqtest-0.1.0.tgz", filepath.Join(dir, "reqtest-0.1.0.tgz")); err != nil { + if err := linkOrCopy("../../testdata/testcharts/reqtest-0.1.0.tgz", filepath.Join(dir, "reqtest-0.1.0.tgz")); err != nil { t.Fatal(err) } - if err := linkOrCopy("testdata/testcharts/compressedchart-0.3.0.tgz", filepath.Join(dir, "compressedchart-0.3.0.tgz")); err != nil { + if err := linkOrCopy("../../testdata/testcharts/compressedchart-0.3.0.tgz", filepath.Join(dir, "compressedchart-0.3.0.tgz")); err != nil { t.Fatal(err) } diff --git a/cmd/helm/repo_list.go b/pkg/cli/repo_list.go similarity index 93% rename from cmd/helm/repo_list.go rename to pkg/cli/repo_list.go index 9eecef166..67dbe73bf 100644 --- a/cmd/helm/repo_list.go +++ b/pkg/cli/repo_list.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "fmt" @@ -24,7 +24,7 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" - "k8s.io/helm/cmd/helm/require" + "k8s.io/helm/pkg/cli/require" "k8s.io/helm/pkg/helmpath" "k8s.io/helm/pkg/repo" ) @@ -33,7 +33,7 @@ type repoListOptions struct { home helmpath.Home } -func newRepoListCmd(out io.Writer) *cobra.Command { +func NewRepoListCmd(out io.Writer) *cobra.Command { o := &repoListOptions{} cmd := &cobra.Command{ diff --git a/cmd/helm/repo_remove.go b/pkg/cli/repo_remove.go similarity index 95% rename from cmd/helm/repo_remove.go rename to pkg/cli/repo_remove.go index 4755a7224..f79053b85 100644 --- a/cmd/helm/repo_remove.go +++ b/pkg/cli/repo_remove.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "fmt" @@ -24,7 +24,7 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" - "k8s.io/helm/cmd/helm/require" + "k8s.io/helm/pkg/cli/require" "k8s.io/helm/pkg/helmpath" "k8s.io/helm/pkg/repo" ) @@ -34,7 +34,7 @@ type repoRemoveOptions struct { home helmpath.Home } -func newRepoRemoveCmd(out io.Writer) *cobra.Command { +func NewRepoRemoveCmd(out io.Writer) *cobra.Command { o := &repoRemoveOptions{} cmd := &cobra.Command{ diff --git a/cmd/helm/repo_remove_test.go b/pkg/cli/repo_remove_test.go similarity index 95% rename from cmd/helm/repo_remove_test.go rename to pkg/cli/repo_remove_test.go index 99316a061..ace4ca4c5 100644 --- a/cmd/helm/repo_remove_test.go +++ b/pkg/cli/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 cli import ( "bytes" @@ -29,7 +29,7 @@ import ( func TestRepoRemove(t *testing.T) { defer resetEnv()() - ts, hh, err := repotest.NewTempServer("testdata/testserver/*.*") + ts, hh, err := repotest.NewTempServer("../../testdata/testserver/*.*") if err != nil { t.Fatal(err) } diff --git a/cmd/helm/repo_update.go b/pkg/cli/repo_update.go similarity index 96% rename from cmd/helm/repo_update.go rename to pkg/cli/repo_update.go index b704e4c84..739d395df 100644 --- a/cmd/helm/repo_update.go +++ b/pkg/cli/repo_update.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "fmt" @@ -24,7 +24,7 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" - "k8s.io/helm/cmd/helm/require" + "k8s.io/helm/pkg/cli/require" "k8s.io/helm/pkg/getter" "k8s.io/helm/pkg/helmpath" "k8s.io/helm/pkg/repo" @@ -45,7 +45,7 @@ type repoUpdateOptions struct { home helmpath.Home } -func newRepoUpdateCmd(out io.Writer) *cobra.Command { +func NewRepoUpdateCmd(out io.Writer) *cobra.Command { o := &repoUpdateOptions{update: updateCharts} cmd := &cobra.Command{ diff --git a/cmd/helm/repo_update_test.go b/pkg/cli/repo_update_test.go similarity index 96% rename from cmd/helm/repo_update_test.go rename to pkg/cli/repo_update_test.go index de62d03bb..b053facd6 100644 --- a/cmd/helm/repo_update_test.go +++ b/pkg/cli/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 cli import ( "bytes" @@ -59,7 +59,7 @@ func TestUpdateCmd(t *testing.T) { func TestUpdateCharts(t *testing.T) { defer resetEnv()() - ts, hh, err := repotest.NewTempServer("testdata/testserver/*.*") + ts, hh, err := repotest.NewTempServer("../../testdata/testserver/*.*") if err != nil { t.Fatal(err) } diff --git a/cmd/helm/require/args.go b/pkg/cli/require/args.go similarity index 100% rename from cmd/helm/require/args.go rename to pkg/cli/require/args.go diff --git a/cmd/helm/require/args_test.go b/pkg/cli/require/args_test.go similarity index 100% rename from cmd/helm/require/args_test.go rename to pkg/cli/require/args_test.go diff --git a/cmd/helm/rollback.go b/pkg/cli/rollback.go similarity index 95% rename from cmd/helm/rollback.go rename to pkg/cli/rollback.go index f691fbfb9..2e1742111 100644 --- a/cmd/helm/rollback.go +++ b/pkg/cli/rollback.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "fmt" @@ -22,8 +22,8 @@ import ( "github.com/spf13/cobra" - "k8s.io/helm/cmd/helm/require" "k8s.io/helm/pkg/action" + "k8s.io/helm/pkg/cli/require" ) const rollbackDesc = ` @@ -34,7 +34,7 @@ second is a revision (version) number. To see revision numbers, run 'helm history RELEASE'. ` -func newRollbackCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { +func NewRollbackCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { client := action.NewRollback(cfg) cmd := &cobra.Command{ diff --git a/cmd/helm/rollback_test.go b/pkg/cli/rollback_test.go similarity index 99% rename from cmd/helm/rollback_test.go rename to pkg/cli/rollback_test.go index 3898ce6a9..9e1bfac25 100644 --- a/cmd/helm/rollback_test.go +++ b/pkg/cli/rollback_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "testing" diff --git a/cmd/helm/root_test.go b/pkg/cli/root_test.go similarity index 99% rename from cmd/helm/root_test.go rename to pkg/cli/root_test.go index a8bec6354..2ffcd973f 100644 --- a/cmd/helm/root_test.go +++ b/pkg/cli/root_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "os" diff --git a/cmd/helm/search.go b/pkg/cli/search.go similarity index 97% rename from cmd/helm/search.go rename to pkg/cli/search.go index 3ef9ed1d7..f2eb5e2a6 100644 --- a/cmd/helm/search.go +++ b/pkg/cli/search.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "fmt" @@ -26,7 +26,7 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" - "k8s.io/helm/cmd/helm/search" + "k8s.io/helm/pkg/cli/search" "k8s.io/helm/pkg/helmpath" "k8s.io/helm/pkg/repo" ) @@ -49,7 +49,7 @@ type searchOptions struct { version string } -func newSearchCmd(out io.Writer) *cobra.Command { +func NewSearchCmd(out io.Writer) *cobra.Command { o := &searchOptions{} cmd := &cobra.Command{ diff --git a/cmd/helm/search/search.go b/pkg/cli/search/search.go similarity index 100% rename from cmd/helm/search/search.go rename to pkg/cli/search/search.go diff --git a/cmd/helm/search/search_test.go b/pkg/cli/search/search_test.go similarity index 100% rename from cmd/helm/search/search_test.go rename to pkg/cli/search/search_test.go diff --git a/cmd/helm/search_test.go b/pkg/cli/search_test.go similarity index 97% rename from cmd/helm/search_test.go rename to pkg/cli/search_test.go index 380f87d34..e07b79f8f 100644 --- a/cmd/helm/search_test.go +++ b/pkg/cli/search_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "testing" @@ -24,7 +24,7 @@ func TestSearchCmd(t *testing.T) { defer resetEnv()() setHome := func(cmd string) string { - return cmd + " --home=testdata/helmhome" + return cmd + " --home=../../testdata/helmhome" } tests := []cmdTestCase{{ diff --git a/cmd/helm/show.go b/pkg/cli/show.go similarity index 97% rename from cmd/helm/show.go rename to pkg/cli/show.go index d8970f077..37e129ba5 100644 --- a/cmd/helm/show.go +++ b/pkg/cli/show.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "fmt" @@ -22,8 +22,8 @@ import ( "github.com/spf13/cobra" - "k8s.io/helm/cmd/helm/require" "k8s.io/helm/pkg/action" + "k8s.io/helm/pkg/cli/require" ) const showDesc = ` @@ -48,7 +48,7 @@ This command inspects a chart (directory, file, or URL) and displays the content of the README file ` -func newShowCmd(out io.Writer) *cobra.Command { +func NewShowCmd(out io.Writer) *cobra.Command { client := action.NewShow(action.ShowAll) showCommand := &cobra.Command{ diff --git a/cmd/helm/status.go b/pkg/cli/status.go similarity index 95% rename from cmd/helm/status.go rename to pkg/cli/status.go index 0c6bee728..a34ab7d5e 100644 --- a/cmd/helm/status.go +++ b/pkg/cli/status.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "encoding/json" @@ -24,8 +24,8 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" - "k8s.io/helm/cmd/helm/require" "k8s.io/helm/pkg/action" + "k8s.io/helm/pkg/cli/require" ) var statusHelp = ` @@ -39,7 +39,7 @@ The status consists of: - additional notes provided by the chart ` -func newStatusCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { +func NewStatusCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { client := action.NewStatus(cfg) cmd := &cobra.Command{ diff --git a/cmd/helm/status_test.go b/pkg/cli/status_test.go similarity index 99% rename from cmd/helm/status_test.go rename to pkg/cli/status_test.go index fe4f460a7..4213529e8 100644 --- a/cmd/helm/status_test.go +++ b/pkg/cli/status_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "testing" diff --git a/cmd/helm/template.go b/pkg/cli/template.go similarity index 95% rename from cmd/helm/template.go rename to pkg/cli/template.go index f33237dea..563d03e13 100644 --- a/cmd/helm/template.go +++ b/pkg/cli/template.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "fmt" @@ -25,8 +25,8 @@ import ( "github.com/spf13/cobra" "k8s.io/client-go/kubernetes/fake" - "k8s.io/helm/cmd/helm/require" "k8s.io/helm/pkg/action" + "k8s.io/helm/pkg/cli/require" "k8s.io/helm/pkg/kube" "k8s.io/helm/pkg/storage" "k8s.io/helm/pkg/storage/driver" @@ -45,7 +45,7 @@ To render just one template in a chart, use '-x': $ helm template mychart -x templates/deployment.yaml ` -func newTemplateCmd(out io.Writer) *cobra.Command { +func NewTemplateCmd(out io.Writer) *cobra.Command { customConfig := &action.Configuration{ // Add mock objects in here so it doesn't use Kube API server Releases: storage.Init(driver.NewMemory()), diff --git a/cmd/helm/template_test.go b/pkg/cli/template_test.go similarity index 87% rename from cmd/helm/template_test.go rename to pkg/cli/template_test.go index 65586c394..d729719de 100644 --- a/cmd/helm/template_test.go +++ b/pkg/cli/template_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "fmt" @@ -22,7 +22,7 @@ import ( "testing" ) -var chartPath = "./../../pkg/chartutil/testdata/subpop/charts/subchart1" +var chartPath = "./../chartutil/testdata/subpop/charts/subchart1" func TestTemplateCmd(t *testing.T) { tests := []cmdTestCase{ @@ -54,13 +54,13 @@ func TestTemplateCmd(t *testing.T) { }, { name: "check library chart", - cmd: fmt.Sprintf("template '%s'", "testdata/testcharts/lib-chart"), + cmd: fmt.Sprintf("template '%s'", "../../testdata/testcharts/lib-chart"), wantError: true, golden: "output/template-lib-chart.txt", }, { name: "check chart bad type", - cmd: fmt.Sprintf("template '%s'", "testdata/testcharts/chart-bad-type"), + cmd: fmt.Sprintf("template '%s'", "../../testdata/testcharts/chart-bad-type"), wantError: true, golden: "output/install-chart-bad-type.txt", }, diff --git a/cmd/helm/uninstall.go b/pkg/cli/uninstall.go similarity index 95% rename from cmd/helm/uninstall.go rename to pkg/cli/uninstall.go index a52d151e4..9419595e8 100644 --- a/cmd/helm/uninstall.go +++ b/pkg/cli/uninstall.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "fmt" @@ -22,8 +22,8 @@ import ( "github.com/spf13/cobra" - "k8s.io/helm/cmd/helm/require" "k8s.io/helm/pkg/action" + "k8s.io/helm/pkg/cli/require" ) const uninstallDesc = ` @@ -34,7 +34,7 @@ Use the '--dry-run' flag to see which releases will be uninstalled without actua uninstalling them. ` -func newUninstallCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { +func NewUninstallCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { client := action.NewUninstall(cfg) cmd := &cobra.Command{ diff --git a/cmd/helm/uninstall_test.go b/pkg/cli/uninstall_test.go similarity index 99% rename from cmd/helm/uninstall_test.go rename to pkg/cli/uninstall_test.go index 8012a8d92..8f9caa882 100644 --- a/cmd/helm/uninstall_test.go +++ b/pkg/cli/uninstall_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "testing" diff --git a/cmd/helm/upgrade.go b/pkg/cli/upgrade.go similarity index 98% rename from cmd/helm/upgrade.go rename to pkg/cli/upgrade.go index a5079e91e..158a160b2 100644 --- a/cmd/helm/upgrade.go +++ b/pkg/cli/upgrade.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "fmt" @@ -23,9 +23,9 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" - "k8s.io/helm/cmd/helm/require" "k8s.io/helm/pkg/action" "k8s.io/helm/pkg/chart/loader" + "k8s.io/helm/pkg/cli/require" "k8s.io/helm/pkg/storage/driver" ) @@ -54,7 +54,7 @@ set for a key called 'foo', the 'newbar' value would take precedence: $ helm upgrade --set foo=bar --set foo=newbar redis ./redis ` -func newUpgradeCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { +func NewUpgradeCmd(cfg *action.Configuration, out io.Writer) *cobra.Command { client := action.NewUpgrade(cfg) cmd := &cobra.Command{ diff --git a/cmd/helm/upgrade_test.go b/pkg/cli/upgrade_test.go similarity index 96% rename from cmd/helm/upgrade_test.go rename to pkg/cli/upgrade_test.go index 4cc44e2f1..3fe9d0309 100644 --- a/cmd/helm/upgrade_test.go +++ b/pkg/cli/upgrade_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "fmt" @@ -79,8 +79,8 @@ func TestUpgradeCmd(t *testing.T) { t.Fatalf("Error loading updated chart: %v", err) } - missingDepsPath := "testdata/testcharts/chart-missing-deps" - badDepsPath := "testdata/testcharts/chart-bad-requirements" + missingDepsPath := "../../testdata/testcharts/chart-missing-deps" + badDepsPath := "../../testdata/testcharts/chart-bad-requirements" relMock := func(n string, v int, ch *chart.Chart) *release.Release { return release.Mock(&release.MockReleaseOptions{Name: n, Version: v, Chart: ch}) diff --git a/cmd/helm/verify.go b/pkg/cli/verify.go similarity index 93% rename from cmd/helm/verify.go rename to pkg/cli/verify.go index d9069312a..f4b2ab1df 100644 --- a/cmd/helm/verify.go +++ b/pkg/cli/verify.go @@ -13,15 +13,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "io" "github.com/spf13/cobra" - "k8s.io/helm/cmd/helm/require" "k8s.io/helm/pkg/action" + "k8s.io/helm/pkg/cli/require" ) const verifyDesc = ` @@ -35,7 +35,7 @@ This command can be used to verify a local chart. Several other commands provide the 'helm package --sign' command. ` -func newVerifyCmd(out io.Writer) *cobra.Command { +func NewVerifyCmd(out io.Writer) *cobra.Command { client := action.NewVerify() cmd := &cobra.Command{ diff --git a/cmd/helm/verify_test.go b/pkg/cli/verify_test.go similarity index 82% rename from cmd/helm/verify_test.go rename to pkg/cli/verify_test.go index a70051ff6..e9efb1059 100644 --- a/cmd/helm/verify_test.go +++ b/pkg/cli/verify_test.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "fmt" @@ -52,19 +52,19 @@ func TestVerifyCmd(t *testing.T) { }, { name: "verify requires that chart is not a directory", - cmd: "verify testdata/testcharts/signtest", + cmd: "verify ../../testdata/testcharts/signtest", expect: "unpacked charts cannot be verified", wantError: true, }, { name: "verify requires that chart has prov file", - cmd: "verify testdata/testcharts/compressedchart-0.1.0.tgz", - expect: fmt.Sprintf("could not load provenance file testdata/testcharts/compressedchart-0.1.0.tgz.prov: %s testdata/testcharts/compressedchart-0.1.0.tgz.prov: %s", statExe, statFileMsg), + cmd: "verify ../../testdata/testcharts/compressedchart-0.1.0.tgz", + expect: fmt.Sprintf("could not load provenance file ../../testdata/testcharts/compressedchart-0.1.0.tgz.prov: %s ../../testdata/testcharts/compressedchart-0.1.0.tgz.prov: %s", statExe, statFileMsg), wantError: true, }, { name: "verify validates a properly signed chart", - cmd: "verify testdata/testcharts/signtest-0.1.0.tgz --keyring testdata/helm-test-key.pub", + cmd: "verify ../../testdata/testcharts/signtest-0.1.0.tgz --keyring ../../testdata/helm-test-key.pub", expect: "", wantError: false, }, diff --git a/cmd/helm/version.go b/pkg/cli/version.go similarity index 95% rename from cmd/helm/version.go rename to pkg/cli/version.go index 9bf2761a1..fb56109b7 100644 --- a/cmd/helm/version.go +++ b/pkg/cli/version.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "fmt" @@ -23,8 +23,8 @@ import ( "github.com/spf13/cobra" - "k8s.io/helm/cmd/helm/require" "k8s.io/helm/internal/version" + "k8s.io/helm/pkg/cli/require" ) const versionDesc = ` @@ -46,7 +46,7 @@ type versionOptions struct { template string } -func newVersionCmd(out io.Writer) *cobra.Command { +func NewVersionCmd(out io.Writer) *cobra.Command { o := &versionOptions{} cmd := &cobra.Command{ diff --git a/cmd/helm/version_test.go b/pkg/cli/version_test.go similarity index 98% rename from cmd/helm/version_test.go rename to pkg/cli/version_test.go index 7be08e72d..e5cc1e06c 100644 --- a/cmd/helm/version_test.go +++ b/pkg/cli/version_test.go @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package main +package cli import ( "testing" diff --git a/pkg/downloader/chart_downloader_test.go b/pkg/downloader/chart_downloader_test.go index f8b47c57c..8d77d5ac7 100644 --- a/pkg/downloader/chart_downloader_test.go +++ b/pkg/downloader/chart_downloader_test.go @@ -25,7 +25,7 @@ import ( "path/filepath" "testing" - "k8s.io/helm/pkg/cli" + "k8s.io/helm/pkg/cli/environment" "k8s.io/helm/pkg/getter" "k8s.io/helm/pkg/helmpath" "k8s.io/helm/pkg/repo" @@ -57,7 +57,7 @@ func TestResolveChartRef(t *testing.T) { c := ChartDownloader{ HelmHome: helmpath.Home("testdata/helmhome"), Out: os.Stderr, - Getters: getter.All(cli.EnvSettings{}), + Getters: getter.All(environment.Settings{}), } for _, tt := range tests { @@ -94,7 +94,7 @@ func TestDownload(t *testing.T) { })) defer srv.Close() - provider, err := getter.ByScheme("http", cli.EnvSettings{}) + provider, err := getter.ByScheme("http", environment.Settings{}) if err != nil { t.Fatal("No http provider found") } @@ -197,7 +197,7 @@ func TestDownloadTo(t *testing.T) { Out: os.Stderr, Verify: VerifyAlways, Keyring: "testdata/helm-test-key.pub", - Getters: getter.All(cli.EnvSettings{}), + Getters: getter.All(environment.Settings{}), } cname := "/signtest-0.1.0.tgz" where, v, err := c.DownloadTo(srv.URL()+cname, "", dest) @@ -260,7 +260,7 @@ func TestDownloadTo_VerifyLater(t *testing.T) { HelmHome: hh, Out: os.Stderr, Verify: VerifyLater, - Getters: getter.All(cli.EnvSettings{}), + Getters: getter.All(environment.Settings{}), } cname := "/signtest-0.1.0.tgz" where, _, err := c.DownloadTo(srv.URL()+cname, "", dest) @@ -289,7 +289,7 @@ func TestScanReposForURL(t *testing.T) { HelmHome: hh, Out: os.Stderr, Verify: VerifyLater, - Getters: getter.All(cli.EnvSettings{}), + Getters: getter.All(environment.Settings{}), } u := "http://example.com/alpine-0.2.0.tgz" diff --git a/pkg/getter/getter.go b/pkg/getter/getter.go index 087cc0805..d92575013 100644 --- a/pkg/getter/getter.go +++ b/pkg/getter/getter.go @@ -21,7 +21,7 @@ import ( "github.com/pkg/errors" - "k8s.io/helm/pkg/cli" + "k8s.io/helm/pkg/cli/environment" ) // Getter is an interface to support GET to the specified URL. @@ -71,7 +71,7 @@ func (p Providers) ByScheme(scheme string) (Constructor, error) { // All finds all of the registered getters as a list of Provider instances. // Currently the build-in http/https getter and the discovered // plugins with downloader notations are collected. -func All(settings cli.EnvSettings) Providers { +func All(settings environment.Settings) Providers { result := Providers{ { Schemes: []string{"http", "https"}, @@ -86,7 +86,7 @@ func All(settings cli.EnvSettings) Providers { // ByScheme returns a getter for the given scheme. // // If the scheme is not supported, this will return an error. -func ByScheme(scheme string, settings cli.EnvSettings) (Provider, error) { +func ByScheme(scheme string, settings environment.Settings) (Provider, error) { // Q: What do you call a scheme string who's the boss? // A: Bruce Schemestring, of course. a := All(settings) diff --git a/pkg/getter/plugingetter.go b/pkg/getter/plugingetter.go index 61c1eda90..709fa3e41 100644 --- a/pkg/getter/plugingetter.go +++ b/pkg/getter/plugingetter.go @@ -23,13 +23,13 @@ import ( "github.com/pkg/errors" - "k8s.io/helm/pkg/cli" + "k8s.io/helm/pkg/cli/environment" "k8s.io/helm/pkg/plugin" ) // collectPlugins scans for getter plugins. // This will load plugins according to the cli. -func collectPlugins(settings cli.EnvSettings) (Providers, error) { +func collectPlugins(settings environment.Settings) (Providers, error) { plugins, err := plugin.FindPlugins(settings.PluginDirs()) if err != nil { return nil, err @@ -56,7 +56,7 @@ func collectPlugins(settings cli.EnvSettings) (Providers, error) { type pluginGetter struct { command string certFile, keyFile, cAFile string - settings cli.EnvSettings + settings environment.Settings name string base string } @@ -81,7 +81,7 @@ func (p *pluginGetter) Get(href string) (*bytes.Buffer, error) { } // newPluginGetter constructs a valid plugin getter -func newPluginGetter(command string, settings cli.EnvSettings, name, base string) Constructor { +func newPluginGetter(command string, settings environment.Settings, name, base string) Constructor { return func(URL, CertFile, KeyFile, CAFile string) (Getter, error) { result := &pluginGetter{ command: command, diff --git a/pkg/getter/plugingetter_test.go b/pkg/getter/plugingetter_test.go index a147928b3..73e19b542 100644 --- a/pkg/getter/plugingetter_test.go +++ b/pkg/getter/plugingetter_test.go @@ -22,17 +22,17 @@ import ( "strings" "testing" - "k8s.io/helm/pkg/cli" + "k8s.io/helm/pkg/cli/environment" "k8s.io/helm/pkg/helmpath" ) -func hh(debug bool) cli.EnvSettings { +func hh(debug bool) environment.Settings { apath, err := filepath.Abs("./testdata") if err != nil { panic(err) } hp := helmpath.Home(apath) - return cli.EnvSettings{ + return environment.Settings{ Home: hp, Debug: debug, } diff --git a/pkg/plugin/installer/http_installer.go b/pkg/plugin/installer/http_installer.go index c1348a63e..885ca7809 100644 --- a/pkg/plugin/installer/http_installer.go +++ b/pkg/plugin/installer/http_installer.go @@ -27,7 +27,7 @@ import ( "github.com/pkg/errors" - "k8s.io/helm/pkg/cli" + "k8s.io/helm/pkg/cli/environment" "k8s.io/helm/pkg/getter" "k8s.io/helm/pkg/helmpath" "k8s.io/helm/pkg/plugin/cache" @@ -79,7 +79,7 @@ func NewHTTPInstaller(source string, home helmpath.Home) (*HTTPInstaller, error) return nil, err } - getConstructor, err := getter.ByScheme("http", cli.EnvSettings{}) + getConstructor, err := getter.ByScheme("http", environment.Settings{}) if err != nil { return nil, err } diff --git a/pkg/plugin/plugin.go b/pkg/plugin/plugin.go index 4f91ba26c..d76d8f6fc 100644 --- a/pkg/plugin/plugin.go +++ b/pkg/plugin/plugin.go @@ -25,7 +25,7 @@ import ( "github.com/ghodss/yaml" - helm_env "k8s.io/helm/pkg/cli" + "k8s.io/helm/pkg/cli/environment" ) const pluginFileName = "plugin.yaml" @@ -214,7 +214,7 @@ func FindPlugins(plugdirs string) ([]*Plugin, error) { // SetupPluginEnv prepares os.Env for plugins. It operates on os.Env because // the plugin subsystem itself needs access to the environment variables // created here. -func SetupPluginEnv(settings helm_env.EnvSettings, +func SetupPluginEnv(settings environment.Settings, shortName, base string) { for key, val := range map[string]string{ "HELM_PLUGIN_NAME": shortName, diff --git a/pkg/repo/chartrepo_test.go b/pkg/repo/chartrepo_test.go index afbc31fd1..19c0372d8 100644 --- a/pkg/repo/chartrepo_test.go +++ b/pkg/repo/chartrepo_test.go @@ -28,7 +28,7 @@ import ( "time" "k8s.io/helm/pkg/chart" - "k8s.io/helm/pkg/cli" + "k8s.io/helm/pkg/cli/environment" "k8s.io/helm/pkg/getter" ) @@ -41,7 +41,7 @@ func TestLoadChartRepository(t *testing.T) { r, err := NewChartRepository(&Entry{ Name: testRepository, URL: testURL, - }, getter.All(cli.EnvSettings{})) + }, getter.All(environment.Settings{})) if err != nil { t.Errorf("Problem creating chart repository from %s: %v", testRepository, err) } @@ -74,7 +74,7 @@ func TestIndex(t *testing.T) { r, err := NewChartRepository(&Entry{ Name: testRepository, URL: testURL, - }, getter.All(cli.EnvSettings{})) + }, getter.All(environment.Settings{})) if err != nil { t.Errorf("Problem creating chart repository from %s: %v", testRepository, err) } @@ -221,7 +221,7 @@ func TestFindChartInRepoURL(t *testing.T) { } defer srv.Close() - chartURL, err := FindChartInRepoURL(srv.URL, "nginx", "", "", "", "", getter.All(cli.EnvSettings{})) + chartURL, err := FindChartInRepoURL(srv.URL, "nginx", "", "", "", "", getter.All(environment.Settings{})) if err != nil { t.Errorf("%s", err) } @@ -229,7 +229,7 @@ func TestFindChartInRepoURL(t *testing.T) { t.Errorf("%s is not the valid URL", chartURL) } - chartURL, err = FindChartInRepoURL(srv.URL, "nginx", "0.1.0", "", "", "", getter.All(cli.EnvSettings{})) + chartURL, err = FindChartInRepoURL(srv.URL, "nginx", "0.1.0", "", "", "", getter.All(environment.Settings{})) if err != nil { t.Errorf("%s", err) } @@ -239,7 +239,7 @@ func TestFindChartInRepoURL(t *testing.T) { } func TestErrorFindChartInRepoURL(t *testing.T) { - _, err := FindChartInRepoURL("http://someserver/something", "nginx", "", "", "", "", getter.All(cli.EnvSettings{})) + _, err := FindChartInRepoURL("http://someserver/something", "nginx", "", "", "", "", getter.All(environment.Settings{})) if err == nil { t.Errorf("Expected error for bad chart URL, but did not get any errors") } @@ -253,7 +253,7 @@ func TestErrorFindChartInRepoURL(t *testing.T) { } defer srv.Close() - _, err = FindChartInRepoURL(srv.URL, "nginx1", "", "", "", "", getter.All(cli.EnvSettings{})) + _, err = FindChartInRepoURL(srv.URL, "nginx1", "", "", "", "", getter.All(environment.Settings{})) if err == nil { t.Errorf("Expected error for chart not found, but did not get any errors") } @@ -261,7 +261,7 @@ func TestErrorFindChartInRepoURL(t *testing.T) { t.Errorf("Expected error for chart not found, but got a different error (%v)", err) } - _, err = FindChartInRepoURL(srv.URL, "nginx1", "0.1.0", "", "", "", getter.All(cli.EnvSettings{})) + _, err = FindChartInRepoURL(srv.URL, "nginx1", "0.1.0", "", "", "", getter.All(environment.Settings{})) if err == nil { t.Errorf("Expected error for chart not found, but did not get any errors") } @@ -269,7 +269,7 @@ func TestErrorFindChartInRepoURL(t *testing.T) { t.Errorf("Expected error for chart not found, but got a different error (%v)", err) } - _, err = FindChartInRepoURL(srv.URL, "chartWithNoURL", "", "", "", "", getter.All(cli.EnvSettings{})) + _, err = FindChartInRepoURL(srv.URL, "chartWithNoURL", "", "", "", "", getter.All(environment.Settings{})) if err == nil { t.Errorf("Expected error for no chart URLs available, but did not get any errors") } diff --git a/pkg/repo/index_test.go b/pkg/repo/index_test.go index 81fb973b6..5f9105386 100644 --- a/pkg/repo/index_test.go +++ b/pkg/repo/index_test.go @@ -23,7 +23,7 @@ import ( "testing" "k8s.io/helm/pkg/chart" - "k8s.io/helm/pkg/cli" + "k8s.io/helm/pkg/cli/environment" "k8s.io/helm/pkg/getter" ) @@ -146,7 +146,7 @@ func TestDownloadIndexFile(t *testing.T) { Name: testRepo, URL: srv.URL, Cache: indexFilePath, - }, getter.All(cli.EnvSettings{})) + }, getter.All(environment.Settings{})) if err != nil { t.Errorf("Problem creating chart repository from %s: %v", testRepo, err) } diff --git a/pkg/resolver/resolver_test.go b/pkg/resolver/resolver_test.go index 7ec0cd387..c1a8ffad3 100644 --- a/pkg/resolver/resolver_test.go +++ b/pkg/resolver/resolver_test.go @@ -70,11 +70,11 @@ func TestResolve(t *testing.T) { { name: "repo from valid local path", req: []*chart.Dependency{ - {Name: "signtest", Repository: "file://../../../../cmd/helm/testdata/testcharts/signtest", Version: "0.1.0"}, + {Name: "signtest", Repository: "file://../../../../testdata/testcharts/signtest", Version: "0.1.0"}, }, expect: &chart.Lock{ Dependencies: []*chart.Dependency{ - {Name: "signtest", Repository: "file://../../../../cmd/helm/testdata/testcharts/signtest", Version: "0.1.0"}, + {Name: "signtest", Repository: "file://../../../../testdata/testcharts/signtest", Version: "0.1.0"}, }, }, }, diff --git a/cmd/helm/testdata/helm-test-key.pub b/testdata/helm-test-key.pub similarity index 100% rename from cmd/helm/testdata/helm-test-key.pub rename to testdata/helm-test-key.pub diff --git a/cmd/helm/testdata/helm-test-key.secret b/testdata/helm-test-key.secret similarity index 100% rename from cmd/helm/testdata/helm-test-key.secret rename to testdata/helm-test-key.secret diff --git a/cmd/helm/testdata/helmhome/plugins/args/args.sh b/testdata/helmhome/plugins/args/args.sh similarity index 100% rename from cmd/helm/testdata/helmhome/plugins/args/args.sh rename to testdata/helmhome/plugins/args/args.sh diff --git a/cmd/helm/testdata/helmhome/plugins/args/plugin.yaml b/testdata/helmhome/plugins/args/plugin.yaml similarity index 100% rename from cmd/helm/testdata/helmhome/plugins/args/plugin.yaml rename to testdata/helmhome/plugins/args/plugin.yaml diff --git a/cmd/helm/testdata/helmhome/plugins/echo/plugin.yaml b/testdata/helmhome/plugins/echo/plugin.yaml similarity index 100% rename from cmd/helm/testdata/helmhome/plugins/echo/plugin.yaml rename to testdata/helmhome/plugins/echo/plugin.yaml diff --git a/cmd/helm/testdata/helmhome/plugins/env/plugin.yaml b/testdata/helmhome/plugins/env/plugin.yaml similarity index 100% rename from cmd/helm/testdata/helmhome/plugins/env/plugin.yaml rename to testdata/helmhome/plugins/env/plugin.yaml diff --git a/cmd/helm/testdata/helmhome/plugins/fullenv/fullenv.sh b/testdata/helmhome/plugins/fullenv/fullenv.sh similarity index 100% rename from cmd/helm/testdata/helmhome/plugins/fullenv/fullenv.sh rename to testdata/helmhome/plugins/fullenv/fullenv.sh diff --git a/cmd/helm/testdata/helmhome/plugins/fullenv/plugin.yaml b/testdata/helmhome/plugins/fullenv/plugin.yaml similarity index 100% rename from cmd/helm/testdata/helmhome/plugins/fullenv/plugin.yaml rename to testdata/helmhome/plugins/fullenv/plugin.yaml diff --git a/cmd/helm/testdata/helmhome/repository/cache/testing-index.yaml b/testdata/helmhome/repository/cache/testing-index.yaml similarity index 100% rename from cmd/helm/testdata/helmhome/repository/cache/testing-index.yaml rename to testdata/helmhome/repository/cache/testing-index.yaml diff --git a/cmd/helm/testdata/helmhome/repository/local/index.yaml b/testdata/helmhome/repository/local/index.yaml similarity index 100% rename from cmd/helm/testdata/helmhome/repository/local/index.yaml rename to testdata/helmhome/repository/local/index.yaml diff --git a/cmd/helm/testdata/helmhome/repository/repositories.yaml b/testdata/helmhome/repository/repositories.yaml similarity index 100% rename from cmd/helm/testdata/helmhome/repository/repositories.yaml rename to testdata/helmhome/repository/repositories.yaml diff --git a/cmd/helm/testdata/output/dependency-list-archive.txt b/testdata/output/dependency-list-archive.txt similarity index 100% rename from cmd/helm/testdata/output/dependency-list-archive.txt rename to testdata/output/dependency-list-archive.txt diff --git a/cmd/helm/testdata/output/dependency-list-no-chart-linux.txt b/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 testdata/output/dependency-list-no-chart-linux.txt diff --git a/testdata/output/dependency-list-no-requirements-linux.txt b/testdata/output/dependency-list-no-requirements-linux.txt new file mode 100644 index 000000000..0e28030ad --- /dev/null +++ b/testdata/output/dependency-list-no-requirements-linux.txt @@ -0,0 +1 @@ +WARNING: no dependencies at ../../testdata/testcharts/alpine/charts diff --git a/cmd/helm/testdata/output/dependency-list.txt b/testdata/output/dependency-list.txt similarity index 100% rename from cmd/helm/testdata/output/dependency-list.txt rename to testdata/output/dependency-list.txt diff --git a/cmd/helm/testdata/output/get-hooks-no-args.txt b/testdata/output/get-hooks-no-args.txt similarity index 100% rename from cmd/helm/testdata/output/get-hooks-no-args.txt rename to testdata/output/get-hooks-no-args.txt diff --git a/cmd/helm/testdata/output/get-hooks.txt b/testdata/output/get-hooks.txt similarity index 100% rename from cmd/helm/testdata/output/get-hooks.txt rename to testdata/output/get-hooks.txt diff --git a/cmd/helm/testdata/output/get-manifest-no-args.txt b/testdata/output/get-manifest-no-args.txt similarity index 100% rename from cmd/helm/testdata/output/get-manifest-no-args.txt rename to testdata/output/get-manifest-no-args.txt diff --git a/cmd/helm/testdata/output/get-manifest.txt b/testdata/output/get-manifest.txt similarity index 100% rename from cmd/helm/testdata/output/get-manifest.txt rename to testdata/output/get-manifest.txt diff --git a/cmd/helm/testdata/output/get-no-args.txt b/testdata/output/get-no-args.txt similarity index 100% rename from cmd/helm/testdata/output/get-no-args.txt rename to testdata/output/get-no-args.txt diff --git a/cmd/helm/testdata/output/get-release.txt b/testdata/output/get-release.txt similarity index 100% rename from cmd/helm/testdata/output/get-release.txt rename to testdata/output/get-release.txt diff --git a/cmd/helm/testdata/output/get-values-args.txt b/testdata/output/get-values-args.txt similarity index 100% rename from cmd/helm/testdata/output/get-values-args.txt rename to testdata/output/get-values-args.txt diff --git a/cmd/helm/testdata/output/get-values.txt b/testdata/output/get-values.txt similarity index 100% rename from cmd/helm/testdata/output/get-values.txt rename to testdata/output/get-values.txt diff --git a/cmd/helm/testdata/output/history-limit.txt b/testdata/output/history-limit.txt similarity index 100% rename from cmd/helm/testdata/output/history-limit.txt rename to testdata/output/history-limit.txt diff --git a/cmd/helm/testdata/output/history.json b/testdata/output/history.json similarity index 100% rename from cmd/helm/testdata/output/history.json rename to testdata/output/history.json diff --git a/cmd/helm/testdata/output/history.txt b/testdata/output/history.txt similarity index 100% rename from cmd/helm/testdata/output/history.txt rename to testdata/output/history.txt diff --git a/cmd/helm/testdata/output/history.yaml b/testdata/output/history.yaml similarity index 100% rename from cmd/helm/testdata/output/history.yaml rename to testdata/output/history.yaml diff --git a/cmd/helm/testdata/output/install-and-replace.txt b/testdata/output/install-and-replace.txt similarity index 100% rename from cmd/helm/testdata/output/install-and-replace.txt rename to testdata/output/install-and-replace.txt diff --git a/cmd/helm/testdata/output/install-chart-bad-type.txt b/testdata/output/install-chart-bad-type.txt similarity index 100% rename from cmd/helm/testdata/output/install-chart-bad-type.txt rename to testdata/output/install-chart-bad-type.txt diff --git a/cmd/helm/testdata/output/install-name-template.txt b/testdata/output/install-name-template.txt similarity index 100% rename from cmd/helm/testdata/output/install-name-template.txt rename to testdata/output/install-name-template.txt diff --git a/cmd/helm/testdata/output/install-no-args.txt b/testdata/output/install-no-args.txt similarity index 100% rename from cmd/helm/testdata/output/install-no-args.txt rename to testdata/output/install-no-args.txt diff --git a/cmd/helm/testdata/output/install-no-hooks.txt b/testdata/output/install-no-hooks.txt similarity index 100% rename from cmd/helm/testdata/output/install-no-hooks.txt rename to testdata/output/install-no-hooks.txt diff --git a/cmd/helm/testdata/output/install-with-multiple-values-files.txt b/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 testdata/output/install-with-multiple-values-files.txt diff --git a/cmd/helm/testdata/output/install-with-multiple-values.txt b/testdata/output/install-with-multiple-values.txt similarity index 100% rename from cmd/helm/testdata/output/install-with-multiple-values.txt rename to testdata/output/install-with-multiple-values.txt diff --git a/cmd/helm/testdata/output/install-with-timeout.txt b/testdata/output/install-with-timeout.txt similarity index 100% rename from cmd/helm/testdata/output/install-with-timeout.txt rename to testdata/output/install-with-timeout.txt diff --git a/cmd/helm/testdata/output/install-with-values-file.txt b/testdata/output/install-with-values-file.txt similarity index 100% rename from cmd/helm/testdata/output/install-with-values-file.txt rename to testdata/output/install-with-values-file.txt diff --git a/cmd/helm/testdata/output/install-with-values.txt b/testdata/output/install-with-values.txt similarity index 100% rename from cmd/helm/testdata/output/install-with-values.txt rename to testdata/output/install-with-values.txt diff --git a/cmd/helm/testdata/output/install-with-wait.txt b/testdata/output/install-with-wait.txt similarity index 100% rename from cmd/helm/testdata/output/install-with-wait.txt rename to testdata/output/install-with-wait.txt diff --git a/cmd/helm/testdata/output/install.txt b/testdata/output/install.txt similarity index 100% rename from cmd/helm/testdata/output/install.txt rename to testdata/output/install.txt diff --git a/cmd/helm/testdata/output/repo-add.txt b/testdata/output/repo-add.txt similarity index 100% rename from cmd/helm/testdata/output/repo-add.txt rename to testdata/output/repo-add.txt diff --git a/cmd/helm/testdata/output/rollback-no-args.txt b/testdata/output/rollback-no-args.txt similarity index 100% rename from cmd/helm/testdata/output/rollback-no-args.txt rename to testdata/output/rollback-no-args.txt diff --git a/cmd/helm/testdata/output/rollback-timeout.txt b/testdata/output/rollback-timeout.txt similarity index 100% rename from cmd/helm/testdata/output/rollback-timeout.txt rename to testdata/output/rollback-timeout.txt diff --git a/cmd/helm/testdata/output/rollback-wait.txt b/testdata/output/rollback-wait.txt similarity index 100% rename from cmd/helm/testdata/output/rollback-wait.txt rename to testdata/output/rollback-wait.txt diff --git a/cmd/helm/testdata/output/rollback.txt b/testdata/output/rollback.txt similarity index 100% rename from cmd/helm/testdata/output/rollback.txt rename to testdata/output/rollback.txt diff --git a/cmd/helm/testdata/output/search-constraint-single.txt b/testdata/output/search-constraint-single.txt similarity index 100% rename from cmd/helm/testdata/output/search-constraint-single.txt rename to testdata/output/search-constraint-single.txt diff --git a/cmd/helm/testdata/output/search-constraint.txt b/testdata/output/search-constraint.txt similarity index 100% rename from cmd/helm/testdata/output/search-constraint.txt rename to testdata/output/search-constraint.txt diff --git a/cmd/helm/testdata/output/search-multiple-versions-constraints.txt b/testdata/output/search-multiple-versions-constraints.txt similarity index 100% rename from cmd/helm/testdata/output/search-multiple-versions-constraints.txt rename to testdata/output/search-multiple-versions-constraints.txt diff --git a/cmd/helm/testdata/output/search-multiple-versions.txt b/testdata/output/search-multiple-versions.txt similarity index 100% rename from cmd/helm/testdata/output/search-multiple-versions.txt rename to testdata/output/search-multiple-versions.txt diff --git a/cmd/helm/testdata/output/search-multiple.txt b/testdata/output/search-multiple.txt similarity index 100% rename from cmd/helm/testdata/output/search-multiple.txt rename to testdata/output/search-multiple.txt diff --git a/cmd/helm/testdata/output/search-not-found.txt b/testdata/output/search-not-found.txt similarity index 100% rename from cmd/helm/testdata/output/search-not-found.txt rename to testdata/output/search-not-found.txt diff --git a/cmd/helm/testdata/output/search-regex.txt b/testdata/output/search-regex.txt similarity index 100% rename from cmd/helm/testdata/output/search-regex.txt rename to testdata/output/search-regex.txt diff --git a/cmd/helm/testdata/output/search-single.txt b/testdata/output/search-single.txt similarity index 100% rename from cmd/helm/testdata/output/search-single.txt rename to testdata/output/search-single.txt diff --git a/cmd/helm/testdata/output/search-versions-constraint.txt b/testdata/output/search-versions-constraint.txt similarity index 100% rename from cmd/helm/testdata/output/search-versions-constraint.txt rename to testdata/output/search-versions-constraint.txt diff --git a/cmd/helm/testdata/output/status-with-notes.txt b/testdata/output/status-with-notes.txt similarity index 100% rename from cmd/helm/testdata/output/status-with-notes.txt rename to testdata/output/status-with-notes.txt diff --git a/cmd/helm/testdata/output/status-with-resource.txt b/testdata/output/status-with-resource.txt similarity index 100% rename from cmd/helm/testdata/output/status-with-resource.txt rename to testdata/output/status-with-resource.txt diff --git a/cmd/helm/testdata/output/status-with-test-suite.txt b/testdata/output/status-with-test-suite.txt similarity index 100% rename from cmd/helm/testdata/output/status-with-test-suite.txt rename to testdata/output/status-with-test-suite.txt diff --git a/cmd/helm/testdata/output/status.json b/testdata/output/status.json similarity index 100% rename from cmd/helm/testdata/output/status.json rename to testdata/output/status.json diff --git a/cmd/helm/testdata/output/status.txt b/testdata/output/status.txt similarity index 100% rename from cmd/helm/testdata/output/status.txt rename to testdata/output/status.txt diff --git a/cmd/helm/testdata/output/status.yaml b/testdata/output/status.yaml similarity index 100% rename from cmd/helm/testdata/output/status.yaml rename to testdata/output/status.yaml diff --git a/cmd/helm/testdata/output/template-lib-chart.txt b/testdata/output/template-lib-chart.txt similarity index 100% rename from cmd/helm/testdata/output/template-lib-chart.txt rename to testdata/output/template-lib-chart.txt diff --git a/cmd/helm/testdata/output/template-name-template.txt b/testdata/output/template-name-template.txt similarity index 100% rename from cmd/helm/testdata/output/template-name-template.txt rename to testdata/output/template-name-template.txt diff --git a/cmd/helm/testdata/output/template-no-args.txt b/testdata/output/template-no-args.txt similarity index 100% rename from cmd/helm/testdata/output/template-no-args.txt rename to testdata/output/template-no-args.txt diff --git a/cmd/helm/testdata/output/template-set.txt b/testdata/output/template-set.txt similarity index 100% rename from cmd/helm/testdata/output/template-set.txt rename to testdata/output/template-set.txt diff --git a/cmd/helm/testdata/output/template-values-files.txt b/testdata/output/template-values-files.txt similarity index 100% rename from cmd/helm/testdata/output/template-values-files.txt rename to testdata/output/template-values-files.txt diff --git a/cmd/helm/testdata/output/template.txt b/testdata/output/template.txt similarity index 100% rename from cmd/helm/testdata/output/template.txt rename to testdata/output/template.txt diff --git a/cmd/helm/testdata/output/test-failure.txt b/testdata/output/test-failure.txt similarity index 100% rename from cmd/helm/testdata/output/test-failure.txt rename to testdata/output/test-failure.txt diff --git a/cmd/helm/testdata/output/test-no-tests.txt b/testdata/output/test-no-tests.txt similarity index 100% rename from cmd/helm/testdata/output/test-no-tests.txt rename to testdata/output/test-no-tests.txt diff --git a/cmd/helm/testdata/output/test-running.txt b/testdata/output/test-running.txt similarity index 100% rename from cmd/helm/testdata/output/test-running.txt rename to testdata/output/test-running.txt diff --git a/cmd/helm/testdata/output/test-success.txt b/testdata/output/test-success.txt similarity index 100% rename from cmd/helm/testdata/output/test-success.txt rename to testdata/output/test-success.txt diff --git a/cmd/helm/testdata/output/test-unknown.txt b/testdata/output/test-unknown.txt similarity index 100% rename from cmd/helm/testdata/output/test-unknown.txt rename to testdata/output/test-unknown.txt diff --git a/cmd/helm/testdata/output/uninstall-no-args.txt b/testdata/output/uninstall-no-args.txt similarity index 100% rename from cmd/helm/testdata/output/uninstall-no-args.txt rename to testdata/output/uninstall-no-args.txt diff --git a/cmd/helm/testdata/output/uninstall-no-hooks.txt b/testdata/output/uninstall-no-hooks.txt similarity index 100% rename from cmd/helm/testdata/output/uninstall-no-hooks.txt rename to testdata/output/uninstall-no-hooks.txt diff --git a/cmd/helm/testdata/output/uninstall-purge.txt b/testdata/output/uninstall-purge.txt similarity index 100% rename from cmd/helm/testdata/output/uninstall-purge.txt rename to testdata/output/uninstall-purge.txt diff --git a/cmd/helm/testdata/output/uninstall-timeout.txt b/testdata/output/uninstall-timeout.txt similarity index 100% rename from cmd/helm/testdata/output/uninstall-timeout.txt rename to testdata/output/uninstall-timeout.txt diff --git a/cmd/helm/testdata/output/uninstall.txt b/testdata/output/uninstall.txt similarity index 100% rename from cmd/helm/testdata/output/uninstall.txt rename to testdata/output/uninstall.txt diff --git a/cmd/helm/testdata/output/upgrade-with-bad-dependencies.txt b/testdata/output/upgrade-with-bad-dependencies.txt similarity index 100% rename from cmd/helm/testdata/output/upgrade-with-bad-dependencies.txt rename to testdata/output/upgrade-with-bad-dependencies.txt diff --git a/cmd/helm/testdata/output/upgrade-with-install-timeout.txt b/testdata/output/upgrade-with-install-timeout.txt similarity index 100% rename from cmd/helm/testdata/output/upgrade-with-install-timeout.txt rename to testdata/output/upgrade-with-install-timeout.txt diff --git a/cmd/helm/testdata/output/upgrade-with-install.txt b/testdata/output/upgrade-with-install.txt similarity index 100% rename from cmd/helm/testdata/output/upgrade-with-install.txt rename to testdata/output/upgrade-with-install.txt diff --git a/cmd/helm/testdata/output/upgrade-with-missing-dependencies.txt b/testdata/output/upgrade-with-missing-dependencies.txt similarity index 100% rename from cmd/helm/testdata/output/upgrade-with-missing-dependencies.txt rename to testdata/output/upgrade-with-missing-dependencies.txt diff --git a/cmd/helm/testdata/output/upgrade-with-reset-values.txt b/testdata/output/upgrade-with-reset-values.txt similarity index 100% rename from cmd/helm/testdata/output/upgrade-with-reset-values.txt rename to testdata/output/upgrade-with-reset-values.txt diff --git a/cmd/helm/testdata/output/upgrade-with-reset-values2.txt b/testdata/output/upgrade-with-reset-values2.txt similarity index 100% rename from cmd/helm/testdata/output/upgrade-with-reset-values2.txt rename to testdata/output/upgrade-with-reset-values2.txt diff --git a/cmd/helm/testdata/output/upgrade-with-timeout.txt b/testdata/output/upgrade-with-timeout.txt similarity index 100% rename from cmd/helm/testdata/output/upgrade-with-timeout.txt rename to testdata/output/upgrade-with-timeout.txt diff --git a/cmd/helm/testdata/output/upgrade-with-wait.txt b/testdata/output/upgrade-with-wait.txt similarity index 100% rename from cmd/helm/testdata/output/upgrade-with-wait.txt rename to testdata/output/upgrade-with-wait.txt diff --git a/cmd/helm/testdata/output/upgrade.txt b/testdata/output/upgrade.txt similarity index 100% rename from cmd/helm/testdata/output/upgrade.txt rename to testdata/output/upgrade.txt diff --git a/cmd/helm/testdata/output/version-template.txt b/testdata/output/version-template.txt similarity index 100% rename from cmd/helm/testdata/output/version-template.txt rename to testdata/output/version-template.txt diff --git a/cmd/helm/testdata/output/version.txt b/testdata/output/version.txt similarity index 100% rename from cmd/helm/testdata/output/version.txt rename to testdata/output/version.txt diff --git a/cmd/helm/testdata/plugins.yaml b/testdata/plugins.yaml similarity index 50% rename from cmd/helm/testdata/plugins.yaml rename to testdata/plugins.yaml index 69086973e..5002875b4 100644 --- a/cmd/helm/testdata/plugins.yaml +++ b/testdata/plugins.yaml @@ -1,3 +1,3 @@ plugins: - name: testplugin - url: testdata/testplugin + url: ./testplugin diff --git a/cmd/helm/testdata/repositories.yaml b/testdata/repositories.yaml similarity index 100% rename from cmd/helm/testdata/repositories.yaml rename to testdata/repositories.yaml diff --git a/cmd/helm/testdata/testcharts/alpine/Chart.yaml b/testdata/testcharts/alpine/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/alpine/Chart.yaml rename to testdata/testcharts/alpine/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/alpine/README.md b/testdata/testcharts/alpine/README.md similarity index 100% rename from cmd/helm/testdata/testcharts/alpine/README.md rename to testdata/testcharts/alpine/README.md diff --git a/cmd/helm/testdata/testcharts/alpine/extra_values.yaml b/testdata/testcharts/alpine/extra_values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/alpine/extra_values.yaml rename to testdata/testcharts/alpine/extra_values.yaml diff --git a/cmd/helm/testdata/testcharts/alpine/more_values.yaml b/testdata/testcharts/alpine/more_values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/alpine/more_values.yaml rename to testdata/testcharts/alpine/more_values.yaml diff --git a/cmd/helm/testdata/testcharts/alpine/templates/alpine-pod.yaml b/testdata/testcharts/alpine/templates/alpine-pod.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/alpine/templates/alpine-pod.yaml rename to testdata/testcharts/alpine/templates/alpine-pod.yaml diff --git a/cmd/helm/testdata/testcharts/alpine/values.yaml b/testdata/testcharts/alpine/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/alpine/values.yaml rename to testdata/testcharts/alpine/values.yaml diff --git a/cmd/helm/testdata/testcharts/chart-bad-requirements/.helmignore b/testdata/testcharts/chart-bad-requirements/.helmignore similarity index 100% rename from cmd/helm/testdata/testcharts/chart-bad-requirements/.helmignore rename to testdata/testcharts/chart-bad-requirements/.helmignore diff --git a/cmd/helm/testdata/testcharts/chart-bad-requirements/Chart.yaml b/testdata/testcharts/chart-bad-requirements/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-bad-requirements/Chart.yaml rename to testdata/testcharts/chart-bad-requirements/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/chart-bad-requirements/charts/reqsubchart/.helmignore b/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 testdata/testcharts/chart-bad-requirements/charts/reqsubchart/.helmignore diff --git a/cmd/helm/testdata/testcharts/chart-bad-requirements/charts/reqsubchart/Chart.yaml b/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 testdata/testcharts/chart-bad-requirements/charts/reqsubchart/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/chart-bad-requirements/charts/reqsubchart/values.yaml b/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 testdata/testcharts/chart-bad-requirements/charts/reqsubchart/values.yaml diff --git a/cmd/helm/testdata/testcharts/chart-bad-requirements/values.yaml b/testdata/testcharts/chart-bad-requirements/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-bad-requirements/values.yaml rename to testdata/testcharts/chart-bad-requirements/values.yaml diff --git a/cmd/helm/testdata/testcharts/chart-bad-type/Chart.yaml b/testdata/testcharts/chart-bad-type/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-bad-type/Chart.yaml rename to testdata/testcharts/chart-bad-type/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/chart-bad-type/README.md b/testdata/testcharts/chart-bad-type/README.md similarity index 100% rename from cmd/helm/testdata/testcharts/chart-bad-type/README.md rename to testdata/testcharts/chart-bad-type/README.md diff --git a/cmd/helm/testdata/testcharts/chart-bad-type/extra_values.yaml b/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 testdata/testcharts/chart-bad-type/extra_values.yaml diff --git a/cmd/helm/testdata/testcharts/chart-bad-type/more_values.yaml b/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 testdata/testcharts/chart-bad-type/more_values.yaml diff --git a/cmd/helm/testdata/testcharts/chart-bad-type/templates/alpine-pod.yaml b/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 testdata/testcharts/chart-bad-type/templates/alpine-pod.yaml diff --git a/cmd/helm/testdata/testcharts/chart-bad-type/values.yaml b/testdata/testcharts/chart-bad-type/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-bad-type/values.yaml rename to testdata/testcharts/chart-bad-type/values.yaml diff --git a/cmd/helm/testdata/testcharts/chart-missing-deps/.helmignore b/testdata/testcharts/chart-missing-deps/.helmignore similarity index 100% rename from cmd/helm/testdata/testcharts/chart-missing-deps/.helmignore rename to testdata/testcharts/chart-missing-deps/.helmignore diff --git a/cmd/helm/testdata/testcharts/chart-missing-deps/Chart.yaml b/testdata/testcharts/chart-missing-deps/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-missing-deps/Chart.yaml rename to testdata/testcharts/chart-missing-deps/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/chart-missing-deps/charts/reqsubchart/.helmignore b/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 testdata/testcharts/chart-missing-deps/charts/reqsubchart/.helmignore diff --git a/cmd/helm/testdata/testcharts/chart-missing-deps/charts/reqsubchart/Chart.yaml b/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 testdata/testcharts/chart-missing-deps/charts/reqsubchart/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/chart-missing-deps/charts/reqsubchart/values.yaml b/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 testdata/testcharts/chart-missing-deps/charts/reqsubchart/values.yaml diff --git a/cmd/helm/testdata/testcharts/chart-missing-deps/values.yaml b/testdata/testcharts/chart-missing-deps/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/chart-missing-deps/values.yaml rename to testdata/testcharts/chart-missing-deps/values.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-lib-dep/.helmignore b/testdata/testcharts/chart-with-lib-dep/.helmignore similarity index 100% rename from cmd/helm/testdata/testcharts/chart-with-lib-dep/.helmignore rename to testdata/testcharts/chart-with-lib-dep/.helmignore diff --git a/cmd/helm/testdata/testcharts/chart-with-lib-dep/Chart.yaml b/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 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/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 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/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 testdata/testcharts/chart-with-lib-dep/templates/NOTES.txt diff --git a/cmd/helm/testdata/testcharts/chart-with-lib-dep/templates/_helpers.tpl b/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 testdata/testcharts/chart-with-lib-dep/templates/_helpers.tpl diff --git a/cmd/helm/testdata/testcharts/chart-with-lib-dep/templates/deployment.yaml b/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 testdata/testcharts/chart-with-lib-dep/templates/deployment.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-lib-dep/templates/ingress.yaml b/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 testdata/testcharts/chart-with-lib-dep/templates/ingress.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-lib-dep/templates/service.yaml b/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 testdata/testcharts/chart-with-lib-dep/templates/service.yaml diff --git a/cmd/helm/testdata/testcharts/chart-with-lib-dep/values.yaml b/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 testdata/testcharts/chart-with-lib-dep/values.yaml diff --git a/cmd/helm/testdata/testcharts/compressedchart-0.1.0.tgz b/testdata/testcharts/compressedchart-0.1.0.tgz similarity index 100% rename from cmd/helm/testdata/testcharts/compressedchart-0.1.0.tgz rename to testdata/testcharts/compressedchart-0.1.0.tgz diff --git a/cmd/helm/testdata/testcharts/compressedchart-0.2.0.tgz b/testdata/testcharts/compressedchart-0.2.0.tgz similarity index 100% rename from cmd/helm/testdata/testcharts/compressedchart-0.2.0.tgz rename to testdata/testcharts/compressedchart-0.2.0.tgz diff --git a/cmd/helm/testdata/testcharts/compressedchart-0.3.0.tgz b/testdata/testcharts/compressedchart-0.3.0.tgz similarity index 100% rename from cmd/helm/testdata/testcharts/compressedchart-0.3.0.tgz rename to testdata/testcharts/compressedchart-0.3.0.tgz diff --git a/cmd/helm/testdata/testcharts/compressedchart-with-hyphens-0.1.0.tgz b/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 testdata/testcharts/compressedchart-with-hyphens-0.1.0.tgz diff --git a/cmd/helm/testdata/testcharts/decompressedchart/.helmignore b/testdata/testcharts/decompressedchart/.helmignore similarity index 100% rename from cmd/helm/testdata/testcharts/decompressedchart/.helmignore rename to testdata/testcharts/decompressedchart/.helmignore diff --git a/cmd/helm/testdata/testcharts/decompressedchart/Chart.yaml b/testdata/testcharts/decompressedchart/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/decompressedchart/Chart.yaml rename to testdata/testcharts/decompressedchart/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/decompressedchart/values.yaml b/testdata/testcharts/decompressedchart/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/decompressedchart/values.yaml rename to testdata/testcharts/decompressedchart/values.yaml diff --git a/cmd/helm/testdata/testcharts/empty/Chart.yaml b/testdata/testcharts/empty/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/empty/Chart.yaml rename to testdata/testcharts/empty/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/empty/README.md b/testdata/testcharts/empty/README.md similarity index 100% rename from cmd/helm/testdata/testcharts/empty/README.md rename to testdata/testcharts/empty/README.md diff --git a/cmd/helm/testdata/testcharts/empty/templates/empty.yaml b/testdata/testcharts/empty/templates/empty.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/empty/templates/empty.yaml rename to testdata/testcharts/empty/templates/empty.yaml diff --git a/cmd/helm/testdata/testcharts/empty/values.yaml b/testdata/testcharts/empty/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/empty/values.yaml rename to testdata/testcharts/empty/values.yaml diff --git a/cmd/helm/testdata/testcharts/issue1979/Chart.yaml b/testdata/testcharts/issue1979/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/issue1979/Chart.yaml rename to testdata/testcharts/issue1979/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/issue1979/README.md b/testdata/testcharts/issue1979/README.md similarity index 100% rename from cmd/helm/testdata/testcharts/issue1979/README.md rename to testdata/testcharts/issue1979/README.md diff --git a/cmd/helm/testdata/testcharts/issue1979/extra_values.yaml b/testdata/testcharts/issue1979/extra_values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/issue1979/extra_values.yaml rename to testdata/testcharts/issue1979/extra_values.yaml diff --git a/cmd/helm/testdata/testcharts/issue1979/more_values.yaml b/testdata/testcharts/issue1979/more_values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/issue1979/more_values.yaml rename to testdata/testcharts/issue1979/more_values.yaml diff --git a/cmd/helm/testdata/testcharts/issue1979/templates/alpine-pod.yaml b/testdata/testcharts/issue1979/templates/alpine-pod.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/issue1979/templates/alpine-pod.yaml rename to testdata/testcharts/issue1979/templates/alpine-pod.yaml diff --git a/cmd/helm/testdata/testcharts/issue1979/values.yaml b/testdata/testcharts/issue1979/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/issue1979/values.yaml rename to testdata/testcharts/issue1979/values.yaml diff --git a/cmd/helm/testdata/testcharts/lib-chart/.helmignore b/testdata/testcharts/lib-chart/.helmignore similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/.helmignore rename to testdata/testcharts/lib-chart/.helmignore diff --git a/cmd/helm/testdata/testcharts/lib-chart/Chart.yaml b/testdata/testcharts/lib-chart/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/Chart.yaml rename to testdata/testcharts/lib-chart/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/lib-chart/README.md b/testdata/testcharts/lib-chart/README.md similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/README.md rename to testdata/testcharts/lib-chart/README.md diff --git a/cmd/helm/testdata/testcharts/lib-chart/templates/_chartref.tpl b/testdata/testcharts/lib-chart/templates/_chartref.tpl similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/templates/_chartref.tpl rename to testdata/testcharts/lib-chart/templates/_chartref.tpl diff --git a/cmd/helm/testdata/testcharts/lib-chart/templates/_configmap.yaml b/testdata/testcharts/lib-chart/templates/_configmap.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/templates/_configmap.yaml rename to testdata/testcharts/lib-chart/templates/_configmap.yaml diff --git a/cmd/helm/testdata/testcharts/lib-chart/templates/_container.yaml b/testdata/testcharts/lib-chart/templates/_container.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/templates/_container.yaml rename to testdata/testcharts/lib-chart/templates/_container.yaml diff --git a/cmd/helm/testdata/testcharts/lib-chart/templates/_deployment.yaml b/testdata/testcharts/lib-chart/templates/_deployment.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/templates/_deployment.yaml rename to testdata/testcharts/lib-chart/templates/_deployment.yaml diff --git a/cmd/helm/testdata/testcharts/lib-chart/templates/_envvar.tpl b/testdata/testcharts/lib-chart/templates/_envvar.tpl similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/templates/_envvar.tpl rename to testdata/testcharts/lib-chart/templates/_envvar.tpl diff --git a/cmd/helm/testdata/testcharts/lib-chart/templates/_fullname.tpl b/testdata/testcharts/lib-chart/templates/_fullname.tpl similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/templates/_fullname.tpl rename to testdata/testcharts/lib-chart/templates/_fullname.tpl diff --git a/cmd/helm/testdata/testcharts/lib-chart/templates/_ingress.yaml b/testdata/testcharts/lib-chart/templates/_ingress.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/templates/_ingress.yaml rename to testdata/testcharts/lib-chart/templates/_ingress.yaml diff --git a/cmd/helm/testdata/testcharts/lib-chart/templates/_metadata.yaml b/testdata/testcharts/lib-chart/templates/_metadata.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/templates/_metadata.yaml rename to testdata/testcharts/lib-chart/templates/_metadata.yaml diff --git a/cmd/helm/testdata/testcharts/lib-chart/templates/_metadata_annotations.tpl b/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 testdata/testcharts/lib-chart/templates/_metadata_annotations.tpl diff --git a/cmd/helm/testdata/testcharts/lib-chart/templates/_metadata_labels.tpl b/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 testdata/testcharts/lib-chart/templates/_metadata_labels.tpl diff --git a/cmd/helm/testdata/testcharts/lib-chart/templates/_name.tpl b/testdata/testcharts/lib-chart/templates/_name.tpl similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/templates/_name.tpl rename to testdata/testcharts/lib-chart/templates/_name.tpl diff --git a/cmd/helm/testdata/testcharts/lib-chart/templates/_persistentvolumeclaim.yaml b/testdata/testcharts/lib-chart/templates/_persistentvolumeclaim.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/templates/_persistentvolumeclaim.yaml rename to testdata/testcharts/lib-chart/templates/_persistentvolumeclaim.yaml diff --git a/cmd/helm/testdata/testcharts/lib-chart/templates/_secret.yaml b/testdata/testcharts/lib-chart/templates/_secret.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/templates/_secret.yaml rename to testdata/testcharts/lib-chart/templates/_secret.yaml diff --git a/cmd/helm/testdata/testcharts/lib-chart/templates/_service.yaml b/testdata/testcharts/lib-chart/templates/_service.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/templates/_service.yaml rename to testdata/testcharts/lib-chart/templates/_service.yaml diff --git a/cmd/helm/testdata/testcharts/lib-chart/templates/_util.tpl b/testdata/testcharts/lib-chart/templates/_util.tpl similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/templates/_util.tpl rename to testdata/testcharts/lib-chart/templates/_util.tpl diff --git a/cmd/helm/testdata/testcharts/lib-chart/templates/_volume.tpl b/testdata/testcharts/lib-chart/templates/_volume.tpl similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/templates/_volume.tpl rename to testdata/testcharts/lib-chart/templates/_volume.tpl diff --git a/cmd/helm/testdata/testcharts/lib-chart/values.yaml b/testdata/testcharts/lib-chart/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/lib-chart/values.yaml rename to testdata/testcharts/lib-chart/values.yaml diff --git a/cmd/helm/testdata/testcharts/novals/Chart.yaml b/testdata/testcharts/novals/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/novals/Chart.yaml rename to testdata/testcharts/novals/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/novals/README.md b/testdata/testcharts/novals/README.md similarity index 100% rename from cmd/helm/testdata/testcharts/novals/README.md rename to testdata/testcharts/novals/README.md diff --git a/cmd/helm/testdata/testcharts/novals/templates/alpine-pod.yaml b/testdata/testcharts/novals/templates/alpine-pod.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/novals/templates/alpine-pod.yaml rename to testdata/testcharts/novals/templates/alpine-pod.yaml diff --git a/cmd/helm/testdata/testcharts/reqtest-0.1.0.tgz b/testdata/testcharts/reqtest-0.1.0.tgz similarity index 100% rename from cmd/helm/testdata/testcharts/reqtest-0.1.0.tgz rename to testdata/testcharts/reqtest-0.1.0.tgz diff --git a/cmd/helm/testdata/testcharts/reqtest/.helmignore b/testdata/testcharts/reqtest/.helmignore similarity index 100% rename from cmd/helm/testdata/testcharts/reqtest/.helmignore rename to testdata/testcharts/reqtest/.helmignore diff --git a/cmd/helm/testdata/testcharts/reqtest/Chart.lock b/testdata/testcharts/reqtest/Chart.lock similarity index 100% rename from cmd/helm/testdata/testcharts/reqtest/Chart.lock rename to testdata/testcharts/reqtest/Chart.lock diff --git a/cmd/helm/testdata/testcharts/reqtest/Chart.yaml b/testdata/testcharts/reqtest/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/reqtest/Chart.yaml rename to testdata/testcharts/reqtest/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/reqtest/charts/reqsubchart/.helmignore b/testdata/testcharts/reqtest/charts/reqsubchart/.helmignore similarity index 100% rename from cmd/helm/testdata/testcharts/reqtest/charts/reqsubchart/.helmignore rename to testdata/testcharts/reqtest/charts/reqsubchart/.helmignore diff --git a/cmd/helm/testdata/testcharts/reqtest/charts/reqsubchart/Chart.yaml b/testdata/testcharts/reqtest/charts/reqsubchart/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/reqtest/charts/reqsubchart/Chart.yaml rename to testdata/testcharts/reqtest/charts/reqsubchart/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/reqtest/charts/reqsubchart/values.yaml b/testdata/testcharts/reqtest/charts/reqsubchart/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/reqtest/charts/reqsubchart/values.yaml rename to testdata/testcharts/reqtest/charts/reqsubchart/values.yaml diff --git a/cmd/helm/testdata/testcharts/reqtest/charts/reqsubchart2/.helmignore b/testdata/testcharts/reqtest/charts/reqsubchart2/.helmignore similarity index 100% rename from cmd/helm/testdata/testcharts/reqtest/charts/reqsubchart2/.helmignore rename to testdata/testcharts/reqtest/charts/reqsubchart2/.helmignore diff --git a/cmd/helm/testdata/testcharts/reqtest/charts/reqsubchart2/Chart.yaml b/testdata/testcharts/reqtest/charts/reqsubchart2/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/reqtest/charts/reqsubchart2/Chart.yaml rename to testdata/testcharts/reqtest/charts/reqsubchart2/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/reqtest/charts/reqsubchart2/values.yaml b/testdata/testcharts/reqtest/charts/reqsubchart2/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/reqtest/charts/reqsubchart2/values.yaml rename to testdata/testcharts/reqtest/charts/reqsubchart2/values.yaml diff --git a/cmd/helm/testdata/testcharts/reqtest/charts/reqsubchart3-0.2.0.tgz b/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 testdata/testcharts/reqtest/charts/reqsubchart3-0.2.0.tgz diff --git a/cmd/helm/testdata/testcharts/reqtest/values.yaml b/testdata/testcharts/reqtest/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/reqtest/values.yaml rename to testdata/testcharts/reqtest/values.yaml diff --git a/cmd/helm/testdata/testcharts/signtest-0.1.0.tgz b/testdata/testcharts/signtest-0.1.0.tgz similarity index 100% rename from cmd/helm/testdata/testcharts/signtest-0.1.0.tgz rename to testdata/testcharts/signtest-0.1.0.tgz diff --git a/cmd/helm/testdata/testcharts/signtest-0.1.0.tgz.prov b/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 testdata/testcharts/signtest-0.1.0.tgz.prov diff --git a/cmd/helm/testdata/testcharts/signtest/.helmignore b/testdata/testcharts/signtest/.helmignore similarity index 100% rename from cmd/helm/testdata/testcharts/signtest/.helmignore rename to testdata/testcharts/signtest/.helmignore diff --git a/cmd/helm/testdata/testcharts/signtest/Chart.yaml b/testdata/testcharts/signtest/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/signtest/Chart.yaml rename to testdata/testcharts/signtest/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/signtest/alpine/Chart.yaml b/testdata/testcharts/signtest/alpine/Chart.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/signtest/alpine/Chart.yaml rename to testdata/testcharts/signtest/alpine/Chart.yaml diff --git a/cmd/helm/testdata/testcharts/signtest/alpine/README.md b/testdata/testcharts/signtest/alpine/README.md similarity index 100% rename from cmd/helm/testdata/testcharts/signtest/alpine/README.md rename to testdata/testcharts/signtest/alpine/README.md diff --git a/cmd/helm/testdata/testcharts/signtest/alpine/templates/alpine-pod.yaml b/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 testdata/testcharts/signtest/alpine/templates/alpine-pod.yaml diff --git a/cmd/helm/testdata/testcharts/signtest/alpine/values.yaml b/testdata/testcharts/signtest/alpine/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/signtest/alpine/values.yaml rename to testdata/testcharts/signtest/alpine/values.yaml diff --git a/cmd/helm/testdata/testcharts/signtest/templates/pod.yaml b/testdata/testcharts/signtest/templates/pod.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/signtest/templates/pod.yaml rename to testdata/testcharts/signtest/templates/pod.yaml diff --git a/cmd/helm/testdata/testcharts/signtest/values.yaml b/testdata/testcharts/signtest/values.yaml similarity index 100% rename from cmd/helm/testdata/testcharts/signtest/values.yaml rename to testdata/testcharts/signtest/values.yaml diff --git a/cmd/helm/testdata/testplugin/plugin.yaml b/testdata/testplugin/plugin.yaml similarity index 100% rename from cmd/helm/testdata/testplugin/plugin.yaml rename to testdata/testplugin/plugin.yaml diff --git a/cmd/helm/testdata/testserver/index.yaml b/testdata/testserver/index.yaml similarity index 100% rename from cmd/helm/testdata/testserver/index.yaml rename to testdata/testserver/index.yaml diff --git a/cmd/helm/testdata/testserver/repository/repositories.yaml b/testdata/testserver/repository/repositories.yaml similarity index 100% rename from cmd/helm/testdata/testserver/repository/repositories.yaml rename to testdata/testserver/repository/repositories.yaml