From c463e1f1854a7e2101ca0d0ecb555080de2b5991 Mon Sep 17 00:00:00 2001 From: Taylor Thomas Date: Wed, 19 Apr 2017 20:08:26 -0700 Subject: [PATCH 1/5] ref(*): Regenerates protobuf files with protoc 3.2.0 Protoc was updated a little while ago and we are likely to get more people using it. This should avoid weird merge conflicts and bump us to the latest version --- docs/developers.md | 2 +- pkg/proto/hapi/chart/chart.pb.go | 2 +- pkg/proto/hapi/chart/config.pb.go | 2 +- pkg/proto/hapi/chart/metadata.pb.go | 2 +- pkg/proto/hapi/chart/template.pb.go | 2 +- pkg/proto/hapi/release/hook.pb.go | 2 +- pkg/proto/hapi/release/info.pb.go | 2 +- pkg/proto/hapi/release/release.pb.go | 2 +- pkg/proto/hapi/release/status.pb.go | 2 +- pkg/proto/hapi/release/test_run.pb.go | 2 +- pkg/proto/hapi/release/test_suite.pb.go | 2 +- pkg/proto/hapi/services/tiller.pb.go | 2 +- pkg/proto/hapi/version/version.pb.go | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/developers.md b/docs/developers.md index 4594e0c89..ec17d2fa2 100644 --- a/docs/developers.md +++ b/docs/developers.md @@ -56,7 +56,7 @@ Helm and Tiller communicate using gRPC. To get started with gRPC, you will need - Run Helm's `make bootstrap` to generate the `protoc-gen-go` plugin and place it in `bin/`. -Note that you need to be on protobuf 3.x (`protoc --version`). The +Note that you need to be on protobuf 3.2.0 (`protoc --version`). The version of `protoc-gen-go` is tied to the version of gRPC used in Kubernetes. So the plugin is maintained locally. diff --git a/pkg/proto/hapi/chart/chart.pb.go b/pkg/proto/hapi/chart/chart.pb.go index c3afc3f44..dbb188e91 100644 --- a/pkg/proto/hapi/chart/chart.pb.go +++ b/pkg/proto/hapi/chart/chart.pb.go @@ -101,7 +101,7 @@ func init() { proto.RegisterFile("hapi/chart/chart.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ // 242 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x6c, 0x90, 0xb1, 0x4e, 0xc3, 0x30, + 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, diff --git a/pkg/proto/hapi/chart/config.pb.go b/pkg/proto/hapi/chart/config.pb.go index a7b61885a..73ab3ec47 100644 --- a/pkg/proto/hapi/chart/config.pb.go +++ b/pkg/proto/hapi/chart/config.pb.go @@ -50,7 +50,7 @@ func init() { proto.RegisterFile("hapi/chart/config.proto", fileDescriptor1) } var fileDescriptor1 = []byte{ // 182 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x12, 0xcf, 0x48, 0x2c, 0xc8, + 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, diff --git a/pkg/proto/hapi/chart/metadata.pb.go b/pkg/proto/hapi/chart/metadata.pb.go index f1ee5eb36..339ae9772 100644 --- a/pkg/proto/hapi/chart/metadata.pb.go +++ b/pkg/proto/hapi/chart/metadata.pb.go @@ -106,7 +106,7 @@ func init() { proto.RegisterFile("hapi/chart/metadata.proto", fileDescriptor2) } var fileDescriptor2 = []byte{ // 354 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x6c, 0x92, 0x5f, 0x4b, 0xe3, 0x40, + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0x5f, 0x4b, 0xe3, 0x40, 0x14, 0xc5, 0x37, 0x9b, 0xe6, 0xdf, 0xcd, 0x76, 0xb7, 0x0c, 0x4b, 0x99, 0x5d, 0x44, 0x42, 0xf1, 0x21, 0x4f, 0x29, 0x28, 0x88, 0xcf, 0x82, 0xf8, 0xa0, 0x6d, 0x25, 0xf8, 0x07, 0x7c, 0x1b, 0x93, 0x4b, 0x3b, 0xd8, 0xcc, 0x84, 0xc9, 0xa8, 0xf8, 0x7d, 0xfd, 0x20, 0x32, 0x93, 0xa4, 0x8d, 0xe0, diff --git a/pkg/proto/hapi/chart/template.pb.go b/pkg/proto/hapi/chart/template.pb.go index 2bed587b5..74ecc4292 100644 --- a/pkg/proto/hapi/chart/template.pb.go +++ b/pkg/proto/hapi/chart/template.pb.go @@ -37,7 +37,7 @@ func init() { proto.RegisterFile("hapi/chart/template.proto", fileDescriptor3) } var fileDescriptor3 = []byte{ // 107 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x92, 0xcc, 0x48, 0x2c, 0xc8, + 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, diff --git a/pkg/proto/hapi/release/hook.pb.go b/pkg/proto/hapi/release/hook.pb.go index 3a1391745..2fd8e5196 100644 --- a/pkg/proto/hapi/release/hook.pb.go +++ b/pkg/proto/hapi/release/hook.pb.go @@ -125,7 +125,7 @@ func init() { proto.RegisterFile("hapi/release/hook.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ // 371 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x64, 0x90, 0xdf, 0x8e, 0x93, 0x40, + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x90, 0xdf, 0x8e, 0x93, 0x40, 0x14, 0x87, 0x65, 0x5b, 0xa0, 0x3d, 0x5d, 0xd7, 0x71, 0x62, 0x74, 0xd2, 0x1b, 0xc9, 0x5e, 0x71, 0x35, 0x98, 0x35, 0x3e, 0x00, 0xdb, 0x1d, 0x75, 0xb3, 0x84, 0x36, 0x03, 0xc4, 0xc4, 0x1b, 0xc2, 0xc6, 0x69, 0x21, 0x2d, 0x0c, 0x29, 0x53, 0x7d, 0x33, 0x9f, 0xc4, 0x07, 0x32, 0x33, 0xfc, 0x89, diff --git a/pkg/proto/hapi/release/info.pb.go b/pkg/proto/hapi/release/info.pb.go index a73dcab2f..daa26d4c9 100644 --- a/pkg/proto/hapi/release/info.pb.go +++ b/pkg/proto/hapi/release/info.pb.go @@ -66,7 +66,7 @@ func init() { proto.RegisterFile("hapi/release/info.proto", fileDescriptor1) } var fileDescriptor1 = []byte{ // 235 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x84, 0x8f, 0x31, 0x4f, 0xc3, 0x30, + 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, diff --git a/pkg/proto/hapi/release/release.pb.go b/pkg/proto/hapi/release/release.pb.go index 72255e3e2..01f79fe29 100644 --- a/pkg/proto/hapi/release/release.pb.go +++ b/pkg/proto/hapi/release/release.pb.go @@ -78,7 +78,7 @@ func init() { proto.RegisterFile("hapi/release/release.proto", fileDescriptor2) var fileDescriptor2 = []byte{ // 256 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x64, 0x90, 0xbf, 0x4e, 0xc3, 0x40, + 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, diff --git a/pkg/proto/hapi/release/status.pb.go b/pkg/proto/hapi/release/status.pb.go index 29144b7ca..65672a0cf 100644 --- a/pkg/proto/hapi/release/status.pb.go +++ b/pkg/proto/hapi/release/status.pb.go @@ -85,7 +85,7 @@ func init() { proto.RegisterFile("hapi/release/status.proto", fileDescriptor3) } var fileDescriptor3 = []byte{ // 291 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x54, 0x90, 0xdf, 0x6a, 0xc2, 0x30, + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x90, 0xdf, 0x6a, 0xc2, 0x30, 0x14, 0xc6, 0x57, 0xad, 0x3a, 0x8f, 0x22, 0x21, 0x1b, 0xac, 0xca, 0x06, 0xc5, 0xab, 0xde, 0xac, 0x05, 0xf7, 0x04, 0xdb, 0x12, 0x87, 0xac, 0x54, 0x69, 0x2b, 0xfb, 0x73, 0x53, 0xaa, 0x9e, 0x39, 0xa1, 0x34, 0xd2, 0x24, 0x17, 0x7b, 0x88, 0xbd, 0xf3, 0x68, 0x2b, 0x74, 0x5e, 0x7e, 0xf9, 0xfd, diff --git a/pkg/proto/hapi/release/test_run.pb.go b/pkg/proto/hapi/release/test_run.pb.go index 51b3e72f9..46bdf81fc 100644 --- a/pkg/proto/hapi/release/test_run.pb.go +++ b/pkg/proto/hapi/release/test_run.pb.go @@ -74,7 +74,7 @@ func init() { proto.RegisterFile("hapi/release/test_run.proto", fileDescriptor4) var fileDescriptor4 = []byte{ // 265 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x84, 0x8f, 0x41, 0x4b, 0xfb, 0x40, + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x8f, 0x41, 0x4b, 0xfb, 0x40, 0x14, 0xc4, 0xff, 0xc9, 0xbf, 0x26, 0x64, 0x53, 0x24, 0xec, 0x29, 0x54, 0xc1, 0xd0, 0x53, 0x4e, 0xbb, 0x50, 0xbd, 0x78, 0xf0, 0x10, 0x4b, 0x05, 0x51, 0x22, 0x6c, 0x1a, 0x04, 0x2f, 0x65, 0xab, 0xaf, 0x35, 0x90, 0x64, 0x43, 0xf6, 0xe5, 0x8b, 0xf8, 0x89, 0x65, 0x93, 0xad, 0x78, 0xf3, 0xf6, diff --git a/pkg/proto/hapi/release/test_suite.pb.go b/pkg/proto/hapi/release/test_suite.pb.go index 27fe45ac5..f168bf1d2 100644 --- a/pkg/proto/hapi/release/test_suite.pb.go +++ b/pkg/proto/hapi/release/test_suite.pb.go @@ -58,7 +58,7 @@ func init() { proto.RegisterFile("hapi/release/test_suite.proto", fileDescriptor var fileDescriptor5 = []byte{ // 207 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x84, 0x8f, 0xc1, 0x4a, 0x86, 0x40, + 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, diff --git a/pkg/proto/hapi/services/tiller.pb.go b/pkg/proto/hapi/services/tiller.pb.go index 8d2873741..89983e5bc 100644 --- a/pkg/proto/hapi/services/tiller.pb.go +++ b/pkg/proto/hapi/services/tiller.pb.go @@ -1000,7 +1000,7 @@ func init() { proto.RegisterFile("hapi/services/tiller.proto", fileDescriptor0) var fileDescriptor0 = []byte{ // 1170 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x9c, 0x57, 0xdb, 0x6e, 0xe3, 0x44, + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0xdb, 0x6e, 0xe3, 0x44, 0x18, 0xae, 0xe3, 0x1c, 0xff, 0x1e, 0x48, 0xa7, 0x27, 0xd7, 0x02, 0x54, 0x8c, 0xa0, 0xd9, 0x85, 0x4d, 0x21, 0x5c, 0x21, 0x21, 0xa4, 0x6e, 0x37, 0x6a, 0x0b, 0xa5, 0x2b, 0x39, 0xdb, 0x45, 0x42, 0x88, 0xc8, 0x4d, 0x26, 0xad, 0x59, 0xc7, 0x13, 0x3c, 0xe3, 0xb2, 0xbd, 0xe5, 0x8e, 0x47, 0xe1, diff --git a/pkg/proto/hapi/version/version.pb.go b/pkg/proto/hapi/version/version.pb.go index 79771408e..adbee1a33 100644 --- a/pkg/proto/hapi/version/version.pb.go +++ b/pkg/proto/hapi/version/version.pb.go @@ -48,7 +48,7 @@ func init() { proto.RegisterFile("hapi/version/version.proto", fileDescriptor0) var fileDescriptor0 = []byte{ // 151 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x92, 0xca, 0x48, 0x2c, 0xc8, + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xca, 0x48, 0x2c, 0xc8, 0xd4, 0x2f, 0x4b, 0x2d, 0x2a, 0xce, 0xcc, 0xcf, 0x83, 0xd1, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0x3c, 0x20, 0x39, 0x3d, 0xa8, 0x98, 0x52, 0x3a, 0x17, 0x7b, 0x18, 0x84, 0x29, 0x24, 0xce, 0xc5, 0x5e, 0x9c, 0x9a, 0x1b, 0x5f, 0x96, 0x5a, 0x24, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x19, 0xc4, From 50eee8364655b7240108f4af2fb4e835c1ddfb2d Mon Sep 17 00:00:00 2001 From: Adam Reese Date: Wed, 19 Apr 2017 23:55:36 -0700 Subject: [PATCH 2/5] ref(helm): use new debug method to standardize debug output --- cmd/helm/dependency_update.go | 2 +- cmd/helm/helm.go | 11 ++++------- cmd/helm/home.go | 2 +- cmd/helm/init.go | 2 +- cmd/helm/init_test.go | 6 +++--- cmd/helm/install.go | 14 +++++--------- cmd/helm/package.go | 15 +++++---------- cmd/helm/plugin_install.go | 2 +- cmd/helm/plugin_test.go | 4 ++-- cmd/helm/printer.go | 2 +- cmd/helm/upgrade.go | 2 +- cmd/helm/version.go | 5 +---- pkg/helm/environment/environment.go | 2 +- pkg/plugin/plugin.go | 2 +- 14 files changed, 28 insertions(+), 43 deletions(-) diff --git a/cmd/helm/dependency_update.go b/cmd/helm/dependency_update.go index bd2183cff..1838acb0a 100644 --- a/cmd/helm/dependency_update.go +++ b/cmd/helm/dependency_update.go @@ -100,7 +100,7 @@ func (d *dependencyUpdateCmd) run() error { if d.verify { man.Verify = downloader.VerifyIfPossible } - if settings.FlagDebug { + if settings.Debug { man.Debug = true } return man.Update() diff --git a/cmd/helm/helm.go b/cmd/helm/helm.go index 113cf6b14..ced336ac4 100644 --- a/cmd/helm/helm.go +++ b/cmd/helm/helm.go @@ -105,7 +105,7 @@ func newRootCmd(out io.Writer) *cobra.Command { settings.Home = helmpath.Home(helmHomeTemp) p.StringVar(&settings.TillerHost, "host", helm_env.DefaultHelmHost(), "address of tiller. Overrides $HELM_HOST") p.StringVar(&kubeContext, "kube-context", "", "name of the kubeconfig context to use") - p.BoolVar(&settings.FlagDebug, "debug", false, "enable verbose output") + p.BoolVar(&settings.Debug, "debug", false, "enable verbose output") p.StringVar(&settings.TillerNamespace, "tiller-namespace", tiller_env.GetTillerNamespace(), "namespace of tiller") if os.Getenv(helm_env.PluginDisableEnvVar) != "1" { @@ -190,15 +190,12 @@ func setupConnection(c *cobra.Command, args []string) error { } settings.TillerHost = fmt.Sprintf("localhost:%d", tunnel.Local) - if settings.FlagDebug { - fmt.Printf("Created tunnel using local port: '%d'\n", tunnel.Local) - } + debug("Created tunnel using local port: '%d'\n", tunnel.Local) } // Set up the gRPC config. - if settings.FlagDebug { - fmt.Printf("SERVER: %q\n", settings.TillerHost) - } + debug("SERVER: %q\n", settings.TillerHost) + // Plugin support. return nil } diff --git a/cmd/helm/home.go b/cmd/helm/home.go index 6f2647db0..25809b521 100644 --- a/cmd/helm/home.go +++ b/cmd/helm/home.go @@ -36,7 +36,7 @@ func newHomeCmd(out io.Writer) *cobra.Command { Run: func(cmd *cobra.Command, args []string) { h := settings.Home fmt.Fprintf(out, "%s\n", h) - if settings.FlagDebug { + if settings.Debug { fmt.Fprintf(out, "Repository: %s\n", h.Repository()) fmt.Fprintf(out, "RepositoryFile: %s\n", h.RepositoryFile()) fmt.Fprintf(out, "Cache: %s\n", h.Cache()) diff --git a/cmd/helm/init.go b/cmd/helm/init.go index f08dc1ed5..a2bec7a65 100644 --- a/cmd/helm/init.go +++ b/cmd/helm/init.go @@ -155,7 +155,7 @@ func (i *initCmd) run() error { i.opts.UseCanary = i.canary i.opts.ImageSpec = i.image - if settings.FlagDebug { + if settings.Debug { writeYAMLManifest := func(apiVersion, kind, body string, first, last bool) error { w := i.out if !first { diff --git a/cmd/helm/init_test.go b/cmd/helm/init_test.go index 03fc844f0..4d82c297b 100644 --- a/cmd/helm/init_test.go +++ b/cmd/helm/init_test.go @@ -140,11 +140,11 @@ func TestInitCmd_dryRun(t *testing.T) { if err != nil { t.Fatal(err) } - dbg := settings.FlagDebug - settings.FlagDebug = true + dbg := settings.Debug + settings.Debug = true defer func() { os.Remove(home) - settings.FlagDebug = dbg + settings.Debug = dbg }() var buf bytes.Buffer diff --git a/cmd/helm/install.go b/cmd/helm/install.go index d119802f8..d01ee514a 100644 --- a/cmd/helm/install.go +++ b/cmd/helm/install.go @@ -178,9 +178,7 @@ func newInstallCmd(c helm.Interface, out io.Writer) *cobra.Command { } func (i *installCmd) run() error { - if settings.FlagDebug { - fmt.Fprintf(i.out, "CHART PATH: %s\n", i.chartPath) - } + debug("CHART PATH: %s\n", i.chartPath) if i.namespace == "" { i.namespace = defaultNamespace() @@ -305,14 +303,14 @@ func (i *installCmd) vals() ([]byte, error) { return yaml.Marshal(base) } -// printRelease prints info about a release if the flagDebug is true. +// printRelease prints info about a release if the Debug is true. func (i *installCmd) printRelease(rel *release.Release) { if rel == nil { return } // TODO: Switch to text/template like everything else. fmt.Fprintf(i.out, "NAME: %s\n", rel.Name) - if settings.FlagDebug { + if settings.Debug { printRelease(i.out, rel) } } @@ -371,11 +369,9 @@ func locateChartPath(name, version string, verify bool, keyring string) (string, if err != nil { return filename, err } - if settings.FlagDebug { - fmt.Printf("Fetched %s to %s\n", name, filename) - } + debug("Fetched %s to %s\n", name, filename) return lname, nil - } else if settings.FlagDebug { + } else if settings.Debug { return filename, err } diff --git a/cmd/helm/package.go b/cmd/helm/package.go index 89ec2b18e..a2da2c338 100644 --- a/cmd/helm/package.go +++ b/cmd/helm/package.go @@ -119,9 +119,7 @@ func (p *packageCmd) run(cmd *cobra.Command, args []string) error { if err := setVersion(ch, p.version); err != nil { return err } - if settings.FlagDebug { - fmt.Fprintf(p.out, "Setting version to %s", p.version) - } + debug("Setting version to %s", p.version) } if filepath.Base(path) != ch.Metadata.Name { @@ -145,8 +143,8 @@ func (p *packageCmd) run(cmd *cobra.Command, args []string) error { } name, err := chartutil.Save(ch, dest) - if err == nil && settings.FlagDebug { - fmt.Fprintf(p.out, "Saved %s to current directory\n", name) + if err == nil { + debug("Saved %s to current directory\n", name) } // Save to $HELM_HOME/local directory. This is second, because we don't want @@ -155,9 +153,8 @@ func (p *packageCmd) run(cmd *cobra.Command, args []string) error { lr := p.home.LocalRepository() if err := repo.AddChartToLocalRepo(ch, lr); err != nil { return err - } else if settings.FlagDebug { - fmt.Fprintf(p.out, "Saved %s to %s\n", name, lr) } + debug("Saved %s to %s\n", name, lr) } if p.sign { @@ -194,9 +191,7 @@ func (p *packageCmd) clearsign(filename string) error { return err } - if settings.FlagDebug { - fmt.Fprintln(p.out, sig) - } + debug(sig) return ioutil.WriteFile(filename+".prov", []byte(sig), 0755) } diff --git a/cmd/helm/plugin_install.go b/cmd/helm/plugin_install.go index e56c3b229..7ab4d21fa 100644 --- a/cmd/helm/plugin_install.go +++ b/cmd/helm/plugin_install.go @@ -59,7 +59,7 @@ func (pcmd *pluginInstallCmd) complete(args []string) error { } func (pcmd *pluginInstallCmd) run() error { - installer.Debug = settings.FlagDebug + installer.Debug = settings.Debug i, err := installer.NewForSource(pcmd.source, pcmd.version, pcmd.home) if err != nil { diff --git a/cmd/helm/plugin_test.go b/cmd/helm/plugin_test.go index cd0e3da74..095de7063 100644 --- a/cmd/helm/plugin_test.go +++ b/cmd/helm/plugin_test.go @@ -162,9 +162,9 @@ func TestSetupEnv(t *testing.T) { settings.Home = helmpath.Home("testdata/helmhome") base := filepath.Join(settings.Home.Plugins(), name) settings.PlugDirs = settings.Home.Plugins() - settings.FlagDebug = true + settings.Debug = true defer func() { - settings.FlagDebug = false + settings.Debug = false }() plugin.SetupPluginEnv(settings, name, base) diff --git a/cmd/helm/printer.go b/cmd/helm/printer.go index a8b04dfda..ebb24bf7d 100644 --- a/cmd/helm/printer.go +++ b/cmd/helm/printer.go @@ -75,7 +75,7 @@ func tpl(t string, vals map[string]interface{}, out io.Writer) error { } func debug(format string, args ...interface{}) { - if settings.FlagDebug { + if settings.Debug { format = fmt.Sprintf("[debug] %s\n", format) fmt.Printf(format, args...) } diff --git a/cmd/helm/upgrade.go b/cmd/helm/upgrade.go index bc4dc2971..ea8d667a1 100644 --- a/cmd/helm/upgrade.go +++ b/cmd/helm/upgrade.go @@ -185,7 +185,7 @@ func (u *upgradeCmd) run() error { return fmt.Errorf("UPGRADE FAILED: %v", prettyError(err)) } - if settings.FlagDebug { + if settings.Debug { printRelease(u.out, resp.Release) } diff --git a/cmd/helm/version.go b/cmd/helm/version.go index bba79a8c1..64c66b348 100644 --- a/cmd/helm/version.go +++ b/cmd/helm/version.go @@ -20,7 +20,6 @@ import ( "errors" "fmt" "io" - "os" "github.com/spf13/cobra" "google.golang.org/grpc" @@ -105,9 +104,7 @@ func (v *versionCmd) run() error { if grpc.Code(err) == codes.Unimplemented { return errors.New("server is too old to know its version") } - if settings.FlagDebug { - fmt.Fprintln(os.Stderr, err) - } + debug("%s", err) return errors.New("cannot connect to Tiller") } fmt.Fprintf(v.out, "Server: %s\n", formatVersion(resp.Version, v.short)) diff --git a/pkg/helm/environment/environment.go b/pkg/helm/environment/environment.go index 6a24a624c..22fb43ae7 100644 --- a/pkg/helm/environment/environment.go +++ b/pkg/helm/environment/environment.go @@ -52,5 +52,5 @@ type EnvSettings struct { TillerNamespace string Home helmpath.Home PlugDirs string - FlagDebug bool + Debug bool } diff --git a/pkg/plugin/plugin.go b/pkg/plugin/plugin.go index 6bcb5a186..8bde6ad24 100644 --- a/pkg/plugin/plugin.go +++ b/pkg/plugin/plugin.go @@ -195,7 +195,7 @@ func SetupPluginEnv(settings helm_env.EnvSettings, os.Setenv(key, val) } - if settings.FlagDebug { + if settings.Debug { os.Setenv("HELM_DEBUG", "1") } } From 4fb7deb023df7af6a25390f972099bd534fdd157 Mon Sep 17 00:00:00 2001 From: spiddy Date: Thu, 20 Apr 2017 10:10:11 +0200 Subject: [PATCH 3/5] Added reference to plugins --- docs/plugins.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/plugins.md b/docs/plugins.md index 99f150874..72e78c25e 100644 --- a/docs/plugins.md +++ b/docs/plugins.md @@ -4,6 +4,8 @@ Helm 2.1.0 introduced the concept of a client-side Helm _plugin_. A plugin is a tool that can be accessed through the `helm` CLI, but which is not part of the built-in Helm codebase. +Existing plugins can be found on [related](related.md#helm-plugins) section or by searching [Github](https://github.com/search?q=topic%3Ahelm-plugin&type=Repositories). + This guide explains how to use and create plugins. ## An Overview @@ -170,4 +172,3 @@ these flags are _not_ passed on to the plugin. Plugins _should_ display help text and then exit for `-h` and `--help`. In all other cases, plugins may use flags as appropriate. - From 2540836133fbeadbaf312dc7f5b086bf4fec3a6f Mon Sep 17 00:00:00 2001 From: Adam Reese Date: Thu, 20 Apr 2017 01:37:18 -0700 Subject: [PATCH 4/5] chore(*): bump kubernetes to v1.6.2 --- glide.lock | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/glide.lock b/glide.lock index d6a3094b8..77abc9aa6 100644 --- a/glide.lock +++ b/glide.lock @@ -1,5 +1,5 @@ hash: 59f320c07649cfd057b84f1044074670230fa3ca27b32632eb77a16a972adc8e -updated: 2017-04-13T09:30:07.067775284+06:00 +updated: 2017-04-20T01:34:59.645884965-07:00 imports: - name: bitbucket.org/ww/goautoneg version: 75cd24fc2f2c2a2088577d12123ddee5f54e0675 @@ -309,7 +309,7 @@ imports: - name: gopkg.in/yaml.v2 version: a83829b6f1293c91addabc89d0571c246397bbf4 - name: k8s.io/apimachinery - version: c1c4a7fe832857c75cc1d79c8e40d71d5da15fc6 + version: fbd6803372f831e58b86c78d07421637a64ad768 subpackages: - pkg/api/equality - pkg/api/errors @@ -398,6 +398,7 @@ imports: - kubernetes/typed/storage/v1 - kubernetes/typed/storage/v1beta1 - pkg/api + - pkg/api/helper - pkg/api/install - pkg/api/v1 - pkg/apis/apps @@ -467,7 +468,7 @@ imports: - util/integer - util/jsonpath - name: k8s.io/kubernetes - version: aaf9ea07f519a2c3f4769dc8d10b807ad1a8d279 + version: 477efc3cbe6a7effca06bd1452fa356e2201e1ee subpackages: - federation/apis/federation - federation/apis/federation/install From dfbdd4c5eaf5a87a58d0a03506e63937589924e2 Mon Sep 17 00:00:00 2001 From: Michelle Noorali Date: Thu, 20 Apr 2017 12:54:06 -0400 Subject: [PATCH 5/5] chore(README.md): update zoom meeting link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bbb18d69f..2c35deae0 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ You can reach the Helm community and developers via the following channels: - [Kubernetes Slack](https://slack.k8s.io): #helm - Mailing List: https://groups.google.com/forum/#!forum/kubernetes-sig-apps -- Developer Call: Thursdays at 9:30-10:00 Pacific. https://engineyard.zoom.us/j/366425549 +- Developer Call: Thursdays at 9:30-10:00 Pacific. [https://zoom.us/j/4526666954](https://zoom.us/j/4526666954) ### Code of conduct