From 6345f0419087123bd21e6abb2d32299ec3226204 Mon Sep 17 00:00:00 2001 From: Adam Reese <adam@reese.io> Date: Wed, 18 Apr 2018 14:53:38 -0700 Subject: [PATCH] ref(hapi): convert protobuf to go types --- _proto/Makefile | 45 - _proto/hapi/chart/chart.proto | 44 - _proto/hapi/chart/config.proto | 31 - _proto/hapi/chart/metadata.proto | 93 -- _proto/hapi/chart/template.proto | 31 - _proto/hapi/release/hook.proto | 58 -- _proto/hapi/release/info.proto | 37 - _proto/hapi/release/release.proto | 53 -- _proto/hapi/release/status.proto | 61 -- _proto/hapi/release/test_run.proto | 37 - _proto/hapi/release/test_suite.proto | 34 - cmd/helm/create.go | 2 +- cmd/helm/create_test.go | 2 +- cmd/helm/delete_test.go | 2 +- cmd/helm/dependency_update_test.go | 2 +- cmd/helm/get_hooks_test.go | 2 +- cmd/helm/get_manifest_test.go | 2 +- cmd/helm/get_test.go | 2 +- cmd/helm/get_values_test.go | 2 +- cmd/helm/helm_test.go | 2 +- cmd/helm/history.go | 4 +- cmd/helm/history_test.go | 2 +- cmd/helm/install.go | 4 +- cmd/helm/list.go | 30 +- cmd/helm/list_test.go | 2 +- cmd/helm/package.go | 2 +- cmd/helm/package_test.go | 2 +- cmd/helm/printer.go | 2 +- cmd/helm/release_testing.go | 2 +- cmd/helm/release_testing_test.go | 3 +- cmd/helm/search/search_test.go | 2 +- cmd/helm/status.go | 6 +- cmd/helm/status_test.go | 2 +- cmd/helm/template.go | 4 +- cmd/helm/upgrade_test.go | 4 +- pkg/chartutil/chartfile.go | 2 +- pkg/chartutil/chartfile_test.go | 2 +- pkg/chartutil/create.go | 2 +- pkg/chartutil/create_test.go | 2 +- pkg/chartutil/load.go | 2 +- pkg/chartutil/load_test.go | 2 +- pkg/chartutil/requirements.go | 3 +- pkg/chartutil/requirements_test.go | 2 +- pkg/chartutil/save.go | 2 +- pkg/chartutil/save_test.go | 3 +- pkg/chartutil/values.go | 3 +- pkg/chartutil/values_test.go | 3 +- pkg/downloader/manager.go | 2 +- pkg/engine/engine.go | 2 +- pkg/engine/engine_test.go | 2 +- pkg/hapi/chart/chart.go | 54 ++ pkg/hapi/chart/config.go | 12 + pkg/hapi/chart/metadata.go | 73 ++ pkg/hapi/chart/template.go | 26 + pkg/hapi/release/hook.go | 88 ++ pkg/hapi/release/info.go | 14 + pkg/hapi/release/release.go | 25 + pkg/hapi/release/status.go | 62 ++ pkg/hapi/release/test_run.go | 37 + pkg/hapi/release/test_suite.go | 13 + .../tiller.proto => pkg/hapi/tiller.go | 249 +++-- pkg/helm/client.go | 16 +- pkg/helm/fake.go | 20 +- pkg/helm/fake_test.go | 18 +- pkg/helm/helm_test.go | 54 +- pkg/helm/interface.go | 12 +- pkg/helm/option.go | 35 +- pkg/hooks/hooks.go | 2 +- pkg/lint/rules/chartfile.go | 3 +- pkg/lint/rules/chartfile_test.go | 2 +- pkg/lint/rules/template.go | 3 +- pkg/proto/hapi/chart/chart.pb.go | 119 --- pkg/proto/hapi/chart/config.pb.go | 78 -- pkg/proto/hapi/chart/metadata.pb.go | 276 ------ pkg/proto/hapi/chart/template.pb.go | 60 -- pkg/proto/hapi/release/hook.pb.go | 231 ----- pkg/proto/hapi/release/info.pb.go | 90 -- pkg/proto/hapi/release/release.pb.go | 124 --- pkg/proto/hapi/release/status.pb.go | 141 --- pkg/proto/hapi/release/test_run.pb.go | 118 --- pkg/proto/hapi/release/test_suite.pb.go | 73 -- pkg/proto/hapi/services/tiller.pb.go | 851 ------------------ pkg/provenance/sign.go | 2 +- pkg/releasetesting/environment.go | 8 +- pkg/releasetesting/environment_test.go | 6 +- pkg/releasetesting/test_suite.go | 2 +- pkg/releasetesting/test_suite_test.go | 12 +- pkg/releaseutil/filter.go | 4 +- pkg/releaseutil/filter_test.go | 2 +- pkg/releaseutil/sorter.go | 2 +- pkg/releaseutil/sorter_test.go | 2 +- pkg/repo/chartrepo_test.go | 2 +- pkg/repo/index.go | 2 +- pkg/repo/index_test.go | 2 +- pkg/repo/local.go | 2 +- pkg/storage/driver/cfgmaps.go | 2 +- pkg/storage/driver/cfgmaps_test.go | 13 +- pkg/storage/driver/driver.go | 2 +- pkg/storage/driver/memory.go | 2 +- pkg/storage/driver/memory_test.go | 4 +- pkg/storage/driver/mock_test.go | 2 +- pkg/storage/driver/records.go | 7 +- pkg/storage/driver/records_test.go | 2 +- pkg/storage/driver/secrets.go | 2 +- pkg/storage/driver/secrets_test.go | 13 +- pkg/storage/driver/util.go | 8 +- pkg/storage/storage.go | 2 +- pkg/storage/storage_test.go | 8 +- pkg/tiller/environment/environment.go | 2 +- pkg/tiller/environment/environment_test.go | 2 +- pkg/tiller/hook_sorter.go | 2 +- pkg/tiller/hook_sorter_test.go | 2 +- pkg/tiller/hooks.go | 2 +- pkg/tiller/hooks_test.go | 2 +- pkg/tiller/release_content.go | 6 +- pkg/tiller/release_content_test.go | 4 +- pkg/tiller/release_history.go | 6 +- pkg/tiller/release_history_test.go | 14 +- pkg/tiller/release_install.go | 12 +- pkg/tiller/release_install_test.go | 6 +- pkg/tiller/release_list.go | 12 +- pkg/tiller/release_list_test.go | 18 +- pkg/tiller/release_rollback.go | 10 +- pkg/tiller/release_rollback_test.go | 12 +- pkg/tiller/release_server.go | 12 +- pkg/tiller/release_server_test.go | 12 +- pkg/tiller/release_status.go | 8 +- pkg/tiller/release_status_test.go | 8 +- pkg/tiller/release_testing.go | 8 +- pkg/tiller/release_uninstall.go | 10 +- pkg/tiller/release_uninstall_test.go | 18 +- pkg/tiller/release_update.go | 14 +- pkg/tiller/release_update_test.go | 37 +- 133 files changed, 846 insertions(+), 3134 deletions(-) delete mode 100644 _proto/Makefile delete mode 100644 _proto/hapi/chart/chart.proto delete mode 100644 _proto/hapi/chart/config.proto delete mode 100644 _proto/hapi/chart/metadata.proto delete mode 100644 _proto/hapi/chart/template.proto delete mode 100644 _proto/hapi/release/hook.proto delete mode 100644 _proto/hapi/release/info.proto delete mode 100644 _proto/hapi/release/release.proto delete mode 100644 _proto/hapi/release/status.proto delete mode 100644 _proto/hapi/release/test_run.proto delete mode 100644 _proto/hapi/release/test_suite.proto create mode 100644 pkg/hapi/chart/chart.go create mode 100644 pkg/hapi/chart/config.go create mode 100644 pkg/hapi/chart/metadata.go create mode 100644 pkg/hapi/chart/template.go create mode 100644 pkg/hapi/release/hook.go create mode 100644 pkg/hapi/release/info.go create mode 100644 pkg/hapi/release/release.go create mode 100644 pkg/hapi/release/status.go create mode 100644 pkg/hapi/release/test_run.go create mode 100644 pkg/hapi/release/test_suite.go rename _proto/hapi/services/tiller.proto => pkg/hapi/tiller.go (55%) delete mode 100644 pkg/proto/hapi/chart/chart.pb.go delete mode 100644 pkg/proto/hapi/chart/config.pb.go delete mode 100644 pkg/proto/hapi/chart/metadata.pb.go delete mode 100644 pkg/proto/hapi/chart/template.pb.go delete mode 100644 pkg/proto/hapi/release/hook.pb.go delete mode 100644 pkg/proto/hapi/release/info.pb.go delete mode 100644 pkg/proto/hapi/release/release.pb.go delete mode 100644 pkg/proto/hapi/release/status.pb.go delete mode 100644 pkg/proto/hapi/release/test_run.pb.go delete mode 100644 pkg/proto/hapi/release/test_suite.pb.go delete mode 100644 pkg/proto/hapi/services/tiller.pb.go diff --git a/_proto/Makefile b/_proto/Makefile deleted file mode 100644 index 5418bd5ca..000000000 --- a/_proto/Makefile +++ /dev/null @@ -1,45 +0,0 @@ -space := $(empty) $(empty) -comma := , -empty := - -import_path = k8s.io/helm/pkg/proto/hapi - -dst = ../pkg/proto -target = go - -chart_ias = $(subst $(space),$(comma),$(addsuffix =$(import_path)/$(chart_pkg),$(addprefix M,$(chart_pbs)))) -chart_pbs = $(sort $(wildcard hapi/chart/*.proto)) -chart_pkg = chart - -release_ias = $(subst $(space),$(comma),$(addsuffix =$(import_path)/$(release_pkg),$(addprefix M,$(release_pbs)))) -release_pbs = $(sort $(wildcard hapi/release/*.proto)) -release_pkg = release - -services_ias = $(subst $(space),$(comma),$(addsuffix =$(import_path)/$(services_pkg),$(addprefix M,$(services_pbs)))) -services_pbs = $(sort $(wildcard hapi/services/*.proto)) -services_pkg = services - -rudder_ias = $(subst $(space),$(comma),$(addsuffix =$(import_path)/$(rudder_pkg),$(addprefix M,$(rudder_pbs)))) -rudder_pbs = $(sort $(wildcard hapi/rudder/*.proto)) -rudder_pkg = rudder - -google_deps = Mgoogle/protobuf/timestamp.proto=github.com/golang/protobuf/ptypes/timestamp,Mgoogle/protobuf/any.proto=github.com/golang/protobuf/ptypes/any - -.PHONY: all -all: chart release services - -.PHONY: chart -chart: - PATH=../bin:$(PATH) protoc --$(target)_out=plugins=$(google_deps),$(chart_ias):$(dst) $(chart_pbs) - -.PHONY: release -release: - PATH=../bin:$(PATH) protoc --$(target)_out=plugins=$(google_deps),$(chart_ias):$(dst) $(release_pbs) - -.PHONY: services -services: - PATH=../bin:$(PATH) protoc --$(target)_out=plugins=$(google_deps),$(chart_ias),$(release_ias):$(dst) $(services_pbs) - -.PHONY: clean -clean: - @rm -rf $(dst)/hapi 2>/dev/null diff --git a/_proto/hapi/chart/chart.proto b/_proto/hapi/chart/chart.proto deleted file mode 100644 index 9b838fd1a..000000000 --- a/_proto/hapi/chart/chart.proto +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2016 The Kubernetes Authors All rights reserved. -// -// 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. - -syntax = "proto3"; - -package hapi.chart; - -import "hapi/chart/config.proto"; -import "hapi/chart/metadata.proto"; -import "hapi/chart/template.proto"; -import "google/protobuf/any.proto"; - -option go_package = "chart"; - -// Chart is a helm package that contains metadata, a default config, zero or more -// optionally parameterizable templates, and zero or more charts (dependencies). -message Chart { - // Contents of the Chartfile. - hapi.chart.Metadata metadata = 1; - - // Templates for this chart. - repeated hapi.chart.Template templates = 2; - - // Charts that this chart depends on. - repeated Chart dependencies = 3; - - // Default config for this template. - hapi.chart.Config values = 4; - - // Miscellaneous files in a chart archive, - // e.g. README, LICENSE, etc. - repeated google.protobuf.Any files = 5; -} diff --git a/_proto/hapi/chart/config.proto b/_proto/hapi/chart/config.proto deleted file mode 100644 index a1404476b..000000000 --- a/_proto/hapi/chart/config.proto +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2016 The Kubernetes Authors All rights reserved. -// -// 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. - -syntax = "proto3"; - -package hapi.chart; - -option go_package = "chart"; - -// Config supplies values to the parametrizable templates of a chart. -message Config { - string raw = 1; - - map<string,Value> values = 2; -} - -// Value describes a configuration value as a string. -message Value { - string value = 1; -} diff --git a/_proto/hapi/chart/metadata.proto b/_proto/hapi/chart/metadata.proto deleted file mode 100644 index 49d6a217a..000000000 --- a/_proto/hapi/chart/metadata.proto +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright 2016 The Kubernetes Authors All rights reserved. -// -// 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. - -syntax = "proto3"; - -package hapi.chart; - -option go_package = "chart"; - -// Maintainer describes a Chart maintainer. -message Maintainer { - // Name is a user name or organization name - string name = 1; - - // Email is an optional email address to contact the named maintainer - string email = 2; - - // Url is an optional URL to an address for the named maintainer - string url = 3; -} - -// Metadata for a Chart file. This models the structure of a Chart.yaml file. -// -// Spec: https://k8s.io/helm/blob/master/docs/design/chart_format.md#the-chart-file -message Metadata { - enum Engine { - UNKNOWN = 0; - GOTPL = 1; - } - // The name of the chart - string name = 1; - - // The URL to a relevant project page, git repo, or contact person - string home = 2; - - // Source is the URL to the source code of this chart - repeated string sources = 3; - - // A SemVer 2 conformant version string of the chart - string version = 4; - - // A one-sentence description of the chart - string description = 5; - - // A list of string keywords - repeated string keywords = 6; - - // A list of name and URL/email address combinations for the maintainer(s) - repeated Maintainer maintainers = 7; - - // The name of the template engine to use. Defaults to 'gotpl'. - string engine = 8; - - // The URL to an icon file. - string icon = 9; - - // The API Version of this chart. - string apiVersion = 10; - - // The condition to check to enable chart - string condition = 11; - - // The tags to check to enable chart - string tags = 12; - - // The version of the application enclosed inside of this chart. - string appVersion = 13; - - // Whether or not this chart is deprecated - bool deprecated = 14; - - // TillerVersion is a SemVer constraints on what version of Tiller is required. - // See SemVer ranges here: https://github.com/Masterminds/semver#basic-comparisons - string tillerVersion = 15; - - // Annotations are additional mappings uninterpreted by Tiller, - // made available for inspection by other applications. - map<string,string> annotations = 16; - - // KubeVersion is a SemVer constraint specifying the version of Kubernetes required. - string kubeVersion = 17; -} diff --git a/_proto/hapi/chart/template.proto b/_proto/hapi/chart/template.proto deleted file mode 100644 index d13543ea9..000000000 --- a/_proto/hapi/chart/template.proto +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2016 The Kubernetes Authors All rights reserved. -// -// 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. - -syntax = "proto3"; - -package hapi.chart; - -option go_package = "chart"; - -// Template represents a template as a name/value pair. -// -// By convention, name is a relative path within the scope of the chart's -// base directory. -message Template { - // Name is the path-like name of the template. - string name = 1; - - // Data is the template as byte data. - bytes data = 2; -} diff --git a/_proto/hapi/release/hook.proto b/_proto/hapi/release/hook.proto deleted file mode 100644 index f0332ecb8..000000000 --- a/_proto/hapi/release/hook.proto +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2016 The Kubernetes Authors All rights reserved. -// -// 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. - -syntax = "proto3"; - -package hapi.release; - -import "google/protobuf/timestamp.proto"; - -option go_package = "release"; - -// Hook defines a hook object. -message Hook { - enum Event { - UNKNOWN = 0; - PRE_INSTALL = 1; - POST_INSTALL = 2; - PRE_DELETE = 3; - POST_DELETE = 4; - PRE_UPGRADE = 5; - POST_UPGRADE = 6; - PRE_ROLLBACK = 7; - POST_ROLLBACK = 8; - RELEASE_TEST_SUCCESS = 9; - RELEASE_TEST_FAILURE = 10; - } - enum DeletePolicy { - SUCCEEDED = 0; - FAILED = 1; - BEFORE_HOOK_CREATION = 2; - } - string name = 1; - // Kind is the Kubernetes kind. - string kind = 2; - // Path is the chart-relative path to the template. - string path = 3; - // Manifest is the manifest contents. - string manifest = 4; - // Events are the events that this hook fires on. - repeated Event events = 5; - // LastRun indicates the date/time this was last run. - google.protobuf.Timestamp last_run = 6; - // Weight indicates the sort order for execution among similar Hook type - int32 weight = 7; - // DeletePolicies are the policies that indicate when to delete the hook - repeated DeletePolicy delete_policies = 8; -} diff --git a/_proto/hapi/release/info.proto b/_proto/hapi/release/info.proto deleted file mode 100644 index e23175d3d..000000000 --- a/_proto/hapi/release/info.proto +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2016 The Kubernetes Authors All rights reserved. -// -// 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. - -syntax = "proto3"; - -package hapi.release; - -import "google/protobuf/timestamp.proto"; -import "hapi/release/status.proto"; - -option go_package = "release"; - -// Info describes release information. -message Info { - Status status = 1; - - google.protobuf.Timestamp first_deployed = 2; - - google.protobuf.Timestamp last_deployed = 3; - - // Deleted tracks when this object was deleted. - google.protobuf.Timestamp deleted = 4; - - // Description is human-friendly "log entry" about this release. - string Description = 5; -} diff --git a/_proto/hapi/release/release.proto b/_proto/hapi/release/release.proto deleted file mode 100644 index 4a6afa0fe..000000000 --- a/_proto/hapi/release/release.proto +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2016 The Kubernetes Authors All rights reserved. -// -// 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. - -syntax = "proto3"; - -package hapi.release; - -import "hapi/release/hook.proto"; -import "hapi/release/info.proto"; -import "hapi/chart/config.proto"; -import "hapi/chart/chart.proto"; - -option go_package = "release"; - -// Release describes a deployment of a chart, together with the chart -// and the variables used to deploy that chart. -message Release { - // Name is the name of the release - string name = 1; - - // Info provides information about a release - hapi.release.Info info = 2; - - // Chart is the chart that was released. - hapi.chart.Chart chart = 3; - - // Config is the set of extra Values added to the chart. - // These values override the default values inside of the chart. - hapi.chart.Config config = 4; - - // Manifest is the string representation of the rendered template. - string manifest = 5; - - // Hooks are all of the hooks declared for this release. - repeated hapi.release.Hook hooks = 6; - - // Version is an int32 which represents the version of the release. - int32 version = 7; - - // Namespace is the kubernetes namespace of the release. - string namespace = 8; -} diff --git a/_proto/hapi/release/status.proto b/_proto/hapi/release/status.proto deleted file mode 100644 index ef28a233c..000000000 --- a/_proto/hapi/release/status.proto +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2016 The Kubernetes Authors All rights reserved. -// -// 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. - -syntax = "proto3"; - -package hapi.release; - -import "hapi/release/test_suite.proto"; - -import "google/protobuf/any.proto"; - -option go_package = "release"; - -// Status defines the status of a release. -message Status { - enum Code { - // Status_UNKNOWN indicates that a release is in an uncertain state. - UNKNOWN = 0; - // Status_DEPLOYED indicates that the release has been pushed to Kubernetes. - DEPLOYED = 1; - // Status_DELETED indicates that a release has been deleted from Kubermetes. - DELETED = 2; - // Status_SUPERSEDED indicates that this release object is outdated and a newer one exists. - SUPERSEDED = 3; - // Status_FAILED indicates that the release was not successfully deployed. - FAILED = 4; - // Status_DELETING indicates that a delete operation is underway. - DELETING = 5; - // Status_PENDING_INSTALL indicates that an install operation is underway. - PENDING_INSTALL = 6; - // Status_PENDING_UPGRADE indicates that an upgrade operation is underway. - PENDING_UPGRADE = 7; - // Status_PENDING_ROLLBACK indicates that an rollback operation is underway. - PENDING_ROLLBACK = 8; - } - - Code code = 1; - - // Deprecated - // google.protobuf.Any details = 2; - - // Cluster resources as kubectl would print them. - string resources = 3; - - // Contains the rendered templates/NOTES.txt if available - string notes = 4; - - // LastTestSuiteRun provides results on the last test run on a release - hapi.release.TestSuite last_test_suite_run = 5; -} diff --git a/_proto/hapi/release/test_run.proto b/_proto/hapi/release/test_run.proto deleted file mode 100644 index 60734ae03..000000000 --- a/_proto/hapi/release/test_run.proto +++ /dev/null @@ -1,37 +0,0 @@ - -// Copyright 2016 The Kubernetes Authors All rights reserved. -// -// 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. - -syntax = "proto3"; - -package hapi.release; - -import "google/protobuf/timestamp.proto"; - -option go_package = "release"; - -message TestRun { - enum Status { - UNKNOWN = 0; - SUCCESS = 1; - FAILURE = 2; - RUNNING = 3; - } - - string name = 1; - Status status = 2; - string info = 3; - google.protobuf.Timestamp started_at = 4; - google.protobuf.Timestamp completed_at = 5; -} diff --git a/_proto/hapi/release/test_suite.proto b/_proto/hapi/release/test_suite.proto deleted file mode 100644 index 2f6feb08c..000000000 --- a/_proto/hapi/release/test_suite.proto +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2016 The Kubernetes Authors All rights reserved. -// -// 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. - -syntax = "proto3"; - -package hapi.release; - -import "google/protobuf/timestamp.proto"; -import "hapi/release/test_run.proto"; - -option go_package = "release"; - -// TestSuite comprises of the last run of the pre-defined test suite of a release version -message TestSuite { - // StartedAt indicates the date/time this test suite was kicked off - google.protobuf.Timestamp started_at = 1; - - // CompletedAt indicates the date/time this test suite was completed - google.protobuf.Timestamp completed_at = 2; - - // Results are the results of each segment of the test - repeated hapi.release.TestRun results = 3; -} diff --git a/cmd/helm/create.go b/cmd/helm/create.go index 556ff171d..27d1c6cf3 100644 --- a/cmd/helm/create.go +++ b/cmd/helm/create.go @@ -25,8 +25,8 @@ import ( "github.com/spf13/cobra" "k8s.io/helm/pkg/chartutil" + "k8s.io/helm/pkg/hapi/chart" "k8s.io/helm/pkg/helm/helmpath" - "k8s.io/helm/pkg/proto/hapi/chart" ) const createDesc = ` diff --git a/cmd/helm/create_test.go b/cmd/helm/create_test.go index 84ccebece..06e793411 100644 --- a/cmd/helm/create_test.go +++ b/cmd/helm/create_test.go @@ -23,7 +23,7 @@ import ( "testing" "k8s.io/helm/pkg/chartutil" - "k8s.io/helm/pkg/proto/hapi/chart" + "k8s.io/helm/pkg/hapi/chart" ) func TestCreateCmd(t *testing.T) { diff --git a/cmd/helm/delete_test.go b/cmd/helm/delete_test.go index 829d17906..457b08d78 100644 --- a/cmd/helm/delete_test.go +++ b/cmd/helm/delete_test.go @@ -22,8 +22,8 @@ import ( "github.com/spf13/cobra" + "k8s.io/helm/pkg/hapi/release" "k8s.io/helm/pkg/helm" - "k8s.io/helm/pkg/proto/hapi/release" ) func TestDelete(t *testing.T) { diff --git a/cmd/helm/dependency_update_test.go b/cmd/helm/dependency_update_test.go index e29cb35de..6adc08391 100644 --- a/cmd/helm/dependency_update_test.go +++ b/cmd/helm/dependency_update_test.go @@ -26,8 +26,8 @@ import ( "github.com/ghodss/yaml" "k8s.io/helm/pkg/chartutil" + "k8s.io/helm/pkg/hapi/chart" "k8s.io/helm/pkg/helm/helmpath" - "k8s.io/helm/pkg/proto/hapi/chart" "k8s.io/helm/pkg/provenance" "k8s.io/helm/pkg/repo" "k8s.io/helm/pkg/repo/repotest" diff --git a/cmd/helm/get_hooks_test.go b/cmd/helm/get_hooks_test.go index e578c2533..3a5dd2e75 100644 --- a/cmd/helm/get_hooks_test.go +++ b/cmd/helm/get_hooks_test.go @@ -22,8 +22,8 @@ import ( "github.com/spf13/cobra" + "k8s.io/helm/pkg/hapi/release" "k8s.io/helm/pkg/helm" - "k8s.io/helm/pkg/proto/hapi/release" ) func TestGetHooks(t *testing.T) { diff --git a/cmd/helm/get_manifest_test.go b/cmd/helm/get_manifest_test.go index 286b5628a..df30914c7 100644 --- a/cmd/helm/get_manifest_test.go +++ b/cmd/helm/get_manifest_test.go @@ -22,8 +22,8 @@ import ( "github.com/spf13/cobra" + "k8s.io/helm/pkg/hapi/release" "k8s.io/helm/pkg/helm" - "k8s.io/helm/pkg/proto/hapi/release" ) func TestGetManifest(t *testing.T) { diff --git a/cmd/helm/get_test.go b/cmd/helm/get_test.go index a6e72987a..29f1500e6 100644 --- a/cmd/helm/get_test.go +++ b/cmd/helm/get_test.go @@ -22,8 +22,8 @@ import ( "github.com/spf13/cobra" + "k8s.io/helm/pkg/hapi/release" "k8s.io/helm/pkg/helm" - "k8s.io/helm/pkg/proto/hapi/release" ) func TestGetCmd(t *testing.T) { diff --git a/cmd/helm/get_values_test.go b/cmd/helm/get_values_test.go index 30b2ba4b8..024858738 100644 --- a/cmd/helm/get_values_test.go +++ b/cmd/helm/get_values_test.go @@ -22,8 +22,8 @@ import ( "github.com/spf13/cobra" + "k8s.io/helm/pkg/hapi/release" "k8s.io/helm/pkg/helm" - "k8s.io/helm/pkg/proto/hapi/release" ) func TestGetValuesCmd(t *testing.T) { diff --git a/cmd/helm/helm_test.go b/cmd/helm/helm_test.go index 79b8c16f2..d72273e66 100644 --- a/cmd/helm/helm_test.go +++ b/cmd/helm/helm_test.go @@ -29,9 +29,9 @@ import ( "github.com/spf13/cobra" + "k8s.io/helm/pkg/hapi/release" "k8s.io/helm/pkg/helm" "k8s.io/helm/pkg/helm/helmpath" - "k8s.io/helm/pkg/proto/hapi/release" "k8s.io/helm/pkg/repo" ) diff --git a/cmd/helm/history.go b/cmd/helm/history.go index 2a2007aea..b37cf0989 100644 --- a/cmd/helm/history.go +++ b/cmd/helm/history.go @@ -25,9 +25,9 @@ import ( "github.com/gosuri/uitable" "github.com/spf13/cobra" + "k8s.io/helm/pkg/hapi/chart" + "k8s.io/helm/pkg/hapi/release" "k8s.io/helm/pkg/helm" - "k8s.io/helm/pkg/proto/hapi/chart" - "k8s.io/helm/pkg/proto/hapi/release" "k8s.io/helm/pkg/timeconv" ) diff --git a/cmd/helm/history_test.go b/cmd/helm/history_test.go index fef433742..3be4ffffe 100644 --- a/cmd/helm/history_test.go +++ b/cmd/helm/history_test.go @@ -22,8 +22,8 @@ import ( "github.com/spf13/cobra" + rpb "k8s.io/helm/pkg/hapi/release" "k8s.io/helm/pkg/helm" - rpb "k8s.io/helm/pkg/proto/hapi/release" ) func TestHistoryCmd(t *testing.T) { diff --git a/cmd/helm/install.go b/cmd/helm/install.go index df0454e11..b51455477 100644 --- a/cmd/helm/install.go +++ b/cmd/helm/install.go @@ -35,10 +35,10 @@ import ( "k8s.io/helm/pkg/chartutil" "k8s.io/helm/pkg/downloader" "k8s.io/helm/pkg/getter" + "k8s.io/helm/pkg/hapi/chart" + "k8s.io/helm/pkg/hapi/release" "k8s.io/helm/pkg/helm" "k8s.io/helm/pkg/kube" - "k8s.io/helm/pkg/proto/hapi/chart" - "k8s.io/helm/pkg/proto/hapi/release" "k8s.io/helm/pkg/repo" "k8s.io/helm/pkg/strvals" ) diff --git a/cmd/helm/list.go b/cmd/helm/list.go index 887c8a9db..427409fb8 100644 --- a/cmd/helm/list.go +++ b/cmd/helm/list.go @@ -24,9 +24,9 @@ import ( "github.com/gosuri/uitable" "github.com/spf13/cobra" + "k8s.io/helm/pkg/hapi" + "k8s.io/helm/pkg/hapi/release" "k8s.io/helm/pkg/helm" - "k8s.io/helm/pkg/proto/hapi/release" - "k8s.io/helm/pkg/proto/hapi/services" "k8s.io/helm/pkg/timeconv" ) @@ -121,14 +121,14 @@ func newListCmd(client helm.Interface, out io.Writer) *cobra.Command { } func (l *listCmd) run() error { - sortBy := services.ListSort_NAME + sortBy := hapi.ListSort_NAME if l.byDate { - sortBy = services.ListSort_LAST_RELEASED + sortBy = hapi.ListSort_LAST_RELEASED } - sortOrder := services.ListSort_ASC + sortOrder := hapi.ListSort_ASC if l.sortDesc { - sortOrder = services.ListSort_DESC + sortOrder = hapi.ListSort_DESC } stats := l.statusCodes() @@ -168,7 +168,7 @@ func filterList(rels []*release.Release) []*release.Release { idx := map[string]int32{} for _, r := range rels { - name, version := r.GetName(), r.GetVersion() + name, version := r.Name, r.Version if max, ok := idx[name]; ok { // check if we have a greater version already if max > version { @@ -180,7 +180,7 @@ func filterList(rels []*release.Release) []*release.Release { uniq := make([]*release.Release, 0, len(idx)) for _, r := range rels { - if idx[r.GetName()] == r.GetVersion() { + if idx[r.Name] == r.Version { uniq = append(uniq, r) } } @@ -234,16 +234,16 @@ func formatList(rels []*release.Release, colWidth uint) string { table.MaxColWidth = colWidth table.AddRow("NAME", "REVISION", "UPDATED", "STATUS", "CHART", "NAMESPACE") for _, r := range rels { - md := r.GetChart().GetMetadata() - c := fmt.Sprintf("%s-%s", md.GetName(), md.GetVersion()) + md := r.Chart.Metadata + c := fmt.Sprintf("%s-%s", md.Name, md.Version) t := "-" - if tspb := r.GetInfo().GetLastDeployed(); tspb != nil { + if tspb := r.Info.LastDeployed; tspb != nil { t = timeconv.String(tspb) } - s := r.GetInfo().GetStatus().GetCode().String() - v := r.GetVersion() - n := r.GetNamespace() - table.AddRow(r.GetName(), v, t, s, c, n) + s := r.Info.Status.Code.String() + v := r.Version + n := r.Namespace + table.AddRow(r.Name, v, t, s, c, n) } return table.String() } diff --git a/cmd/helm/list_test.go b/cmd/helm/list_test.go index d853fa6b1..beb4bc26a 100644 --- a/cmd/helm/list_test.go +++ b/cmd/helm/list_test.go @@ -22,8 +22,8 @@ import ( "github.com/spf13/cobra" + "k8s.io/helm/pkg/hapi/release" "k8s.io/helm/pkg/helm" - "k8s.io/helm/pkg/proto/hapi/release" ) func TestListCmd(t *testing.T) { diff --git a/cmd/helm/package.go b/cmd/helm/package.go index bf171e534..537dfb31d 100644 --- a/cmd/helm/package.go +++ b/cmd/helm/package.go @@ -32,8 +32,8 @@ import ( "k8s.io/helm/pkg/chartutil" "k8s.io/helm/pkg/downloader" "k8s.io/helm/pkg/getter" + "k8s.io/helm/pkg/hapi/chart" "k8s.io/helm/pkg/helm/helmpath" - "k8s.io/helm/pkg/proto/hapi/chart" "k8s.io/helm/pkg/provenance" "k8s.io/helm/pkg/repo" ) diff --git a/cmd/helm/package_test.go b/cmd/helm/package_test.go index 4a2df3f54..1edc646f7 100644 --- a/cmd/helm/package_test.go +++ b/cmd/helm/package_test.go @@ -27,8 +27,8 @@ import ( "github.com/spf13/cobra" "k8s.io/helm/pkg/chartutil" + "k8s.io/helm/pkg/hapi/chart" "k8s.io/helm/pkg/helm/helmpath" - "k8s.io/helm/pkg/proto/hapi/chart" ) func TestSetVersion(t *testing.T) { diff --git a/cmd/helm/printer.go b/cmd/helm/printer.go index ebb24bf7d..a13466765 100644 --- a/cmd/helm/printer.go +++ b/cmd/helm/printer.go @@ -23,7 +23,7 @@ import ( "time" "k8s.io/helm/pkg/chartutil" - "k8s.io/helm/pkg/proto/hapi/release" + "k8s.io/helm/pkg/hapi/release" "k8s.io/helm/pkg/timeconv" ) diff --git a/cmd/helm/release_testing.go b/cmd/helm/release_testing.go index 34ada1ddf..73c716c69 100644 --- a/cmd/helm/release_testing.go +++ b/cmd/helm/release_testing.go @@ -22,8 +22,8 @@ import ( "github.com/spf13/cobra" + "k8s.io/helm/pkg/hapi/release" "k8s.io/helm/pkg/helm" - "k8s.io/helm/pkg/proto/hapi/release" ) const releaseTestDesc = ` diff --git a/cmd/helm/release_testing_test.go b/cmd/helm/release_testing_test.go index b946746d0..3246b94c9 100644 --- a/cmd/helm/release_testing_test.go +++ b/cmd/helm/release_testing_test.go @@ -21,8 +21,9 @@ import ( "testing" "github.com/spf13/cobra" + + "k8s.io/helm/pkg/hapi/release" "k8s.io/helm/pkg/helm" - "k8s.io/helm/pkg/proto/hapi/release" ) func TestReleaseTesting(t *testing.T) { diff --git a/cmd/helm/search/search_test.go b/cmd/helm/search/search_test.go index 574f55448..754c5ac6a 100644 --- a/cmd/helm/search/search_test.go +++ b/cmd/helm/search/search_test.go @@ -20,7 +20,7 @@ import ( "strings" "testing" - "k8s.io/helm/pkg/proto/hapi/chart" + "k8s.io/helm/pkg/hapi/chart" "k8s.io/helm/pkg/repo" ) diff --git a/cmd/helm/status.go b/cmd/helm/status.go index 3041f779f..066137cbc 100644 --- a/cmd/helm/status.go +++ b/cmd/helm/status.go @@ -28,9 +28,9 @@ import ( "github.com/gosuri/uitable/util/strutil" "github.com/spf13/cobra" + "k8s.io/helm/pkg/hapi" + "k8s.io/helm/pkg/hapi/release" "k8s.io/helm/pkg/helm" - "k8s.io/helm/pkg/proto/hapi/release" - "k8s.io/helm/pkg/proto/hapi/services" "k8s.io/helm/pkg/timeconv" ) @@ -112,7 +112,7 @@ func (s *statusCmd) run() error { // PrintStatus prints out the status of a release. Shared because also used by // install / upgrade -func PrintStatus(out io.Writer, res *services.GetReleaseStatusResponse) { +func PrintStatus(out io.Writer, res *hapi.GetReleaseStatusResponse) { if res.Info.LastDeployed != nil { fmt.Fprintf(out, "LAST DEPLOYED: %s\n", timeconv.String(res.Info.LastDeployed)) } diff --git a/cmd/helm/status_test.go b/cmd/helm/status_test.go index 616b027f3..a4f3ab151 100644 --- a/cmd/helm/status_test.go +++ b/cmd/helm/status_test.go @@ -24,8 +24,8 @@ import ( "github.com/golang/protobuf/ptypes/timestamp" "github.com/spf13/cobra" + "k8s.io/helm/pkg/hapi/release" "k8s.io/helm/pkg/helm" - "k8s.io/helm/pkg/proto/hapi/release" "k8s.io/helm/pkg/timeconv" ) diff --git a/cmd/helm/template.go b/cmd/helm/template.go index 54d612fa7..76ea72a69 100644 --- a/cmd/helm/template.go +++ b/cmd/helm/template.go @@ -32,8 +32,8 @@ import ( "k8s.io/helm/pkg/chartutil" "k8s.io/helm/pkg/engine" - "k8s.io/helm/pkg/proto/hapi/chart" - "k8s.io/helm/pkg/proto/hapi/release" + "k8s.io/helm/pkg/hapi/chart" + "k8s.io/helm/pkg/hapi/release" util "k8s.io/helm/pkg/releaseutil" "k8s.io/helm/pkg/tiller" "k8s.io/helm/pkg/timeconv" diff --git a/cmd/helm/upgrade_test.go b/cmd/helm/upgrade_test.go index 187d3593e..9576d3512 100644 --- a/cmd/helm/upgrade_test.go +++ b/cmd/helm/upgrade_test.go @@ -26,9 +26,9 @@ import ( "github.com/spf13/cobra" "k8s.io/helm/pkg/chartutil" + "k8s.io/helm/pkg/hapi/chart" + "k8s.io/helm/pkg/hapi/release" "k8s.io/helm/pkg/helm" - "k8s.io/helm/pkg/proto/hapi/chart" - "k8s.io/helm/pkg/proto/hapi/release" ) func TestUpgradeCmd(t *testing.T) { diff --git a/pkg/chartutil/chartfile.go b/pkg/chartutil/chartfile.go index c2879cdae..d927e5e54 100644 --- a/pkg/chartutil/chartfile.go +++ b/pkg/chartutil/chartfile.go @@ -25,7 +25,7 @@ import ( "github.com/ghodss/yaml" - "k8s.io/helm/pkg/proto/hapi/chart" + "k8s.io/helm/pkg/hapi/chart" ) // ApiVersionV1 is the API version number for version 1. diff --git a/pkg/chartutil/chartfile_test.go b/pkg/chartutil/chartfile_test.go index 5b36dc955..f64324813 100755 --- a/pkg/chartutil/chartfile_test.go +++ b/pkg/chartutil/chartfile_test.go @@ -19,7 +19,7 @@ package chartutil import ( "testing" - "k8s.io/helm/pkg/proto/hapi/chart" + "k8s.io/helm/pkg/hapi/chart" ) const testfile = "testdata/chartfiletest.yaml" diff --git a/pkg/chartutil/create.go b/pkg/chartutil/create.go index 9f2a8cc1f..586df6378 100644 --- a/pkg/chartutil/create.go +++ b/pkg/chartutil/create.go @@ -22,7 +22,7 @@ import ( "os" "path/filepath" - "k8s.io/helm/pkg/proto/hapi/chart" + "k8s.io/helm/pkg/hapi/chart" ) const ( diff --git a/pkg/chartutil/create_test.go b/pkg/chartutil/create_test.go index e9af83ad2..6a2df46dc 100644 --- a/pkg/chartutil/create_test.go +++ b/pkg/chartutil/create_test.go @@ -23,7 +23,7 @@ import ( "strings" "testing" - "k8s.io/helm/pkg/proto/hapi/chart" + "k8s.io/helm/pkg/hapi/chart" ) func TestCreate(t *testing.T) { diff --git a/pkg/chartutil/load.go b/pkg/chartutil/load.go index c5246b8d7..1f8f33485 100644 --- a/pkg/chartutil/load.go +++ b/pkg/chartutil/load.go @@ -30,8 +30,8 @@ import ( "github.com/golang/protobuf/ptypes/any" + "k8s.io/helm/pkg/hapi/chart" "k8s.io/helm/pkg/ignore" - "k8s.io/helm/pkg/proto/hapi/chart" "k8s.io/helm/pkg/sympath" ) diff --git a/pkg/chartutil/load_test.go b/pkg/chartutil/load_test.go index 454500489..968c7e73c 100644 --- a/pkg/chartutil/load_test.go +++ b/pkg/chartutil/load_test.go @@ -20,7 +20,7 @@ import ( "path" "testing" - "k8s.io/helm/pkg/proto/hapi/chart" + "k8s.io/helm/pkg/hapi/chart" ) func TestLoadDir(t *testing.T) { diff --git a/pkg/chartutil/requirements.go b/pkg/chartutil/requirements.go index ce761a6fc..764f99b35 100644 --- a/pkg/chartutil/requirements.go +++ b/pkg/chartutil/requirements.go @@ -22,7 +22,8 @@ import ( "time" "github.com/ghodss/yaml" - "k8s.io/helm/pkg/proto/hapi/chart" + + "k8s.io/helm/pkg/hapi/chart" "k8s.io/helm/pkg/version" ) diff --git a/pkg/chartutil/requirements_test.go b/pkg/chartutil/requirements_test.go index 24388f86c..5392cfb55 100644 --- a/pkg/chartutil/requirements_test.go +++ b/pkg/chartutil/requirements_test.go @@ -20,7 +20,7 @@ import ( "strconv" - "k8s.io/helm/pkg/proto/hapi/chart" + "k8s.io/helm/pkg/hapi/chart" "k8s.io/helm/pkg/version" ) diff --git a/pkg/chartutil/save.go b/pkg/chartutil/save.go index bff32dde5..082fe9f0e 100644 --- a/pkg/chartutil/save.go +++ b/pkg/chartutil/save.go @@ -27,7 +27,7 @@ import ( "github.com/ghodss/yaml" - "k8s.io/helm/pkg/proto/hapi/chart" + "k8s.io/helm/pkg/hapi/chart" ) var headerBytes = []byte("+aHR0cHM6Ly95b3V0dS5iZS96OVV6MWljandyTQo=") diff --git a/pkg/chartutil/save_test.go b/pkg/chartutil/save_test.go index 5e1564299..3db77d38c 100644 --- a/pkg/chartutil/save_test.go +++ b/pkg/chartutil/save_test.go @@ -23,7 +23,8 @@ import ( "testing" "github.com/golang/protobuf/ptypes/any" - "k8s.io/helm/pkg/proto/hapi/chart" + + "k8s.io/helm/pkg/hapi/chart" ) func TestSave(t *testing.T) { diff --git a/pkg/chartutil/values.go b/pkg/chartutil/values.go index 66a2658d5..f0e13a36a 100644 --- a/pkg/chartutil/values.go +++ b/pkg/chartutil/values.go @@ -26,7 +26,8 @@ import ( "github.com/ghodss/yaml" "github.com/golang/protobuf/ptypes/timestamp" - "k8s.io/helm/pkg/proto/hapi/chart" + + "k8s.io/helm/pkg/hapi/chart" ) // ErrNoTable indicates that a chart does not have a matching table. diff --git a/pkg/chartutil/values_test.go b/pkg/chartutil/values_test.go index d9b03c21a..730ab4659 100644 --- a/pkg/chartutil/values_test.go +++ b/pkg/chartutil/values_test.go @@ -26,7 +26,8 @@ import ( "github.com/golang/protobuf/ptypes/any" kversion "k8s.io/apimachinery/pkg/version" - "k8s.io/helm/pkg/proto/hapi/chart" + + "k8s.io/helm/pkg/hapi/chart" "k8s.io/helm/pkg/timeconv" "k8s.io/helm/pkg/version" ) diff --git a/pkg/downloader/manager.go b/pkg/downloader/manager.go index 89a839b54..a1fe276cd 100644 --- a/pkg/downloader/manager.go +++ b/pkg/downloader/manager.go @@ -32,8 +32,8 @@ import ( "k8s.io/helm/pkg/chartutil" "k8s.io/helm/pkg/getter" + "k8s.io/helm/pkg/hapi/chart" "k8s.io/helm/pkg/helm/helmpath" - "k8s.io/helm/pkg/proto/hapi/chart" "k8s.io/helm/pkg/repo" "k8s.io/helm/pkg/resolver" "k8s.io/helm/pkg/urlutil" diff --git a/pkg/engine/engine.go b/pkg/engine/engine.go index 7a940fc84..b29e63707 100644 --- a/pkg/engine/engine.go +++ b/pkg/engine/engine.go @@ -27,7 +27,7 @@ import ( "github.com/Masterminds/sprig" "k8s.io/helm/pkg/chartutil" - "k8s.io/helm/pkg/proto/hapi/chart" + "k8s.io/helm/pkg/hapi/chart" ) // Engine is an implementation of 'cmd/tiller/environment'.Engine that uses Go templates. diff --git a/pkg/engine/engine_test.go b/pkg/engine/engine_test.go index 8ffb3d87c..d11944dd6 100644 --- a/pkg/engine/engine_test.go +++ b/pkg/engine/engine_test.go @@ -22,7 +22,7 @@ import ( "testing" "k8s.io/helm/pkg/chartutil" - "k8s.io/helm/pkg/proto/hapi/chart" + "k8s.io/helm/pkg/hapi/chart" "github.com/golang/protobuf/ptypes/any" ) diff --git a/pkg/hapi/chart/chart.go b/pkg/hapi/chart/chart.go new file mode 100644 index 000000000..a11b63530 --- /dev/null +++ b/pkg/hapi/chart/chart.go @@ -0,0 +1,54 @@ +package chart + +import google_protobuf "github.com/golang/protobuf/ptypes/any" + +// Chart is a helm package that contains metadata, a default config, zero or more +// optionally parameterizable templates, and zero or more charts (dependencies). +type Chart struct { + // Contents of the Chartfile. + Metadata *Metadata `json:"metadata,omitempty"` + // Templates for this chart. + Templates []*Template `json:"templates,omitempty"` + // Charts that this chart depends on. + Dependencies []*Chart `json:"dependencies,omitempty"` + // Default config for this template. + Values *Config `json:"values,omitempty"` + // Miscellaneous files in a chart archive, + // e.g. README, LICENSE, etc. + Files []*google_protobuf.Any `json:"files,omitempty"` +} + +func (m *Chart) GetMetadata() *Metadata { + if m != nil { + return m.Metadata + } + return nil +} + +func (m *Chart) GetTemplates() []*Template { + if m != nil { + return m.Templates + } + return nil +} + +func (m *Chart) GetDependencies() []*Chart { + if m != nil { + return m.Dependencies + } + return nil +} + +func (m *Chart) GetValues() *Config { + if m != nil { + return m.Values + } + return nil +} + +func (m *Chart) GetFiles() []*google_protobuf.Any { + if m != nil { + return m.Files + } + return nil +} diff --git a/pkg/hapi/chart/config.go b/pkg/hapi/chart/config.go new file mode 100644 index 000000000..ccca83927 --- /dev/null +++ b/pkg/hapi/chart/config.go @@ -0,0 +1,12 @@ +package chart + +// Config supplies values to the parametrizable templates of a chart. +type Config struct { + Raw string `json:"raw,omitempty"` + Values map[string]*Value `json:"values,omitempty"` +} + +// Value describes a configuration value as a string. +type Value struct { + Value string `json:"value,omitempty"` +} diff --git a/pkg/hapi/chart/metadata.go b/pkg/hapi/chart/metadata.go new file mode 100644 index 000000000..ee9b8d0d6 --- /dev/null +++ b/pkg/hapi/chart/metadata.go @@ -0,0 +1,73 @@ +package chart + +type Metadata_Engine int32 + +const ( + Metadata_UNKNOWN Metadata_Engine = 0 + Metadata_GOTPL Metadata_Engine = 1 +) + +var Metadata_Engine_name = map[int32]string{ + 0: "UNKNOWN", + 1: "GOTPL", +} +var Metadata_Engine_value = map[string]int32{ + "UNKNOWN": 0, + "GOTPL": 1, +} + +func (x Metadata_Engine) String() string { + return Metadata_Engine_name[int32(x)] +} + +// Maintainer describes a Chart maintainer. +type Maintainer struct { + // Name is a user name or organization name + Name string `json:"name,omitempty"` + // Email is an optional email address to contact the named maintainer + Email string `json:"email,omitempty"` + // Url is an optional URL to an address for the named maintainer + Url string `json:"url,omitempty"` +} + +// Metadata for a Chart file. This models the structure of a Chart.yaml file. +// +// Spec: https://k8s.io/helm/blob/master/docs/design/chart_format.md#the-chart-file +type Metadata struct { + // The name of the chart + Name string `json:"name,omitempty"` + // The URL to a relevant project page, git repo, or contact person + Home string `json:"home,omitempty"` + // Source is the URL to the source code of this chart + Sources []string `json:"sources,omitempty"` + // A SemVer 2 conformant version string of the chart + Version string `json:"version,omitempty"` + // A one-sentence description of the chart + Description string `json:"description,omitempty"` + // A list of string keywords + Keywords []string `json:"keywords,omitempty"` + // A list of name and URL/email address combinations for the maintainer(s) + Maintainers []*Maintainer `json:"maintainers,omitempty"` + // The name of the template engine to use. Defaults to 'gotpl'. + Engine string `json:"engine,omitempty"` + // The URL to an icon file. + Icon string `json:"icon,omitempty"` + // The API Version of this chart. + ApiVersion string `json:"apiVersion,omitempty"` + // The condition to check to enable chart + Condition string `json:"condition,omitempty"` + // The tags to check to enable chart + Tags string `json:"tags,omitempty"` + // The version of the application enclosed inside of this chart. + AppVersion string `json:"appVersion,omitempty"` + // Whether or not this chart is deprecated + Deprecated bool `json:"deprecated,omitempty"` + // TillerVersion is a SemVer constraints on what version of Tiller is required. + // See SemVer ranges here: https://github.com/Masterminds/semver#basic-comparisons + TillerVersion string `json:"tillerVersion,omitempty"` + // Annotations are additional mappings uninterpreted by Tiller, + // made available for inspection by other applications. + Annotations map[string]string `json:"annotations,omitempty"` + // KubeVersion is a SemVer constraint specifying the version of Kubernetes required. + KubeVersion string `json:"kubeVersion,omitempty"` +} diff --git a/pkg/hapi/chart/template.go b/pkg/hapi/chart/template.go new file mode 100644 index 000000000..95b8ff3d1 --- /dev/null +++ b/pkg/hapi/chart/template.go @@ -0,0 +1,26 @@ +package chart + +// Template represents a template as a name/value pair. +// +// By convention, name is a relative path within the scope of the chart's +// base directory. +type Template struct { + // Name is the path-like name of the template. + Name string `json:"name,omitempty"` + // Data is the template as byte data. + Data []byte `json:"data,omitempty"` +} + +func (m *Template) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Template) GetData() []byte { + if m != nil { + return m.Data + } + return nil +} diff --git a/pkg/hapi/release/hook.go b/pkg/hapi/release/hook.go new file mode 100644 index 000000000..bdfc8edb6 --- /dev/null +++ b/pkg/hapi/release/hook.go @@ -0,0 +1,88 @@ +package release + +import google_protobuf "github.com/golang/protobuf/ptypes/timestamp" + +type Hook_Event int32 + +const ( + Hook_UNKNOWN Hook_Event = 0 + Hook_PRE_INSTALL Hook_Event = 1 + Hook_POST_INSTALL Hook_Event = 2 + Hook_PRE_DELETE Hook_Event = 3 + Hook_POST_DELETE Hook_Event = 4 + Hook_PRE_UPGRADE Hook_Event = 5 + Hook_POST_UPGRADE Hook_Event = 6 + Hook_PRE_ROLLBACK Hook_Event = 7 + Hook_POST_ROLLBACK Hook_Event = 8 + Hook_RELEASE_TEST_SUCCESS Hook_Event = 9 + Hook_RELEASE_TEST_FAILURE Hook_Event = 10 +) + +var Hook_Event_name = map[int32]string{ + 0: "UNKNOWN", + 1: "PRE_INSTALL", + 2: "POST_INSTALL", + 3: "PRE_DELETE", + 4: "POST_DELETE", + 5: "PRE_UPGRADE", + 6: "POST_UPGRADE", + 7: "PRE_ROLLBACK", + 8: "POST_ROLLBACK", + 9: "RELEASE_TEST_SUCCESS", + 10: "RELEASE_TEST_FAILURE", +} +var Hook_Event_value = map[string]int32{ + "UNKNOWN": 0, + "PRE_INSTALL": 1, + "POST_INSTALL": 2, + "PRE_DELETE": 3, + "POST_DELETE": 4, + "PRE_UPGRADE": 5, + "POST_UPGRADE": 6, + "PRE_ROLLBACK": 7, + "POST_ROLLBACK": 8, + "RELEASE_TEST_SUCCESS": 9, + "RELEASE_TEST_FAILURE": 10, +} + +func (x Hook_Event) String() string { + return Hook_Event_name[int32(x)] +} + +type Hook_DeletePolicy int32 + +const ( + Hook_SUCCEEDED Hook_DeletePolicy = 0 + Hook_FAILED Hook_DeletePolicy = 1 + Hook_BEFORE_HOOK_CREATION Hook_DeletePolicy = 2 +) + +var Hook_DeletePolicy_name = map[int32]string{ + 0: "SUCCEEDED", + 1: "FAILED", + 2: "BEFORE_HOOK_CREATION", +} +var Hook_DeletePolicy_value = map[string]int32{ + "SUCCEEDED": 0, + "FAILED": 1, + "BEFORE_HOOK_CREATION": 2, +} + +// Hook defines a hook object. +type Hook struct { + Name string `json:"name,omitempty"` + // Kind is the Kubernetes kind. + Kind string `json:"kind,omitempty"` + // Path is the chart-relative path to the template. + Path string `json:"path,omitempty"` + // Manifest is the manifest contents. + Manifest string `json:"manifest,omitempty"` + // Events are the events that this hook fires on. + Events []Hook_Event `json:"events,omitempty"` + // LastRun indicates the date/time this was last run. + LastRun *google_protobuf.Timestamp `json:"last_run,omitempty"` + // Weight indicates the sort order for execution among similar Hook type + Weight int32 `json:"weight,omitempty"` + // DeletePolicies are the policies that indicate when to delete the hook + DeletePolicies []Hook_DeletePolicy `json:"delete_policies,omitempty"` +} diff --git a/pkg/hapi/release/info.go b/pkg/hapi/release/info.go new file mode 100644 index 000000000..10f947792 --- /dev/null +++ b/pkg/hapi/release/info.go @@ -0,0 +1,14 @@ +package release + +import google_protobuf "github.com/golang/protobuf/ptypes/timestamp" + +// Info describes release information. +type Info struct { + Status *Status `json:"status,omitempty"` + FirstDeployed *google_protobuf.Timestamp `json:"first_deployed,omitempty"` + LastDeployed *google_protobuf.Timestamp `json:"last_deployed,omitempty"` + // Deleted tracks when this object was deleted. + Deleted *google_protobuf.Timestamp `json:"deleted,omitempty"` + // Description is human-friendly "log entry" about this release. + Description string `json:"Description,omitempty"` +} diff --git a/pkg/hapi/release/release.go b/pkg/hapi/release/release.go new file mode 100644 index 000000000..147c029b6 --- /dev/null +++ b/pkg/hapi/release/release.go @@ -0,0 +1,25 @@ +package release + +import "k8s.io/helm/pkg/hapi/chart" + +// Release describes a deployment of a chart, together with the chart +// and the variables used to deploy that chart. +type Release struct { + // Name is the name of the release + Name string `json:"name,omitempty"` + // Info provides information about a release + Info *Info `json:"info,omitempty"` + // Chart is the chart that was released. + Chart *chart.Chart `json:"chart,omitempty"` + // Config is the set of extra Values added to the chart. + // These values override the default values inside of the chart. + Config *chart.Config `json:"config,omitempty"` + // Manifest is the string representation of the rendered template. + Manifest string `json:"manifest,omitempty"` + // Hooks are all of the hooks declared for this release. + Hooks []*Hook `json:"hooks,omitempty"` + // Version is an int32 which represents the version of the release. + Version int32 `json:"version,omitempty"` + // Namespace is the kubernetes namespace of the release. + Namespace string `json:"namespace,omitempty"` +} diff --git a/pkg/hapi/release/status.go b/pkg/hapi/release/status.go new file mode 100644 index 000000000..da26f07d9 --- /dev/null +++ b/pkg/hapi/release/status.go @@ -0,0 +1,62 @@ +package release + +type Status_Code int32 + +const ( + // Status_UNKNOWN indicates that a release is in an uncertain state. + Status_UNKNOWN Status_Code = 0 + // Status_DEPLOYED indicates that the release has been pushed to Kubernetes. + Status_DEPLOYED Status_Code = 1 + // Status_DELETED indicates that a release has been deleted from Kubermetes. + Status_DELETED Status_Code = 2 + // Status_SUPERSEDED indicates that this release object is outdated and a newer one exists. + Status_SUPERSEDED Status_Code = 3 + // Status_FAILED indicates that the release was not successfully deployed. + Status_FAILED Status_Code = 4 + // Status_DELETING indicates that a delete operation is underway. + Status_DELETING Status_Code = 5 + // Status_PENDING_INSTALL indicates that an install operation is underway. + Status_PENDING_INSTALL Status_Code = 6 + // Status_PENDING_UPGRADE indicates that an upgrade operation is underway. + Status_PENDING_UPGRADE Status_Code = 7 + // Status_PENDING_ROLLBACK indicates that an rollback operation is underway. + Status_PENDING_ROLLBACK Status_Code = 8 +) + +var Status_Code_name = map[int32]string{ + 0: "UNKNOWN", + 1: "DEPLOYED", + 2: "DELETED", + 3: "SUPERSEDED", + 4: "FAILED", + 5: "DELETING", + 6: "PENDING_INSTALL", + 7: "PENDING_UPGRADE", + 8: "PENDING_ROLLBACK", +} +var Status_Code_value = map[string]int32{ + "UNKNOWN": 0, + "DEPLOYED": 1, + "DELETED": 2, + "SUPERSEDED": 3, + "FAILED": 4, + "DELETING": 5, + "PENDING_INSTALL": 6, + "PENDING_UPGRADE": 7, + "PENDING_ROLLBACK": 8, +} + +func (x Status_Code) String() string { + return Status_Code_name[int32(x)] +} + +// Status defines the status of a release. +type Status struct { + Code Status_Code `json:"code,omitempty"` + // Cluster resources as kubectl would print them. + Resources string `json:"resources,omitempty"` + // Contains the rendered templates/NOTES.txt if available + Notes string `json:"notes,omitempty"` + // LastTestSuiteRun provides results on the last test run on a release + LastTestSuiteRun *TestSuite `json:"last_test_suite_run,omitempty"` +} diff --git a/pkg/hapi/release/test_run.go b/pkg/hapi/release/test_run.go new file mode 100644 index 000000000..5a804e0b6 --- /dev/null +++ b/pkg/hapi/release/test_run.go @@ -0,0 +1,37 @@ +package release + +import google_protobuf "github.com/golang/protobuf/ptypes/timestamp" + +type TestRun_Status int32 + +const ( + TestRun_UNKNOWN TestRun_Status = 0 + TestRun_SUCCESS TestRun_Status = 1 + TestRun_FAILURE TestRun_Status = 2 + TestRun_RUNNING TestRun_Status = 3 +) + +var TestRun_Status_name = map[int32]string{ + 0: "UNKNOWN", + 1: "SUCCESS", + 2: "FAILURE", + 3: "RUNNING", +} +var TestRun_Status_value = map[string]int32{ + "UNKNOWN": 0, + "SUCCESS": 1, + "FAILURE": 2, + "RUNNING": 3, +} + +func (x TestRun_Status) String() string { + return TestRun_Status_name[int32(x)] +} + +type TestRun struct { + Name string `json:"name,omitempty"` + Status TestRun_Status `json:"status,omitempty"` + Info string `json:"info,omitempty"` + StartedAt *google_protobuf.Timestamp `json:"started_at,omitempty"` + CompletedAt *google_protobuf.Timestamp `json:"completed_at,omitempty"` +} diff --git a/pkg/hapi/release/test_suite.go b/pkg/hapi/release/test_suite.go new file mode 100644 index 000000000..bf4b33ea9 --- /dev/null +++ b/pkg/hapi/release/test_suite.go @@ -0,0 +1,13 @@ +package release + +import google_protobuf "github.com/golang/protobuf/ptypes/timestamp" + +// TestSuite comprises of the last run of the pre-defined test suite of a release version +type TestSuite struct { + // StartedAt indicates the date/time this test suite was kicked off + StartedAt *google_protobuf.Timestamp `json:"started_at,omitempty"` + // CompletedAt indicates the date/time this test suite was completed + CompletedAt *google_protobuf.Timestamp `json:"completed_at,omitempty"` + // Results are the results of each segment of the test + Results []*TestRun `json:"results,omitempty"` +} diff --git a/_proto/hapi/services/tiller.proto b/pkg/hapi/tiller.go similarity index 55% rename from _proto/hapi/services/tiller.proto rename to pkg/hapi/tiller.go index b1bbdb9ce..b26b34f52 100644 --- a/_proto/hapi/services/tiller.proto +++ b/pkg/hapi/tiller.go @@ -1,243 +1,236 @@ -// Copyright 2016 The Kubernetes Authors All rights reserved. -// -// 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 hapi + +import ( + "k8s.io/helm/pkg/hapi/chart" + "k8s.io/helm/pkg/hapi/release" +) + +// SortBy defines sort operations. +type ListSort_SortBy int32 + +const ( + ListSort_UNKNOWN ListSort_SortBy = 0 + ListSort_NAME ListSort_SortBy = 1 + ListSort_LAST_RELEASED ListSort_SortBy = 2 +) + +var ListSort_SortBy_name = map[int32]string{ + 0: "UNKNOWN", + 1: "NAME", + 2: "LAST_RELEASED", +} +var ListSort_SortBy_value = map[string]int32{ + "UNKNOWN": 0, + "NAME": 1, + "LAST_RELEASED": 2, +} -syntax = "proto3"; +func (x ListSort_SortBy) String() string { + return ListSort_SortBy_name[int32(x)] +} -package hapi.services.tiller; +// SortOrder defines sort orders to augment sorting operations. +type ListSort_SortOrder int32 -import "hapi/chart/chart.proto"; -import "hapi/chart/config.proto"; -import "hapi/release/release.proto"; -import "hapi/release/info.proto"; -import "hapi/release/test_run.proto"; -import "hapi/release/status.proto"; +const ( + ListSort_ASC ListSort_SortOrder = 0 + ListSort_DESC ListSort_SortOrder = 1 +) -option go_package = "services"; +var ListSort_SortOrder_name = map[int32]string{ + 0: "ASC", + 1: "DESC", +} +var ListSort_SortOrder_value = map[string]int32{ + "ASC": 0, + "DESC": 1, +} + +func (x ListSort_SortOrder) String() string { + return ListSort_SortOrder_name[int32(x)] +} // ListReleasesRequest requests a list of releases. // // Releases can be retrieved in chunks by setting limit and offset. // // Releases can be sorted according to a few pre-determined sort stategies. -message ListReleasesRequest { +type ListReleasesRequest struct { // Limit is the maximum number of releases to be returned. - int64 limit = 1; - + Limit int64 `json:"limit,omityempty"` // Offset is the last release name that was seen. The next listing // operation will start with the name after this one. // Example: If list one returns albert, bernie, carl, and sets 'next: dennis'. // dennis is the offset. Supplying 'dennis' for the next request should // cause the next batch to return a set of results starting with 'dennis'. - string offset = 2; - + Offset string `json:"offset,omityempty"` // SortBy is the sort field that the ListReleases server should sort data before returning. - ListSort.SortBy sort_by = 3; - + SortBy ListSort_SortBy `json:"sort_by,omityempty"` // Filter is a regular expression used to filter which releases should be listed. // // Anything that matches the regexp will be included in the results. - string filter = 4; - + Filter string `json:"filter,omityempty"` // SortOrder is the ordering directive used for sorting. - ListSort.SortOrder sort_order = 5; - - repeated hapi.release.Status.Code status_codes = 6; + SortOrder ListSort_SortOrder `json:"sort_order,omityempty"` + StatusCodes []release.Status_Code `json:"status_codes,omityempty"` // Namespace is the filter to select releases only from a specific namespace. - string namespace = 7; -} - -// ListSort defines sorting fields on a release list. -message ListSort{ - // SortBy defines sort operations. - enum SortBy { - UNKNOWN = 0; - NAME = 1; - LAST_RELEASED = 2; - } - - // SortOrder defines sort orders to augment sorting operations. - enum SortOrder { - ASC = 0; - DESC = 1; - } + Namespace string `json:"namespace,omityempty"` } // ListReleasesResponse is a list of releases. -message ListReleasesResponse { - // Count is the expected total number of releases to be returned. - int64 count = 1; - +type ListReleasesResponse struct { + // Count is the expected total number of releases to be returned. + Count int64 `json:"count,omityempty"` // Next is the name of the next release. If this is other than an empty // string, it means there are more results. - string next = 2; - + Next string `json:"next,omityempty"` // Total is the total number of queryable releases. - int64 total = 3; - + Total int64 `json:"total,omityempty"` // Releases is the list of found release objects. - repeated hapi.release.Release releases = 4; + Releases []*release.Release `json:"releases,omityempty"` } // GetReleaseStatusRequest is a request to get the status of a release. -message GetReleaseStatusRequest { +type GetReleaseStatusRequest struct { // Name is the name of the release - string name = 1; + Name string `json:"name,omitempty"` // Version is the version of the release - int32 version = 2; + Version int32 `json:"version,omitempty"` } // GetReleaseStatusResponse is the response indicating the status of the named release. -message GetReleaseStatusResponse { +type GetReleaseStatusResponse struct { // Name is the name of the release. - string name = 1; - + Name string `json:"name,omitempty"` // Info contains information about the release. - hapi.release.Info info = 2; - - // Namespace the release was released into - string namespace = 3; + Info *release.Info `json:"info,omitempty"` + // Namespace the release was released into + Namespace string `json:"namespace,omitempty"` } // GetReleaseContentRequest is a request to get the contents of a release. -message GetReleaseContentRequest { +type GetReleaseContentRequest struct { // The name of the release - string name = 1; + Name string `json:"name,omityempty"` // Version is the version of the release - int32 version = 2; + Version int32 `json:"version,omityempty"` } // UpdateReleaseRequest updates a release. -message UpdateReleaseRequest { +type UpdateReleaseRequest struct { // The name of the release - string name = 1; + Name string `json:"name,omityempty"` // Chart is the protobuf representation of a chart. - hapi.chart.Chart chart = 2; + Chart *chart.Chart `json:"chart,omityempty"` // Values is a string containing (unparsed) YAML values. - hapi.chart.Config values = 3; + Values *chart.Config `json:"values,omityempty"` // dry_run, if true, will run through the release logic, but neither create - bool dry_run = 4; + DryRun bool `json:"dry_run,omityempty"` // DisableHooks causes the server to skip running any hooks for the upgrade. - bool disable_hooks = 5; + DisableHooks bool `json:"disable_hooks,omityempty"` // Performs pods restart for resources if applicable - bool recreate = 6; + Recreate bool `json:"recreate,omityempty"` // timeout specifies the max amount of time any kubernetes client command can run. - int64 timeout = 7; + Timeout int64 `json:"timeout,omityempty"` // ResetValues will cause Tiller to ignore stored values, resetting to default values. - bool reset_values = 8; + ResetValues bool `json:"reset_values,omityempty"` // wait, if true, will wait until all Pods, PVCs, and Services are in a ready state // before marking the release as successful. It will wait for as long as timeout - bool wait = 9; + Wait bool `json:"wait,omityempty"` // ReuseValues will cause Tiller to reuse the values from the last release. // This is ignored if reset_values is set. - bool reuse_values = 10; + ReuseValues bool `json:"reuse_values,omityempty"` // Force resource update through delete/recreate if needed. - bool force = 11; + Force bool `json:"force,omityempty"` } -message RollbackReleaseRequest { +type RollbackReleaseRequest struct { // The name of the release - string name = 1; + Name string `json:"name,omityempty"` // dry_run, if true, will run through the release logic but no create - bool dry_run = 2; + DryRun bool `json:"dry_run,omityempty"` // DisableHooks causes the server to skip running any hooks for the rollback - bool disable_hooks = 3; + DisableHooks bool `json:"disable_hooks,omityempty"` // Version is the version of the release to deploy. - int32 version = 4; + Version int32 `json:"version,omityempty"` // Performs pods restart for resources if applicable - bool recreate = 5; + Recreate bool `json:"recreate,omityempty"` // timeout specifies the max amount of time any kubernetes client command can run. - int64 timeout = 6; + Timeout int64 `json:"timeout,omityempty"` // wait, if true, will wait until all Pods, PVCs, and Services are in a ready state // before marking the release as successful. It will wait for as long as timeout - bool wait = 7; + Wait bool `json:"wait,omityempty"` // Force resource update through delete/recreate if needed. - bool force = 8; + Force bool `json:"force,omityempty"` } // InstallReleaseRequest is the request for an installation of a chart. -message InstallReleaseRequest { +type InstallReleaseRequest struct { // Chart is the protobuf representation of a chart. - hapi.chart.Chart chart = 1; + Chart *chart.Chart `json:"chart,omityempty"` // Values is a string containing (unparsed) YAML values. - hapi.chart.Config values = 2; + Values *chart.Config `json:"values,omityempty"` // DryRun, if true, will run through the release logic, but neither create // a release object nor deploy to Kubernetes. The release object returned // in the response will be fake. - bool dry_run = 3; - + DryRun bool `json:"dry_run,omityempty"` // Name is the candidate release name. This must be unique to the // namespace, otherwise the server will return an error. If it is not // supplied, the server will autogenerate one. - string name = 4; - + Name string `json:"name,omityempty"` // DisableHooks causes the server to skip running any hooks for the install. - bool disable_hooks = 5; - + DisableHooks bool `json:"disable_hooks,omityempty"` // Namepace is the kubernetes namespace of the release. - string namespace = 6; - + Namespace string `json:"namespace,omityempty"` // ReuseName requests that Tiller re-uses a name, instead of erroring out. - bool reuse_name = 7; - + ReuseName bool `json:"reuse_name,omityempty"` // timeout specifies the max amount of time any kubernetes client command can run. - int64 timeout = 8; + Timeout int64 `json:"timeout,omityempty"` // wait, if true, will wait until all Pods, PVCs, and Services are in a ready state // before marking the release as successful. It will wait for as long as timeout - bool wait = 9; + Wait bool `json:"wait,omityempty"` } // UninstallReleaseRequest represents a request to uninstall a named release. -message UninstallReleaseRequest { +type UninstallReleaseRequest struct { // Name is the name of the release to delete. - string name = 1; + Name string `json:"name,omityempty"` // DisableHooks causes the server to skip running any hooks for the uninstall. - bool disable_hooks = 2; + DisableHooks bool `json:"disable_hooks,omityempty"` // Purge removes the release from the store and make its name free for later use. - bool purge = 3; + Purge bool `json:"purge,omityempty"` // timeout specifies the max amount of time any kubernetes client command can run. - int64 timeout = 4; + Timeout int64 `json:"timeout,omityempty"` } // UninstallReleaseResponse represents a successful response to an uninstall request. -message UninstallReleaseResponse { +type UninstallReleaseResponse struct { // Release is the release that was marked deleted. - hapi.release.Release release = 1; + Release *release.Release `json:"release,omityempty"` // Info is an uninstall message - string info = 2; + Info string `json:"info,omityempty"` } // GetHistoryRequest requests a release's history. -message GetHistoryRequest { +type GetHistoryRequest struct { // The name of the release. - string name = 1; + Name string `json:"name,omityempty"` // The maximum number of releases to include. - int32 max = 2; + Max int32 `json:"max,omityempty"` } // TestReleaseRequest is a request to get the status of a release. -message TestReleaseRequest { +type TestReleaseRequest struct { // Name is the name of the release - string name = 1; + Name string `json:"name,omityempty"` // timeout specifies the max amount of time any kubernetes client command can run. - int64 timeout = 2; + Timeout int64 `json:"timeout,omityempty"` // cleanup specifies whether or not to attempt pod deletion after test completes - bool cleanup = 3; + Cleanup bool `json:"cleanup,omityempty"` } // TestReleaseResponse represents a message from executing a test -message TestReleaseResponse { - string msg = 1; - hapi.release.TestRun.Status status = 2; - +type TestReleaseResponse struct { + Msg string `json:"msg,omityempty"` + Status release.TestRun_Status `json:"status,omityempty"` } diff --git a/pkg/helm/client.go b/pkg/helm/client.go index fc8b40cd7..170b62840 100644 --- a/pkg/helm/client.go +++ b/pkg/helm/client.go @@ -18,9 +18,9 @@ package helm // import "k8s.io/helm/pkg/helm" import ( "k8s.io/helm/pkg/chartutil" - "k8s.io/helm/pkg/proto/hapi/chart" - "k8s.io/helm/pkg/proto/hapi/release" - rls "k8s.io/helm/pkg/proto/hapi/services" + "k8s.io/helm/pkg/hapi" + "k8s.io/helm/pkg/hapi/chart" + "k8s.io/helm/pkg/hapi/release" "k8s.io/helm/pkg/storage" "k8s.io/helm/pkg/tiller" "k8s.io/helm/pkg/tiller/environment" @@ -109,7 +109,7 @@ func (c *Client) InstallReleaseFromChart(chart *chart.Chart, ns string, opts ... } // DeleteRelease uninstalls a named release and returns the response. -func (c *Client) DeleteRelease(rlsName string, opts ...DeleteOption) (*rls.UninstallReleaseResponse, error) { +func (c *Client) DeleteRelease(rlsName string, opts ...DeleteOption) (*hapi.UninstallReleaseResponse, error) { // apply the uninstall options reqOpts := c.opts for _, opt := range opts { @@ -120,9 +120,9 @@ func (c *Client) DeleteRelease(rlsName string, opts ...DeleteOption) (*rls.Unins // In the dry run case, just see if the release exists r, err := c.ReleaseContent(rlsName, 0) if err != nil { - return &rls.UninstallReleaseResponse{}, err + return &hapi.UninstallReleaseResponse{}, err } - return &rls.UninstallReleaseResponse{Release: r}, nil + return &hapi.UninstallReleaseResponse{Release: r}, nil } req := &reqOpts.uninstallReq @@ -198,7 +198,7 @@ func (c *Client) RollbackRelease(rlsName string, opts ...RollbackOption) (*relea } // ReleaseStatus returns the given release's status. -func (c *Client) ReleaseStatus(rlsName string, version int32) (*rls.GetReleaseStatusResponse, error) { +func (c *Client) ReleaseStatus(rlsName string, version int32) (*hapi.GetReleaseStatusResponse, error) { reqOpts := c.opts req := &reqOpts.statusReq req.Name = rlsName @@ -237,7 +237,7 @@ func (c *Client) ReleaseHistory(rlsName string, max int32) ([]*release.Release, } // RunReleaseTest executes a pre-defined test on a release. -func (c *Client) RunReleaseTest(rlsName string, opts ...ReleaseTestOption) (<-chan *rls.TestReleaseResponse, <-chan error) { +func (c *Client) RunReleaseTest(rlsName string, opts ...ReleaseTestOption) (<-chan *hapi.TestReleaseResponse, <-chan error) { reqOpts := c.opts for _, opt := range opts { opt(&reqOpts) diff --git a/pkg/helm/fake.go b/pkg/helm/fake.go index 011e82458..08b017fa2 100644 --- a/pkg/helm/fake.go +++ b/pkg/helm/fake.go @@ -24,9 +24,9 @@ import ( "github.com/golang/protobuf/ptypes/timestamp" - "k8s.io/helm/pkg/proto/hapi/chart" - "k8s.io/helm/pkg/proto/hapi/release" - rls "k8s.io/helm/pkg/proto/hapi/services" + "k8s.io/helm/pkg/hapi" + "k8s.io/helm/pkg/hapi/chart" + "k8s.io/helm/pkg/hapi/release" ) // FakeClient implements Interface @@ -79,11 +79,11 @@ func (c *FakeClient) InstallReleaseFromChart(chart *chart.Chart, ns string, opts } // DeleteRelease deletes a release from the FakeClient -func (c *FakeClient) DeleteRelease(rlsName string, opts ...DeleteOption) (*rls.UninstallReleaseResponse, error) { +func (c *FakeClient) DeleteRelease(rlsName string, opts ...DeleteOption) (*hapi.UninstallReleaseResponse, error) { for i, rel := range c.Rels { if rel.Name == rlsName { c.Rels = append(c.Rels[:i], c.Rels[i+1:]...) - return &rls.UninstallReleaseResponse{ + return &hapi.UninstallReleaseResponse{ Release: rel, }, nil } @@ -109,10 +109,10 @@ func (c *FakeClient) RollbackRelease(rlsName string, opts ...RollbackOption) (*r } // ReleaseStatus returns a release status response with info from the matching release name. -func (c *FakeClient) ReleaseStatus(rlsName string, version int32) (*rls.GetReleaseStatusResponse, error) { +func (c *FakeClient) ReleaseStatus(rlsName string, version int32) (*hapi.GetReleaseStatusResponse, error) { for _, rel := range c.Rels { if rel.Name == rlsName { - return &rls.GetReleaseStatusResponse{ + return &hapi.GetReleaseStatusResponse{ Name: rel.Name, Info: rel.Info, Namespace: rel.Namespace, @@ -138,9 +138,9 @@ func (c *FakeClient) ReleaseHistory(rlsName string, max int32) ([]*release.Relea } // RunReleaseTest executes a pre-defined tests on a release -func (c *FakeClient) RunReleaseTest(rlsName string, opts ...ReleaseTestOption) (<-chan *rls.TestReleaseResponse, <-chan error) { +func (c *FakeClient) RunReleaseTest(rlsName string, opts ...ReleaseTestOption) (<-chan *hapi.TestReleaseResponse, <-chan error) { - results := make(chan *rls.TestReleaseResponse) + results := make(chan *hapi.TestReleaseResponse) errc := make(chan error, 1) go func() { @@ -150,7 +150,7 @@ func (c *FakeClient) RunReleaseTest(rlsName string, opts ...ReleaseTestOption) ( go func(msg string, status release.TestRun_Status) { defer wg.Done() - results <- &rls.TestReleaseResponse{Msg: msg, Status: status} + results <- &hapi.TestReleaseResponse{Msg: msg, Status: status} }(m, s) } diff --git a/pkg/helm/fake_test.go b/pkg/helm/fake_test.go index 626f372b6..c41142b0e 100644 --- a/pkg/helm/fake_test.go +++ b/pkg/helm/fake_test.go @@ -20,9 +20,9 @@ import ( "reflect" "testing" - "k8s.io/helm/pkg/proto/hapi/chart" - "k8s.io/helm/pkg/proto/hapi/release" - rls "k8s.io/helm/pkg/proto/hapi/services" + "k8s.io/helm/pkg/hapi" + "k8s.io/helm/pkg/hapi/chart" + "k8s.io/helm/pkg/hapi/release" ) func TestFakeClient_ReleaseStatus(t *testing.T) { @@ -39,7 +39,7 @@ func TestFakeClient_ReleaseStatus(t *testing.T) { name string fields fields args args - want *rls.GetReleaseStatusResponse + want *hapi.GetReleaseStatusResponse wantErr bool }{ { @@ -52,7 +52,7 @@ func TestFakeClient_ReleaseStatus(t *testing.T) { args: args{ rlsName: releasePresent.Name, }, - want: &rls.GetReleaseStatusResponse{ + want: &hapi.GetReleaseStatusResponse{ Name: releasePresent.Name, Info: releasePresent.Info, Namespace: releasePresent.Namespace, @@ -85,7 +85,7 @@ func TestFakeClient_ReleaseStatus(t *testing.T) { args: args{ rlsName: releasePresent.Name, }, - want: &rls.GetReleaseStatusResponse{ + want: &hapi.GetReleaseStatusResponse{ Name: releasePresent.Name, Info: releasePresent.Info, Namespace: releasePresent.Namespace, @@ -194,7 +194,7 @@ func TestFakeClient_DeleteRelease(t *testing.T) { name string fields fields args args - want *rls.UninstallReleaseResponse + want *hapi.UninstallReleaseResponse relsAfter []*release.Release wantErr bool }{ @@ -213,7 +213,7 @@ func TestFakeClient_DeleteRelease(t *testing.T) { relsAfter: []*release.Release{ ReleaseMock(&MockReleaseOptions{Name: "angry-dolphin"}), }, - want: &rls.UninstallReleaseResponse{ + want: &hapi.UninstallReleaseResponse{ Release: ReleaseMock(&MockReleaseOptions{Name: "trepid-tapir"}), }, wantErr: false, @@ -249,7 +249,7 @@ func TestFakeClient_DeleteRelease(t *testing.T) { opts: []DeleteOption{}, }, relsAfter: []*release.Release{}, - want: &rls.UninstallReleaseResponse{ + want: &hapi.UninstallReleaseResponse{ Release: ReleaseMock(&MockReleaseOptions{Name: "trepid-tapir"}), }, wantErr: false, diff --git a/pkg/helm/helm_test.go b/pkg/helm/helm_test.go index b304cafd1..e0ae9f9c4 100644 --- a/pkg/helm/helm_test.go +++ b/pkg/helm/helm_test.go @@ -22,12 +22,10 @@ import ( "reflect" "testing" - "github.com/golang/protobuf/proto" - "k8s.io/helm/pkg/chartutil" - cpb "k8s.io/helm/pkg/proto/hapi/chart" - rls "k8s.io/helm/pkg/proto/hapi/release" - tpb "k8s.io/helm/pkg/proto/hapi/services" + "k8s.io/helm/pkg/hapi" + cpb "k8s.io/helm/pkg/hapi/chart" + rls "k8s.io/helm/pkg/hapi/release" ) // Path to example charts relative to pkg/helm. @@ -53,12 +51,12 @@ func TestListReleases_VerifyOptions(t *testing.T) { var namespace = "namespace" // Expected ListReleasesRequest message - exp := &tpb.ListReleasesRequest{ + exp := &hapi.ListReleasesRequest{ Limit: int64(limit), Offset: offset, Filter: filter, - SortBy: tpb.ListSort_SortBy(sortBy), - SortOrder: tpb.ListSort_SortOrder(sortOrd), + SortBy: hapi.ListSort_SortBy(sortBy), + SortOrder: hapi.ListSort_SortOrder(sortOrd), StatusCodes: codes, Namespace: namespace, } @@ -75,9 +73,9 @@ func TestListReleases_VerifyOptions(t *testing.T) { } // BeforeCall option to intercept Helm client ListReleasesRequest - b4c := BeforeCall(func(msg proto.Message) error { + b4c := BeforeCall(func(msg interface{}) error { switch act := msg.(type) { - case *tpb.ListReleasesRequest: + case *hapi.ListReleasesRequest: t.Logf("ListReleasesRequest: %#+v\n", act) assert(t, exp, act) default: @@ -109,7 +107,7 @@ func TestInstallRelease_VerifyOptions(t *testing.T) { var overrides = []byte("key1=value1,key2=value2") // Expected InstallReleaseRequest message - exp := &tpb.InstallReleaseRequest{ + exp := &hapi.InstallReleaseRequest{ Chart: loadChart(t, chartName), Values: &cpb.Config{Raw: string(overrides)}, DryRun: dryRun, @@ -129,9 +127,9 @@ func TestInstallRelease_VerifyOptions(t *testing.T) { } // BeforeCall option to intercept Helm client InstallReleaseRequest - b4c := BeforeCall(func(msg proto.Message) error { + b4c := BeforeCall(func(msg interface{}) error { switch act := msg.(type) { - case *tpb.InstallReleaseRequest: + case *hapi.InstallReleaseRequest: t.Logf("InstallReleaseRequest: %#+v\n", act) assert(t, exp, act) default: @@ -157,7 +155,7 @@ func TestDeleteRelease_VerifyOptions(t *testing.T) { var purgeFlag = true // Expected DeleteReleaseRequest message - exp := &tpb.UninstallReleaseRequest{ + exp := &hapi.UninstallReleaseRequest{ Name: releaseName, Purge: purgeFlag, DisableHooks: disableHooks, @@ -170,9 +168,9 @@ func TestDeleteRelease_VerifyOptions(t *testing.T) { } // BeforeCall option to intercept Helm client DeleteReleaseRequest - b4c := BeforeCall(func(msg proto.Message) error { + b4c := BeforeCall(func(msg interface{}) error { switch act := msg.(type) { - case *tpb.UninstallReleaseRequest: + case *hapi.UninstallReleaseRequest: t.Logf("UninstallReleaseRequest: %#+v\n", act) assert(t, exp, act) default: @@ -201,7 +199,7 @@ func TestUpdateRelease_VerifyOptions(t *testing.T) { var dryRun = false // Expected UpdateReleaseRequest message - exp := &tpb.UpdateReleaseRequest{ + exp := &hapi.UpdateReleaseRequest{ Name: releaseName, Chart: loadChart(t, chartName), Values: &cpb.Config{Raw: string(overrides)}, @@ -217,9 +215,9 @@ func TestUpdateRelease_VerifyOptions(t *testing.T) { } // BeforeCall option to intercept Helm client UpdateReleaseRequest - b4c := BeforeCall(func(msg proto.Message) error { + b4c := BeforeCall(func(msg interface{}) error { switch act := msg.(type) { - case *tpb.UpdateReleaseRequest: + case *hapi.UpdateReleaseRequest: t.Logf("UpdateReleaseRequest: %#+v\n", act) assert(t, exp, act) default: @@ -246,7 +244,7 @@ func TestRollbackRelease_VerifyOptions(t *testing.T) { var dryRun = true // Expected RollbackReleaseRequest message - exp := &tpb.RollbackReleaseRequest{ + exp := &hapi.RollbackReleaseRequest{ Name: releaseName, DryRun: dryRun, Version: revision, @@ -261,9 +259,9 @@ func TestRollbackRelease_VerifyOptions(t *testing.T) { } // BeforeCall option to intercept Helm client RollbackReleaseRequest - b4c := BeforeCall(func(msg proto.Message) error { + b4c := BeforeCall(func(msg interface{}) error { switch act := msg.(type) { - case *tpb.RollbackReleaseRequest: + case *hapi.RollbackReleaseRequest: t.Logf("RollbackReleaseRequest: %#+v\n", act) assert(t, exp, act) default: @@ -288,15 +286,15 @@ func TestReleaseStatus_VerifyOptions(t *testing.T) { var revision = int32(2) // Expected GetReleaseStatusRequest message - exp := &tpb.GetReleaseStatusRequest{ + exp := &hapi.GetReleaseStatusRequest{ Name: releaseName, Version: revision, } // BeforeCall option to intercept Helm client GetReleaseStatusRequest - b4c := BeforeCall(func(msg proto.Message) error { + b4c := BeforeCall(func(msg interface{}) error { switch act := msg.(type) { - case *tpb.GetReleaseStatusRequest: + case *hapi.GetReleaseStatusRequest: t.Logf("GetReleaseStatusRequest: %#+v\n", act) assert(t, exp, act) default: @@ -322,15 +320,15 @@ func TestReleaseContent_VerifyOptions(t *testing.T) { var revision = int32(2) // Expected GetReleaseContentRequest message - exp := &tpb.GetReleaseContentRequest{ + exp := &hapi.GetReleaseContentRequest{ Name: releaseName, Version: revision, } // BeforeCall option to intercept Helm client GetReleaseContentRequest - b4c := BeforeCall(func(msg proto.Message) error { + b4c := BeforeCall(func(msg interface{}) error { switch act := msg.(type) { - case *tpb.GetReleaseContentRequest: + case *hapi.GetReleaseContentRequest: t.Logf("GetReleaseContentRequest: %#+v\n", act) assert(t, exp, act) default: diff --git a/pkg/helm/interface.go b/pkg/helm/interface.go index 666e3f510..eced75ecf 100644 --- a/pkg/helm/interface.go +++ b/pkg/helm/interface.go @@ -17,9 +17,9 @@ limitations under the License. package helm import ( - "k8s.io/helm/pkg/proto/hapi/chart" - "k8s.io/helm/pkg/proto/hapi/release" - rls "k8s.io/helm/pkg/proto/hapi/services" + "k8s.io/helm/pkg/hapi" + "k8s.io/helm/pkg/hapi/chart" + "k8s.io/helm/pkg/hapi/release" ) // Interface for helm client for mocking in tests @@ -27,12 +27,12 @@ type Interface interface { ListReleases(opts ...ReleaseListOption) ([]*release.Release, error) InstallRelease(chStr, namespace string, opts ...InstallOption) (*release.Release, error) InstallReleaseFromChart(chart *chart.Chart, namespace string, opts ...InstallOption) (*release.Release, error) - DeleteRelease(rlsName string, opts ...DeleteOption) (*rls.UninstallReleaseResponse, error) - ReleaseStatus(rlsName string, version int32) (*rls.GetReleaseStatusResponse, error) + DeleteRelease(rlsName string, opts ...DeleteOption) (*hapi.UninstallReleaseResponse, error) + ReleaseStatus(rlsName string, version int32) (*hapi.GetReleaseStatusResponse, error) UpdateRelease(rlsName, chStr string, opts ...UpdateOption) (*release.Release, error) UpdateReleaseFromChart(rlsName string, chart *chart.Chart, opts ...UpdateOption) (*release.Release, error) RollbackRelease(rlsName string, opts ...RollbackOption) (*release.Release, error) ReleaseContent(rlsName string, version int32) (*release.Release, error) ReleaseHistory(rlsName string, max int32) ([]*release.Release, error) - RunReleaseTest(rlsName string, opts ...ReleaseTestOption) (<-chan *rls.TestReleaseResponse, <-chan error) + RunReleaseTest(rlsName string, opts ...ReleaseTestOption) (<-chan *hapi.TestReleaseResponse, <-chan error) } diff --git a/pkg/helm/option.go b/pkg/helm/option.go index 375cb719d..9fb5450e9 100644 --- a/pkg/helm/option.go +++ b/pkg/helm/option.go @@ -17,12 +17,11 @@ limitations under the License. package helm import ( - "github.com/golang/protobuf/proto" "k8s.io/client-go/discovery" - cpb "k8s.io/helm/pkg/proto/hapi/chart" - "k8s.io/helm/pkg/proto/hapi/release" - rls "k8s.io/helm/pkg/proto/hapi/services" + "k8s.io/helm/pkg/hapi" + cpb "k8s.io/helm/pkg/hapi/chart" + "k8s.io/helm/pkg/hapi/release" "k8s.io/helm/pkg/storage/driver" "k8s.io/helm/pkg/tiller/environment" ) @@ -45,36 +44,36 @@ type options struct { // if set, skip running hooks disableHooks bool // release list options are applied directly to the list releases request - listReq rls.ListReleasesRequest + listReq hapi.ListReleasesRequest // release install options are applied directly to the install release request - instReq rls.InstallReleaseRequest + instReq hapi.InstallReleaseRequest // release update options are applied directly to the update release request - updateReq rls.UpdateReleaseRequest + updateReq hapi.UpdateReleaseRequest // release uninstall options are applied directly to the uninstall release request - uninstallReq rls.UninstallReleaseRequest + uninstallReq hapi.UninstallReleaseRequest // release get status options are applied directly to the get release status request - statusReq rls.GetReleaseStatusRequest + statusReq hapi.GetReleaseStatusRequest // release get content options are applied directly to the get release content request - contentReq rls.GetReleaseContentRequest + contentReq hapi.GetReleaseContentRequest // release rollback options are applied directly to the rollback release request - rollbackReq rls.RollbackReleaseRequest + rollbackReq hapi.RollbackReleaseRequest // before intercepts client calls before sending - before func(proto.Message) error + before func(interface{}) error // release history options are applied directly to the get release history request - histReq rls.GetHistoryRequest + histReq hapi.GetHistoryRequest // resetValues instructs Tiller to reset values to their defaults. resetValues bool // reuseValues instructs Tiller to reuse the values from the last release. reuseValues bool // release test options are applied directly to the test release history request - testReq rls.TestReleaseRequest + testReq hapi.TestReleaseRequest driver driver.Driver kubeClient environment.KubeClient discovery discovery.DiscoveryInterface } -func (opts *options) runBefore(msg proto.Message) error { +func (opts *options) runBefore(msg interface{}) error { if opts.before != nil { return opts.before(msg) } @@ -84,7 +83,7 @@ func (opts *options) runBefore(msg proto.Message) error { // BeforeCall returns an option that allows intercepting a helm client rpc // before being sent OTA to tiller. The intercepting function should return // an error to indicate that the call should not proceed or nil otherwise. -func BeforeCall(fn func(proto.Message) error) Option { +func BeforeCall(fn func(interface{}) error) Option { return func(opts *options) { opts.before = fn } @@ -119,14 +118,14 @@ func ReleaseListLimit(limit int) ReleaseListOption { // ReleaseListOrder specifies how to order a list of releases. func ReleaseListOrder(order int32) ReleaseListOption { return func(opts *options) { - opts.listReq.SortOrder = rls.ListSort_SortOrder(order) + opts.listReq.SortOrder = hapi.ListSort_SortOrder(order) } } // ReleaseListSort specifies how to sort a release list. func ReleaseListSort(sort int32) ReleaseListOption { return func(opts *options) { - opts.listReq.SortBy = rls.ListSort_SortBy(sort) + opts.listReq.SortBy = hapi.ListSort_SortBy(sort) } } diff --git a/pkg/hooks/hooks.go b/pkg/hooks/hooks.go index 80f838368..6974f43eb 100644 --- a/pkg/hooks/hooks.go +++ b/pkg/hooks/hooks.go @@ -17,7 +17,7 @@ limitations under the License. package hooks import ( - "k8s.io/helm/pkg/proto/hapi/release" + "k8s.io/helm/pkg/hapi/release" ) // HookAnno is the label name for a hook diff --git a/pkg/lint/rules/chartfile.go b/pkg/lint/rules/chartfile.go index 0dab0d250..e97a14488 100644 --- a/pkg/lint/rules/chartfile.go +++ b/pkg/lint/rules/chartfile.go @@ -26,9 +26,10 @@ import ( "github.com/Masterminds/semver" "github.com/asaskevich/govalidator" + "k8s.io/helm/pkg/chartutil" + "k8s.io/helm/pkg/hapi/chart" "k8s.io/helm/pkg/lint/support" - "k8s.io/helm/pkg/proto/hapi/chart" ) // Chartfile runs a set of linter rules related to Chart.yaml file diff --git a/pkg/lint/rules/chartfile_test.go b/pkg/lint/rules/chartfile_test.go index 99dc4de0f..dca8ab477 100644 --- a/pkg/lint/rules/chartfile_test.go +++ b/pkg/lint/rules/chartfile_test.go @@ -24,8 +24,8 @@ import ( "testing" "k8s.io/helm/pkg/chartutil" + "k8s.io/helm/pkg/hapi/chart" "k8s.io/helm/pkg/lint/support" - "k8s.io/helm/pkg/proto/hapi/chart" ) const ( diff --git a/pkg/lint/rules/template.go b/pkg/lint/rules/template.go index a8b6a6757..4b6bbae4e 100644 --- a/pkg/lint/rules/template.go +++ b/pkg/lint/rules/template.go @@ -23,10 +23,11 @@ import ( "path/filepath" "github.com/ghodss/yaml" + "k8s.io/helm/pkg/chartutil" "k8s.io/helm/pkg/engine" + cpb "k8s.io/helm/pkg/hapi/chart" "k8s.io/helm/pkg/lint/support" - cpb "k8s.io/helm/pkg/proto/hapi/chart" "k8s.io/helm/pkg/timeconv" tversion "k8s.io/helm/pkg/version" ) diff --git a/pkg/proto/hapi/chart/chart.pb.go b/pkg/proto/hapi/chart/chart.pb.go deleted file mode 100644 index a884ed552..000000000 --- a/pkg/proto/hapi/chart/chart.pb.go +++ /dev/null @@ -1,119 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: hapi/chart/chart.proto - -/* -Package chart is a generated protocol buffer package. - -It is generated from these files: - hapi/chart/chart.proto - hapi/chart/config.proto - hapi/chart/metadata.proto - hapi/chart/template.proto - -It has these top-level messages: - Chart - Config - Value - Maintainer - Metadata - Template -*/ -package chart - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import google_protobuf "github.com/golang/protobuf/ptypes/any" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package - -// Chart is a helm package that contains metadata, a default config, zero or more -// optionally parameterizable templates, and zero or more charts (dependencies). -type Chart struct { - // Contents of the Chartfile. - Metadata *Metadata `protobuf:"bytes,1,opt,name=metadata" json:"metadata,omitempty"` - // Templates for this chart. - Templates []*Template `protobuf:"bytes,2,rep,name=templates" json:"templates,omitempty"` - // Charts that this chart depends on. - Dependencies []*Chart `protobuf:"bytes,3,rep,name=dependencies" json:"dependencies,omitempty"` - // Default config for this template. - Values *Config `protobuf:"bytes,4,opt,name=values" json:"values,omitempty"` - // Miscellaneous files in a chart archive, - // e.g. README, LICENSE, etc. - Files []*google_protobuf.Any `protobuf:"bytes,5,rep,name=files" json:"files,omitempty"` -} - -func (m *Chart) Reset() { *m = Chart{} } -func (m *Chart) String() string { return proto.CompactTextString(m) } -func (*Chart) ProtoMessage() {} -func (*Chart) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } - -func (m *Chart) GetMetadata() *Metadata { - if m != nil { - return m.Metadata - } - return nil -} - -func (m *Chart) GetTemplates() []*Template { - if m != nil { - return m.Templates - } - return nil -} - -func (m *Chart) GetDependencies() []*Chart { - if m != nil { - return m.Dependencies - } - return nil -} - -func (m *Chart) GetValues() *Config { - if m != nil { - return m.Values - } - return nil -} - -func (m *Chart) GetFiles() []*google_protobuf.Any { - if m != nil { - return m.Files - } - return nil -} - -func init() { - proto.RegisterType((*Chart)(nil), "hapi.chart.Chart") -} - -func init() { proto.RegisterFile("hapi/chart/chart.proto", fileDescriptor0) } - -var fileDescriptor0 = []byte{ - // 242 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x90, 0xb1, 0x4e, 0xc3, 0x30, - 0x10, 0x86, 0x15, 0x4a, 0x0a, 0x1c, 0x2c, 0x58, 0x08, 0x4c, 0xa7, 0x8a, 0x09, 0x75, 0x70, 0x50, - 0x11, 0x0f, 0x00, 0xcc, 0x2c, 0x16, 0x13, 0xdb, 0xb5, 0xb9, 0xa4, 0x91, 0x52, 0x3b, 0xaa, 0x5d, - 0xa4, 0xbe, 0x3b, 0x03, 0xea, 0xd9, 0xa6, 0x09, 0xea, 0x12, 0x29, 0xf7, 0x7d, 0xff, 0xe5, 0xbf, - 0xc0, 0xed, 0x0a, 0xbb, 0xa6, 0x58, 0xae, 0x70, 0xe3, 0xc3, 0x53, 0x75, 0x1b, 0xeb, 0xad, 0x80, - 0xfd, 0x5c, 0xf1, 0x64, 0x72, 0xd7, 0x77, 0xac, 0xa9, 0x9a, 0x3a, 0x48, 0x93, 0xfb, 0x1e, 0x58, - 0x93, 0xc7, 0x12, 0x3d, 0x1e, 0x41, 0x9e, 0xd6, 0x5d, 0x8b, 0x9e, 0x12, 0xaa, 0xad, 0xad, 0x5b, - 0x2a, 0xf8, 0x6d, 0xb1, 0xad, 0x0a, 0x34, 0xbb, 0x80, 0x1e, 0x7e, 0x32, 0xc8, 0xdf, 0xf7, 0x19, - 0xf1, 0x04, 0xe7, 0x69, 0xa3, 0xcc, 0xa6, 0xd9, 0xe3, 0xe5, 0xfc, 0x46, 0x1d, 0x2a, 0xa9, 0x8f, - 0xc8, 0xf4, 0x9f, 0x25, 0xe6, 0x70, 0x91, 0x3e, 0xe4, 0xe4, 0xc9, 0x74, 0xf4, 0x3f, 0xf2, 0x19, - 0xa1, 0x3e, 0x68, 0xe2, 0x05, 0xae, 0x4a, 0xea, 0xc8, 0x94, 0x64, 0x96, 0x0d, 0x39, 0x39, 0xe2, - 0xd8, 0x75, 0x3f, 0xc6, 0x75, 0xf4, 0x40, 0x13, 0x33, 0x18, 0x7f, 0x63, 0xbb, 0x25, 0x27, 0x4f, - 0xb9, 0x9a, 0x18, 0x04, 0xf8, 0x0f, 0xe9, 0x68, 0x88, 0x19, 0xe4, 0x55, 0xd3, 0x92, 0x93, 0x79, - 0xac, 0x14, 0xae, 0x57, 0xe9, 0x7a, 0xf5, 0x6a, 0x76, 0x3a, 0x28, 0x6f, 0x67, 0x5f, 0x39, 0xef, - 0x58, 0x8c, 0x99, 0x3e, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xe9, 0x70, 0x34, 0x75, 0x9e, 0x01, - 0x00, 0x00, -} diff --git a/pkg/proto/hapi/chart/config.pb.go b/pkg/proto/hapi/chart/config.pb.go deleted file mode 100644 index 30c652700..000000000 --- a/pkg/proto/hapi/chart/config.pb.go +++ /dev/null @@ -1,78 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: hapi/chart/config.proto - -package chart - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// Config supplies values to the parametrizable templates of a chart. -type Config struct { - Raw string `protobuf:"bytes,1,opt,name=raw" json:"raw,omitempty"` - Values map[string]*Value `protobuf:"bytes,2,rep,name=values" json:"values,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` -} - -func (m *Config) Reset() { *m = Config{} } -func (m *Config) String() string { return proto.CompactTextString(m) } -func (*Config) ProtoMessage() {} -func (*Config) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} } - -func (m *Config) GetRaw() string { - if m != nil { - return m.Raw - } - return "" -} - -func (m *Config) GetValues() map[string]*Value { - if m != nil { - return m.Values - } - return nil -} - -// Value describes a configuration value as a string. -type Value struct { - Value string `protobuf:"bytes,1,opt,name=value" json:"value,omitempty"` -} - -func (m *Value) Reset() { *m = Value{} } -func (m *Value) String() string { return proto.CompactTextString(m) } -func (*Value) ProtoMessage() {} -func (*Value) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{1} } - -func (m *Value) GetValue() string { - if m != nil { - return m.Value - } - return "" -} - -func init() { - proto.RegisterType((*Config)(nil), "hapi.chart.Config") - proto.RegisterType((*Value)(nil), "hapi.chart.Value") -} - -func init() { proto.RegisterFile("hapi/chart/config.proto", fileDescriptor1) } - -var fileDescriptor1 = []byte{ - // 182 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xcf, 0x48, 0x2c, 0xc8, - 0xd4, 0x4f, 0xce, 0x48, 0x2c, 0x2a, 0xd1, 0x4f, 0xce, 0xcf, 0x4b, 0xcb, 0x4c, 0xd7, 0x2b, 0x28, - 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x02, 0x49, 0xe8, 0x81, 0x25, 0x94, 0x16, 0x30, 0x72, 0xb1, 0x39, - 0x83, 0x25, 0x85, 0x04, 0xb8, 0x98, 0x8b, 0x12, 0xcb, 0x25, 0x18, 0x15, 0x18, 0x35, 0x38, 0x83, - 0x40, 0x4c, 0x21, 0x33, 0x2e, 0xb6, 0xb2, 0xc4, 0x9c, 0xd2, 0xd4, 0x62, 0x09, 0x26, 0x05, 0x66, - 0x0d, 0x6e, 0x23, 0x39, 0x3d, 0x84, 0x4e, 0x3d, 0x88, 0x2e, 0xbd, 0x30, 0xb0, 0x02, 0xd7, 0xbc, - 0x92, 0xa2, 0xca, 0x20, 0xa8, 0x6a, 0x29, 0x1f, 0x2e, 0x6e, 0x24, 0x61, 0x90, 0xc1, 0xd9, 0xa9, - 0x95, 0x30, 0x83, 0xb3, 0x53, 0x2b, 0x85, 0xd4, 0xb9, 0x58, 0xc1, 0x4a, 0x25, 0x98, 0x14, 0x18, - 0x35, 0xb8, 0x8d, 0x04, 0x91, 0xcd, 0x05, 0xeb, 0x0c, 0x82, 0xc8, 0x5b, 0x31, 0x59, 0x30, 0x2a, - 0xc9, 0x72, 0xb1, 0x82, 0xc5, 0x84, 0x44, 0x60, 0xba, 0x20, 0x26, 0x41, 0x38, 0x4e, 0xec, 0x51, - 0xac, 0x60, 0x8d, 0x49, 0x6c, 0x60, 0xdf, 0x19, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0xe1, 0x12, - 0x60, 0xda, 0xf8, 0x00, 0x00, 0x00, -} diff --git a/pkg/proto/hapi/chart/metadata.pb.go b/pkg/proto/hapi/chart/metadata.pb.go deleted file mode 100644 index 9daeaa9e5..000000000 --- a/pkg/proto/hapi/chart/metadata.pb.go +++ /dev/null @@ -1,276 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: hapi/chart/metadata.proto - -package chart - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type Metadata_Engine int32 - -const ( - Metadata_UNKNOWN Metadata_Engine = 0 - Metadata_GOTPL Metadata_Engine = 1 -) - -var Metadata_Engine_name = map[int32]string{ - 0: "UNKNOWN", - 1: "GOTPL", -} -var Metadata_Engine_value = map[string]int32{ - "UNKNOWN": 0, - "GOTPL": 1, -} - -func (x Metadata_Engine) String() string { - return proto.EnumName(Metadata_Engine_name, int32(x)) -} -func (Metadata_Engine) EnumDescriptor() ([]byte, []int) { return fileDescriptor2, []int{1, 0} } - -// Maintainer describes a Chart maintainer. -type Maintainer struct { - // Name is a user name or organization name - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - // Email is an optional email address to contact the named maintainer - Email string `protobuf:"bytes,2,opt,name=email" json:"email,omitempty"` - // Url is an optional URL to an address for the named maintainer - Url string `protobuf:"bytes,3,opt,name=url" json:"url,omitempty"` -} - -func (m *Maintainer) Reset() { *m = Maintainer{} } -func (m *Maintainer) String() string { return proto.CompactTextString(m) } -func (*Maintainer) ProtoMessage() {} -func (*Maintainer) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0} } - -func (m *Maintainer) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *Maintainer) GetEmail() string { - if m != nil { - return m.Email - } - return "" -} - -func (m *Maintainer) GetUrl() string { - if m != nil { - return m.Url - } - return "" -} - -// Metadata for a Chart file. This models the structure of a Chart.yaml file. -// -// Spec: https://k8s.io/helm/blob/master/docs/design/chart_format.md#the-chart-file -type Metadata struct { - // The name of the chart - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - // The URL to a relevant project page, git repo, or contact person - Home string `protobuf:"bytes,2,opt,name=home" json:"home,omitempty"` - // Source is the URL to the source code of this chart - Sources []string `protobuf:"bytes,3,rep,name=sources" json:"sources,omitempty"` - // A SemVer 2 conformant version string of the chart - Version string `protobuf:"bytes,4,opt,name=version" json:"version,omitempty"` - // A one-sentence description of the chart - Description string `protobuf:"bytes,5,opt,name=description" json:"description,omitempty"` - // A list of string keywords - Keywords []string `protobuf:"bytes,6,rep,name=keywords" json:"keywords,omitempty"` - // A list of name and URL/email address combinations for the maintainer(s) - Maintainers []*Maintainer `protobuf:"bytes,7,rep,name=maintainers" json:"maintainers,omitempty"` - // The name of the template engine to use. Defaults to 'gotpl'. - Engine string `protobuf:"bytes,8,opt,name=engine" json:"engine,omitempty"` - // The URL to an icon file. - Icon string `protobuf:"bytes,9,opt,name=icon" json:"icon,omitempty"` - // The API Version of this chart. - ApiVersion string `protobuf:"bytes,10,opt,name=apiVersion" json:"apiVersion,omitempty"` - // The condition to check to enable chart - Condition string `protobuf:"bytes,11,opt,name=condition" json:"condition,omitempty"` - // The tags to check to enable chart - Tags string `protobuf:"bytes,12,opt,name=tags" json:"tags,omitempty"` - // The version of the application enclosed inside of this chart. - AppVersion string `protobuf:"bytes,13,opt,name=appVersion" json:"appVersion,omitempty"` - // Whether or not this chart is deprecated - Deprecated bool `protobuf:"varint,14,opt,name=deprecated" json:"deprecated,omitempty"` - // TillerVersion is a SemVer constraints on what version of Tiller is required. - // See SemVer ranges here: https://github.com/Masterminds/semver#basic-comparisons - TillerVersion string `protobuf:"bytes,15,opt,name=tillerVersion" json:"tillerVersion,omitempty"` - // Annotations are additional mappings uninterpreted by Tiller, - // made available for inspection by other applications. - Annotations map[string]string `protobuf:"bytes,16,rep,name=annotations" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - // KubeVersion is a SemVer constraint specifying the version of Kubernetes required. - KubeVersion string `protobuf:"bytes,17,opt,name=kubeVersion" json:"kubeVersion,omitempty"` -} - -func (m *Metadata) Reset() { *m = Metadata{} } -func (m *Metadata) String() string { return proto.CompactTextString(m) } -func (*Metadata) ProtoMessage() {} -func (*Metadata) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{1} } - -func (m *Metadata) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *Metadata) GetHome() string { - if m != nil { - return m.Home - } - return "" -} - -func (m *Metadata) GetSources() []string { - if m != nil { - return m.Sources - } - return nil -} - -func (m *Metadata) GetVersion() string { - if m != nil { - return m.Version - } - return "" -} - -func (m *Metadata) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -func (m *Metadata) GetKeywords() []string { - if m != nil { - return m.Keywords - } - return nil -} - -func (m *Metadata) GetMaintainers() []*Maintainer { - if m != nil { - return m.Maintainers - } - return nil -} - -func (m *Metadata) GetEngine() string { - if m != nil { - return m.Engine - } - return "" -} - -func (m *Metadata) GetIcon() string { - if m != nil { - return m.Icon - } - return "" -} - -func (m *Metadata) GetApiVersion() string { - if m != nil { - return m.ApiVersion - } - return "" -} - -func (m *Metadata) GetCondition() string { - if m != nil { - return m.Condition - } - return "" -} - -func (m *Metadata) GetTags() string { - if m != nil { - return m.Tags - } - return "" -} - -func (m *Metadata) GetAppVersion() string { - if m != nil { - return m.AppVersion - } - return "" -} - -func (m *Metadata) GetDeprecated() bool { - if m != nil { - return m.Deprecated - } - return false -} - -func (m *Metadata) GetTillerVersion() string { - if m != nil { - return m.TillerVersion - } - return "" -} - -func (m *Metadata) GetAnnotations() map[string]string { - if m != nil { - return m.Annotations - } - return nil -} - -func (m *Metadata) GetKubeVersion() string { - if m != nil { - return m.KubeVersion - } - return "" -} - -func init() { - proto.RegisterType((*Maintainer)(nil), "hapi.chart.Maintainer") - proto.RegisterType((*Metadata)(nil), "hapi.chart.Metadata") - proto.RegisterEnum("hapi.chart.Metadata_Engine", Metadata_Engine_name, Metadata_Engine_value) -} - -func init() { proto.RegisterFile("hapi/chart/metadata.proto", fileDescriptor2) } - -var fileDescriptor2 = []byte{ - // 435 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x52, 0x5d, 0x6b, 0xd4, 0x40, - 0x14, 0x35, 0xcd, 0x66, 0x77, 0x73, 0x63, 0x35, 0x0e, 0x52, 0xc6, 0x22, 0x12, 0x16, 0x85, 0x7d, - 0xda, 0x82, 0xbe, 0x14, 0x1f, 0x04, 0x85, 0x52, 0x41, 0xbb, 0x95, 0xe0, 0x07, 0xf8, 0x36, 0x4d, - 0x2e, 0xdd, 0x61, 0x93, 0x99, 0x30, 0x99, 0xad, 0xec, 0xaf, 0xf0, 0x2f, 0xcb, 0xdc, 0x64, 0x9a, - 0xac, 0xf4, 0xed, 0x9e, 0x73, 0x66, 0xce, 0xcc, 0xbd, 0xf7, 0xc0, 0x8b, 0x8d, 0x68, 0xe4, 0x59, - 0xb1, 0x11, 0xc6, 0x9e, 0xd5, 0x68, 0x45, 0x29, 0xac, 0x58, 0x35, 0x46, 0x5b, 0xcd, 0xc0, 0x49, - 0x2b, 0x92, 0x16, 0x9f, 0x01, 0xae, 0x84, 0x54, 0x56, 0x48, 0x85, 0x86, 0x31, 0x98, 0x28, 0x51, - 0x23, 0x0f, 0xb2, 0x60, 0x19, 0xe7, 0x54, 0xb3, 0xe7, 0x10, 0x61, 0x2d, 0x64, 0xc5, 0x8f, 0x88, - 0xec, 0x00, 0x4b, 0x21, 0xdc, 0x99, 0x8a, 0x87, 0xc4, 0xb9, 0x72, 0xf1, 0x37, 0x82, 0xf9, 0x55, - 0xff, 0xd0, 0x83, 0x46, 0x0c, 0x26, 0x1b, 0x5d, 0x63, 0xef, 0x43, 0x35, 0xe3, 0x30, 0x6b, 0xf5, - 0xce, 0x14, 0xd8, 0xf2, 0x30, 0x0b, 0x97, 0x71, 0xee, 0xa1, 0x53, 0xee, 0xd0, 0xb4, 0x52, 0x2b, - 0x3e, 0xa1, 0x0b, 0x1e, 0xb2, 0x0c, 0x92, 0x12, 0xdb, 0xc2, 0xc8, 0xc6, 0x3a, 0x35, 0x22, 0x75, - 0x4c, 0xb1, 0x53, 0x98, 0x6f, 0x71, 0xff, 0x47, 0x9b, 0xb2, 0xe5, 0x53, 0xb2, 0xbd, 0xc7, 0xec, - 0x1c, 0x92, 0xfa, 0xbe, 0xe1, 0x96, 0xcf, 0xb2, 0x70, 0x99, 0xbc, 0x3d, 0x59, 0x0d, 0x23, 0x59, - 0x0d, 0xf3, 0xc8, 0xc7, 0x47, 0xd9, 0x09, 0x4c, 0x51, 0xdd, 0x4a, 0x85, 0x7c, 0x4e, 0x4f, 0xf6, - 0xc8, 0xf5, 0x25, 0x0b, 0xad, 0x78, 0xdc, 0xf5, 0xe5, 0x6a, 0xf6, 0x0a, 0x40, 0x34, 0xf2, 0x67, - 0xdf, 0x00, 0x90, 0x32, 0x62, 0xd8, 0x4b, 0x88, 0x0b, 0xad, 0x4a, 0x49, 0x1d, 0x24, 0x24, 0x0f, - 0x84, 0x73, 0xb4, 0xe2, 0xb6, 0xe5, 0x8f, 0x3b, 0x47, 0x57, 0x77, 0x8e, 0x8d, 0x77, 0x3c, 0xf6, - 0x8e, 0x9e, 0x71, 0x7a, 0x89, 0x8d, 0xc1, 0x42, 0x58, 0x2c, 0xf9, 0x93, 0x2c, 0x58, 0xce, 0xf3, - 0x11, 0xc3, 0x5e, 0xc3, 0xb1, 0x95, 0x55, 0x85, 0xc6, 0x5b, 0x3c, 0x25, 0x8b, 0x43, 0x92, 0x5d, - 0x42, 0x22, 0x94, 0xd2, 0x56, 0xb8, 0x7f, 0xb4, 0x3c, 0xa5, 0xe9, 0xbc, 0x39, 0x98, 0x8e, 0xcf, - 0xd2, 0xc7, 0xe1, 0xdc, 0x85, 0xb2, 0x66, 0x9f, 0x8f, 0x6f, 0xba, 0x25, 0x6d, 0x77, 0x37, 0xe8, - 0x1f, 0x7b, 0xd6, 0x2d, 0x69, 0x44, 0x9d, 0x7e, 0x80, 0xf4, 0x7f, 0x0b, 0x97, 0xaa, 0x2d, 0xee, - 0xfb, 0xd4, 0xb8, 0xd2, 0xa5, 0xef, 0x4e, 0x54, 0x3b, 0x9f, 0x9a, 0x0e, 0xbc, 0x3f, 0x3a, 0x0f, - 0x16, 0x19, 0x4c, 0x2f, 0xba, 0x05, 0x24, 0x30, 0xfb, 0xb1, 0xfe, 0xb2, 0xbe, 0xfe, 0xb5, 0x4e, - 0x1f, 0xb1, 0x18, 0xa2, 0xcb, 0xeb, 0xef, 0xdf, 0xbe, 0xa6, 0xc1, 0xa7, 0xd9, 0xef, 0x88, 0xfe, - 0x7c, 0x33, 0xa5, 0xdc, 0xbf, 0xfb, 0x17, 0x00, 0x00, 0xff, 0xff, 0x36, 0xf9, 0x0d, 0xa6, 0x14, - 0x03, 0x00, 0x00, -} diff --git a/pkg/proto/hapi/chart/template.pb.go b/pkg/proto/hapi/chart/template.pb.go deleted file mode 100644 index 439aec5a8..000000000 --- a/pkg/proto/hapi/chart/template.pb.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: hapi/chart/template.proto - -package chart - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// Template represents a template as a name/value pair. -// -// By convention, name is a relative path within the scope of the chart's -// base directory. -type Template struct { - // Name is the path-like name of the template. - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - // Data is the template as byte data. - Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` -} - -func (m *Template) Reset() { *m = Template{} } -func (m *Template) String() string { return proto.CompactTextString(m) } -func (*Template) ProtoMessage() {} -func (*Template) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{0} } - -func (m *Template) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *Template) GetData() []byte { - if m != nil { - return m.Data - } - return nil -} - -func init() { - proto.RegisterType((*Template)(nil), "hapi.chart.Template") -} - -func init() { proto.RegisterFile("hapi/chart/template.proto", fileDescriptor3) } - -var fileDescriptor3 = []byte{ - // 107 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcc, 0x48, 0x2c, 0xc8, - 0xd4, 0x4f, 0xce, 0x48, 0x2c, 0x2a, 0xd1, 0x2f, 0x49, 0xcd, 0x2d, 0xc8, 0x49, 0x2c, 0x49, 0xd5, - 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x02, 0x49, 0xe9, 0x81, 0xa5, 0x94, 0x8c, 0xb8, 0x38, - 0x42, 0xa0, 0xb2, 0x42, 0x42, 0x5c, 0x2c, 0x79, 0x89, 0xb9, 0xa9, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, - 0x9c, 0x41, 0x60, 0x36, 0x48, 0x2c, 0x25, 0xb1, 0x24, 0x51, 0x82, 0x49, 0x81, 0x51, 0x83, 0x27, - 0x08, 0xcc, 0x76, 0x62, 0x8f, 0x62, 0x05, 0x6b, 0x4e, 0x62, 0x03, 0x9b, 0x67, 0x0c, 0x08, 0x00, - 0x00, 0xff, 0xff, 0x53, 0xee, 0x0e, 0x67, 0x6c, 0x00, 0x00, 0x00, -} diff --git a/pkg/proto/hapi/release/hook.pb.go b/pkg/proto/hapi/release/hook.pb.go deleted file mode 100644 index 00fa5c188..000000000 --- a/pkg/proto/hapi/release/hook.pb.go +++ /dev/null @@ -1,231 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: hapi/release/hook.proto - -/* -Package release is a generated protocol buffer package. - -It is generated from these files: - hapi/release/hook.proto - hapi/release/info.proto - hapi/release/release.proto - hapi/release/status.proto - hapi/release/test_run.proto - hapi/release/test_suite.proto - -It has these top-level messages: - Hook - Info - Release - Status - TestRun - TestSuite -*/ -package release - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import google_protobuf "github.com/golang/protobuf/ptypes/timestamp" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package - -type Hook_Event int32 - -const ( - Hook_UNKNOWN Hook_Event = 0 - Hook_PRE_INSTALL Hook_Event = 1 - Hook_POST_INSTALL Hook_Event = 2 - Hook_PRE_DELETE Hook_Event = 3 - Hook_POST_DELETE Hook_Event = 4 - Hook_PRE_UPGRADE Hook_Event = 5 - Hook_POST_UPGRADE Hook_Event = 6 - Hook_PRE_ROLLBACK Hook_Event = 7 - Hook_POST_ROLLBACK Hook_Event = 8 - Hook_RELEASE_TEST_SUCCESS Hook_Event = 9 - Hook_RELEASE_TEST_FAILURE Hook_Event = 10 -) - -var Hook_Event_name = map[int32]string{ - 0: "UNKNOWN", - 1: "PRE_INSTALL", - 2: "POST_INSTALL", - 3: "PRE_DELETE", - 4: "POST_DELETE", - 5: "PRE_UPGRADE", - 6: "POST_UPGRADE", - 7: "PRE_ROLLBACK", - 8: "POST_ROLLBACK", - 9: "RELEASE_TEST_SUCCESS", - 10: "RELEASE_TEST_FAILURE", -} -var Hook_Event_value = map[string]int32{ - "UNKNOWN": 0, - "PRE_INSTALL": 1, - "POST_INSTALL": 2, - "PRE_DELETE": 3, - "POST_DELETE": 4, - "PRE_UPGRADE": 5, - "POST_UPGRADE": 6, - "PRE_ROLLBACK": 7, - "POST_ROLLBACK": 8, - "RELEASE_TEST_SUCCESS": 9, - "RELEASE_TEST_FAILURE": 10, -} - -func (x Hook_Event) String() string { - return proto.EnumName(Hook_Event_name, int32(x)) -} -func (Hook_Event) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0, 0} } - -type Hook_DeletePolicy int32 - -const ( - Hook_SUCCEEDED Hook_DeletePolicy = 0 - Hook_FAILED Hook_DeletePolicy = 1 - Hook_BEFORE_HOOK_CREATION Hook_DeletePolicy = 2 -) - -var Hook_DeletePolicy_name = map[int32]string{ - 0: "SUCCEEDED", - 1: "FAILED", - 2: "BEFORE_HOOK_CREATION", -} -var Hook_DeletePolicy_value = map[string]int32{ - "SUCCEEDED": 0, - "FAILED": 1, - "BEFORE_HOOK_CREATION": 2, -} - -func (x Hook_DeletePolicy) String() string { - return proto.EnumName(Hook_DeletePolicy_name, int32(x)) -} -func (Hook_DeletePolicy) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0, 1} } - -// Hook defines a hook object. -type Hook struct { - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - // Kind is the Kubernetes kind. - Kind string `protobuf:"bytes,2,opt,name=kind" json:"kind,omitempty"` - // Path is the chart-relative path to the template. - Path string `protobuf:"bytes,3,opt,name=path" json:"path,omitempty"` - // Manifest is the manifest contents. - Manifest string `protobuf:"bytes,4,opt,name=manifest" json:"manifest,omitempty"` - // Events are the events that this hook fires on. - Events []Hook_Event `protobuf:"varint,5,rep,packed,name=events,enum=hapi.release.Hook_Event" json:"events,omitempty"` - // LastRun indicates the date/time this was last run. - LastRun *google_protobuf.Timestamp `protobuf:"bytes,6,opt,name=last_run,json=lastRun" json:"last_run,omitempty"` - // Weight indicates the sort order for execution among similar Hook type - Weight int32 `protobuf:"varint,7,opt,name=weight" json:"weight,omitempty"` - // DeletePolicies are the policies that indicate when to delete the hook - DeletePolicies []Hook_DeletePolicy `protobuf:"varint,8,rep,packed,name=delete_policies,json=deletePolicies,enum=hapi.release.Hook_DeletePolicy" json:"delete_policies,omitempty"` -} - -func (m *Hook) Reset() { *m = Hook{} } -func (m *Hook) String() string { return proto.CompactTextString(m) } -func (*Hook) ProtoMessage() {} -func (*Hook) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } - -func (m *Hook) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *Hook) GetKind() string { - if m != nil { - return m.Kind - } - return "" -} - -func (m *Hook) GetPath() string { - if m != nil { - return m.Path - } - return "" -} - -func (m *Hook) GetManifest() string { - if m != nil { - return m.Manifest - } - return "" -} - -func (m *Hook) GetEvents() []Hook_Event { - if m != nil { - return m.Events - } - return nil -} - -func (m *Hook) GetLastRun() *google_protobuf.Timestamp { - if m != nil { - return m.LastRun - } - return nil -} - -func (m *Hook) GetWeight() int32 { - if m != nil { - return m.Weight - } - return 0 -} - -func (m *Hook) GetDeletePolicies() []Hook_DeletePolicy { - if m != nil { - return m.DeletePolicies - } - return nil -} - -func init() { - proto.RegisterType((*Hook)(nil), "hapi.release.Hook") - proto.RegisterEnum("hapi.release.Hook_Event", Hook_Event_name, Hook_Event_value) - proto.RegisterEnum("hapi.release.Hook_DeletePolicy", Hook_DeletePolicy_name, Hook_DeletePolicy_value) -} - -func init() { proto.RegisterFile("hapi/release/hook.proto", fileDescriptor0) } - -var fileDescriptor0 = []byte{ - // 445 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0x51, 0x8f, 0x9a, 0x40, - 0x10, 0x80, 0x8f, 0x13, 0x41, 0x47, 0xcf, 0xdb, 0x6e, 0x9a, 0x76, 0xe3, 0xcb, 0x19, 0x9f, 0x7c, - 0xc2, 0xe6, 0x9a, 0xfe, 0x00, 0x84, 0xb9, 0x6a, 0x24, 0x60, 0x16, 0x4c, 0x93, 0xbe, 0x10, 0xae, - 0xee, 0x29, 0x11, 0x81, 0x08, 0xb6, 0xe9, 0x0f, 0xec, 0x3f, 0xe8, 0x0f, 0x6a, 0x76, 0x45, 0x7b, - 0x49, 0xfb, 0x36, 0xf3, 0xcd, 0x37, 0xc3, 0x0c, 0x0b, 0xef, 0x77, 0x49, 0x99, 0x4e, 0x8f, 0x22, - 0x13, 0x49, 0x25, 0xa6, 0xbb, 0xa2, 0xd8, 0x5b, 0xe5, 0xb1, 0xa8, 0x0b, 0xda, 0x97, 0x05, 0xab, - 0x29, 0x0c, 0x1f, 0xb6, 0x45, 0xb1, 0xcd, 0xc4, 0x54, 0xd5, 0x9e, 0x4f, 0x2f, 0xd3, 0x3a, 0x3d, - 0x88, 0xaa, 0x4e, 0x0e, 0xe5, 0x59, 0x1f, 0xff, 0xd2, 0x41, 0x9f, 0x17, 0xc5, 0x9e, 0x52, 0xd0, - 0xf3, 0xe4, 0x20, 0x98, 0x36, 0xd2, 0x26, 0x5d, 0xae, 0x62, 0xc9, 0xf6, 0x69, 0xbe, 0x61, 0xb7, - 0x67, 0x26, 0x63, 0xc9, 0xca, 0xa4, 0xde, 0xb1, 0xd6, 0x99, 0xc9, 0x98, 0x0e, 0xa1, 0x73, 0x48, - 0xf2, 0xf4, 0x45, 0x54, 0x35, 0xd3, 0x15, 0xbf, 0xe6, 0xf4, 0x03, 0x18, 0xe2, 0xbb, 0xc8, 0xeb, - 0x8a, 0xb5, 0x47, 0xad, 0xc9, 0xe0, 0x91, 0x59, 0xaf, 0x17, 0xb4, 0xe4, 0xb7, 0x2d, 0x94, 0x02, - 0x6f, 0x3c, 0xfa, 0x09, 0x3a, 0x59, 0x52, 0xd5, 0xf1, 0xf1, 0x94, 0x33, 0x63, 0xa4, 0x4d, 0x7a, - 0x8f, 0x43, 0xeb, 0x7c, 0x86, 0x75, 0x39, 0xc3, 0x8a, 0x2e, 0x67, 0x70, 0x53, 0xba, 0xfc, 0x94, - 0xd3, 0x77, 0x60, 0xfc, 0x10, 0xe9, 0x76, 0x57, 0x33, 0x73, 0xa4, 0x4d, 0xda, 0xbc, 0xc9, 0xe8, - 0x1c, 0xee, 0x37, 0x22, 0x13, 0xb5, 0x88, 0xcb, 0x22, 0x4b, 0xbf, 0xa5, 0xa2, 0x62, 0x1d, 0xb5, - 0xc9, 0xc3, 0x7f, 0x36, 0x71, 0x95, 0xb9, 0x92, 0xe2, 0x4f, 0x3e, 0xd8, 0xfc, 0xcd, 0x52, 0x51, - 0x8d, 0x7f, 0x6b, 0xd0, 0x56, 0xab, 0xd2, 0x1e, 0x98, 0x6b, 0x7f, 0xe9, 0x07, 0x5f, 0x7c, 0x72, - 0x43, 0xef, 0xa1, 0xb7, 0xe2, 0x18, 0x2f, 0xfc, 0x30, 0xb2, 0x3d, 0x8f, 0x68, 0x94, 0x40, 0x7f, - 0x15, 0x84, 0xd1, 0x95, 0xdc, 0xd2, 0x01, 0x80, 0x54, 0x5c, 0xf4, 0x30, 0x42, 0xd2, 0x52, 0x2d, - 0xd2, 0x68, 0x80, 0x7e, 0x99, 0xb1, 0x5e, 0x7d, 0xe6, 0xb6, 0x8b, 0xa4, 0x7d, 0x9d, 0x71, 0x21, - 0x86, 0x22, 0x1c, 0x63, 0x1e, 0x78, 0xde, 0xcc, 0x76, 0x96, 0xc4, 0xa4, 0x6f, 0xe0, 0x4e, 0x39, - 0x57, 0xd4, 0xa1, 0x0c, 0xde, 0x72, 0xf4, 0xd0, 0x0e, 0x31, 0x8e, 0x30, 0x8c, 0xe2, 0x70, 0xed, - 0x38, 0x18, 0x86, 0xa4, 0xfb, 0x4f, 0xe5, 0xc9, 0x5e, 0x78, 0x6b, 0x8e, 0x04, 0xc6, 0x0e, 0xf4, - 0x5f, 0x9f, 0x4d, 0xef, 0xa0, 0xab, 0xda, 0xd0, 0x45, 0x97, 0xdc, 0x50, 0x00, 0x43, 0xba, 0xe8, - 0x12, 0x4d, 0x0e, 0x99, 0xe1, 0x53, 0xc0, 0x31, 0x9e, 0x07, 0xc1, 0x32, 0x76, 0x38, 0xda, 0xd1, - 0x22, 0xf0, 0xc9, 0xed, 0xac, 0xfb, 0xd5, 0x6c, 0x7e, 0xe4, 0xb3, 0xa1, 0x5e, 0xe9, 0xe3, 0x9f, - 0x00, 0x00, 0x00, 0xff, 0xff, 0x13, 0x64, 0x75, 0x6c, 0xa3, 0x02, 0x00, 0x00, -} diff --git a/pkg/proto/hapi/release/info.pb.go b/pkg/proto/hapi/release/info.pb.go deleted file mode 100644 index 7a7ccdd74..000000000 --- a/pkg/proto/hapi/release/info.pb.go +++ /dev/null @@ -1,90 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: hapi/release/info.proto - -package release - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import google_protobuf "github.com/golang/protobuf/ptypes/timestamp" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// Info describes release information. -type Info struct { - Status *Status `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"` - FirstDeployed *google_protobuf.Timestamp `protobuf:"bytes,2,opt,name=first_deployed,json=firstDeployed" json:"first_deployed,omitempty"` - LastDeployed *google_protobuf.Timestamp `protobuf:"bytes,3,opt,name=last_deployed,json=lastDeployed" json:"last_deployed,omitempty"` - // Deleted tracks when this object was deleted. - Deleted *google_protobuf.Timestamp `protobuf:"bytes,4,opt,name=deleted" json:"deleted,omitempty"` - // Description is human-friendly "log entry" about this release. - Description string `protobuf:"bytes,5,opt,name=Description" json:"Description,omitempty"` -} - -func (m *Info) Reset() { *m = Info{} } -func (m *Info) String() string { return proto.CompactTextString(m) } -func (*Info) ProtoMessage() {} -func (*Info) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} } - -func (m *Info) GetStatus() *Status { - if m != nil { - return m.Status - } - return nil -} - -func (m *Info) GetFirstDeployed() *google_protobuf.Timestamp { - if m != nil { - return m.FirstDeployed - } - return nil -} - -func (m *Info) GetLastDeployed() *google_protobuf.Timestamp { - if m != nil { - return m.LastDeployed - } - return nil -} - -func (m *Info) GetDeleted() *google_protobuf.Timestamp { - if m != nil { - return m.Deleted - } - return nil -} - -func (m *Info) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -func init() { - proto.RegisterType((*Info)(nil), "hapi.release.Info") -} - -func init() { proto.RegisterFile("hapi/release/info.proto", fileDescriptor1) } - -var fileDescriptor1 = []byte{ - // 235 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x8f, 0x31, 0x4f, 0xc3, 0x30, - 0x10, 0x85, 0x95, 0x52, 0x5a, 0xd5, 0x6d, 0x19, 0x2c, 0x24, 0x42, 0x16, 0x22, 0xa6, 0x0e, 0xc8, - 0x91, 0x80, 0x1d, 0x81, 0xba, 0xb0, 0x06, 0x26, 0x16, 0xe4, 0xe2, 0x73, 0xb1, 0xe4, 0xe6, 0x2c, - 0xfb, 0x3a, 0xf0, 0x2f, 0xf8, 0xc9, 0xa8, 0xb6, 0x83, 0xd2, 0xa9, 0xab, 0xbf, 0xf7, 0x3e, 0xbf, - 0x63, 0x57, 0xdf, 0xd2, 0x99, 0xc6, 0x83, 0x05, 0x19, 0xa0, 0x31, 0x9d, 0x46, 0xe1, 0x3c, 0x12, - 0xf2, 0xc5, 0x01, 0x88, 0x0c, 0xaa, 0x9b, 0x2d, 0xe2, 0xd6, 0x42, 0x13, 0xd9, 0x66, 0xaf, 0x1b, - 0x32, 0x3b, 0x08, 0x24, 0x77, 0x2e, 0xc5, 0xab, 0xeb, 0x23, 0x4f, 0x20, 0x49, 0xfb, 0x90, 0xd0, - 0xed, 0xef, 0x88, 0x8d, 0x5f, 0x3b, 0x8d, 0xfc, 0x8e, 0x4d, 0x12, 0x28, 0x8b, 0xba, 0x58, 0xcd, - 0xef, 0x2f, 0xc5, 0xf0, 0x0f, 0xf1, 0x16, 0x59, 0x9b, 0x33, 0xfc, 0x99, 0x5d, 0x68, 0xe3, 0x03, - 0x7d, 0x2a, 0x70, 0x16, 0x7f, 0x40, 0x95, 0xa3, 0xd8, 0xaa, 0x44, 0xda, 0x22, 0xfa, 0x2d, 0xe2, - 0xbd, 0xdf, 0xd2, 0x2e, 0x63, 0x63, 0x9d, 0x0b, 0xfc, 0x89, 0x2d, 0xad, 0x1c, 0x1a, 0xce, 0x4e, - 0x1a, 0x16, 0x87, 0xc2, 0xbf, 0xe0, 0x91, 0x4d, 0x15, 0x58, 0x20, 0x50, 0xe5, 0xf8, 0x64, 0xb5, - 0x8f, 0xf2, 0x9a, 0xcd, 0xd7, 0x10, 0xbe, 0xbc, 0x71, 0x64, 0xb0, 0x2b, 0xcf, 0xeb, 0x62, 0x35, - 0x6b, 0x87, 0x4f, 0x2f, 0xb3, 0x8f, 0x69, 0xbe, 0x7a, 0x33, 0x89, 0xa6, 0x87, 0xbf, 0x00, 0x00, - 0x00, 0xff, 0xff, 0x1a, 0x52, 0x8f, 0x9c, 0x89, 0x01, 0x00, 0x00, -} diff --git a/pkg/proto/hapi/release/release.pb.go b/pkg/proto/hapi/release/release.pb.go deleted file mode 100644 index 511b543d7..000000000 --- a/pkg/proto/hapi/release/release.pb.go +++ /dev/null @@ -1,124 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: hapi/release/release.proto - -package release - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import hapi_chart "k8s.io/helm/pkg/proto/hapi/chart" -import hapi_chart3 "k8s.io/helm/pkg/proto/hapi/chart" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// Release describes a deployment of a chart, together with the chart -// and the variables used to deploy that chart. -type Release struct { - // Name is the name of the release - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - // Info provides information about a release - Info *Info `protobuf:"bytes,2,opt,name=info" json:"info,omitempty"` - // Chart is the chart that was released. - Chart *hapi_chart3.Chart `protobuf:"bytes,3,opt,name=chart" json:"chart,omitempty"` - // Config is the set of extra Values added to the chart. - // These values override the default values inside of the chart. - Config *hapi_chart.Config `protobuf:"bytes,4,opt,name=config" json:"config,omitempty"` - // Manifest is the string representation of the rendered template. - Manifest string `protobuf:"bytes,5,opt,name=manifest" json:"manifest,omitempty"` - // Hooks are all of the hooks declared for this release. - Hooks []*Hook `protobuf:"bytes,6,rep,name=hooks" json:"hooks,omitempty"` - // Version is an int32 which represents the version of the release. - Version int32 `protobuf:"varint,7,opt,name=version" json:"version,omitempty"` - // Namespace is the kubernetes namespace of the release. - Namespace string `protobuf:"bytes,8,opt,name=namespace" json:"namespace,omitempty"` -} - -func (m *Release) Reset() { *m = Release{} } -func (m *Release) String() string { return proto.CompactTextString(m) } -func (*Release) ProtoMessage() {} -func (*Release) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0} } - -func (m *Release) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *Release) GetInfo() *Info { - if m != nil { - return m.Info - } - return nil -} - -func (m *Release) GetChart() *hapi_chart3.Chart { - if m != nil { - return m.Chart - } - return nil -} - -func (m *Release) GetConfig() *hapi_chart.Config { - if m != nil { - return m.Config - } - return nil -} - -func (m *Release) GetManifest() string { - if m != nil { - return m.Manifest - } - return "" -} - -func (m *Release) GetHooks() []*Hook { - if m != nil { - return m.Hooks - } - return nil -} - -func (m *Release) GetVersion() int32 { - if m != nil { - return m.Version - } - return 0 -} - -func (m *Release) GetNamespace() string { - if m != nil { - return m.Namespace - } - return "" -} - -func init() { - proto.RegisterType((*Release)(nil), "hapi.release.Release") -} - -func init() { proto.RegisterFile("hapi/release/release.proto", fileDescriptor2) } - -var fileDescriptor2 = []byte{ - // 256 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x90, 0xbf, 0x4e, 0xc3, 0x40, - 0x0c, 0xc6, 0x95, 0x36, 0x7f, 0x1a, 0xc3, 0x82, 0x07, 0xb0, 0x22, 0x86, 0x88, 0x01, 0x22, 0x86, - 0x54, 0x82, 0x37, 0x80, 0x05, 0xd6, 0x1b, 0xd9, 0x8e, 0xe8, 0x42, 0x4e, 0xa5, 0xe7, 0x28, 0x17, - 0xf1, 0x2c, 0x3c, 0x2e, 0xba, 0x3f, 0x85, 0x94, 0x2e, 0x4e, 0xec, 0xdf, 0xa7, 0xcf, 0xdf, 0x19, - 0xaa, 0x41, 0x8e, 0x7a, 0x3b, 0xa9, 0x4f, 0x25, 0xad, 0x3a, 0x7c, 0xdb, 0x71, 0xe2, 0x99, 0xf1, - 0xdc, 0xb1, 0x36, 0xce, 0xaa, 0xab, 0x23, 0xe5, 0xc0, 0xbc, 0x0b, 0xb2, 0x7f, 0x40, 0x9b, 0x9e, - 0x8f, 0x40, 0x37, 0xc8, 0x69, 0xde, 0x76, 0x6c, 0x7a, 0xfd, 0x11, 0xc1, 0xe5, 0x12, 0xb8, 0x1a, - 0xe6, 0x37, 0xdf, 0x2b, 0x28, 0x44, 0xf0, 0x41, 0x84, 0xd4, 0xc8, 0xbd, 0xa2, 0xa4, 0x4e, 0x9a, - 0x52, 0xf8, 0x7f, 0xbc, 0x85, 0xd4, 0xd9, 0xd3, 0xaa, 0x4e, 0x9a, 0xb3, 0x07, 0x6c, 0x97, 0xf9, - 0xda, 0x57, 0xd3, 0xb3, 0xf0, 0x1c, 0xef, 0x20, 0xf3, 0xb6, 0xb4, 0xf6, 0xc2, 0x8b, 0x20, 0x0c, - 0x9b, 0x9e, 0x5d, 0x15, 0x81, 0xe3, 0x3d, 0xe4, 0x21, 0x18, 0xa5, 0x4b, 0xcb, 0xa8, 0xf4, 0x44, - 0x44, 0x05, 0x56, 0xb0, 0xd9, 0x4b, 0xa3, 0x7b, 0x65, 0x67, 0xca, 0x7c, 0xa8, 0xdf, 0x1e, 0x1b, - 0xc8, 0xdc, 0x41, 0x2c, 0xe5, 0xf5, 0xfa, 0x34, 0xd9, 0x0b, 0xf3, 0x4e, 0x04, 0x01, 0x12, 0x14, - 0x5f, 0x6a, 0xb2, 0x9a, 0x0d, 0x15, 0x75, 0xd2, 0x64, 0xe2, 0xd0, 0xe2, 0x35, 0x94, 0xee, 0x91, - 0x76, 0x94, 0x9d, 0xa2, 0x8d, 0x5f, 0xf0, 0x37, 0x78, 0x2a, 0xdf, 0x8a, 0x68, 0xf7, 0x9e, 0xfb, - 0x63, 0x3d, 0xfe, 0x04, 0x00, 0x00, 0xff, 0xff, 0xc8, 0x8f, 0xec, 0x97, 0xbb, 0x01, 0x00, 0x00, -} diff --git a/pkg/proto/hapi/release/status.pb.go b/pkg/proto/hapi/release/status.pb.go deleted file mode 100644 index 284892642..000000000 --- a/pkg/proto/hapi/release/status.pb.go +++ /dev/null @@ -1,141 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: hapi/release/status.proto - -package release - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/golang/protobuf/ptypes/any" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type Status_Code int32 - -const ( - // Status_UNKNOWN indicates that a release is in an uncertain state. - Status_UNKNOWN Status_Code = 0 - // Status_DEPLOYED indicates that the release has been pushed to Kubernetes. - Status_DEPLOYED Status_Code = 1 - // Status_DELETED indicates that a release has been deleted from Kubermetes. - Status_DELETED Status_Code = 2 - // Status_SUPERSEDED indicates that this release object is outdated and a newer one exists. - Status_SUPERSEDED Status_Code = 3 - // Status_FAILED indicates that the release was not successfully deployed. - Status_FAILED Status_Code = 4 - // Status_DELETING indicates that a delete operation is underway. - Status_DELETING Status_Code = 5 - // Status_PENDING_INSTALL indicates that an install operation is underway. - Status_PENDING_INSTALL Status_Code = 6 - // Status_PENDING_UPGRADE indicates that an upgrade operation is underway. - Status_PENDING_UPGRADE Status_Code = 7 - // Status_PENDING_ROLLBACK indicates that an rollback operation is underway. - Status_PENDING_ROLLBACK Status_Code = 8 -) - -var Status_Code_name = map[int32]string{ - 0: "UNKNOWN", - 1: "DEPLOYED", - 2: "DELETED", - 3: "SUPERSEDED", - 4: "FAILED", - 5: "DELETING", - 6: "PENDING_INSTALL", - 7: "PENDING_UPGRADE", - 8: "PENDING_ROLLBACK", -} -var Status_Code_value = map[string]int32{ - "UNKNOWN": 0, - "DEPLOYED": 1, - "DELETED": 2, - "SUPERSEDED": 3, - "FAILED": 4, - "DELETING": 5, - "PENDING_INSTALL": 6, - "PENDING_UPGRADE": 7, - "PENDING_ROLLBACK": 8, -} - -func (x Status_Code) String() string { - return proto.EnumName(Status_Code_name, int32(x)) -} -func (Status_Code) EnumDescriptor() ([]byte, []int) { return fileDescriptor3, []int{0, 0} } - -// Status defines the status of a release. -type Status struct { - Code Status_Code `protobuf:"varint,1,opt,name=code,enum=hapi.release.Status_Code" json:"code,omitempty"` - // Cluster resources as kubectl would print them. - Resources string `protobuf:"bytes,3,opt,name=resources" json:"resources,omitempty"` - // Contains the rendered templates/NOTES.txt if available - Notes string `protobuf:"bytes,4,opt,name=notes" json:"notes,omitempty"` - // LastTestSuiteRun provides results on the last test run on a release - LastTestSuiteRun *TestSuite `protobuf:"bytes,5,opt,name=last_test_suite_run,json=lastTestSuiteRun" json:"last_test_suite_run,omitempty"` -} - -func (m *Status) Reset() { *m = Status{} } -func (m *Status) String() string { return proto.CompactTextString(m) } -func (*Status) ProtoMessage() {} -func (*Status) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{0} } - -func (m *Status) GetCode() Status_Code { - if m != nil { - return m.Code - } - return Status_UNKNOWN -} - -func (m *Status) GetResources() string { - if m != nil { - return m.Resources - } - return "" -} - -func (m *Status) GetNotes() string { - if m != nil { - return m.Notes - } - return "" -} - -func (m *Status) GetLastTestSuiteRun() *TestSuite { - if m != nil { - return m.LastTestSuiteRun - } - return nil -} - -func init() { - proto.RegisterType((*Status)(nil), "hapi.release.Status") - proto.RegisterEnum("hapi.release.Status_Code", Status_Code_name, Status_Code_value) -} - -func init() { proto.RegisterFile("hapi/release/status.proto", fileDescriptor3) } - -var fileDescriptor3 = []byte{ - // 333 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x90, 0xd1, 0x6e, 0xa2, 0x40, - 0x14, 0x86, 0x17, 0x45, 0xd4, 0xa3, 0x71, 0x27, 0xa3, 0xc9, 0xa2, 0xd9, 0x4d, 0x8c, 0x57, 0xde, - 0x2c, 0x24, 0xf6, 0x09, 0xd0, 0x19, 0x0d, 0x71, 0x82, 0x04, 0x30, 0x4d, 0x7b, 0x43, 0x50, 0xa7, - 0xd6, 0xc4, 0x30, 0x86, 0x19, 0x2e, 0xfa, 0x26, 0x7d, 0xaa, 0x3e, 0x53, 0x03, 0xd8, 0xa8, 0x97, - 0xff, 0xff, 0x7d, 0x87, 0x73, 0x18, 0x18, 0xbe, 0x27, 0x97, 0x93, 0x9d, 0xf1, 0x33, 0x4f, 0x24, - 0xb7, 0xa5, 0x4a, 0x54, 0x2e, 0xad, 0x4b, 0x26, 0x94, 0xc0, 0xdd, 0x02, 0x59, 0x57, 0x34, 0xfa, - 0xf7, 0x20, 0x2a, 0x2e, 0x55, 0x2c, 0xf3, 0x93, 0xe2, 0x95, 0x3c, 0x1a, 0x1e, 0x85, 0x38, 0x9e, - 0xb9, 0x5d, 0xa6, 0x5d, 0xfe, 0x66, 0x27, 0xe9, 0x47, 0x85, 0x26, 0x5f, 0x35, 0x30, 0xc2, 0xf2, - 0xc3, 0xf8, 0x3f, 0xe8, 0x7b, 0x71, 0xe0, 0xa6, 0x36, 0xd6, 0xa6, 0xbd, 0xd9, 0xd0, 0xba, 0xdf, - 0x60, 0x55, 0x8e, 0xb5, 0x10, 0x07, 0x1e, 0x94, 0x1a, 0xfe, 0x0b, 0xed, 0x8c, 0x4b, 0x91, 0x67, - 0x7b, 0x2e, 0xcd, 0xfa, 0x58, 0x9b, 0xb6, 0x83, 0x5b, 0x81, 0x07, 0xd0, 0x48, 0x85, 0xe2, 0xd2, - 0xd4, 0x4b, 0x52, 0x05, 0xbc, 0x84, 0xfe, 0x39, 0x91, 0x2a, 0xbe, 0x5d, 0x18, 0x67, 0x79, 0x6a, - 0x36, 0xc6, 0xda, 0xb4, 0x33, 0xfb, 0xf3, 0xb8, 0x31, 0xe2, 0x52, 0x85, 0x85, 0x12, 0xa0, 0x62, - 0xe6, 0x16, 0xf3, 0x74, 0xf2, 0xa9, 0x81, 0x5e, 0x9c, 0x82, 0x3b, 0xd0, 0xdc, 0x7a, 0x6b, 0x6f, - 0xf3, 0xec, 0xa1, 0x5f, 0xb8, 0x0b, 0x2d, 0x42, 0x7d, 0xb6, 0x79, 0xa1, 0x04, 0x69, 0x05, 0x22, - 0x94, 0xd1, 0x88, 0x12, 0x54, 0xc3, 0x3d, 0x80, 0x70, 0xeb, 0xd3, 0x20, 0xa4, 0x84, 0x12, 0x54, - 0xc7, 0x00, 0xc6, 0xd2, 0x71, 0x19, 0x25, 0x48, 0xaf, 0xc6, 0x18, 0x8d, 0x5c, 0x6f, 0x85, 0x1a, - 0xb8, 0x0f, 0xbf, 0x7d, 0xea, 0x11, 0xd7, 0x5b, 0xc5, 0xae, 0x17, 0x46, 0x0e, 0x63, 0xc8, 0xb8, - 0x2f, 0xb7, 0xfe, 0x2a, 0x70, 0x08, 0x45, 0x4d, 0x3c, 0x00, 0xf4, 0x53, 0x06, 0x1b, 0xc6, 0xe6, - 0xce, 0x62, 0x8d, 0x5a, 0xf3, 0xf6, 0x6b, 0xf3, 0xfa, 0x07, 0x3b, 0xa3, 0x7c, 0xe2, 0xa7, 0xef, - 0x00, 0x00, 0x00, 0xff, 0xff, 0x09, 0x48, 0x18, 0xba, 0xc7, 0x01, 0x00, 0x00, -} diff --git a/pkg/proto/hapi/release/test_run.pb.go b/pkg/proto/hapi/release/test_run.pb.go deleted file mode 100644 index 4d39d17c2..000000000 --- a/pkg/proto/hapi/release/test_run.pb.go +++ /dev/null @@ -1,118 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: hapi/release/test_run.proto - -package release - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import google_protobuf "github.com/golang/protobuf/ptypes/timestamp" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -type TestRun_Status int32 - -const ( - TestRun_UNKNOWN TestRun_Status = 0 - TestRun_SUCCESS TestRun_Status = 1 - TestRun_FAILURE TestRun_Status = 2 - TestRun_RUNNING TestRun_Status = 3 -) - -var TestRun_Status_name = map[int32]string{ - 0: "UNKNOWN", - 1: "SUCCESS", - 2: "FAILURE", - 3: "RUNNING", -} -var TestRun_Status_value = map[string]int32{ - "UNKNOWN": 0, - "SUCCESS": 1, - "FAILURE": 2, - "RUNNING": 3, -} - -func (x TestRun_Status) String() string { - return proto.EnumName(TestRun_Status_name, int32(x)) -} -func (TestRun_Status) EnumDescriptor() ([]byte, []int) { return fileDescriptor4, []int{0, 0} } - -type TestRun struct { - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - Status TestRun_Status `protobuf:"varint,2,opt,name=status,enum=hapi.release.TestRun_Status" json:"status,omitempty"` - Info string `protobuf:"bytes,3,opt,name=info" json:"info,omitempty"` - StartedAt *google_protobuf.Timestamp `protobuf:"bytes,4,opt,name=started_at,json=startedAt" json:"started_at,omitempty"` - CompletedAt *google_protobuf.Timestamp `protobuf:"bytes,5,opt,name=completed_at,json=completedAt" json:"completed_at,omitempty"` -} - -func (m *TestRun) Reset() { *m = TestRun{} } -func (m *TestRun) String() string { return proto.CompactTextString(m) } -func (*TestRun) ProtoMessage() {} -func (*TestRun) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{0} } - -func (m *TestRun) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *TestRun) GetStatus() TestRun_Status { - if m != nil { - return m.Status - } - return TestRun_UNKNOWN -} - -func (m *TestRun) GetInfo() string { - if m != nil { - return m.Info - } - return "" -} - -func (m *TestRun) GetStartedAt() *google_protobuf.Timestamp { - if m != nil { - return m.StartedAt - } - return nil -} - -func (m *TestRun) GetCompletedAt() *google_protobuf.Timestamp { - if m != nil { - return m.CompletedAt - } - return nil -} - -func init() { - proto.RegisterType((*TestRun)(nil), "hapi.release.TestRun") - proto.RegisterEnum("hapi.release.TestRun_Status", TestRun_Status_name, TestRun_Status_value) -} - -func init() { proto.RegisterFile("hapi/release/test_run.proto", fileDescriptor4) } - -var fileDescriptor4 = []byte{ - // 274 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x8f, 0xc1, 0x4b, 0xfb, 0x30, - 0x1c, 0xc5, 0x7f, 0xe9, 0xf6, 0x6b, 0x69, 0x3a, 0xa4, 0xe4, 0x54, 0xa6, 0x60, 0xd9, 0xa9, 0xa7, - 0x14, 0xa6, 0x17, 0x41, 0x0f, 0x75, 0x4c, 0x19, 0x4a, 0x84, 0x74, 0x45, 0xf0, 0x32, 0x32, 0xcd, - 0x66, 0xa1, 0x6d, 0x4a, 0xf3, 0xed, 0xdf, 0xe3, 0xbf, 0x2a, 0x69, 0x33, 0xf1, 0xe6, 0xed, 0xfb, - 0x78, 0x9f, 0xf7, 0xf2, 0x82, 0xcf, 0x3f, 0x45, 0x5b, 0xa6, 0x9d, 0xac, 0xa4, 0xd0, 0x32, 0x05, - 0xa9, 0x61, 0xd7, 0xf5, 0x0d, 0x6d, 0x3b, 0x05, 0x8a, 0xcc, 0x8c, 0x49, 0xad, 0x39, 0xbf, 0x3c, - 0x2a, 0x75, 0xac, 0x64, 0x3a, 0x78, 0xfb, 0xfe, 0x90, 0x42, 0x59, 0x4b, 0x0d, 0xa2, 0x6e, 0x47, - 0x7c, 0xf1, 0xe5, 0x60, 0x6f, 0x2b, 0x35, 0xf0, 0xbe, 0x21, 0x04, 0x4f, 0x1b, 0x51, 0xcb, 0x08, - 0xc5, 0x28, 0xf1, 0xf9, 0x70, 0x93, 0x6b, 0xec, 0x6a, 0x10, 0xd0, 0xeb, 0xc8, 0x89, 0x51, 0x72, - 0xb6, 0xbc, 0xa0, 0xbf, 0xfb, 0xa9, 0x8d, 0xd2, 0x7c, 0x60, 0xb8, 0x65, 0x4d, 0x53, 0xd9, 0x1c, - 0x54, 0x34, 0x19, 0x9b, 0xcc, 0x4d, 0x6e, 0x30, 0xd6, 0x20, 0x3a, 0x90, 0x1f, 0x3b, 0x01, 0xd1, - 0x34, 0x46, 0x49, 0xb0, 0x9c, 0xd3, 0x71, 0x1f, 0x3d, 0xed, 0xa3, 0xdb, 0xd3, 0x3e, 0xee, 0x5b, - 0x3a, 0x03, 0x72, 0x87, 0x67, 0xef, 0xaa, 0x6e, 0x2b, 0x69, 0xc3, 0xff, 0xff, 0x0c, 0x07, 0x3f, - 0x7c, 0x06, 0x8b, 0x5b, 0xec, 0x8e, 0xfb, 0x48, 0x80, 0xbd, 0x82, 0x3d, 0xb1, 0x97, 0x57, 0x16, - 0xfe, 0x33, 0x22, 0x2f, 0x56, 0xab, 0x75, 0x9e, 0x87, 0xc8, 0x88, 0x87, 0x6c, 0xf3, 0x5c, 0xf0, - 0x75, 0xe8, 0x18, 0xc1, 0x0b, 0xc6, 0x36, 0xec, 0x31, 0x9c, 0xdc, 0xfb, 0x6f, 0x9e, 0xfd, 0xed, - 0xde, 0x1d, 0x5e, 0xba, 0xfa, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x31, 0x86, 0x46, 0xdb, 0x81, 0x01, - 0x00, 0x00, -} diff --git a/pkg/proto/hapi/release/test_suite.pb.go b/pkg/proto/hapi/release/test_suite.pb.go deleted file mode 100644 index b7fa26147..000000000 --- a/pkg/proto/hapi/release/test_suite.pb.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: hapi/release/test_suite.proto - -package release - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import google_protobuf "github.com/golang/protobuf/ptypes/timestamp" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// TestSuite comprises of the last run of the pre-defined test suite of a release version -type TestSuite struct { - // StartedAt indicates the date/time this test suite was kicked off - StartedAt *google_protobuf.Timestamp `protobuf:"bytes,1,opt,name=started_at,json=startedAt" json:"started_at,omitempty"` - // CompletedAt indicates the date/time this test suite was completed - CompletedAt *google_protobuf.Timestamp `protobuf:"bytes,2,opt,name=completed_at,json=completedAt" json:"completed_at,omitempty"` - // Results are the results of each segment of the test - Results []*TestRun `protobuf:"bytes,3,rep,name=results" json:"results,omitempty"` -} - -func (m *TestSuite) Reset() { *m = TestSuite{} } -func (m *TestSuite) String() string { return proto.CompactTextString(m) } -func (*TestSuite) ProtoMessage() {} -func (*TestSuite) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{0} } - -func (m *TestSuite) GetStartedAt() *google_protobuf.Timestamp { - if m != nil { - return m.StartedAt - } - return nil -} - -func (m *TestSuite) GetCompletedAt() *google_protobuf.Timestamp { - if m != nil { - return m.CompletedAt - } - return nil -} - -func (m *TestSuite) GetResults() []*TestRun { - if m != nil { - return m.Results - } - return nil -} - -func init() { - proto.RegisterType((*TestSuite)(nil), "hapi.release.TestSuite") -} - -func init() { proto.RegisterFile("hapi/release/test_suite.proto", fileDescriptor5) } - -var fileDescriptor5 = []byte{ - // 207 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x8f, 0xc1, 0x4a, 0x86, 0x40, - 0x14, 0x85, 0x31, 0x21, 0x71, 0x74, 0x35, 0x10, 0x88, 0x11, 0x49, 0x2b, 0x57, 0x33, 0x60, 0xab, - 0x16, 0x2d, 0xec, 0x11, 0xcc, 0x55, 0x1b, 0x19, 0xeb, 0x66, 0xc2, 0xe8, 0x0c, 0x73, 0xef, 0xbc, - 0x5a, 0xcf, 0x17, 0xea, 0x18, 0x41, 0x8b, 0x7f, 0xfd, 0x7d, 0xe7, 0x9c, 0x7b, 0xd9, 0xdd, 0x97, - 0xb2, 0xb3, 0x74, 0xa0, 0x41, 0x21, 0x48, 0x02, 0xa4, 0x01, 0xfd, 0x4c, 0x20, 0xac, 0x33, 0x64, - 0x78, 0xbe, 0x61, 0x11, 0x70, 0x79, 0x3f, 0x19, 0x33, 0x69, 0x90, 0x3b, 0x1b, 0xfd, 0xa7, 0xa4, - 0x79, 0x01, 0x24, 0xb5, 0xd8, 0x43, 0x2f, 0x6f, 0xff, 0xb7, 0x39, 0xbf, 0x1e, 0xf0, 0xe1, 0x3b, - 0x62, 0x69, 0x0f, 0x48, 0xaf, 0x5b, 0x3f, 0x7f, 0x62, 0x0c, 0x49, 0x39, 0x82, 0x8f, 0x41, 0x51, - 0x11, 0x55, 0x51, 0x9d, 0x35, 0xa5, 0x38, 0x06, 0xc4, 0x39, 0x20, 0xfa, 0x73, 0xa0, 0x4b, 0x83, - 0xdd, 0x12, 0x7f, 0x66, 0xf9, 0xbb, 0x59, 0xac, 0x86, 0x10, 0xbe, 0xba, 0x18, 0xce, 0x7e, 0xfd, - 0x96, 0xb8, 0x64, 0x89, 0x03, 0xf4, 0x9a, 0xb0, 0x88, 0xab, 0xb8, 0xce, 0x9a, 0x1b, 0xf1, 0xf7, - 0x4b, 0xb1, 0xdd, 0xd8, 0xf9, 0xb5, 0x3b, 0xad, 0x97, 0xf4, 0x2d, 0x09, 0x6c, 0xbc, 0xde, 0xcb, - 0x1f, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x8c, 0x59, 0x65, 0x4f, 0x37, 0x01, 0x00, 0x00, -} diff --git a/pkg/proto/hapi/services/tiller.pb.go b/pkg/proto/hapi/services/tiller.pb.go deleted file mode 100644 index d0387643e..000000000 --- a/pkg/proto/hapi/services/tiller.pb.go +++ /dev/null @@ -1,851 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: hapi/services/tiller.proto - -/* -Package services is a generated protocol buffer package. - -It is generated from these files: - hapi/services/tiller.proto - -It has these top-level messages: - ListReleasesRequest - ListSort - ListReleasesResponse - GetReleaseStatusRequest - GetReleaseStatusResponse - GetReleaseContentRequest - UpdateReleaseRequest - RollbackReleaseRequest - InstallReleaseRequest - UninstallReleaseRequest - UninstallReleaseResponse - GetHistoryRequest - TestReleaseRequest - TestReleaseResponse -*/ -package services - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import hapi_chart3 "k8s.io/helm/pkg/proto/hapi/chart" -import hapi_chart "k8s.io/helm/pkg/proto/hapi/chart" -import hapi_release5 "k8s.io/helm/pkg/proto/hapi/release" -import hapi_release4 "k8s.io/helm/pkg/proto/hapi/release" -import hapi_release1 "k8s.io/helm/pkg/proto/hapi/release" -import hapi_release3 "k8s.io/helm/pkg/proto/hapi/release" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package - -// SortBy defines sort operations. -type ListSort_SortBy int32 - -const ( - ListSort_UNKNOWN ListSort_SortBy = 0 - ListSort_NAME ListSort_SortBy = 1 - ListSort_LAST_RELEASED ListSort_SortBy = 2 -) - -var ListSort_SortBy_name = map[int32]string{ - 0: "UNKNOWN", - 1: "NAME", - 2: "LAST_RELEASED", -} -var ListSort_SortBy_value = map[string]int32{ - "UNKNOWN": 0, - "NAME": 1, - "LAST_RELEASED": 2, -} - -func (x ListSort_SortBy) String() string { - return proto.EnumName(ListSort_SortBy_name, int32(x)) -} -func (ListSort_SortBy) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{1, 0} } - -// SortOrder defines sort orders to augment sorting operations. -type ListSort_SortOrder int32 - -const ( - ListSort_ASC ListSort_SortOrder = 0 - ListSort_DESC ListSort_SortOrder = 1 -) - -var ListSort_SortOrder_name = map[int32]string{ - 0: "ASC", - 1: "DESC", -} -var ListSort_SortOrder_value = map[string]int32{ - "ASC": 0, - "DESC": 1, -} - -func (x ListSort_SortOrder) String() string { - return proto.EnumName(ListSort_SortOrder_name, int32(x)) -} -func (ListSort_SortOrder) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{1, 1} } - -// ListReleasesRequest requests a list of releases. -// -// Releases can be retrieved in chunks by setting limit and offset. -// -// Releases can be sorted according to a few pre-determined sort stategies. -type ListReleasesRequest struct { - // Limit is the maximum number of releases to be returned. - Limit int64 `protobuf:"varint,1,opt,name=limit" json:"limit,omitempty"` - // Offset is the last release name that was seen. The next listing - // operation will start with the name after this one. - // Example: If list one returns albert, bernie, carl, and sets 'next: dennis'. - // dennis is the offset. Supplying 'dennis' for the next request should - // cause the next batch to return a set of results starting with 'dennis'. - Offset string `protobuf:"bytes,2,opt,name=offset" json:"offset,omitempty"` - // SortBy is the sort field that the ListReleases server should sort data before returning. - SortBy ListSort_SortBy `protobuf:"varint,3,opt,name=sort_by,json=sortBy,enum=hapi.services.tiller.ListSort_SortBy" json:"sort_by,omitempty"` - // Filter is a regular expression used to filter which releases should be listed. - // - // Anything that matches the regexp will be included in the results. - Filter string `protobuf:"bytes,4,opt,name=filter" json:"filter,omitempty"` - // SortOrder is the ordering directive used for sorting. - SortOrder ListSort_SortOrder `protobuf:"varint,5,opt,name=sort_order,json=sortOrder,enum=hapi.services.tiller.ListSort_SortOrder" json:"sort_order,omitempty"` - StatusCodes []hapi_release3.Status_Code `protobuf:"varint,6,rep,packed,name=status_codes,json=statusCodes,enum=hapi.release.Status_Code" json:"status_codes,omitempty"` - // Namespace is the filter to select releases only from a specific namespace. - Namespace string `protobuf:"bytes,7,opt,name=namespace" json:"namespace,omitempty"` -} - -func (m *ListReleasesRequest) Reset() { *m = ListReleasesRequest{} } -func (m *ListReleasesRequest) String() string { return proto.CompactTextString(m) } -func (*ListReleasesRequest) ProtoMessage() {} -func (*ListReleasesRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } - -func (m *ListReleasesRequest) GetLimit() int64 { - if m != nil { - return m.Limit - } - return 0 -} - -func (m *ListReleasesRequest) GetOffset() string { - if m != nil { - return m.Offset - } - return "" -} - -func (m *ListReleasesRequest) GetSortBy() ListSort_SortBy { - if m != nil { - return m.SortBy - } - return ListSort_UNKNOWN -} - -func (m *ListReleasesRequest) GetFilter() string { - if m != nil { - return m.Filter - } - return "" -} - -func (m *ListReleasesRequest) GetSortOrder() ListSort_SortOrder { - if m != nil { - return m.SortOrder - } - return ListSort_ASC -} - -func (m *ListReleasesRequest) GetStatusCodes() []hapi_release3.Status_Code { - if m != nil { - return m.StatusCodes - } - return nil -} - -func (m *ListReleasesRequest) GetNamespace() string { - if m != nil { - return m.Namespace - } - return "" -} - -// ListSort defines sorting fields on a release list. -type ListSort struct { -} - -func (m *ListSort) Reset() { *m = ListSort{} } -func (m *ListSort) String() string { return proto.CompactTextString(m) } -func (*ListSort) ProtoMessage() {} -func (*ListSort) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } - -// ListReleasesResponse is a list of releases. -type ListReleasesResponse struct { - // Count is the expected total number of releases to be returned. - Count int64 `protobuf:"varint,1,opt,name=count" json:"count,omitempty"` - // Next is the name of the next release. If this is other than an empty - // string, it means there are more results. - Next string `protobuf:"bytes,2,opt,name=next" json:"next,omitempty"` - // Total is the total number of queryable releases. - Total int64 `protobuf:"varint,3,opt,name=total" json:"total,omitempty"` - // Releases is the list of found release objects. - Releases []*hapi_release5.Release `protobuf:"bytes,4,rep,name=releases" json:"releases,omitempty"` -} - -func (m *ListReleasesResponse) Reset() { *m = ListReleasesResponse{} } -func (m *ListReleasesResponse) String() string { return proto.CompactTextString(m) } -func (*ListReleasesResponse) ProtoMessage() {} -func (*ListReleasesResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } - -func (m *ListReleasesResponse) GetCount() int64 { - if m != nil { - return m.Count - } - return 0 -} - -func (m *ListReleasesResponse) GetNext() string { - if m != nil { - return m.Next - } - return "" -} - -func (m *ListReleasesResponse) GetTotal() int64 { - if m != nil { - return m.Total - } - return 0 -} - -func (m *ListReleasesResponse) GetReleases() []*hapi_release5.Release { - if m != nil { - return m.Releases - } - return nil -} - -// GetReleaseStatusRequest is a request to get the status of a release. -type GetReleaseStatusRequest struct { - // Name is the name of the release - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - // Version is the version of the release - Version int32 `protobuf:"varint,2,opt,name=version" json:"version,omitempty"` -} - -func (m *GetReleaseStatusRequest) Reset() { *m = GetReleaseStatusRequest{} } -func (m *GetReleaseStatusRequest) String() string { return proto.CompactTextString(m) } -func (*GetReleaseStatusRequest) ProtoMessage() {} -func (*GetReleaseStatusRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } - -func (m *GetReleaseStatusRequest) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *GetReleaseStatusRequest) GetVersion() int32 { - if m != nil { - return m.Version - } - return 0 -} - -// GetReleaseStatusResponse is the response indicating the status of the named release. -type GetReleaseStatusResponse struct { - // Name is the name of the release. - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - // Info contains information about the release. - Info *hapi_release4.Info `protobuf:"bytes,2,opt,name=info" json:"info,omitempty"` - // Namespace the release was released into - Namespace string `protobuf:"bytes,3,opt,name=namespace" json:"namespace,omitempty"` -} - -func (m *GetReleaseStatusResponse) Reset() { *m = GetReleaseStatusResponse{} } -func (m *GetReleaseStatusResponse) String() string { return proto.CompactTextString(m) } -func (*GetReleaseStatusResponse) ProtoMessage() {} -func (*GetReleaseStatusResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } - -func (m *GetReleaseStatusResponse) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *GetReleaseStatusResponse) GetInfo() *hapi_release4.Info { - if m != nil { - return m.Info - } - return nil -} - -func (m *GetReleaseStatusResponse) GetNamespace() string { - if m != nil { - return m.Namespace - } - return "" -} - -// GetReleaseContentRequest is a request to get the contents of a release. -type GetReleaseContentRequest struct { - // The name of the release - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - // Version is the version of the release - Version int32 `protobuf:"varint,2,opt,name=version" json:"version,omitempty"` -} - -func (m *GetReleaseContentRequest) Reset() { *m = GetReleaseContentRequest{} } -func (m *GetReleaseContentRequest) String() string { return proto.CompactTextString(m) } -func (*GetReleaseContentRequest) ProtoMessage() {} -func (*GetReleaseContentRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } - -func (m *GetReleaseContentRequest) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *GetReleaseContentRequest) GetVersion() int32 { - if m != nil { - return m.Version - } - return 0 -} - -// UpdateReleaseRequest updates a release. -type UpdateReleaseRequest struct { - // The name of the release - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - // Chart is the protobuf representation of a chart. - Chart *hapi_chart3.Chart `protobuf:"bytes,2,opt,name=chart" json:"chart,omitempty"` - // Values is a string containing (unparsed) YAML values. - Values *hapi_chart.Config `protobuf:"bytes,3,opt,name=values" json:"values,omitempty"` - // dry_run, if true, will run through the release logic, but neither create - DryRun bool `protobuf:"varint,4,opt,name=dry_run,json=dryRun" json:"dry_run,omitempty"` - // DisableHooks causes the server to skip running any hooks for the upgrade. - DisableHooks bool `protobuf:"varint,5,opt,name=disable_hooks,json=disableHooks" json:"disable_hooks,omitempty"` - // Performs pods restart for resources if applicable - Recreate bool `protobuf:"varint,6,opt,name=recreate" json:"recreate,omitempty"` - // timeout specifies the max amount of time any kubernetes client command can run. - Timeout int64 `protobuf:"varint,7,opt,name=timeout" json:"timeout,omitempty"` - // ResetValues will cause Tiller to ignore stored values, resetting to default values. - ResetValues bool `protobuf:"varint,8,opt,name=reset_values,json=resetValues" json:"reset_values,omitempty"` - // wait, if true, will wait until all Pods, PVCs, and Services are in a ready state - // before marking the release as successful. It will wait for as long as timeout - Wait bool `protobuf:"varint,9,opt,name=wait" json:"wait,omitempty"` - // ReuseValues will cause Tiller to reuse the values from the last release. - // This is ignored if reset_values is set. - ReuseValues bool `protobuf:"varint,10,opt,name=reuse_values,json=reuseValues" json:"reuse_values,omitempty"` - // Force resource update through delete/recreate if needed. - Force bool `protobuf:"varint,11,opt,name=force" json:"force,omitempty"` -} - -func (m *UpdateReleaseRequest) Reset() { *m = UpdateReleaseRequest{} } -func (m *UpdateReleaseRequest) String() string { return proto.CompactTextString(m) } -func (*UpdateReleaseRequest) ProtoMessage() {} -func (*UpdateReleaseRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } - -func (m *UpdateReleaseRequest) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *UpdateReleaseRequest) GetChart() *hapi_chart3.Chart { - if m != nil { - return m.Chart - } - return nil -} - -func (m *UpdateReleaseRequest) GetValues() *hapi_chart.Config { - if m != nil { - return m.Values - } - return nil -} - -func (m *UpdateReleaseRequest) GetDryRun() bool { - if m != nil { - return m.DryRun - } - return false -} - -func (m *UpdateReleaseRequest) GetDisableHooks() bool { - if m != nil { - return m.DisableHooks - } - return false -} - -func (m *UpdateReleaseRequest) GetRecreate() bool { - if m != nil { - return m.Recreate - } - return false -} - -func (m *UpdateReleaseRequest) GetTimeout() int64 { - if m != nil { - return m.Timeout - } - return 0 -} - -func (m *UpdateReleaseRequest) GetResetValues() bool { - if m != nil { - return m.ResetValues - } - return false -} - -func (m *UpdateReleaseRequest) GetWait() bool { - if m != nil { - return m.Wait - } - return false -} - -func (m *UpdateReleaseRequest) GetReuseValues() bool { - if m != nil { - return m.ReuseValues - } - return false -} - -func (m *UpdateReleaseRequest) GetForce() bool { - if m != nil { - return m.Force - } - return false -} - -type RollbackReleaseRequest struct { - // The name of the release - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - // dry_run, if true, will run through the release logic but no create - DryRun bool `protobuf:"varint,2,opt,name=dry_run,json=dryRun" json:"dry_run,omitempty"` - // DisableHooks causes the server to skip running any hooks for the rollback - DisableHooks bool `protobuf:"varint,3,opt,name=disable_hooks,json=disableHooks" json:"disable_hooks,omitempty"` - // Version is the version of the release to deploy. - Version int32 `protobuf:"varint,4,opt,name=version" json:"version,omitempty"` - // Performs pods restart for resources if applicable - Recreate bool `protobuf:"varint,5,opt,name=recreate" json:"recreate,omitempty"` - // timeout specifies the max amount of time any kubernetes client command can run. - Timeout int64 `protobuf:"varint,6,opt,name=timeout" json:"timeout,omitempty"` - // wait, if true, will wait until all Pods, PVCs, and Services are in a ready state - // before marking the release as successful. It will wait for as long as timeout - Wait bool `protobuf:"varint,7,opt,name=wait" json:"wait,omitempty"` - // Force resource update through delete/recreate if needed. - Force bool `protobuf:"varint,8,opt,name=force" json:"force,omitempty"` -} - -func (m *RollbackReleaseRequest) Reset() { *m = RollbackReleaseRequest{} } -func (m *RollbackReleaseRequest) String() string { return proto.CompactTextString(m) } -func (*RollbackReleaseRequest) ProtoMessage() {} -func (*RollbackReleaseRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } - -func (m *RollbackReleaseRequest) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *RollbackReleaseRequest) GetDryRun() bool { - if m != nil { - return m.DryRun - } - return false -} - -func (m *RollbackReleaseRequest) GetDisableHooks() bool { - if m != nil { - return m.DisableHooks - } - return false -} - -func (m *RollbackReleaseRequest) GetVersion() int32 { - if m != nil { - return m.Version - } - return 0 -} - -func (m *RollbackReleaseRequest) GetRecreate() bool { - if m != nil { - return m.Recreate - } - return false -} - -func (m *RollbackReleaseRequest) GetTimeout() int64 { - if m != nil { - return m.Timeout - } - return 0 -} - -func (m *RollbackReleaseRequest) GetWait() bool { - if m != nil { - return m.Wait - } - return false -} - -func (m *RollbackReleaseRequest) GetForce() bool { - if m != nil { - return m.Force - } - return false -} - -// InstallReleaseRequest is the request for an installation of a chart. -type InstallReleaseRequest struct { - // Chart is the protobuf representation of a chart. - Chart *hapi_chart3.Chart `protobuf:"bytes,1,opt,name=chart" json:"chart,omitempty"` - // Values is a string containing (unparsed) YAML values. - Values *hapi_chart.Config `protobuf:"bytes,2,opt,name=values" json:"values,omitempty"` - // DryRun, if true, will run through the release logic, but neither create - // a release object nor deploy to Kubernetes. The release object returned - // in the response will be fake. - DryRun bool `protobuf:"varint,3,opt,name=dry_run,json=dryRun" json:"dry_run,omitempty"` - // Name is the candidate release name. This must be unique to the - // namespace, otherwise the server will return an error. If it is not - // supplied, the server will autogenerate one. - Name string `protobuf:"bytes,4,opt,name=name" json:"name,omitempty"` - // DisableHooks causes the server to skip running any hooks for the install. - DisableHooks bool `protobuf:"varint,5,opt,name=disable_hooks,json=disableHooks" json:"disable_hooks,omitempty"` - // Namepace is the kubernetes namespace of the release. - Namespace string `protobuf:"bytes,6,opt,name=namespace" json:"namespace,omitempty"` - // ReuseName requests that Tiller re-uses a name, instead of erroring out. - ReuseName bool `protobuf:"varint,7,opt,name=reuse_name,json=reuseName" json:"reuse_name,omitempty"` - // timeout specifies the max amount of time any kubernetes client command can run. - Timeout int64 `protobuf:"varint,8,opt,name=timeout" json:"timeout,omitempty"` - // wait, if true, will wait until all Pods, PVCs, and Services are in a ready state - // before marking the release as successful. It will wait for as long as timeout - Wait bool `protobuf:"varint,9,opt,name=wait" json:"wait,omitempty"` -} - -func (m *InstallReleaseRequest) Reset() { *m = InstallReleaseRequest{} } -func (m *InstallReleaseRequest) String() string { return proto.CompactTextString(m) } -func (*InstallReleaseRequest) ProtoMessage() {} -func (*InstallReleaseRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} } - -func (m *InstallReleaseRequest) GetChart() *hapi_chart3.Chart { - if m != nil { - return m.Chart - } - return nil -} - -func (m *InstallReleaseRequest) GetValues() *hapi_chart.Config { - if m != nil { - return m.Values - } - return nil -} - -func (m *InstallReleaseRequest) GetDryRun() bool { - if m != nil { - return m.DryRun - } - return false -} - -func (m *InstallReleaseRequest) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *InstallReleaseRequest) GetDisableHooks() bool { - if m != nil { - return m.DisableHooks - } - return false -} - -func (m *InstallReleaseRequest) GetNamespace() string { - if m != nil { - return m.Namespace - } - return "" -} - -func (m *InstallReleaseRequest) GetReuseName() bool { - if m != nil { - return m.ReuseName - } - return false -} - -func (m *InstallReleaseRequest) GetTimeout() int64 { - if m != nil { - return m.Timeout - } - return 0 -} - -func (m *InstallReleaseRequest) GetWait() bool { - if m != nil { - return m.Wait - } - return false -} - -// UninstallReleaseRequest represents a request to uninstall a named release. -type UninstallReleaseRequest struct { - // Name is the name of the release to delete. - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - // DisableHooks causes the server to skip running any hooks for the uninstall. - DisableHooks bool `protobuf:"varint,2,opt,name=disable_hooks,json=disableHooks" json:"disable_hooks,omitempty"` - // Purge removes the release from the store and make its name free for later use. - Purge bool `protobuf:"varint,3,opt,name=purge" json:"purge,omitempty"` - // timeout specifies the max amount of time any kubernetes client command can run. - Timeout int64 `protobuf:"varint,4,opt,name=timeout" json:"timeout,omitempty"` -} - -func (m *UninstallReleaseRequest) Reset() { *m = UninstallReleaseRequest{} } -func (m *UninstallReleaseRequest) String() string { return proto.CompactTextString(m) } -func (*UninstallReleaseRequest) ProtoMessage() {} -func (*UninstallReleaseRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} } - -func (m *UninstallReleaseRequest) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *UninstallReleaseRequest) GetDisableHooks() bool { - if m != nil { - return m.DisableHooks - } - return false -} - -func (m *UninstallReleaseRequest) GetPurge() bool { - if m != nil { - return m.Purge - } - return false -} - -func (m *UninstallReleaseRequest) GetTimeout() int64 { - if m != nil { - return m.Timeout - } - return 0 -} - -// UninstallReleaseResponse represents a successful response to an uninstall request. -type UninstallReleaseResponse struct { - // Release is the release that was marked deleted. - Release *hapi_release5.Release `protobuf:"bytes,1,opt,name=release" json:"release,omitempty"` - // Info is an uninstall message - Info string `protobuf:"bytes,2,opt,name=info" json:"info,omitempty"` -} - -func (m *UninstallReleaseResponse) Reset() { *m = UninstallReleaseResponse{} } -func (m *UninstallReleaseResponse) String() string { return proto.CompactTextString(m) } -func (*UninstallReleaseResponse) ProtoMessage() {} -func (*UninstallReleaseResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} } - -func (m *UninstallReleaseResponse) GetRelease() *hapi_release5.Release { - if m != nil { - return m.Release - } - return nil -} - -func (m *UninstallReleaseResponse) GetInfo() string { - if m != nil { - return m.Info - } - return "" -} - -// GetHistoryRequest requests a release's history. -type GetHistoryRequest struct { - // The name of the release. - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - // The maximum number of releases to include. - Max int32 `protobuf:"varint,2,opt,name=max" json:"max,omitempty"` -} - -func (m *GetHistoryRequest) Reset() { *m = GetHistoryRequest{} } -func (m *GetHistoryRequest) String() string { return proto.CompactTextString(m) } -func (*GetHistoryRequest) ProtoMessage() {} -func (*GetHistoryRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} } - -func (m *GetHistoryRequest) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *GetHistoryRequest) GetMax() int32 { - if m != nil { - return m.Max - } - return 0 -} - -// TestReleaseRequest is a request to get the status of a release. -type TestReleaseRequest struct { - // Name is the name of the release - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - // timeout specifies the max amount of time any kubernetes client command can run. - Timeout int64 `protobuf:"varint,2,opt,name=timeout" json:"timeout,omitempty"` - // cleanup specifies whether or not to attempt pod deletion after test completes - Cleanup bool `protobuf:"varint,3,opt,name=cleanup" json:"cleanup,omitempty"` -} - -func (m *TestReleaseRequest) Reset() { *m = TestReleaseRequest{} } -func (m *TestReleaseRequest) String() string { return proto.CompactTextString(m) } -func (*TestReleaseRequest) ProtoMessage() {} -func (*TestReleaseRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} } - -func (m *TestReleaseRequest) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *TestReleaseRequest) GetTimeout() int64 { - if m != nil { - return m.Timeout - } - return 0 -} - -func (m *TestReleaseRequest) GetCleanup() bool { - if m != nil { - return m.Cleanup - } - return false -} - -// TestReleaseResponse represents a message from executing a test -type TestReleaseResponse struct { - Msg string `protobuf:"bytes,1,opt,name=msg" json:"msg,omitempty"` - Status hapi_release1.TestRun_Status `protobuf:"varint,2,opt,name=status,enum=hapi.release.TestRun_Status" json:"status,omitempty"` -} - -func (m *TestReleaseResponse) Reset() { *m = TestReleaseResponse{} } -func (m *TestReleaseResponse) String() string { return proto.CompactTextString(m) } -func (*TestReleaseResponse) ProtoMessage() {} -func (*TestReleaseResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} } - -func (m *TestReleaseResponse) GetMsg() string { - if m != nil { - return m.Msg - } - return "" -} - -func (m *TestReleaseResponse) GetStatus() hapi_release1.TestRun_Status { - if m != nil { - return m.Status - } - return hapi_release1.TestRun_UNKNOWN -} - -func init() { - proto.RegisterType((*ListReleasesRequest)(nil), "hapi.services.tiller.ListReleasesRequest") - proto.RegisterType((*ListSort)(nil), "hapi.services.tiller.ListSort") - proto.RegisterType((*ListReleasesResponse)(nil), "hapi.services.tiller.ListReleasesResponse") - proto.RegisterType((*GetReleaseStatusRequest)(nil), "hapi.services.tiller.GetReleaseStatusRequest") - proto.RegisterType((*GetReleaseStatusResponse)(nil), "hapi.services.tiller.GetReleaseStatusResponse") - proto.RegisterType((*GetReleaseContentRequest)(nil), "hapi.services.tiller.GetReleaseContentRequest") - proto.RegisterType((*UpdateReleaseRequest)(nil), "hapi.services.tiller.UpdateReleaseRequest") - proto.RegisterType((*RollbackReleaseRequest)(nil), "hapi.services.tiller.RollbackReleaseRequest") - proto.RegisterType((*InstallReleaseRequest)(nil), "hapi.services.tiller.InstallReleaseRequest") - proto.RegisterType((*UninstallReleaseRequest)(nil), "hapi.services.tiller.UninstallReleaseRequest") - proto.RegisterType((*UninstallReleaseResponse)(nil), "hapi.services.tiller.UninstallReleaseResponse") - proto.RegisterType((*GetHistoryRequest)(nil), "hapi.services.tiller.GetHistoryRequest") - proto.RegisterType((*TestReleaseRequest)(nil), "hapi.services.tiller.TestReleaseRequest") - proto.RegisterType((*TestReleaseResponse)(nil), "hapi.services.tiller.TestReleaseResponse") - proto.RegisterEnum("hapi.services.tiller.ListSort_SortBy", ListSort_SortBy_name, ListSort_SortBy_value) - proto.RegisterEnum("hapi.services.tiller.ListSort_SortOrder", ListSort_SortOrder_name, ListSort_SortOrder_value) -} - -func init() { proto.RegisterFile("hapi/services/tiller.proto", fileDescriptor0) } - -var fileDescriptor0 = []byte{ - // 948 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0x5f, 0x6f, 0x1b, 0x45, - 0x10, 0xe7, 0x7c, 0xf6, 0xd9, 0x1e, 0xa7, 0x91, 0xb3, 0x75, 0x93, 0x6b, 0x28, 0xc8, 0x1c, 0x02, - 0x2c, 0x1e, 0x1c, 0x61, 0x78, 0x41, 0x42, 0x48, 0xa9, 0x6b, 0x25, 0x15, 0xc1, 0x95, 0xd6, 0x0d, - 0x48, 0x08, 0xb0, 0x2e, 0xf6, 0x38, 0x39, 0xf5, 0x7c, 0x6b, 0x76, 0xf7, 0x42, 0xfd, 0xca, 0x1b, - 0x1f, 0x85, 0x6f, 0xc1, 0x77, 0x81, 0x0f, 0x82, 0xf6, 0x9f, 0xb9, 0x4b, 0xdc, 0x10, 0xfa, 0x72, - 0xde, 0xd9, 0xf9, 0xb3, 0xbf, 0xf9, 0xcd, 0xec, 0xac, 0xe1, 0xf0, 0x2a, 0x5e, 0x25, 0x47, 0x02, - 0xf9, 0x75, 0x32, 0x43, 0x71, 0x24, 0x93, 0x34, 0x45, 0xde, 0x5f, 0x71, 0x26, 0x19, 0xe9, 0x28, - 0x5d, 0xdf, 0xe9, 0xfa, 0x46, 0x77, 0xb8, 0xaf, 0x3d, 0x66, 0x57, 0x31, 0x97, 0xe6, 0x6b, 0xac, - 0x0f, 0x0f, 0x8a, 0xfb, 0x2c, 0x5b, 0x24, 0x97, 0x56, 0x61, 0x8e, 0xe0, 0x98, 0x62, 0x2c, 0xd0, - 0xfd, 0x96, 0x9c, 0x9c, 0x2e, 0xc9, 0x16, 0xcc, 0x2a, 0xde, 0x2d, 0x29, 0x24, 0x0a, 0x39, 0xe5, - 0x79, 0x66, 0x95, 0x8f, 0x4b, 0x4a, 0x21, 0x63, 0x99, 0x0b, 0xa3, 0x8a, 0xfe, 0xac, 0xc0, 0xc3, - 0xb3, 0x44, 0x48, 0x6a, 0x94, 0x82, 0xe2, 0x2f, 0x39, 0x0a, 0x49, 0x3a, 0x50, 0x4b, 0x93, 0x65, - 0x22, 0x43, 0xaf, 0xeb, 0xf5, 0x7c, 0x6a, 0x04, 0xb2, 0x0f, 0x01, 0x5b, 0x2c, 0x04, 0xca, 0xb0, - 0xd2, 0xf5, 0x7a, 0x4d, 0x6a, 0x25, 0xf2, 0x35, 0xd4, 0x05, 0xe3, 0x72, 0x7a, 0xb1, 0x0e, 0xfd, - 0xae, 0xd7, 0xdb, 0x1d, 0x7c, 0xd4, 0xdf, 0xc6, 0x45, 0x5f, 0x9d, 0x34, 0x61, 0x5c, 0xf6, 0xd5, - 0xe7, 0xe9, 0x9a, 0x06, 0x42, 0xff, 0xaa, 0xb8, 0x8b, 0x24, 0x95, 0xc8, 0xc3, 0xaa, 0x89, 0x6b, - 0x24, 0x72, 0x02, 0xa0, 0xe3, 0x32, 0x3e, 0x47, 0x1e, 0xd6, 0x74, 0xe8, 0xde, 0x3d, 0x42, 0xbf, - 0x50, 0xf6, 0xb4, 0x29, 0xdc, 0x92, 0x7c, 0x05, 0x3b, 0x26, 0xed, 0xe9, 0x8c, 0xcd, 0x51, 0x84, - 0x41, 0xd7, 0xef, 0xed, 0x0e, 0x1e, 0x9b, 0x50, 0x8e, 0xe2, 0x89, 0x21, 0x66, 0xc8, 0xe6, 0x48, - 0x5b, 0xc6, 0x5c, 0xad, 0x05, 0x79, 0x02, 0xcd, 0x2c, 0x5e, 0xa2, 0x58, 0xc5, 0x33, 0x0c, 0xeb, - 0x1a, 0xe1, 0xbf, 0x1b, 0xd1, 0xcf, 0xd0, 0x70, 0x87, 0x47, 0x03, 0x08, 0x4c, 0x6a, 0xa4, 0x05, - 0xf5, 0xf3, 0xf1, 0x37, 0xe3, 0x17, 0xdf, 0x8f, 0xdb, 0xef, 0x90, 0x06, 0x54, 0xc7, 0xc7, 0xdf, - 0x8e, 0xda, 0x1e, 0xd9, 0x83, 0x07, 0x67, 0xc7, 0x93, 0x97, 0x53, 0x3a, 0x3a, 0x1b, 0x1d, 0x4f, - 0x46, 0xcf, 0xda, 0x95, 0xe8, 0x7d, 0x68, 0x6e, 0x30, 0x93, 0x3a, 0xf8, 0xc7, 0x93, 0xa1, 0x71, - 0x79, 0x36, 0x9a, 0x0c, 0xdb, 0x5e, 0xf4, 0xbb, 0x07, 0x9d, 0x72, 0x89, 0xc4, 0x8a, 0x65, 0x02, - 0x55, 0x8d, 0x66, 0x2c, 0xcf, 0x36, 0x35, 0xd2, 0x02, 0x21, 0x50, 0xcd, 0xf0, 0xb5, 0xab, 0x90, - 0x5e, 0x2b, 0x4b, 0xc9, 0x64, 0x9c, 0xea, 0xea, 0xf8, 0xd4, 0x08, 0xe4, 0x33, 0x68, 0xd8, 0xd4, - 0x45, 0x58, 0xed, 0xfa, 0xbd, 0xd6, 0xe0, 0x51, 0x99, 0x10, 0x7b, 0x22, 0xdd, 0x98, 0x45, 0x27, - 0x70, 0x70, 0x82, 0x0e, 0x89, 0xe1, 0xcb, 0x75, 0x8c, 0x3a, 0x37, 0x5e, 0xa2, 0x06, 0xa3, 0xce, - 0x8d, 0x97, 0x48, 0x42, 0xa8, 0x5f, 0x23, 0x17, 0x09, 0xcb, 0x34, 0x9c, 0x1a, 0x75, 0x62, 0x24, - 0x21, 0xbc, 0x1d, 0xc8, 0xe6, 0xb5, 0x2d, 0xd2, 0xc7, 0x50, 0x55, 0xdd, 0xae, 0xc3, 0xb4, 0x06, - 0xa4, 0x8c, 0xf3, 0x79, 0xb6, 0x60, 0x54, 0xeb, 0xcb, 0xa5, 0xf2, 0x6f, 0x96, 0xea, 0xb4, 0x78, - 0xea, 0x90, 0x65, 0x12, 0x33, 0xf9, 0x76, 0xf8, 0xff, 0xaa, 0x40, 0xe7, 0x7c, 0x35, 0x8f, 0x25, - 0x3a, 0x92, 0xee, 0x08, 0xf3, 0x09, 0xd4, 0xf4, 0x3d, 0xb7, 0xe8, 0xf7, 0x0c, 0x7a, 0x33, 0x0c, - 0x86, 0xea, 0x4b, 0x8d, 0x9e, 0x7c, 0x0a, 0xc1, 0x75, 0x9c, 0xe6, 0x28, 0x34, 0xf4, 0x4d, 0x9e, - 0xd6, 0x52, 0x0f, 0x09, 0x6a, 0x2d, 0xc8, 0x01, 0xd4, 0xe7, 0x7c, 0xad, 0x6e, 0xb9, 0xbe, 0x34, - 0x0d, 0x1a, 0xcc, 0xf9, 0x9a, 0xe6, 0x19, 0xf9, 0x10, 0x1e, 0xcc, 0x13, 0x11, 0x5f, 0xa4, 0x38, - 0xbd, 0x62, 0xec, 0x95, 0xd0, 0xf7, 0xa6, 0x41, 0x77, 0xec, 0xe6, 0xa9, 0xda, 0x23, 0x87, 0xaa, - 0xf6, 0x33, 0x8e, 0xb1, 0xc4, 0x30, 0xd0, 0xfa, 0x8d, 0xac, 0xb2, 0x96, 0xc9, 0x12, 0x59, 0x2e, - 0x75, 0xb3, 0xfb, 0xd4, 0x89, 0xe4, 0x03, 0xd8, 0xe1, 0x28, 0x50, 0x4e, 0x2d, 0xca, 0x86, 0xf6, - 0x6c, 0xe9, 0xbd, 0xef, 0x0c, 0x2c, 0x02, 0xd5, 0x5f, 0xe3, 0x44, 0x86, 0x4d, 0xad, 0xd2, 0x6b, - 0xe3, 0x96, 0x0b, 0x74, 0x6e, 0xe0, 0xdc, 0x72, 0x81, 0xd6, 0xad, 0x03, 0xb5, 0x05, 0xe3, 0x33, - 0x0c, 0x5b, 0x5a, 0x67, 0x84, 0xe8, 0x6f, 0x0f, 0xf6, 0x29, 0x4b, 0xd3, 0x8b, 0x78, 0xf6, 0xea, - 0x1e, 0x3c, 0x17, 0x28, 0xa9, 0xdc, 0x4d, 0x89, 0xbf, 0x85, 0x92, 0x42, 0xb1, 0xab, 0xa5, 0x62, - 0x97, 0xc8, 0xaa, 0xbd, 0x99, 0xac, 0xa0, 0x4c, 0x96, 0x63, 0xa2, 0x5e, 0x60, 0x62, 0x93, 0x66, - 0xa3, 0x98, 0xe6, 0x1f, 0x15, 0x78, 0xf4, 0x3c, 0x13, 0x32, 0x4e, 0xd3, 0x1b, 0x59, 0x6e, 0x3a, - 0xc7, 0xbb, 0x77, 0xe7, 0x54, 0xfe, 0x4f, 0xe7, 0xf8, 0x25, 0x9a, 0x1c, 0xa7, 0xd5, 0x02, 0xa7, - 0xf7, 0xea, 0xa6, 0xd2, 0xad, 0x0b, 0x6e, 0xdc, 0x3a, 0xf2, 0x1e, 0x80, 0x29, 0xbf, 0x0e, 0x6e, - 0xe8, 0x68, 0xea, 0x9d, 0xb1, 0xbd, 0x64, 0x8e, 0xc1, 0xc6, 0x76, 0x06, 0x0b, 0xbd, 0x14, 0xfd, - 0xe6, 0xc1, 0xc1, 0x79, 0x96, 0x6c, 0x65, 0x6b, 0x5b, 0x4f, 0xdc, 0xc2, 0x5f, 0xd9, 0x82, 0xbf, - 0x03, 0xb5, 0x55, 0xce, 0x2f, 0xd1, 0xf2, 0x61, 0x84, 0x22, 0xb0, 0x6a, 0x09, 0x58, 0x34, 0x85, - 0xf0, 0x36, 0x06, 0x3b, 0xbd, 0x8e, 0xa0, 0x6e, 0xe7, 0x92, 0x2d, 0xda, 0x1b, 0x86, 0xaa, 0xb3, - 0x52, 0xa8, 0x37, 0xa3, 0xad, 0x69, 0xc6, 0x58, 0xf4, 0x25, 0xec, 0x9d, 0xa0, 0x3c, 0x4d, 0x84, - 0x64, 0x7c, 0x7d, 0x57, 0x7a, 0x6d, 0xf0, 0x97, 0xf1, 0x6b, 0x3b, 0x9d, 0xd4, 0x32, 0xfa, 0x11, - 0xc8, 0x4b, 0xdc, 0xbc, 0x16, 0xff, 0x31, 0xdd, 0x5c, 0x7e, 0x95, 0x32, 0xf1, 0x21, 0xd4, 0x67, - 0x29, 0xc6, 0x59, 0xbe, 0xb2, 0x8c, 0x38, 0x31, 0xfa, 0x09, 0x1e, 0x96, 0xa2, 0xdb, 0xa4, 0x15, - 0x0c, 0x71, 0x69, 0xa3, 0xab, 0x25, 0xf9, 0x02, 0x02, 0xf3, 0x84, 0xea, 0xd8, 0xbb, 0x83, 0x27, - 0x65, 0x16, 0x74, 0x90, 0x3c, 0xb3, 0x6f, 0x2e, 0xb5, 0xb6, 0x4f, 0xe1, 0x87, 0x86, 0x7b, 0xd8, - 0x2f, 0x02, 0xfd, 0x0f, 0xe5, 0xf3, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x31, 0x61, 0x13, 0xb4, - 0x73, 0x09, 0x00, 0x00, -} diff --git a/pkg/provenance/sign.go b/pkg/provenance/sign.go index ecd6612a3..7bbd96cae 100644 --- a/pkg/provenance/sign.go +++ b/pkg/provenance/sign.go @@ -34,7 +34,7 @@ import ( "golang.org/x/crypto/openpgp/packet" "k8s.io/helm/pkg/chartutil" - hapi "k8s.io/helm/pkg/proto/hapi/chart" + hapi "k8s.io/helm/pkg/hapi/chart" ) var defaultPGPConfig = packet.Config{ diff --git a/pkg/releasetesting/environment.go b/pkg/releasetesting/environment.go index 42f4275d6..55dae3e93 100644 --- a/pkg/releasetesting/environment.go +++ b/pkg/releasetesting/environment.go @@ -24,8 +24,8 @@ import ( "k8s.io/kubernetes/pkg/apis/core" - "k8s.io/helm/pkg/proto/hapi/release" - "k8s.io/helm/pkg/proto/hapi/services" + "k8s.io/helm/pkg/hapi" + "k8s.io/helm/pkg/hapi/release" "k8s.io/helm/pkg/tiller/environment" ) @@ -33,7 +33,7 @@ import ( type Environment struct { Namespace string KubeClient environment.KubeClient - Mesages chan *services.TestReleaseResponse + Mesages chan *hapi.TestReleaseResponse Timeout int64 } @@ -106,7 +106,7 @@ func (env *Environment) streamUnknown(name, info string) error { } func (env *Environment) streamMessage(msg string, status release.TestRun_Status) error { - resp := &services.TestReleaseResponse{Msg: msg, Status: status} + resp := &hapi.TestReleaseResponse{Msg: msg, Status: status} env.Mesages <- resp return nil } diff --git a/pkg/releasetesting/environment_test.go b/pkg/releasetesting/environment_test.go index e1071453b..98a1b195a 100644 --- a/pkg/releasetesting/environment_test.go +++ b/pkg/releasetesting/environment_test.go @@ -23,8 +23,8 @@ import ( "io/ioutil" "testing" - "k8s.io/helm/pkg/proto/hapi/release" - "k8s.io/helm/pkg/proto/hapi/services" + "k8s.io/helm/pkg/hapi" + "k8s.io/helm/pkg/hapi/release" tillerEnv "k8s.io/helm/pkg/tiller/environment" ) @@ -74,7 +74,7 @@ func TestDeleteTestPods(t *testing.T) { func TestStreamMessage(t *testing.T) { tEnv := mockTillerEnvironment() - ch := make(chan *services.TestReleaseResponse, 1) + ch := make(chan *hapi.TestReleaseResponse, 1) defer close(ch) mockTestEnv := &Environment{ diff --git a/pkg/releasetesting/test_suite.go b/pkg/releasetesting/test_suite.go index 4bcfdcf83..b12a4a315 100644 --- a/pkg/releasetesting/test_suite.go +++ b/pkg/releasetesting/test_suite.go @@ -24,8 +24,8 @@ import ( "github.com/golang/protobuf/ptypes/timestamp" "k8s.io/kubernetes/pkg/apis/core" + "k8s.io/helm/pkg/hapi/release" "k8s.io/helm/pkg/hooks" - "k8s.io/helm/pkg/proto/hapi/release" util "k8s.io/helm/pkg/releaseutil" "k8s.io/helm/pkg/timeconv" ) diff --git a/pkg/releasetesting/test_suite_test.go b/pkg/releasetesting/test_suite_test.go index d617393fa..a87e742f4 100644 --- a/pkg/releasetesting/test_suite_test.go +++ b/pkg/releasetesting/test_suite_test.go @@ -25,9 +25,9 @@ import ( "github.com/golang/protobuf/ptypes/timestamp" "k8s.io/kubernetes/pkg/apis/core" - "k8s.io/helm/pkg/proto/hapi/chart" - "k8s.io/helm/pkg/proto/hapi/release" - "k8s.io/helm/pkg/proto/hapi/services" + "k8s.io/helm/pkg/hapi" + "k8s.io/helm/pkg/hapi/chart" + "k8s.io/helm/pkg/hapi/release" "k8s.io/helm/pkg/storage" "k8s.io/helm/pkg/storage/driver" tillerEnv "k8s.io/helm/pkg/tiller/environment" @@ -74,7 +74,7 @@ func TestRun(t *testing.T) { testManifests := []string{manifestWithTestSuccessHook, manifestWithTestFailureHook} ts := testSuiteFixture(testManifests) - ch := make(chan *services.TestReleaseResponse, 1) + ch := make(chan *hapi.TestReleaseResponse, 1) env := testEnvFixture() env.Mesages = ch @@ -129,7 +129,7 @@ func TestRun(t *testing.T) { func TestRunEmptyTestSuite(t *testing.T) { ts := testSuiteFixture([]string{}) - ch := make(chan *services.TestReleaseResponse, 1) + ch := make(chan *hapi.TestReleaseResponse, 1) env := testEnvFixture() env.Mesages = ch @@ -158,7 +158,7 @@ func TestRunEmptyTestSuite(t *testing.T) { func TestRunSuccessWithTestFailureHook(t *testing.T) { ts := testSuiteFixture([]string{manifestWithTestFailureHook}) - ch := make(chan *services.TestReleaseResponse, 1) + ch := make(chan *hapi.TestReleaseResponse, 1) env := testEnvFixture() env.KubeClient = newPodFailedKubeClient() diff --git a/pkg/releaseutil/filter.go b/pkg/releaseutil/filter.go index fdd2cc381..c724617bd 100644 --- a/pkg/releaseutil/filter.go +++ b/pkg/releaseutil/filter.go @@ -16,7 +16,7 @@ limitations under the License. package releaseutil // import "k8s.io/helm/pkg/releaseutil" -import rspb "k8s.io/helm/pkg/proto/hapi/release" +import rspb "k8s.io/helm/pkg/hapi/release" // FilterFunc returns true if the release object satisfies // the predicate of the underlying filter func. @@ -73,6 +73,6 @@ func StatusFilter(status rspb.Status_Code) FilterFunc { if rls == nil { return true } - return rls.GetInfo().GetStatus().Code == status + return rls.Info.Status.Code == status }) } diff --git a/pkg/releaseutil/filter_test.go b/pkg/releaseutil/filter_test.go index 590952363..6b553e455 100644 --- a/pkg/releaseutil/filter_test.go +++ b/pkg/releaseutil/filter_test.go @@ -19,7 +19,7 @@ package releaseutil // import "k8s.io/helm/pkg/releaseutil" import ( "testing" - rspb "k8s.io/helm/pkg/proto/hapi/release" + rspb "k8s.io/helm/pkg/hapi/release" ) func TestFilterAny(t *testing.T) { diff --git a/pkg/releaseutil/sorter.go b/pkg/releaseutil/sorter.go index 1b744d72c..482c52686 100644 --- a/pkg/releaseutil/sorter.go +++ b/pkg/releaseutil/sorter.go @@ -19,7 +19,7 @@ package releaseutil // import "k8s.io/helm/pkg/releaseutil" import ( "sort" - rspb "k8s.io/helm/pkg/proto/hapi/release" + rspb "k8s.io/helm/pkg/hapi/release" ) type sorter struct { diff --git a/pkg/releaseutil/sorter_test.go b/pkg/releaseutil/sorter_test.go index 7d4e31e2e..a028e67e8 100644 --- a/pkg/releaseutil/sorter_test.go +++ b/pkg/releaseutil/sorter_test.go @@ -20,7 +20,7 @@ import ( "testing" "time" - rspb "k8s.io/helm/pkg/proto/hapi/release" + rspb "k8s.io/helm/pkg/hapi/release" "k8s.io/helm/pkg/timeconv" ) diff --git a/pkg/repo/chartrepo_test.go b/pkg/repo/chartrepo_test.go index 948ee12d3..ab2f174b0 100644 --- a/pkg/repo/chartrepo_test.go +++ b/pkg/repo/chartrepo_test.go @@ -28,8 +28,8 @@ import ( "time" "k8s.io/helm/pkg/getter" + "k8s.io/helm/pkg/hapi/chart" "k8s.io/helm/pkg/helm/environment" - "k8s.io/helm/pkg/proto/hapi/chart" ) const ( diff --git a/pkg/repo/index.go b/pkg/repo/index.go index 174ceea01..2b1993a23 100644 --- a/pkg/repo/index.go +++ b/pkg/repo/index.go @@ -31,7 +31,7 @@ import ( "github.com/ghodss/yaml" "k8s.io/helm/pkg/chartutil" - "k8s.io/helm/pkg/proto/hapi/chart" + "k8s.io/helm/pkg/hapi/chart" "k8s.io/helm/pkg/provenance" "k8s.io/helm/pkg/urlutil" ) diff --git a/pkg/repo/index_test.go b/pkg/repo/index_test.go index ba426b174..c3199290a 100644 --- a/pkg/repo/index_test.go +++ b/pkg/repo/index_test.go @@ -23,8 +23,8 @@ import ( "testing" "k8s.io/helm/pkg/getter" + "k8s.io/helm/pkg/hapi/chart" "k8s.io/helm/pkg/helm/environment" - "k8s.io/helm/pkg/proto/hapi/chart" ) const ( diff --git a/pkg/repo/local.go b/pkg/repo/local.go index f13a4d0ac..3e004a6d5 100644 --- a/pkg/repo/local.go +++ b/pkg/repo/local.go @@ -27,7 +27,7 @@ import ( "github.com/ghodss/yaml" "k8s.io/helm/pkg/chartutil" - "k8s.io/helm/pkg/proto/hapi/chart" + "k8s.io/helm/pkg/hapi/chart" "k8s.io/helm/pkg/provenance" ) diff --git a/pkg/storage/driver/cfgmaps.go b/pkg/storage/driver/cfgmaps.go index ca2f82501..2f507d808 100644 --- a/pkg/storage/driver/cfgmaps.go +++ b/pkg/storage/driver/cfgmaps.go @@ -29,7 +29,7 @@ import ( "k8s.io/apimachinery/pkg/util/validation" corev1 "k8s.io/client-go/kubernetes/typed/core/v1" - rspb "k8s.io/helm/pkg/proto/hapi/release" + rspb "k8s.io/helm/pkg/hapi/release" ) var _ Driver = (*ConfigMaps)(nil) diff --git a/pkg/storage/driver/cfgmaps_test.go b/pkg/storage/driver/cfgmaps_test.go index bda5c086e..3f16ca53f 100644 --- a/pkg/storage/driver/cfgmaps_test.go +++ b/pkg/storage/driver/cfgmaps_test.go @@ -15,14 +15,13 @@ package driver import ( "encoding/base64" + "encoding/json" "reflect" "testing" - "github.com/gogo/protobuf/proto" - "k8s.io/api/core/v1" - rspb "k8s.io/helm/pkg/proto/hapi/release" + rspb "k8s.io/helm/pkg/hapi/release" ) func TestConfigMapName(t *testing.T) { @@ -48,7 +47,7 @@ func TestConfigMapGet(t *testing.T) { } // compare fetched release with original if !reflect.DeepEqual(rel, got) { - t.Errorf("Expected {%q}, got {%q}", rel, got) + t.Errorf("Expected {%v}, got {%v}", rel, got) } } @@ -64,7 +63,7 @@ func TestUNcompressedConfigMapGet(t *testing.T) { if err != nil { t.Fatalf("Failed to create configmap: %s", err) } - b, err := proto.Marshal(rel) + b, err := json.Marshal(rel) if err != nil { t.Fatalf("Failed to marshal release: %s", err) } @@ -80,7 +79,7 @@ func TestUNcompressedConfigMapGet(t *testing.T) { } // compare fetched release with original if !reflect.DeepEqual(rel, got) { - t.Errorf("Expected {%q}, got {%q}", rel, got) + t.Errorf("Expected {%v}, got {%v}", rel, got) } } @@ -153,7 +152,7 @@ func TestConfigMapCreate(t *testing.T) { // compare created release with original if !reflect.DeepEqual(rel, got) { - t.Errorf("Expected {%q}, got {%q}", rel, got) + t.Errorf("Expected {%v}, got {%v}", rel, got) } } diff --git a/pkg/storage/driver/driver.go b/pkg/storage/driver/driver.go index e01d35d64..2c74ebba7 100644 --- a/pkg/storage/driver/driver.go +++ b/pkg/storage/driver/driver.go @@ -19,7 +19,7 @@ package driver // import "k8s.io/helm/pkg/storage/driver" import ( "fmt" - rspb "k8s.io/helm/pkg/proto/hapi/release" + rspb "k8s.io/helm/pkg/hapi/release" ) var ( diff --git a/pkg/storage/driver/memory.go b/pkg/storage/driver/memory.go index ceb0d67dd..8bce774e9 100644 --- a/pkg/storage/driver/memory.go +++ b/pkg/storage/driver/memory.go @@ -21,7 +21,7 @@ import ( "strings" "sync" - rspb "k8s.io/helm/pkg/proto/hapi/release" + rspb "k8s.io/helm/pkg/hapi/release" ) var _ Driver = (*Memory)(nil) diff --git a/pkg/storage/driver/memory_test.go b/pkg/storage/driver/memory_test.go index 1062071e7..e0d302891 100644 --- a/pkg/storage/driver/memory_test.go +++ b/pkg/storage/driver/memory_test.go @@ -21,7 +21,7 @@ import ( "reflect" "testing" - rspb "k8s.io/helm/pkg/proto/hapi/release" + rspb "k8s.io/helm/pkg/hapi/release" ) func TestMemoryName(t *testing.T) { @@ -143,7 +143,7 @@ func TestMemoryUpdate(t *testing.T) { } if !reflect.DeepEqual(r, tt.rls) { - t.Fatalf("Expected %s, actual %s\n", tt.rls, r) + t.Fatalf("Expected %v, actual %v\n", tt.rls, r) } } } diff --git a/pkg/storage/driver/mock_test.go b/pkg/storage/driver/mock_test.go index b60a017e5..62662b53d 100644 --- a/pkg/storage/driver/mock_test.go +++ b/pkg/storage/driver/mock_test.go @@ -25,7 +25,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" corev1 "k8s.io/client-go/kubernetes/typed/core/v1" - rspb "k8s.io/helm/pkg/proto/hapi/release" + rspb "k8s.io/helm/pkg/hapi/release" ) func releaseStub(name string, vers int32, namespace string, code rspb.Status_Code) *rspb.Release { diff --git a/pkg/storage/driver/records.go b/pkg/storage/driver/records.go index ce72308a8..2ea933901 100644 --- a/pkg/storage/driver/records.go +++ b/pkg/storage/driver/records.go @@ -20,9 +20,7 @@ import ( "sort" "strconv" - "github.com/golang/protobuf/proto" - - rspb "k8s.io/helm/pkg/proto/hapi/release" + rspb "k8s.io/helm/pkg/hapi/release" ) // records holds a list of in-memory release records @@ -131,5 +129,6 @@ func newRecord(key string, rls *rspb.Release) *record { lbs.set("STATUS", rspb.Status_Code_name[int32(rls.Info.Status.Code)]) lbs.set("VERSION", strconv.Itoa(int(rls.Version))) - return &record{key: key, lbs: lbs, rls: proto.Clone(rls).(*rspb.Release)} + // return &record{key: key, lbs: lbs, rls: proto.Clone(rls).(*rspb.Release)} + return &record{key: key, lbs: lbs, rls: rls} } diff --git a/pkg/storage/driver/records_test.go b/pkg/storage/driver/records_test.go index 79380afb8..44754b013 100644 --- a/pkg/storage/driver/records_test.go +++ b/pkg/storage/driver/records_test.go @@ -19,7 +19,7 @@ package driver // import "k8s.io/helm/pkg/storage/driver" import ( "testing" - rspb "k8s.io/helm/pkg/proto/hapi/release" + rspb "k8s.io/helm/pkg/hapi/release" ) func TestRecordsAdd(t *testing.T) { diff --git a/pkg/storage/driver/secrets.go b/pkg/storage/driver/secrets.go index 54d7e4900..47b95e2aa 100644 --- a/pkg/storage/driver/secrets.go +++ b/pkg/storage/driver/secrets.go @@ -29,7 +29,7 @@ import ( "k8s.io/apimachinery/pkg/util/validation" corev1 "k8s.io/client-go/kubernetes/typed/core/v1" - rspb "k8s.io/helm/pkg/proto/hapi/release" + rspb "k8s.io/helm/pkg/hapi/release" ) var _ Driver = (*Secrets)(nil) diff --git a/pkg/storage/driver/secrets_test.go b/pkg/storage/driver/secrets_test.go index cb770b059..0aee4088c 100644 --- a/pkg/storage/driver/secrets_test.go +++ b/pkg/storage/driver/secrets_test.go @@ -15,14 +15,13 @@ package driver import ( "encoding/base64" + "encoding/json" "reflect" "testing" - "github.com/gogo/protobuf/proto" - "k8s.io/api/core/v1" - rspb "k8s.io/helm/pkg/proto/hapi/release" + rspb "k8s.io/helm/pkg/hapi/release" ) func TestSecretName(t *testing.T) { @@ -48,7 +47,7 @@ func TestSecretGet(t *testing.T) { } // compare fetched release with original if !reflect.DeepEqual(rel, got) { - t.Errorf("Expected {%q}, got {%q}", rel, got) + t.Errorf("Expected {%v}, got {%v}", rel, got) } } @@ -64,7 +63,7 @@ func TestUNcompressedSecretGet(t *testing.T) { if err != nil { t.Fatalf("Failed to create secret: %s", err) } - b, err := proto.Marshal(rel) + b, err := json.Marshal(rel) if err != nil { t.Fatalf("Failed to marshal release: %s", err) } @@ -80,7 +79,7 @@ func TestUNcompressedSecretGet(t *testing.T) { } // compare fetched release with original if !reflect.DeepEqual(rel, got) { - t.Errorf("Expected {%q}, got {%q}", rel, got) + t.Errorf("Expected {%v}, got {%v}", rel, got) } } @@ -153,7 +152,7 @@ func TestSecretCreate(t *testing.T) { // compare created release with original if !reflect.DeepEqual(rel, got) { - t.Errorf("Expected {%q}, got {%q}", rel, got) + t.Errorf("Expected {%v}, got {%v}", rel, got) } } diff --git a/pkg/storage/driver/util.go b/pkg/storage/driver/util.go index 65fb17e7c..234707c86 100644 --- a/pkg/storage/driver/util.go +++ b/pkg/storage/driver/util.go @@ -20,10 +20,10 @@ import ( "bytes" "compress/gzip" "encoding/base64" + "encoding/json" "io/ioutil" - "github.com/golang/protobuf/proto" - rspb "k8s.io/helm/pkg/proto/hapi/release" + rspb "k8s.io/helm/pkg/hapi/release" ) var b64 = base64.StdEncoding @@ -33,7 +33,7 @@ var magicGzip = []byte{0x1f, 0x8b, 0x08} // encodeRelease encodes a release returning a base64 encoded // gzipped binary protobuf encoding representation, or error. func encodeRelease(rls *rspb.Release) (string, error) { - b, err := proto.Marshal(rls) + b, err := json.Marshal(rls) if err != nil { return "", err } @@ -78,7 +78,7 @@ func decodeRelease(data string) (*rspb.Release, error) { var rls rspb.Release // unmarshal protobuf bytes - if err := proto.Unmarshal(b, &rls); err != nil { + if err := json.Unmarshal(b, &rls); err != nil { return nil, err } return &rls, nil diff --git a/pkg/storage/storage.go b/pkg/storage/storage.go index 4b39e0bb2..69f9490e2 100644 --- a/pkg/storage/storage.go +++ b/pkg/storage/storage.go @@ -20,7 +20,7 @@ import ( "fmt" "strings" - rspb "k8s.io/helm/pkg/proto/hapi/release" + rspb "k8s.io/helm/pkg/hapi/release" relutil "k8s.io/helm/pkg/releaseutil" "k8s.io/helm/pkg/storage/driver" ) diff --git a/pkg/storage/storage_test.go b/pkg/storage/storage_test.go index fb2824de7..6a7f86652 100644 --- a/pkg/storage/storage_test.go +++ b/pkg/storage/storage_test.go @@ -21,7 +21,7 @@ import ( "reflect" "testing" - rspb "k8s.io/helm/pkg/proto/hapi/release" + rspb "k8s.io/helm/pkg/hapi/release" "k8s.io/helm/pkg/storage/driver" ) @@ -43,7 +43,7 @@ func TestStorageCreate(t *testing.T) { // verify the fetched and created release are the same if !reflect.DeepEqual(rls, res) { - t.Fatalf("Expected %q, got %q", rls, res) + t.Fatalf("Expected %v, got %v", rls, res) } } @@ -70,7 +70,7 @@ func TestStorageUpdate(t *testing.T) { // verify updated and fetched releases are the same. if !reflect.DeepEqual(rls, res) { - t.Fatalf("Expected %q, got %q", rls, res) + t.Fatalf("Expected %v, got %v", rls, res) } } @@ -97,7 +97,7 @@ func TestStorageDelete(t *testing.T) { // verify updated and fetched releases are the same. if !reflect.DeepEqual(rls, res) { - t.Fatalf("Expected %q, got %q", rls, res) + t.Fatalf("Expected %v, got %v", rls, res) } hist, err := storage.History(rls.Name) diff --git a/pkg/tiller/environment/environment.go b/pkg/tiller/environment/environment.go index 366fdf522..d99f2393c 100644 --- a/pkg/tiller/environment/environment.go +++ b/pkg/tiller/environment/environment.go @@ -31,8 +31,8 @@ import ( "k8s.io/helm/pkg/chartutil" "k8s.io/helm/pkg/engine" + "k8s.io/helm/pkg/hapi/chart" "k8s.io/helm/pkg/kube" - "k8s.io/helm/pkg/proto/hapi/chart" "k8s.io/helm/pkg/storage" "k8s.io/helm/pkg/storage/driver" ) diff --git a/pkg/tiller/environment/environment_test.go b/pkg/tiller/environment/environment_test.go index d8c82b901..6b89d80f1 100644 --- a/pkg/tiller/environment/environment_test.go +++ b/pkg/tiller/environment/environment_test.go @@ -26,8 +26,8 @@ import ( "k8s.io/kubernetes/pkg/kubectl/resource" "k8s.io/helm/pkg/chartutil" + "k8s.io/helm/pkg/hapi/chart" "k8s.io/helm/pkg/kube" - "k8s.io/helm/pkg/proto/hapi/chart" ) type mockEngine struct { diff --git a/pkg/tiller/hook_sorter.go b/pkg/tiller/hook_sorter.go index 42d546620..cc6e7e992 100644 --- a/pkg/tiller/hook_sorter.go +++ b/pkg/tiller/hook_sorter.go @@ -19,7 +19,7 @@ package tiller import ( "sort" - "k8s.io/helm/pkg/proto/hapi/release" + "k8s.io/helm/pkg/hapi/release" ) // sortByHookWeight does an in-place sort of hooks by their supplied weight. diff --git a/pkg/tiller/hook_sorter_test.go b/pkg/tiller/hook_sorter_test.go index ac5b9bf8d..4e33bdad4 100644 --- a/pkg/tiller/hook_sorter_test.go +++ b/pkg/tiller/hook_sorter_test.go @@ -19,7 +19,7 @@ package tiller import ( "testing" - "k8s.io/helm/pkg/proto/hapi/release" + "k8s.io/helm/pkg/hapi/release" ) func TestHookSorter(t *testing.T) { diff --git a/pkg/tiller/hooks.go b/pkg/tiller/hooks.go index e1e965d08..262f5cb97 100644 --- a/pkg/tiller/hooks.go +++ b/pkg/tiller/hooks.go @@ -26,8 +26,8 @@ import ( "github.com/ghodss/yaml" "k8s.io/helm/pkg/chartutil" + "k8s.io/helm/pkg/hapi/release" "k8s.io/helm/pkg/hooks" - "k8s.io/helm/pkg/proto/hapi/release" util "k8s.io/helm/pkg/releaseutil" ) diff --git a/pkg/tiller/hooks_test.go b/pkg/tiller/hooks_test.go index 658f859f4..8102b0f16 100644 --- a/pkg/tiller/hooks_test.go +++ b/pkg/tiller/hooks_test.go @@ -23,7 +23,7 @@ import ( "github.com/ghodss/yaml" "k8s.io/helm/pkg/chartutil" - "k8s.io/helm/pkg/proto/hapi/release" + "k8s.io/helm/pkg/hapi/release" util "k8s.io/helm/pkg/releaseutil" ) diff --git a/pkg/tiller/release_content.go b/pkg/tiller/release_content.go index f7bd45bf1..54e4518ec 100644 --- a/pkg/tiller/release_content.go +++ b/pkg/tiller/release_content.go @@ -17,12 +17,12 @@ limitations under the License. package tiller import ( - "k8s.io/helm/pkg/proto/hapi/release" - "k8s.io/helm/pkg/proto/hapi/services" + "k8s.io/helm/pkg/hapi" + "k8s.io/helm/pkg/hapi/release" ) // GetReleaseContent gets all of the stored information for the given release. -func (s *ReleaseServer) GetReleaseContent(req *services.GetReleaseContentRequest) (*release.Release, error) { +func (s *ReleaseServer) GetReleaseContent(req *hapi.GetReleaseContentRequest) (*release.Release, error) { if err := validateReleaseName(req.Name); err != nil { s.Log("releaseContent: Release name is invalid: %s", req.Name) return nil, err diff --git a/pkg/tiller/release_content_test.go b/pkg/tiller/release_content_test.go index b9b5fa433..a52c5f029 100644 --- a/pkg/tiller/release_content_test.go +++ b/pkg/tiller/release_content_test.go @@ -19,7 +19,7 @@ package tiller import ( "testing" - "k8s.io/helm/pkg/proto/hapi/services" + "k8s.io/helm/pkg/hapi" ) func TestGetReleaseContent(t *testing.T) { @@ -29,7 +29,7 @@ func TestGetReleaseContent(t *testing.T) { t.Fatalf("Could not store mock release: %s", err) } - res, err := rs.GetReleaseContent(&services.GetReleaseContentRequest{Name: rel.Name, Version: 1}) + res, err := rs.GetReleaseContent(&hapi.GetReleaseContentRequest{Name: rel.Name, Version: 1}) if err != nil { t.Errorf("Error getting release content: %s", err) } diff --git a/pkg/tiller/release_history.go b/pkg/tiller/release_history.go index 761a61542..df0982548 100644 --- a/pkg/tiller/release_history.go +++ b/pkg/tiller/release_history.go @@ -17,13 +17,13 @@ limitations under the License. package tiller import ( - "k8s.io/helm/pkg/proto/hapi/release" - tpb "k8s.io/helm/pkg/proto/hapi/services" + "k8s.io/helm/pkg/hapi" + "k8s.io/helm/pkg/hapi/release" relutil "k8s.io/helm/pkg/releaseutil" ) // GetHistory gets the history for a given release. -func (s *ReleaseServer) GetHistory(req *tpb.GetHistoryRequest) ([]*release.Release, error) { +func (s *ReleaseServer) GetHistory(req *hapi.GetHistoryRequest) ([]*release.Release, error) { if err := validateReleaseName(req.Name); err != nil { s.Log("getHistory: Release name is invalid: %s", req.Name) return nil, err diff --git a/pkg/tiller/release_history_test.go b/pkg/tiller/release_history_test.go index c43c79785..6cdbb0f0c 100644 --- a/pkg/tiller/release_history_test.go +++ b/pkg/tiller/release_history_test.go @@ -20,8 +20,8 @@ import ( "reflect" "testing" - rpb "k8s.io/helm/pkg/proto/hapi/release" - tpb "k8s.io/helm/pkg/proto/hapi/services" + "k8s.io/helm/pkg/hapi" + rpb "k8s.io/helm/pkg/hapi/release" ) func TestGetHistory_WithRevisions(t *testing.T) { @@ -36,12 +36,12 @@ func TestGetHistory_WithRevisions(t *testing.T) { // GetReleaseHistoryTests tests := []struct { desc string - req *tpb.GetHistoryRequest + req *hapi.GetHistoryRequest res []*rpb.Release }{ { desc: "get release with history and default limit (max=256)", - req: &tpb.GetHistoryRequest{Name: "angry-bird", Max: 256}, + req: &hapi.GetHistoryRequest{Name: "angry-bird", Max: 256}, res: []*rpb.Release{ mk("angry-bird", 4, rpb.Status_DEPLOYED), mk("angry-bird", 3, rpb.Status_SUPERSEDED), @@ -51,7 +51,7 @@ func TestGetHistory_WithRevisions(t *testing.T) { }, { desc: "get release with history using result limit (max=2)", - req: &tpb.GetHistoryRequest{Name: "angry-bird", Max: 2}, + req: &hapi.GetHistoryRequest{Name: "angry-bird", Max: 2}, res: []*rpb.Release{ mk("angry-bird", 4, rpb.Status_DEPLOYED), mk("angry-bird", 3, rpb.Status_SUPERSEDED), @@ -89,11 +89,11 @@ func TestGetHistory_WithRevisions(t *testing.T) { func TestGetHistory_WithNoRevisions(t *testing.T) { tests := []struct { desc string - req *tpb.GetHistoryRequest + req *hapi.GetHistoryRequest }{ { desc: "get release with no history", - req: &tpb.GetHistoryRequest{Name: "sad-panda", Max: 256}, + req: &hapi.GetHistoryRequest{Name: "sad-panda", Max: 256}, }, } diff --git a/pkg/tiller/release_install.go b/pkg/tiller/release_install.go index d4f0e5435..43cb67ae6 100644 --- a/pkg/tiller/release_install.go +++ b/pkg/tiller/release_install.go @@ -22,15 +22,15 @@ import ( "strings" "k8s.io/helm/pkg/chartutil" + "k8s.io/helm/pkg/hapi" + "k8s.io/helm/pkg/hapi/release" "k8s.io/helm/pkg/hooks" - "k8s.io/helm/pkg/proto/hapi/release" - "k8s.io/helm/pkg/proto/hapi/services" relutil "k8s.io/helm/pkg/releaseutil" "k8s.io/helm/pkg/timeconv" ) // InstallRelease installs a release and stores the release record. -func (s *ReleaseServer) InstallRelease(req *services.InstallReleaseRequest) (*release.Release, error) { +func (s *ReleaseServer) InstallRelease(req *hapi.InstallReleaseRequest) (*release.Release, error) { s.Log("preparing install for %s", req.Name) rel, err := s.prepareRelease(req) if err != nil { @@ -53,7 +53,7 @@ func (s *ReleaseServer) InstallRelease(req *services.InstallReleaseRequest) (*re } // prepareRelease builds a release for an install operation. -func (s *ReleaseServer) prepareRelease(req *services.InstallReleaseRequest) (*release.Release, error) { +func (s *ReleaseServer) prepareRelease(req *hapi.InstallReleaseRequest) (*release.Release, error) { if req.Chart == nil { return nil, errMissingChart } @@ -130,7 +130,7 @@ func (s *ReleaseServer) prepareRelease(req *services.InstallReleaseRequest) (*re } // performRelease runs a release. -func (s *ReleaseServer) performRelease(r *release.Release, req *services.InstallReleaseRequest) (*release.Release, error) { +func (s *ReleaseServer) performRelease(r *release.Release, req *hapi.InstallReleaseRequest) (*release.Release, error) { if req.DryRun { s.Log("dry run for %s", r.Name) @@ -164,7 +164,7 @@ func (s *ReleaseServer) performRelease(r *release.Release, req *services.Install // update new release with next revision number // so as to append to the old release's history r.Version = old.Version + 1 - updateReq := &services.UpdateReleaseRequest{ + updateReq := &hapi.UpdateReleaseRequest{ Wait: req.Wait, Recreate: false, Timeout: req.Timeout, diff --git a/pkg/tiller/release_install_test.go b/pkg/tiller/release_install_test.go index 7f55ad62a..01e81a2ff 100644 --- a/pkg/tiller/release_install_test.go +++ b/pkg/tiller/release_install_test.go @@ -21,8 +21,8 @@ import ( "strings" "testing" - "k8s.io/helm/pkg/proto/hapi/release" - "k8s.io/helm/pkg/proto/hapi/services" + "k8s.io/helm/pkg/hapi" + "k8s.io/helm/pkg/hapi/release" ) func TestInstallRelease(t *testing.T) { @@ -329,7 +329,7 @@ func TestInstallRelease_ReuseName(t *testing.T) { t.Errorf("expected %q, got %q", rel.Name, res.Name) } - getreq := &services.GetReleaseStatusRequest{Name: rel.Name, Version: 0} + getreq := &hapi.GetReleaseStatusRequest{Name: rel.Name, Version: 0} getres, err := rs.GetReleaseStatus(getreq) if err != nil { t.Errorf("Failed to retrieve release: %s", err) diff --git a/pkg/tiller/release_list.go b/pkg/tiller/release_list.go index 547cba085..a29413c21 100644 --- a/pkg/tiller/release_list.go +++ b/pkg/tiller/release_list.go @@ -19,13 +19,13 @@ package tiller import ( "regexp" - "k8s.io/helm/pkg/proto/hapi/release" - "k8s.io/helm/pkg/proto/hapi/services" + "k8s.io/helm/pkg/hapi" + "k8s.io/helm/pkg/hapi/release" relutil "k8s.io/helm/pkg/releaseutil" ) // ListReleases lists the releases found by the server. -func (s *ReleaseServer) ListReleases(req *services.ListReleasesRequest) ([]*release.Release, error) { +func (s *ReleaseServer) ListReleases(req *hapi.ListReleasesRequest) ([]*release.Release, error) { if len(req.StatusCodes) == 0 { req.StatusCodes = []release.Status_Code{release.Status_DEPLOYED} } @@ -54,13 +54,13 @@ func (s *ReleaseServer) ListReleases(req *services.ListReleasesRequest) ([]*rele } switch req.SortBy { - case services.ListSort_NAME: + case hapi.ListSort_NAME: relutil.SortByName(rels) - case services.ListSort_LAST_RELEASED: + case hapi.ListSort_LAST_RELEASED: relutil.SortByDate(rels) } - if req.SortOrder == services.ListSort_DESC { + if req.SortOrder == hapi.ListSort_DESC { ll := len(rels) rr := make([]*release.Release, ll) for i, item := range rels { diff --git a/pkg/tiller/release_list_test.go b/pkg/tiller/release_list_test.go index 77f3cec87..a68ba82f1 100644 --- a/pkg/tiller/release_list_test.go +++ b/pkg/tiller/release_list_test.go @@ -20,8 +20,8 @@ import ( "fmt" "testing" - "k8s.io/helm/pkg/proto/hapi/release" - "k8s.io/helm/pkg/proto/hapi/services" + "k8s.io/helm/pkg/hapi" + "k8s.io/helm/pkg/hapi/release" ) func TestListReleases(t *testing.T) { @@ -35,7 +35,7 @@ func TestListReleases(t *testing.T) { } } - rels, err := rs.ListReleases(&services.ListReleasesRequest{}) + rels, err := rs.ListReleases(&hapi.ListReleasesRequest{}) if err != nil { t.Fatalf("Failed listing: %s", err) } @@ -87,7 +87,7 @@ func TestListReleasesByStatus(t *testing.T) { } for i, tt := range tests { - rels, err := rs.ListReleases(&services.ListReleasesRequest{StatusCodes: tt.statusCodes, Offset: "", Limit: 64}) + rels, err := rs.ListReleases(&hapi.ListReleasesRequest{StatusCodes: tt.statusCodes, Offset: "", Limit: 64}) if err != nil { t.Fatalf("Failed listing %d: %s", i, err) } @@ -125,10 +125,10 @@ func TestListReleasesSort(t *testing.T) { } limit := 6 - req := &services.ListReleasesRequest{ + req := &hapi.ListReleasesRequest{ Offset: "", Limit: int64(limit), - SortBy: services.ListSort_NAME, + SortBy: hapi.ListSort_NAME, } rels, err := rs.ListReleases(req) if err != nil { @@ -167,11 +167,11 @@ func TestListReleasesFilter(t *testing.T) { } } - req := &services.ListReleasesRequest{ + req := &hapi.ListReleasesRequest{ Offset: "", Limit: 64, Filter: "neuro[a-z]+", - SortBy: services.ListSort_NAME, + SortBy: hapi.ListSort_NAME, } rels, err := rs.ListReleases(req) if err != nil { @@ -216,7 +216,7 @@ func TestReleasesNamespace(t *testing.T) { } } - req := &services.ListReleasesRequest{ + req := &hapi.ListReleasesRequest{ Offset: "", Limit: 64, Namespace: "test123", diff --git a/pkg/tiller/release_rollback.go b/pkg/tiller/release_rollback.go index 3d69b7a7e..38fb328f5 100644 --- a/pkg/tiller/release_rollback.go +++ b/pkg/tiller/release_rollback.go @@ -20,14 +20,14 @@ import ( "bytes" "fmt" + "k8s.io/helm/pkg/hapi" + "k8s.io/helm/pkg/hapi/release" "k8s.io/helm/pkg/hooks" - "k8s.io/helm/pkg/proto/hapi/release" - "k8s.io/helm/pkg/proto/hapi/services" "k8s.io/helm/pkg/timeconv" ) // RollbackRelease rolls back to a previous version of the given release. -func (s *ReleaseServer) RollbackRelease(req *services.RollbackReleaseRequest) (*release.Release, error) { +func (s *ReleaseServer) RollbackRelease(req *hapi.RollbackReleaseRequest) (*release.Release, error) { s.Log("preparing rollback of %s", req.Name) currentRelease, targetRelease, err := s.prepareRollback(req) if err != nil { @@ -58,7 +58,7 @@ func (s *ReleaseServer) RollbackRelease(req *services.RollbackReleaseRequest) (* // prepareRollback finds the previous release and prepares a new release object with // the previous release's configuration -func (s *ReleaseServer) prepareRollback(req *services.RollbackReleaseRequest) (*release.Release, *release.Release, error) { +func (s *ReleaseServer) prepareRollback(req *hapi.RollbackReleaseRequest) (*release.Release, *release.Release, error) { if err := validateReleaseName(req.Name); err != nil { s.Log("prepareRollback: Release name is invalid: %s", req.Name) return nil, nil, err @@ -110,7 +110,7 @@ func (s *ReleaseServer) prepareRollback(req *services.RollbackReleaseRequest) (* return currentRelease, targetRelease, nil } -func (s *ReleaseServer) performRollback(currentRelease, targetRelease *release.Release, req *services.RollbackReleaseRequest) (*release.Release, error) { +func (s *ReleaseServer) performRollback(currentRelease, targetRelease *release.Release, req *hapi.RollbackReleaseRequest) (*release.Release, error) { if req.DryRun { s.Log("dry run for %s", targetRelease.Name) diff --git a/pkg/tiller/release_rollback_test.go b/pkg/tiller/release_rollback_test.go index f1f8eb5a8..0f12ef8e3 100644 --- a/pkg/tiller/release_rollback_test.go +++ b/pkg/tiller/release_rollback_test.go @@ -20,8 +20,8 @@ import ( "strings" "testing" - "k8s.io/helm/pkg/proto/hapi/release" - "k8s.io/helm/pkg/proto/hapi/services" + "k8s.io/helm/pkg/hapi" + "k8s.io/helm/pkg/hapi/release" ) func TestRollbackRelease(t *testing.T) { @@ -46,7 +46,7 @@ func TestRollbackRelease(t *testing.T) { rs.env.Releases.Update(rel) rs.env.Releases.Create(upgradedRel) - req := &services.RollbackReleaseRequest{ + req := &hapi.RollbackReleaseRequest{ Name: rel.Name, } res, err := rs.RollbackRelease(req) @@ -153,7 +153,7 @@ func TestRollbackWithReleaseVersion(t *testing.T) { rs.env.Releases.Update(v2) rs.env.Releases.Create(v3) - req := &services.RollbackReleaseRequest{ + req := &hapi.RollbackReleaseRequest{ Name: rel.Name, DisableHooks: true, Version: 1, @@ -201,7 +201,7 @@ func TestRollbackReleaseNoHooks(t *testing.T) { rs.env.Releases.Update(rel) rs.env.Releases.Create(upgradedRel) - req := &services.RollbackReleaseRequest{ + req := &hapi.RollbackReleaseRequest{ Name: rel.Name, DisableHooks: true, } @@ -224,7 +224,7 @@ func TestRollbackReleaseFailure(t *testing.T) { rs.env.Releases.Update(rel) rs.env.Releases.Create(upgradedRel) - req := &services.RollbackReleaseRequest{ + req := &hapi.RollbackReleaseRequest{ Name: rel.Name, DisableHooks: true, } diff --git a/pkg/tiller/release_server.go b/pkg/tiller/release_server.go index 47d146390..4f1c9c9b5 100644 --- a/pkg/tiller/release_server.go +++ b/pkg/tiller/release_server.go @@ -31,11 +31,11 @@ import ( "k8s.io/client-go/discovery" "k8s.io/helm/pkg/chartutil" + "k8s.io/helm/pkg/hapi" + "k8s.io/helm/pkg/hapi/chart" + "k8s.io/helm/pkg/hapi/release" "k8s.io/helm/pkg/hooks" "k8s.io/helm/pkg/kube" - "k8s.io/helm/pkg/proto/hapi/chart" - "k8s.io/helm/pkg/proto/hapi/release" - "k8s.io/helm/pkg/proto/hapi/services" relutil "k8s.io/helm/pkg/releaseutil" "k8s.io/helm/pkg/tiller/environment" "k8s.io/helm/pkg/timeconv" @@ -104,7 +104,7 @@ func NewReleaseServer(env *environment.Environment, discovery discovery.Discover // // This is skipped if the req.ResetValues flag is set, in which case the // request values are not altered. -func (s *ReleaseServer) reuseValues(req *services.UpdateReleaseRequest, current *release.Release) error { +func (s *ReleaseServer) reuseValues(req *hapi.UpdateReleaseRequest, current *release.Release) error { if req.ResetValues { // If ResetValues is set, we comletely ignore current.Config. s.Log("resetting values to the chart's original version") @@ -433,14 +433,14 @@ func hookHasDeletePolicy(h *release.Hook, policy string) bool { } // Update performs an update from current to target release -func (s *ReleaseServer) Update(current, target *release.Release, req *services.UpdateReleaseRequest) error { +func (s *ReleaseServer) Update(current, target *release.Release, req *hapi.UpdateReleaseRequest) error { c := bytes.NewBufferString(current.Manifest) t := bytes.NewBufferString(target.Manifest) return s.env.KubeClient.Update(target.Namespace, c, t, req.Force, req.Recreate, req.Timeout, req.Wait) } // Delete deletes the release and returns manifests that were kept in the deletion process -func (s *ReleaseServer) Delete(rel *release.Release, req *services.UninstallReleaseRequest) (kept string, errs []error) { +func (s *ReleaseServer) Delete(rel *release.Release, req *hapi.UninstallReleaseRequest) (kept string, errs []error) { vs, err := GetVersionSet(s.discovery) if err != nil { return rel.Manifest, []error{fmt.Errorf("Could not get apiVersions from Kubernetes: %v", err)} diff --git a/pkg/tiller/release_server_test.go b/pkg/tiller/release_server_test.go index 1a5571013..1c7188e51 100644 --- a/pkg/tiller/release_server_test.go +++ b/pkg/tiller/release_server_test.go @@ -32,11 +32,11 @@ import ( "k8s.io/kubernetes/pkg/apis/core" "k8s.io/kubernetes/pkg/kubectl/resource" + "k8s.io/helm/pkg/hapi" + "k8s.io/helm/pkg/hapi/chart" + "k8s.io/helm/pkg/hapi/release" "k8s.io/helm/pkg/hooks" "k8s.io/helm/pkg/kube" - "k8s.io/helm/pkg/proto/hapi/chart" - "k8s.io/helm/pkg/proto/hapi/release" - "k8s.io/helm/pkg/proto/hapi/services" "k8s.io/helm/pkg/storage" "k8s.io/helm/pkg/storage/driver" "k8s.io/helm/pkg/tiller/environment" @@ -162,7 +162,7 @@ func withSampleTemplates() chartOption { } type installOptions struct { - *services.InstallReleaseRequest + *hapi.InstallReleaseRequest } type installOption func(*installOptions) @@ -197,9 +197,9 @@ func withChart(chartOpts ...chartOption) installOption { } } -func installRequest(opts ...installOption) *services.InstallReleaseRequest { +func installRequest(opts ...installOption) *hapi.InstallReleaseRequest { reqOpts := &installOptions{ - &services.InstallReleaseRequest{ + &hapi.InstallReleaseRequest{ Namespace: "spaced", Chart: buildChart(), }, diff --git a/pkg/tiller/release_status.go b/pkg/tiller/release_status.go index 24c2535cb..2fccd5114 100644 --- a/pkg/tiller/release_status.go +++ b/pkg/tiller/release_status.go @@ -21,12 +21,12 @@ import ( "errors" "fmt" - "k8s.io/helm/pkg/proto/hapi/release" - "k8s.io/helm/pkg/proto/hapi/services" + "k8s.io/helm/pkg/hapi" + "k8s.io/helm/pkg/hapi/release" ) // GetReleaseStatus gets the status information for a named release. -func (s *ReleaseServer) GetReleaseStatus(req *services.GetReleaseStatusRequest) (*services.GetReleaseStatusResponse, error) { +func (s *ReleaseServer) GetReleaseStatus(req *hapi.GetReleaseStatusRequest) (*hapi.GetReleaseStatusResponse, error) { if err := validateReleaseName(req.Name); err != nil { s.Log("getStatus: Release name is invalid: %s", req.Name) return nil, err @@ -55,7 +55,7 @@ func (s *ReleaseServer) GetReleaseStatus(req *services.GetReleaseStatusRequest) } sc := rel.Info.Status.Code - statusResp := &services.GetReleaseStatusResponse{ + statusResp := &hapi.GetReleaseStatusResponse{ Name: rel.Name, Namespace: rel.Namespace, Info: rel.Info, diff --git a/pkg/tiller/release_status_test.go b/pkg/tiller/release_status_test.go index 6fbc26bb1..0676bf967 100644 --- a/pkg/tiller/release_status_test.go +++ b/pkg/tiller/release_status_test.go @@ -19,8 +19,8 @@ package tiller import ( "testing" - "k8s.io/helm/pkg/proto/hapi/release" - "k8s.io/helm/pkg/proto/hapi/services" + "k8s.io/helm/pkg/hapi" + "k8s.io/helm/pkg/hapi/release" ) func TestGetReleaseStatus(t *testing.T) { @@ -30,7 +30,7 @@ func TestGetReleaseStatus(t *testing.T) { t.Fatalf("Could not store mock release: %s", err) } - res, err := rs.GetReleaseStatus(&services.GetReleaseStatusRequest{Name: rel.Name, Version: 1}) + res, err := rs.GetReleaseStatus(&hapi.GetReleaseStatusRequest{Name: rel.Name, Version: 1}) if err != nil { t.Errorf("Error getting release content: %s", err) } @@ -51,7 +51,7 @@ func TestGetReleaseStatusDeleted(t *testing.T) { t.Fatalf("Could not store mock release: %s", err) } - res, err := rs.GetReleaseStatus(&services.GetReleaseStatusRequest{Name: rel.Name, Version: 1}) + res, err := rs.GetReleaseStatus(&hapi.GetReleaseStatusRequest{Name: rel.Name, Version: 1}) if err != nil { t.Fatalf("Error getting release content: %s", err) } diff --git a/pkg/tiller/release_testing.go b/pkg/tiller/release_testing.go index 5914a6b8e..9932233f4 100644 --- a/pkg/tiller/release_testing.go +++ b/pkg/tiller/release_testing.go @@ -17,13 +17,13 @@ limitations under the License. package tiller import ( - "k8s.io/helm/pkg/proto/hapi/release" - "k8s.io/helm/pkg/proto/hapi/services" + "k8s.io/helm/pkg/hapi" + "k8s.io/helm/pkg/hapi/release" reltesting "k8s.io/helm/pkg/releasetesting" ) // RunReleaseTest runs pre-defined tests stored as hooks on a given release -func (s *ReleaseServer) RunReleaseTest(req *services.TestReleaseRequest) (<-chan *services.TestReleaseResponse, <-chan error) { +func (s *ReleaseServer) RunReleaseTest(req *hapi.TestReleaseRequest) (<-chan *hapi.TestReleaseResponse, <-chan error) { errc := make(chan error, 1) if err := validateReleaseName(req.Name); err != nil { s.Log("releaseTest: Release name is invalid: %s", req.Name) @@ -38,7 +38,7 @@ func (s *ReleaseServer) RunReleaseTest(req *services.TestReleaseRequest) (<-chan return nil, errc } - ch := make(chan *services.TestReleaseResponse, 1) + ch := make(chan *hapi.TestReleaseResponse, 1) testEnv := &reltesting.Environment{ Namespace: rel.Namespace, KubeClient: s.env.KubeClient, diff --git a/pkg/tiller/release_uninstall.go b/pkg/tiller/release_uninstall.go index 462108f46..b5cbf8314 100644 --- a/pkg/tiller/release_uninstall.go +++ b/pkg/tiller/release_uninstall.go @@ -20,15 +20,15 @@ import ( "fmt" "strings" + "k8s.io/helm/pkg/hapi" + "k8s.io/helm/pkg/hapi/release" "k8s.io/helm/pkg/hooks" - "k8s.io/helm/pkg/proto/hapi/release" - "k8s.io/helm/pkg/proto/hapi/services" relutil "k8s.io/helm/pkg/releaseutil" "k8s.io/helm/pkg/timeconv" ) // UninstallRelease deletes all of the resources associated with this release, and marks the release DELETED. -func (s *ReleaseServer) UninstallRelease(req *services.UninstallReleaseRequest) (*services.UninstallReleaseResponse, error) { +func (s *ReleaseServer) UninstallRelease(req *hapi.UninstallReleaseRequest) (*hapi.UninstallReleaseResponse, error) { if err := validateReleaseName(req.Name); err != nil { s.Log("uninstallRelease: Release name is invalid: %s", req.Name) return nil, err @@ -54,7 +54,7 @@ func (s *ReleaseServer) UninstallRelease(req *services.UninstallReleaseRequest) s.Log("uninstall: Failed to purge the release: %s", err) return nil, err } - return &services.UninstallReleaseResponse{Release: rel}, nil + return &hapi.UninstallReleaseResponse{Release: rel}, nil } return nil, fmt.Errorf("the release named %q is already deleted", req.Name) } @@ -63,7 +63,7 @@ func (s *ReleaseServer) UninstallRelease(req *services.UninstallReleaseRequest) rel.Info.Status.Code = release.Status_DELETING rel.Info.Deleted = timeconv.Now() rel.Info.Description = "Deletion in progress (or silently failed)" - res := &services.UninstallReleaseResponse{Release: rel} + res := &hapi.UninstallReleaseResponse{Release: rel} if !req.DisableHooks { if err := s.execHook(rel.Hooks, rel.Name, rel.Namespace, hooks.PreDelete, req.Timeout); err != nil { diff --git a/pkg/tiller/release_uninstall_test.go b/pkg/tiller/release_uninstall_test.go index c3c953019..1986855b2 100644 --- a/pkg/tiller/release_uninstall_test.go +++ b/pkg/tiller/release_uninstall_test.go @@ -20,15 +20,15 @@ import ( "strings" "testing" - "k8s.io/helm/pkg/proto/hapi/release" - "k8s.io/helm/pkg/proto/hapi/services" + "k8s.io/helm/pkg/hapi" + "k8s.io/helm/pkg/hapi/release" ) func TestUninstallRelease(t *testing.T) { rs := rsFixture() rs.env.Releases.Create(releaseStub()) - req := &services.UninstallReleaseRequest{ + req := &hapi.UninstallReleaseRequest{ Name: "angry-panda", } @@ -66,7 +66,7 @@ func TestUninstallPurgeRelease(t *testing.T) { rs.env.Releases.Update(rel) rs.env.Releases.Create(upgradedRel) - req := &services.UninstallReleaseRequest{ + req := &hapi.UninstallReleaseRequest{ Name: "angry-panda", Purge: true, } @@ -87,7 +87,7 @@ func TestUninstallPurgeRelease(t *testing.T) { if res.Release.Info.Deleted.Seconds <= 0 { t.Errorf("Expected valid UNIX date, got %d", res.Release.Info.Deleted.Seconds) } - rels, err := rs.GetHistory(&services.GetHistoryRequest{Name: "angry-panda"}) + rels, err := rs.GetHistory(&hapi.GetHistoryRequest{Name: "angry-panda"}) if err != nil { t.Fatal(err) } @@ -100,7 +100,7 @@ func TestUninstallPurgeDeleteRelease(t *testing.T) { rs := rsFixture() rs.env.Releases.Create(releaseStub()) - req := &services.UninstallReleaseRequest{ + req := &hapi.UninstallReleaseRequest{ Name: "angry-panda", } @@ -109,7 +109,7 @@ func TestUninstallPurgeDeleteRelease(t *testing.T) { t.Fatalf("Failed uninstall: %s", err) } - req2 := &services.UninstallReleaseRequest{ + req2 := &hapi.UninstallReleaseRequest{ Name: "angry-panda", Purge: true, } @@ -125,7 +125,7 @@ func TestUninstallReleaseWithKeepPolicy(t *testing.T) { name := "angry-bunny" rs.env.Releases.Create(releaseWithKeepStub(name)) - req := &services.UninstallReleaseRequest{ + req := &hapi.UninstallReleaseRequest{ Name: name, } @@ -155,7 +155,7 @@ func TestUninstallReleaseNoHooks(t *testing.T) { rs := rsFixture() rs.env.Releases.Create(releaseStub()) - req := &services.UninstallReleaseRequest{ + req := &hapi.UninstallReleaseRequest{ Name: "angry-panda", DisableHooks: true, } diff --git a/pkg/tiller/release_update.go b/pkg/tiller/release_update.go index c25830b03..12bfb3f9c 100644 --- a/pkg/tiller/release_update.go +++ b/pkg/tiller/release_update.go @@ -21,14 +21,14 @@ import ( "strings" "k8s.io/helm/pkg/chartutil" + "k8s.io/helm/pkg/hapi" + "k8s.io/helm/pkg/hapi/release" "k8s.io/helm/pkg/hooks" - "k8s.io/helm/pkg/proto/hapi/release" - "k8s.io/helm/pkg/proto/hapi/services" "k8s.io/helm/pkg/timeconv" ) // UpdateRelease takes an existing release and new information, and upgrades the release. -func (s *ReleaseServer) UpdateRelease(req *services.UpdateReleaseRequest) (*release.Release, error) { +func (s *ReleaseServer) UpdateRelease(req *hapi.UpdateReleaseRequest) (*release.Release, error) { if err := validateReleaseName(req.Name); err != nil { s.Log("updateRelease: Release name is invalid: %s", req.Name) return nil, err @@ -67,7 +67,7 @@ func (s *ReleaseServer) UpdateRelease(req *services.UpdateReleaseRequest) (*rele } // prepareUpdate builds an updated release for an update operation. -func (s *ReleaseServer) prepareUpdate(req *services.UpdateReleaseRequest) (*release.Release, *release.Release, error) { +func (s *ReleaseServer) prepareUpdate(req *hapi.UpdateReleaseRequest) (*release.Release, *release.Release, error) { if req.Chart == nil { return nil, nil, errMissingChart } @@ -141,14 +141,14 @@ func (s *ReleaseServer) prepareUpdate(req *services.UpdateReleaseRequest) (*rele } // performUpdateForce performs the same action as a `helm delete && helm install --replace`. -func (s *ReleaseServer) performUpdateForce(req *services.UpdateReleaseRequest) (*release.Release, error) { +func (s *ReleaseServer) performUpdateForce(req *hapi.UpdateReleaseRequest) (*release.Release, error) { // find the last release with the given name oldRelease, err := s.env.Releases.Last(req.Name) if err != nil { return nil, err } - newRelease, err := s.prepareRelease(&services.InstallReleaseRequest{ + newRelease, err := s.prepareRelease(&hapi.InstallReleaseRequest{ Chart: req.Chart, Values: req.Values, DryRun: req.DryRun, @@ -241,7 +241,7 @@ func (s *ReleaseServer) performUpdateForce(req *services.UpdateReleaseRequest) ( return newRelease, nil } -func (s *ReleaseServer) performUpdate(originalRelease, updatedRelease *release.Release, req *services.UpdateReleaseRequest) (*release.Release, error) { +func (s *ReleaseServer) performUpdate(originalRelease, updatedRelease *release.Release, req *hapi.UpdateReleaseRequest) (*release.Release, error) { if req.DryRun { s.Log("dry run for %s", updatedRelease.Name) diff --git a/pkg/tiller/release_update_test.go b/pkg/tiller/release_update_test.go index 6d6cb6ef0..a8ae94ad1 100644 --- a/pkg/tiller/release_update_test.go +++ b/pkg/tiller/release_update_test.go @@ -18,14 +18,13 @@ package tiller import ( "fmt" + "reflect" "strings" "testing" - "github.com/golang/protobuf/proto" - - "k8s.io/helm/pkg/proto/hapi/chart" - "k8s.io/helm/pkg/proto/hapi/release" - "k8s.io/helm/pkg/proto/hapi/services" + "k8s.io/helm/pkg/hapi" + "k8s.io/helm/pkg/hapi/chart" + "k8s.io/helm/pkg/hapi/release" ) func TestUpdateRelease(t *testing.T) { @@ -33,7 +32,7 @@ func TestUpdateRelease(t *testing.T) { rel := releaseStub() rs.env.Releases.Create(rel) - req := &services.UpdateReleaseRequest{ + req := &hapi.UpdateReleaseRequest{ Name: rel.Name, Chart: &chart.Chart{ Metadata: &chart.Metadata{Name: "hello"}, @@ -105,7 +104,7 @@ func TestUpdateRelease_ResetValues(t *testing.T) { rel := releaseStub() rs.env.Releases.Create(rel) - req := &services.UpdateReleaseRequest{ + req := &hapi.UpdateReleaseRequest{ Name: rel.Name, Chart: &chart.Chart{ Metadata: &chart.Metadata{Name: "hello"}, @@ -130,7 +129,7 @@ func TestUpdateRelease_ResetValues(t *testing.T) { func TestUpdateRelease_ComplexReuseValues(t *testing.T) { rs := rsFixture() - installReq := &services.InstallReleaseRequest{ + installReq := &hapi.InstallReleaseRequest{ Namespace: "spaced", Chart: &chart.Chart{ Metadata: &chart.Metadata{Name: "hello"}, @@ -150,7 +149,7 @@ func TestUpdateRelease_ComplexReuseValues(t *testing.T) { } rel := installResp - req := &services.UpdateReleaseRequest{ + req := &hapi.UpdateReleaseRequest{ Name: rel.Name, Chart: &chart.Chart{ Metadata: &chart.Metadata{Name: "hello"}, @@ -174,7 +173,7 @@ func TestUpdateRelease_ComplexReuseValues(t *testing.T) { } rel = res - req = &services.UpdateReleaseRequest{ + req = &hapi.UpdateReleaseRequest{ Name: rel.Name, Chart: &chart.Chart{ Metadata: &chart.Metadata{Name: "hello"}, @@ -200,7 +199,7 @@ func TestUpdateRelease_ComplexReuseValues(t *testing.T) { t.Errorf("Expected request config to be %q, got %q", expect, rel.Config.Raw) } - req = &services.UpdateReleaseRequest{ + req = &hapi.UpdateReleaseRequest{ Name: rel.Name, Chart: &chart.Chart{ Metadata: &chart.Metadata{Name: "hello"}, @@ -230,7 +229,7 @@ func TestUpdateRelease_ReuseValues(t *testing.T) { rel := releaseStub() rs.env.Releases.Create(rel) - req := &services.UpdateReleaseRequest{ + req := &hapi.UpdateReleaseRequest{ Name: rel.Name, Chart: &chart.Chart{ Metadata: &chart.Metadata{Name: "hello"}, @@ -267,7 +266,7 @@ func TestUpdateRelease_ResetReuseValues(t *testing.T) { rel := releaseStub() rs.env.Releases.Create(rel) - req := &services.UpdateReleaseRequest{ + req := &hapi.UpdateReleaseRequest{ Name: rel.Name, Chart: &chart.Chart{ Metadata: &chart.Metadata{Name: "hello"}, @@ -297,7 +296,7 @@ func TestUpdateReleaseFailure(t *testing.T) { rs.env.KubeClient = newUpdateFailingKubeClient() rs.Log = t.Logf - req := &services.UpdateReleaseRequest{ + req := &hapi.UpdateReleaseRequest{ Name: rel.Name, DisableHooks: true, Chart: &chart.Chart{ @@ -339,7 +338,7 @@ func TestUpdateReleaseFailure_Force(t *testing.T) { rs.env.Releases.Create(rel) rs.Log = t.Logf - req := &services.UpdateReleaseRequest{ + req := &hapi.UpdateReleaseRequest{ Name: rel.Name, DisableHooks: true, Chart: &chart.Chart{ @@ -381,7 +380,7 @@ func TestUpdateReleaseNoHooks(t *testing.T) { rel := releaseStub() rs.env.Releases.Create(rel) - req := &services.UpdateReleaseRequest{ + req := &hapi.UpdateReleaseRequest{ Name: rel.Name, DisableHooks: true, Chart: &chart.Chart{ @@ -409,10 +408,10 @@ func TestUpdateReleaseNoChanges(t *testing.T) { rel := releaseStub() rs.env.Releases.Create(rel) - req := &services.UpdateReleaseRequest{ + req := &hapi.UpdateReleaseRequest{ Name: rel.Name, DisableHooks: true, - Chart: rel.GetChart(), + Chart: rel.Chart, } _, err := rs.UpdateRelease(req) @@ -427,7 +426,7 @@ func compareStoredAndReturnedRelease(t *testing.T, rs ReleaseServer, res *releas t.Fatalf("Expected release for %s (%v).", res.Name, rs.env.Releases) } - if !proto.Equal(storedRelease, res) { + if !reflect.DeepEqual(storedRelease, res) { t.Errorf("Stored release doesn't match returned Release") } -- GitLab