From 03e00ec6456b0b07571aa81b91b2646f91ac0531 Mon Sep 17 00:00:00 2001 From: John Welsh Date: Thu, 20 Apr 2017 16:40:32 -0700 Subject: [PATCH 01/14] Made changes to protobuf, edited client to stream logs --- _proto/hapi/services/tiller.proto | 20 +- cmd/helm/install.go | 19 ++ pkg/helm/client.go | 45 ++++ pkg/helm/interface.go | 1 + 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 | 32 +-- 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 | 275 ++++++++++++++++-------- pkg/proto/hapi/version/version.pb.go | 2 +- 16 files changed, 294 insertions(+), 118 deletions(-) diff --git a/_proto/hapi/services/tiller.proto b/_proto/hapi/services/tiller.proto index f16d68238..068763511 100644 --- a/_proto/hapi/services/tiller.proto +++ b/_proto/hapi/services/tiller.proto @@ -55,7 +55,11 @@ service ReleaseService { rpc GetReleaseContent(GetReleaseContentRequest) returns (GetReleaseContentResponse) { } - // UpdateRelease updates release content. + // GetReleaseLogs returns a stream of logging information from the release + rpc GetReleaseLogs(GetReleaseLogsRequest) returns (stream GetReleaseLogsResponse) { + } + + // UpdateRelease updates release content. rpc UpdateRelease(UpdateReleaseRequest) returns (UpdateReleaseResponse) { } @@ -182,6 +186,20 @@ message GetReleaseContentResponse { hapi.release.Release release = 1; } +message GetReleaseLogsRequest { + // Name is the name of the release + string name = 1; + // Version is the version of the release + int32 version = 2; +} + +message GetReleaseLogsResponse { + // Source is the name of the release that generated the log + string source = 1; + // Log is a single log line + string log = 2; +} + // UpdateReleaseRequest updates a release. message UpdateReleaseRequest { // The name of the release diff --git a/cmd/helm/install.go b/cmd/helm/install.go index d119802f8..4d451d6d3 100644 --- a/cmd/helm/install.go +++ b/cmd/helm/install.go @@ -177,6 +177,23 @@ func newInstallCmd(c helm.Interface, out io.Writer) *cobra.Command { return cmd } +func streamLogs(client helm.Interface, rlsName string, done <-chan struct{}) error { + logs, err := client.ReleaseLogs(rlsName, done) + if err != nil { + return err + } + + go func() { + select { + case log := <-logs: + fmt.Println(log.Log) + case <-done: + return + } + }() + return nil +} + func (i *installCmd) run() error { if settings.FlagDebug { fmt.Fprintf(i.out, "CHART PATH: %s\n", i.chartPath) @@ -211,6 +228,8 @@ func (i *installCmd) run() error { checkDependencies(chartRequested, req, i.out) } + done := make(chan struct{}) + streamLogs(i.client, i.name, done) res, err := i.client.InstallReleaseFromChart( chartRequested, i.namespace, diff --git a/pkg/helm/client.go b/pkg/helm/client.go index 5b12047c8..0fe071b79 100644 --- a/pkg/helm/client.go +++ b/pkg/helm/client.go @@ -27,6 +27,7 @@ import ( "k8s.io/helm/pkg/chartutil" "k8s.io/helm/pkg/proto/hapi/chart" rls "k8s.io/helm/pkg/proto/hapi/services" + "fmt" ) // Client manages client side of the helm-tiller protocol @@ -215,6 +216,14 @@ func (h *Client) RollbackRelease(rlsName string, opts ...RollbackOption) (*rls.R return h.rollback(ctx, req) } +// ReleaseLogs returns a channel streaming log data from the release +func (h *Client) ReleaseLogs(rlsName string, done <-chan struct{}) (<-chan *rls.GetReleaseLogsResponse, error) { + ctx := NewContext() + req := &rls.GetReleaseLogsRequest{Name: rlsName} + + return h.logs(ctx, req, done) +} + // ReleaseStatus returns the given release's status. func (h *Client) ReleaseStatus(rlsName string, opts ...StatusOption) (*rls.GetReleaseStatusResponse, error) { for _, opt := range opts { @@ -376,6 +385,42 @@ func (h *Client) status(ctx context.Context, req *rls.GetReleaseStatusRequest) ( return rlc.GetReleaseStatus(ctx, req) } +// Executes tiller.GetReleaseLogs RPC. +func (h *Client) logs(ctx context.Context, req *rls.GetReleaseLogsRequest, done <-chan struct{}) (<-chan *rls.GetReleaseLogsResponse, error) { + c, err := h.connect(ctx) + if err != nil { + return nil, err + } + + rlc := rls.NewReleaseServiceClient(c) + s, err := rlc.GetReleaseLogs(ctx, req) + if err != nil { + return nil, err + } + + out := make(chan *rls.GetReleaseLogsResponse) + + go func() { + defer close(out) + defer c.Close() + select { + case rs := s.Recv(): + if err == io.EOF { + return + } + if err != nil { + fmt.Println("gRPC error streaming logs: ", grpc.ErrorDesc(err)) + return + } + out <- rs + case <-done: + return + } + }() + + return out, nil +} + // Executes tiller.GetReleaseContent RPC. func (h *Client) content(ctx context.Context, req *rls.GetReleaseContentRequest) (*rls.GetReleaseContentResponse, error) { c, err := h.connect(ctx) diff --git a/pkg/helm/interface.go b/pkg/helm/interface.go index bff110b34..2320c18f1 100644 --- a/pkg/helm/interface.go +++ b/pkg/helm/interface.go @@ -28,6 +28,7 @@ type Interface interface { InstallReleaseFromChart(chart *chart.Chart, namespace string, opts ...InstallOption) (*rls.InstallReleaseResponse, error) DeleteRelease(rlsName string, opts ...DeleteOption) (*rls.UninstallReleaseResponse, error) ReleaseStatus(rlsName string, opts ...StatusOption) (*rls.GetReleaseStatusResponse, error) + ReleaseLogs(rlsName string, done <-chan struct{}) (<-chan *rls.GetReleaseLogsResponse, error) UpdateRelease(rlsName, chStr string, opts ...UpdateOption) (*rls.UpdateReleaseResponse, error) UpdateReleaseFromChart(rlsName string, chart *chart.Chart, opts ...UpdateOption) (*rls.UpdateReleaseResponse, error) RollbackRelease(rlsName string, opts ...RollbackOption) (*rls.RollbackReleaseResponse, error) 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..37886303d 100644 --- a/pkg/proto/hapi/release/info.pb.go +++ b/pkg/proto/hapi/release/info.pb.go @@ -22,7 +22,7 @@ type Info struct { // 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"` + Description string `protobuf:"bytes,5,opt,name=Description,json=description" json:"Description,omitempty"` } func (m *Info) Reset() { *m = Info{} } @@ -65,20 +65,20 @@ func init() { 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, - 0x10, 0x85, 0x95, 0x52, 0x5a, 0xd5, 0x6d, 0x19, 0x2c, 0x24, 0x42, 0x16, 0x22, 0xa6, 0x0e, 0xc8, + // 236 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, 0x69, 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, - 0xf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f, 0x51, 0x38, 0x8f, 0x84, + 0x7c, 0xbe, 0x07, 0x22, 0x83, 0xfa, 0x6a, 0x83, 0xb8, 0xb1, 0xd0, 0x46, 0xb6, 0xde, 0xe9, 0x96, + 0xcc, 0x16, 0x02, 0xc9, 0xad, 0x4b, 0xf1, 0xfa, 0xf2, 0x9f, 0x27, 0x90, 0xa4, 0x5d, 0x48, 0xe8, + 0xfa, 0x7b, 0xc4, 0xc6, 0xcf, 0xbd, 0x46, 0x7e, 0xc3, 0x26, 0x09, 0x54, 0x45, 0x53, 0x2c, 0xcb, + 0xdb, 0x73, 0x71, 0xf8, 0x87, 0x78, 0x89, 0xac, 0xcb, 0x19, 0xfe, 0xc8, 0xce, 0xb4, 0xf1, 0x81, + 0xde, 0x15, 0x38, 0x8b, 0x5f, 0xa0, 0xaa, 0x51, 0x6c, 0xd5, 0x22, 0x6d, 0x11, 0xc3, 0x16, 0xf1, + 0x3a, 0x6c, 0xe9, 0x16, 0xb1, 0xb1, 0xca, 0x05, 0xfe, 0xc0, 0x16, 0x56, 0x1e, 0x1a, 0x4e, 0x8e, + 0x1a, 0xe6, 0xfb, 0xc2, 0xaf, 0xe0, 0x9e, 0x4d, 0x15, 0x58, 0x20, 0x50, 0xd5, 0xf8, 0x68, 0x75, + 0x88, 0xf2, 0x86, 0x95, 0x2b, 0x08, 0x1f, 0xde, 0x38, 0x32, 0xd8, 0x57, 0xa7, 0x4d, 0xb1, 0x9c, + 0x75, 0xa5, 0xfa, 0x7b, 0x7a, 0x9a, 0xbd, 0x4d, 0xf3, 0xd5, 0xeb, 0x49, 0x34, 0xdd, 0xfd, 0x04, + 0x00, 0x00, 0xff, 0xff, 0x1e, 0x2a, 0x57, 0x7d, 0x89, 0x01, 0x00, 0x00, } 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..1706750fa 100644 --- a/pkg/proto/hapi/services/tiller.pb.go +++ b/pkg/proto/hapi/services/tiller.pb.go @@ -16,6 +16,8 @@ It has these top-level messages: GetReleaseStatusResponse GetReleaseContentRequest GetReleaseContentResponse + GetReleaseLogsRequest + GetReleaseLogsResponse UpdateReleaseRequest UpdateReleaseResponse RollbackReleaseRequest @@ -238,6 +240,30 @@ func (m *GetReleaseContentResponse) GetRelease() *hapi_release5.Release { return nil } +type GetReleaseLogsRequest 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 *GetReleaseLogsRequest) Reset() { *m = GetReleaseLogsRequest{} } +func (m *GetReleaseLogsRequest) String() string { return proto.CompactTextString(m) } +func (*GetReleaseLogsRequest) ProtoMessage() {} +func (*GetReleaseLogsRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } + +type GetReleaseLogsResponse struct { + // Source is the name of the release that generated the log + Source string `protobuf:"bytes,1,opt,name=source" json:"source,omitempty"` + // Log is a single log line + Log string `protobuf:"bytes,2,opt,name=log" json:"log,omitempty"` +} + +func (m *GetReleaseLogsResponse) Reset() { *m = GetReleaseLogsResponse{} } +func (m *GetReleaseLogsResponse) String() string { return proto.CompactTextString(m) } +func (*GetReleaseLogsResponse) ProtoMessage() {} +func (*GetReleaseLogsResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} } + // UpdateReleaseRequest updates a release. type UpdateReleaseRequest struct { // The name of the release @@ -267,7 +293,7 @@ type UpdateReleaseRequest struct { 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{7} } +func (*UpdateReleaseRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} } func (m *UpdateReleaseRequest) GetChart() *hapi_chart3.Chart { if m != nil { @@ -291,7 +317,7 @@ type UpdateReleaseResponse struct { func (m *UpdateReleaseResponse) Reset() { *m = UpdateReleaseResponse{} } func (m *UpdateReleaseResponse) String() string { return proto.CompactTextString(m) } func (*UpdateReleaseResponse) ProtoMessage() {} -func (*UpdateReleaseResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} } +func (*UpdateReleaseResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} } func (m *UpdateReleaseResponse) GetRelease() *hapi_release5.Release { if m != nil { @@ -321,7 +347,7 @@ type RollbackReleaseRequest struct { 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{9} } +func (*RollbackReleaseRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} } // RollbackReleaseResponse is the response to an update request. type RollbackReleaseResponse struct { @@ -331,7 +357,7 @@ type RollbackReleaseResponse struct { func (m *RollbackReleaseResponse) Reset() { *m = RollbackReleaseResponse{} } func (m *RollbackReleaseResponse) String() string { return proto.CompactTextString(m) } func (*RollbackReleaseResponse) ProtoMessage() {} -func (*RollbackReleaseResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} } +func (*RollbackReleaseResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} } func (m *RollbackReleaseResponse) GetRelease() *hapi_release5.Release { if m != nil { @@ -370,7 +396,7 @@ type InstallReleaseRequest struct { 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{11} } +func (*InstallReleaseRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} } func (m *InstallReleaseRequest) GetChart() *hapi_chart3.Chart { if m != nil { @@ -394,7 +420,7 @@ type InstallReleaseResponse struct { func (m *InstallReleaseResponse) Reset() { *m = InstallReleaseResponse{} } func (m *InstallReleaseResponse) String() string { return proto.CompactTextString(m) } func (*InstallReleaseResponse) ProtoMessage() {} -func (*InstallReleaseResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} } +func (*InstallReleaseResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} } func (m *InstallReleaseResponse) GetRelease() *hapi_release5.Release { if m != nil { @@ -418,7 +444,7 @@ type UninstallReleaseRequest struct { 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{13} } +func (*UninstallReleaseRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} } // UninstallReleaseResponse represents a successful response to an uninstall request. type UninstallReleaseResponse struct { @@ -431,7 +457,7 @@ type UninstallReleaseResponse struct { 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{14} } +func (*UninstallReleaseResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16} } func (m *UninstallReleaseResponse) GetRelease() *hapi_release5.Release { if m != nil { @@ -447,16 +473,16 @@ type GetVersionRequest struct { func (m *GetVersionRequest) Reset() { *m = GetVersionRequest{} } func (m *GetVersionRequest) String() string { return proto.CompactTextString(m) } func (*GetVersionRequest) ProtoMessage() {} -func (*GetVersionRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} } +func (*GetVersionRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{17} } type GetVersionResponse struct { - Version *hapi_version.Version `protobuf:"bytes,1,opt,name=Version" json:"Version,omitempty"` + Version *hapi_version.Version `protobuf:"bytes,1,opt,name=Version,json=version" json:"Version,omitempty"` } func (m *GetVersionResponse) Reset() { *m = GetVersionResponse{} } func (m *GetVersionResponse) String() string { return proto.CompactTextString(m) } func (*GetVersionResponse) ProtoMessage() {} -func (*GetVersionResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16} } +func (*GetVersionResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{18} } func (m *GetVersionResponse) GetVersion() *hapi_version.Version { if m != nil { @@ -476,7 +502,7 @@ type GetHistoryRequest struct { 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{17} } +func (*GetHistoryRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{19} } // GetHistoryResponse is received in response to a GetHistory rpc. type GetHistoryResponse struct { @@ -486,7 +512,7 @@ type GetHistoryResponse struct { func (m *GetHistoryResponse) Reset() { *m = GetHistoryResponse{} } func (m *GetHistoryResponse) String() string { return proto.CompactTextString(m) } func (*GetHistoryResponse) ProtoMessage() {} -func (*GetHistoryResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{18} } +func (*GetHistoryResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{20} } func (m *GetHistoryResponse) GetReleases() []*hapi_release5.Release { if m != nil { @@ -508,7 +534,7 @@ type TestReleaseRequest struct { 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{19} } +func (*TestReleaseRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{21} } // TestReleaseResponse represents a message from executing a test type TestReleaseResponse struct { @@ -518,7 +544,7 @@ type TestReleaseResponse struct { 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{20} } +func (*TestReleaseResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{22} } func init() { proto.RegisterType((*ListReleasesRequest)(nil), "hapi.services.tiller.ListReleasesRequest") @@ -528,6 +554,8 @@ func init() { proto.RegisterType((*GetReleaseStatusResponse)(nil), "hapi.services.tiller.GetReleaseStatusResponse") proto.RegisterType((*GetReleaseContentRequest)(nil), "hapi.services.tiller.GetReleaseContentRequest") proto.RegisterType((*GetReleaseContentResponse)(nil), "hapi.services.tiller.GetReleaseContentResponse") + proto.RegisterType((*GetReleaseLogsRequest)(nil), "hapi.services.tiller.GetReleaseLogsRequest") + proto.RegisterType((*GetReleaseLogsResponse)(nil), "hapi.services.tiller.GetReleaseLogsResponse") proto.RegisterType((*UpdateReleaseRequest)(nil), "hapi.services.tiller.UpdateReleaseRequest") proto.RegisterType((*UpdateReleaseResponse)(nil), "hapi.services.tiller.UpdateReleaseResponse") proto.RegisterType((*RollbackReleaseRequest)(nil), "hapi.services.tiller.RollbackReleaseRequest") @@ -566,6 +594,8 @@ type ReleaseServiceClient interface { GetReleaseStatus(ctx context.Context, in *GetReleaseStatusRequest, opts ...grpc.CallOption) (*GetReleaseStatusResponse, error) // GetReleaseContent retrieves the release content (chart + value) for the specified release. GetReleaseContent(ctx context.Context, in *GetReleaseContentRequest, opts ...grpc.CallOption) (*GetReleaseContentResponse, error) + // GetReleaseLogs returns a stream of logging information from the release + GetReleaseLogs(ctx context.Context, in *GetReleaseLogsRequest, opts ...grpc.CallOption) (ReleaseService_GetReleaseLogsClient, error) // UpdateRelease updates release content. UpdateRelease(ctx context.Context, in *UpdateReleaseRequest, opts ...grpc.CallOption) (*UpdateReleaseResponse, error) // InstallRelease requests installation of a chart as a new release. @@ -640,6 +670,38 @@ func (c *releaseServiceClient) GetReleaseContent(ctx context.Context, in *GetRel return out, nil } +func (c *releaseServiceClient) GetReleaseLogs(ctx context.Context, in *GetReleaseLogsRequest, opts ...grpc.CallOption) (ReleaseService_GetReleaseLogsClient, error) { + stream, err := grpc.NewClientStream(ctx, &_ReleaseService_serviceDesc.Streams[1], c.cc, "/hapi.services.tiller.ReleaseService/GetReleaseLogs", opts...) + if err != nil { + return nil, err + } + x := &releaseServiceGetReleaseLogsClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type ReleaseService_GetReleaseLogsClient interface { + Recv() (*GetReleaseLogsResponse, error) + grpc.ClientStream +} + +type releaseServiceGetReleaseLogsClient struct { + grpc.ClientStream +} + +func (x *releaseServiceGetReleaseLogsClient) Recv() (*GetReleaseLogsResponse, error) { + m := new(GetReleaseLogsResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + func (c *releaseServiceClient) UpdateRelease(ctx context.Context, in *UpdateReleaseRequest, opts ...grpc.CallOption) (*UpdateReleaseResponse, error) { out := new(UpdateReleaseResponse) err := grpc.Invoke(ctx, "/hapi.services.tiller.ReleaseService/UpdateRelease", in, out, c.cc, opts...) @@ -695,7 +757,7 @@ func (c *releaseServiceClient) GetHistory(ctx context.Context, in *GetHistoryReq } func (c *releaseServiceClient) RunReleaseTest(ctx context.Context, in *TestReleaseRequest, opts ...grpc.CallOption) (ReleaseService_RunReleaseTestClient, error) { - stream, err := grpc.NewClientStream(ctx, &_ReleaseService_serviceDesc.Streams[1], c.cc, "/hapi.services.tiller.ReleaseService/RunReleaseTest", opts...) + stream, err := grpc.NewClientStream(ctx, &_ReleaseService_serviceDesc.Streams[2], c.cc, "/hapi.services.tiller.ReleaseService/RunReleaseTest", opts...) if err != nil { return nil, err } @@ -738,6 +800,8 @@ type ReleaseServiceServer interface { GetReleaseStatus(context.Context, *GetReleaseStatusRequest) (*GetReleaseStatusResponse, error) // GetReleaseContent retrieves the release content (chart + value) for the specified release. GetReleaseContent(context.Context, *GetReleaseContentRequest) (*GetReleaseContentResponse, error) + // GetReleaseLogs returns a stream of logging information from the release + GetReleaseLogs(*GetReleaseLogsRequest, ReleaseService_GetReleaseLogsServer) error // UpdateRelease updates release content. UpdateRelease(context.Context, *UpdateReleaseRequest) (*UpdateReleaseResponse, error) // InstallRelease requests installation of a chart as a new release. @@ -815,6 +879,27 @@ func _ReleaseService_GetReleaseContent_Handler(srv interface{}, ctx context.Cont return interceptor(ctx, in, info, handler) } +func _ReleaseService_GetReleaseLogs_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(GetReleaseLogsRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(ReleaseServiceServer).GetReleaseLogs(m, &releaseServiceGetReleaseLogsServer{stream}) +} + +type ReleaseService_GetReleaseLogsServer interface { + Send(*GetReleaseLogsResponse) error + grpc.ServerStream +} + +type releaseServiceGetReleaseLogsServer struct { + grpc.ServerStream +} + +func (x *releaseServiceGetReleaseLogsServer) Send(m *GetReleaseLogsResponse) error { + return x.ServerStream.SendMsg(m) +} + func _ReleaseService_UpdateRelease_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UpdateReleaseRequest) if err := dec(in); err != nil { @@ -987,6 +1072,11 @@ var _ReleaseService_serviceDesc = grpc.ServiceDesc{ Handler: _ReleaseService_ListReleases_Handler, ServerStreams: true, }, + { + StreamName: "GetReleaseLogs", + Handler: _ReleaseService_GetReleaseLogs_Handler, + ServerStreams: true, + }, { StreamName: "RunReleaseTest", Handler: _ReleaseService_RunReleaseTest_Handler, @@ -999,79 +1089,82 @@ var _ReleaseService_serviceDesc = grpc.ServiceDesc{ 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, - 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, - 0x2d, 0x78, 0x01, 0x78, 0x01, 0x5e, 0x06, 0x79, 0x0e, 0x6e, 0xc6, 0xb5, 0x5b, 0x6f, 0x6e, 0x62, - 0xcf, 0xfc, 0xe7, 0xef, 0xff, 0xfd, 0xcd, 0x04, 0x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40, 0xcf, 0xf2, 0x7d, 0x14, 0xdc, 0x3b, 0xec, 0x6e, 0x59, 0x75, - 0x15, 0x16, 0xdd, 0xf0, 0xee, 0xeb, 0x67, 0x37, 0x7a, 0xd4, 0x8d, 0x7e, 0x5d, 0xb0, 0x0f, 0x4a, - 0xeb, 0xa7, 0x71, 0x7f, 0x85, 0x55, 0xed, 0x54, 0x42, 0x05, 0x68, 0xe5, 0xdd, 0x04, 0xec, 0xcf, - 0x4a, 0xe9, 0xa6, 0xb1, 0xa6, 0xb0, 0xa6, 0xd3, 0x0d, 0x2a, 0x70, 0x90, 0xcb, 0xdf, 0xf6, 0xe7, - 0xe5, 0x94, 0xd3, 0x70, 0x14, 0xda, 0x59, 0x36, 0x28, 0xea, 0x63, 0x01, 0x73, 0x15, 0xf5, 0xb1, - 0x88, 0x64, 0x9c, 0x25, 0xe4, 0x01, 0xdc, 0x91, 0x01, 0xda, 0x2f, 0x6c, 0x88, 0xce, 0x21, 0x76, - 0xe7, 0x71, 0xc5, 0x34, 0xc4, 0x0c, 0xde, 0xcb, 0x9c, 0x96, 0xa8, 0x00, 0x9a, 0xfc, 0x4b, 0x82, - 0xfd, 0xac, 0xa4, 0x76, 0xa6, 0x28, 0xc9, 0x2f, 0x0f, 0x14, 0xa5, 0x93, 0xd7, 0x03, 0x45, 0x65, - 0xa8, 0xca, 0x59, 0x42, 0x3e, 0xac, 0xb9, 0x71, 0x28, 0x43, 0x27, 0x2c, 0x81, 0x0a, 0xac, 0xef, - 0xf3, 0x93, 0xfd, 0xa4, 0x84, 0xe6, 0xdd, 0xf7, 0xfd, 0x1c, 0x7e, 0x6a, 0x2a, 0xd5, 0xcb, 0x3a, - 0xff, 0xc7, 0xf9, 0xd5, 0xff, 0x01, 0x00, 0x00, 0xff, 0xff, 0x30, 0x80, 0xed, 0x18, 0x42, 0x0f, - 0x00, 0x00, + // 1226 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0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0x9a, 0xdf, + 0x8a, 0x92, 0xcb, 0x7d, 0x30, 0x8a, 0x92, 0xcb, 0xa7, 0x4c, 0x6b, 0x2d, 0x6a, 0x9c, 0x2c, 0xfd, + 0x14, 0x35, 0x4e, 0x01, 0x55, 0x16, 0x35, 0x4e, 0x11, 0xab, 0x59, 0x6b, 0xc8, 0x01, 0x58, 0xb2, + 0x0f, 0xda, 0x2b, 0xac, 0x47, 0x9a, 0xb4, 0xcc, 0xde, 0xc3, 0x8a, 0xb1, 0x8b, 0x05, 0xbc, 0x97, + 0x79, 0x9e, 0x51, 0x01, 0x34, 0xf9, 0x53, 0x89, 0xf9, 0xa2, 0xa4, 0x76, 0x26, 0x29, 0x49, 0x68, + 0xf7, 0x24, 0x95, 0x66, 0xcb, 0x7b, 0x92, 0xca, 0x70, 0xa3, 0xb5, 0x86, 0x5c, 0x68, 0xdb, 0xa1, + 0x2f, 0x5d, 0x47, 0xb4, 0x84, 0x0a, 0x6e, 0xdf, 0x25, 0x44, 0xf3, 0x69, 0x09, 0xcd, 0x65, 0xcb, + 0x1f, 0xc2, 0x8f, 0x4d, 0xa5, 0x7a, 0x59, 0xe7, 0xff, 0x6d, 0x7f, 0xf9, 0x5f, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x33, 0x5c, 0xa4, 0xea, 0x3e, 0x10, 0x00, 0x00, } 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 d6572eb0387d9ab0f55c8a6713302202837e1fc3 Mon Sep 17 00:00:00 2001 From: John Welsh Date: Mon, 24 Apr 2017 14:26:16 -0700 Subject: [PATCH 02/14] Updated glide --- glide.lock | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/glide.lock b/glide.lock index d6a3094b8..e24c5b5ce 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-20T16:44:51.583176673-07:00 imports: - name: bitbucket.org/ww/goautoneg version: 75cd24fc2f2c2a2088577d12123ddee5f54e0675 @@ -103,7 +103,7 @@ imports: - name: github.com/facebookgo/symwalk version: 42004b9f322246749dd73ad71008b1f3160c0052 - name: github.com/ghodss/yaml - version: 73d445a93680fa1a78ae23a5839bad48f32ba1ee + version: 04f313413ffd65ce25f2541bfd2b2ceec5c0908c - name: github.com/go-openapi/jsonpointer version: 46af16f9f7b149af66e5d1bd010e3574dc06de98 - name: github.com/go-openapi/jsonreference @@ -123,7 +123,7 @@ imports: - util/runes - util/strings - name: github.com/gogo/protobuf - version: e18d7aa8f8c624c915db340349aad4c49b10d173 + version: c0656edd0d9eab7c66d1eb0c568f9039345796f7 subpackages: - proto - sortkeys @@ -147,7 +147,7 @@ imports: - util/strutil - util/wordwrap - name: github.com/grpc-ecosystem/go-grpc-prometheus - version: 34abd90a014618f61222a1b0a7b7eb834a2d0dc3 + version: 2500245aa6110c562d17020fb31a2c133d737799 - name: github.com/howeyc/gopass version: 3ca23474a7c7203e0a0a070fd33508f6efdb9b3d - name: github.com/imdario/mergo @@ -171,7 +171,7 @@ imports: - name: github.com/Masterminds/vcs version: 795e20f901c3d561de52811fb3488a2cb2c8588b - name: github.com/mattn/go-runewidth - version: d6bea18f789704b5f83375793155289da36a3c7f + version: 14207d285c6c197daabb5c9793d63e7af9ab2d50 - name: github.com/matttproud/golang_protobuf_extensions version: fc2b8d3a73c4867e51861bbdd5ae3c1f0869dd6a subpackages: @@ -221,7 +221,7 @@ imports: - name: github.com/spf13/pflag version: 9ff6c6923cfffbcd502984b8e0c80539a94968b7 - name: github.com/technosophos/moniker - version: 9f956786b91d9786ca11aa5be6104542fa911546 + version: ab470f5e105a44d0c87ea21bacd6a335c4816d83 - name: github.com/ugorji/go version: ded73eae5db7e7a0ef6f55aace87a2873c5d2b74 subpackages: @@ -307,9 +307,9 @@ imports: - name: gopkg.in/inf.v0 version: 3887ee99ecf07df5b447e9b00d9c0b2adaa9f3e4 - name: gopkg.in/yaml.v2 - version: a83829b6f1293c91addabc89d0571c246397bbf4 + version: a3f3340b5840cee44f372bddb5880fcbc419b46a - name: k8s.io/apimachinery - version: c1c4a7fe832857c75cc1d79c8e40d71d5da15fc6 + version: 9c89140a45325f83409e90359888133478207c7a subpackages: - pkg/api/equality - pkg/api/errors @@ -361,7 +361,7 @@ imports: - third_party/forked/golang/netutil - third_party/forked/golang/reflect - name: k8s.io/apiserver - version: 2308857ad3b8b18abf74ff734853973eda9da94d + version: ee4918ace59d6e34fee56afe56aae4fe355e96f5 subpackages: - pkg/authentication/authenticator - pkg/authentication/serviceaccount @@ -372,7 +372,7 @@ imports: - pkg/util/flag - pkg/util/wsstream - name: k8s.io/client-go - version: 5b0e11b577b35539f05523c47e94ed96a17f992b + version: f64a115c809b7dbd30bd787d9557b7926dbba81e subpackages: - discovery - discovery/fake @@ -400,6 +400,7 @@ imports: - pkg/api - pkg/api/install - pkg/api/v1 + - pkg/api/v1/ref - pkg/apis/apps - pkg/apis/apps/install - pkg/apis/apps/v1beta1 @@ -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 5a33d1f338eefc1371e7ffeb42954d6a4c29515d Mon Sep 17 00:00:00 2001 From: John Welsh Date: Wed, 26 Apr 2017 22:59:42 -0700 Subject: [PATCH 03/14] Added log_streamer for log pubsub --- _proto/hapi/release/log.proto | 9 +- _proto/hapi/services/tiller.proto | 1 + pkg/proto/hapi/release/hook.pb.go | 2 + pkg/proto/hapi/release/log.pb.go | 135 ++++++++++++++ pkg/proto/hapi/release/release.pb.go | 6 +- pkg/proto/hapi/release/status.pb.go | 8 +- pkg/proto/hapi/release/test_run.pb.go | 8 +- pkg/proto/hapi/release/test_suite.pb.go | 6 +- pkg/proto/hapi/services/tiller.pb.go | 169 +++++++++--------- pkg/tiller/logdistributor/log_streamer.go | 89 ++++++--- .../logdistributor/log_streamer_test.go | 83 +++++++-- 11 files changed, 373 insertions(+), 143 deletions(-) create mode 100644 pkg/proto/hapi/release/log.pb.go diff --git a/_proto/hapi/release/log.proto b/_proto/hapi/release/log.proto index 6f5aab057..e1152030f 100644 --- a/_proto/hapi/release/log.proto +++ b/_proto/hapi/release/log.proto @@ -31,7 +31,7 @@ message Log { } // Syslog log levels - enum LogLevel { + enum Level { EMERG = 0; ALERT = 1; CRIT = 2; @@ -43,7 +43,8 @@ message Log { } Source source = 1; - string release = 2; - string log = 3; - google.protobuf.Timestamp timestamp = 4; + Level level = 2; + string release = 3; + string log = 4; + google.protobuf.Timestamp timestamp = 5; } diff --git a/_proto/hapi/services/tiller.proto b/_proto/hapi/services/tiller.proto index 4e6076650..53ce0016b 100644 --- a/_proto/hapi/services/tiller.proto +++ b/_proto/hapi/services/tiller.proto @@ -19,6 +19,7 @@ package hapi.services.tiller; import "hapi/chart/chart.proto"; import "hapi/chart/config.proto"; import "hapi/release/release.proto"; +import "hapi/release/log.proto"; import "hapi/release/info.proto"; import "hapi/release/status.proto"; import "hapi/version/version.proto"; diff --git a/pkg/proto/hapi/release/hook.pb.go b/pkg/proto/hapi/release/hook.pb.go index 2fd8e5196..8989146b3 100644 --- a/pkg/proto/hapi/release/hook.pb.go +++ b/pkg/proto/hapi/release/hook.pb.go @@ -8,6 +8,7 @@ Package release is a generated protocol buffer package. It is generated from these files: hapi/release/hook.proto hapi/release/info.proto + hapi/release/log.proto hapi/release/release.proto hapi/release/status.proto hapi/release/test_run.proto @@ -16,6 +17,7 @@ It is generated from these files: It has these top-level messages: Hook Info + Log Release Status TestRun diff --git a/pkg/proto/hapi/release/log.pb.go b/pkg/proto/hapi/release/log.pb.go new file mode 100644 index 000000000..e965daf69 --- /dev/null +++ b/pkg/proto/hapi/release/log.pb.go @@ -0,0 +1,135 @@ +// Code generated by protoc-gen-go. +// source: hapi/release/log.proto +// DO NOT EDIT! + +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 + +// Allows filtering by log event source +type Log_Source int32 + +const ( + Log_HOOK Log_Source = 0 + Log_TEST Log_Source = 1 + Log_POD Log_Source = 2 + Log_SYSTEM Log_Source = 3 +) + +var Log_Source_name = map[int32]string{ + 0: "HOOK", + 1: "TEST", + 2: "POD", + 3: "SYSTEM", +} +var Log_Source_value = map[string]int32{ + "HOOK": 0, + "TEST": 1, + "POD": 2, + "SYSTEM": 3, +} + +func (x Log_Source) String() string { + return proto.EnumName(Log_Source_name, int32(x)) +} +func (Log_Source) EnumDescriptor() ([]byte, []int) { return fileDescriptor2, []int{0, 0} } + +// Syslog log levels +type Log_Level int32 + +const ( + Log_EMERG Log_Level = 0 + Log_ALERT Log_Level = 1 + Log_CRIT Log_Level = 2 + Log_ERR Log_Level = 3 + Log_WARNING Log_Level = 4 + Log_NOTICE Log_Level = 5 + Log_INFO Log_Level = 6 + Log_DEBUG Log_Level = 7 +) + +var Log_Level_name = map[int32]string{ + 0: "EMERG", + 1: "ALERT", + 2: "CRIT", + 3: "ERR", + 4: "WARNING", + 5: "NOTICE", + 6: "INFO", + 7: "DEBUG", +} +var Log_Level_value = map[string]int32{ + "EMERG": 0, + "ALERT": 1, + "CRIT": 2, + "ERR": 3, + "WARNING": 4, + "NOTICE": 5, + "INFO": 6, + "DEBUG": 7, +} + +func (x Log_Level) String() string { + return proto.EnumName(Log_Level_name, int32(x)) +} +func (Log_Level) EnumDescriptor() ([]byte, []int) { return fileDescriptor2, []int{0, 1} } + +type Log struct { + Source Log_Source `protobuf:"varint,1,opt,name=source,enum=hapi.release.Log_Source" json:"source,omitempty"` + Level Log_Level `protobuf:"varint,2,opt,name=level,enum=hapi.release.Log_Level" json:"level,omitempty"` + Release string `protobuf:"bytes,3,opt,name=release" json:"release,omitempty"` + Log string `protobuf:"bytes,4,opt,name=log" json:"log,omitempty"` + Timestamp *google_protobuf.Timestamp `protobuf:"bytes,5,opt,name=timestamp" json:"timestamp,omitempty"` +} + +func (m *Log) Reset() { *m = Log{} } +func (m *Log) String() string { return proto.CompactTextString(m) } +func (*Log) ProtoMessage() {} +func (*Log) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0} } + +func (m *Log) GetTimestamp() *google_protobuf.Timestamp { + if m != nil { + return m.Timestamp + } + return nil +} + +func init() { + proto.RegisterType((*Log)(nil), "hapi.release.Log") + proto.RegisterEnum("hapi.release.Log_Source", Log_Source_name, Log_Source_value) + proto.RegisterEnum("hapi.release.Log_Level", Log_Level_name, Log_Level_value) +} + +func init() { proto.RegisterFile("hapi/release/log.proto", fileDescriptor2) } + +var fileDescriptor2 = []byte{ + // 317 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x8f, 0x4b, 0x4b, 0xfb, 0x40, + 0x14, 0xc5, 0x9b, 0x77, 0x73, 0xfb, 0xe7, 0xcf, 0x65, 0x16, 0x3a, 0x74, 0x63, 0xe9, 0xaa, 0x1b, + 0x27, 0x5a, 0x37, 0x6e, 0xfb, 0x18, 0x6b, 0x30, 0x4d, 0x64, 0x12, 0x11, 0x5d, 0x08, 0xad, 0x8c, + 0xb1, 0x90, 0x32, 0xa5, 0x0f, 0xbf, 0xae, 0x5f, 0x45, 0x66, 0xd2, 0xa8, 0xe0, 0xee, 0xde, 0x7b, + 0x7e, 0xe7, 0x72, 0x0e, 0x9c, 0xbc, 0x2f, 0x36, 0xab, 0x68, 0x2b, 0x2b, 0xb9, 0xd8, 0xc9, 0xa8, + 0x52, 0x25, 0xdb, 0x6c, 0xd5, 0x5e, 0x91, 0x7f, 0xfa, 0xce, 0x8e, 0xf7, 0xee, 0x59, 0xa9, 0x54, + 0x59, 0xc9, 0xc8, 0x68, 0xcb, 0xc3, 0x5b, 0xb4, 0x5f, 0xad, 0xe5, 0x6e, 0xbf, 0x58, 0x6f, 0x6a, + 0xbc, 0xff, 0x69, 0x83, 0x93, 0xa8, 0x92, 0x5c, 0x80, 0xbf, 0x53, 0x87, 0xed, 0xab, 0xa4, 0x56, + 0xcf, 0x1a, 0xfc, 0x1f, 0x52, 0xf6, 0xfb, 0x0f, 0x4b, 0x54, 0xc9, 0x72, 0xa3, 0x8b, 0x23, 0x47, + 0xce, 0xc1, 0xab, 0xe4, 0x87, 0xac, 0xa8, 0x6d, 0x0c, 0xa7, 0x7f, 0x0d, 0x89, 0x96, 0x45, 0x4d, + 0x11, 0x0a, 0xc1, 0x51, 0xa3, 0x4e, 0xcf, 0x1a, 0x84, 0xa2, 0x59, 0x09, 0x82, 0x53, 0xa9, 0x92, + 0xba, 0xe6, 0xaa, 0x47, 0x72, 0x0d, 0xe1, 0x77, 0x4e, 0xea, 0xf5, 0xac, 0x41, 0x67, 0xd8, 0x65, + 0x75, 0x13, 0xd6, 0x34, 0x61, 0x45, 0x43, 0x88, 0x1f, 0xb8, 0x7f, 0x09, 0x7e, 0x1d, 0x93, 0xb4, + 0xc1, 0xbd, 0xcd, 0xb2, 0x3b, 0x6c, 0xe9, 0xa9, 0xe0, 0x79, 0x81, 0x16, 0x09, 0xc0, 0xb9, 0xcf, + 0xa6, 0x68, 0x13, 0x00, 0x3f, 0x7f, 0xca, 0x0b, 0x3e, 0x47, 0xa7, 0xff, 0x02, 0x9e, 0x09, 0x4a, + 0x42, 0xf0, 0xf8, 0x9c, 0x8b, 0x19, 0xb6, 0xf4, 0x38, 0x4a, 0xb8, 0xd0, 0x9e, 0x36, 0xb8, 0x13, + 0x11, 0x17, 0x68, 0x6b, 0x37, 0x17, 0x02, 0x1d, 0xd2, 0x81, 0xe0, 0x71, 0x24, 0xd2, 0x38, 0x9d, + 0xa1, 0xab, 0x5f, 0xa5, 0x59, 0x11, 0x4f, 0x38, 0x7a, 0x9a, 0x8d, 0xd3, 0x9b, 0x0c, 0x7d, 0xfd, + 0x60, 0xca, 0xc7, 0x0f, 0x33, 0x0c, 0xc6, 0xe1, 0x73, 0xd3, 0x74, 0xe9, 0x9b, 0xf0, 0x57, 0x5f, + 0x01, 0x00, 0x00, 0xff, 0xff, 0xe3, 0x7b, 0x56, 0xb1, 0xbc, 0x01, 0x00, 0x00, +} diff --git a/pkg/proto/hapi/release/release.pb.go b/pkg/proto/hapi/release/release.pb.go index 01f79fe29..e37f039f6 100644 --- a/pkg/proto/hapi/release/release.pb.go +++ b/pkg/proto/hapi/release/release.pb.go @@ -40,7 +40,7 @@ type Release struct { 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 (*Release) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{0} } func (m *Release) GetInfo() *Info { if m != nil { @@ -74,9 +74,9 @@ func init() { proto.RegisterType((*Release)(nil), "hapi.release.Release") } -func init() { proto.RegisterFile("hapi/release/release.proto", fileDescriptor2) } +func init() { proto.RegisterFile("hapi/release/release.proto", fileDescriptor3) } -var fileDescriptor2 = []byte{ +var fileDescriptor3 = []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, diff --git a/pkg/proto/hapi/release/status.pb.go b/pkg/proto/hapi/release/status.pb.go index 65672a0cf..e93d26330 100644 --- a/pkg/proto/hapi/release/status.pb.go +++ b/pkg/proto/hapi/release/status.pb.go @@ -51,7 +51,7 @@ var Status_Code_value = map[string]int32{ 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} } +func (Status_Code) EnumDescriptor() ([]byte, []int) { return fileDescriptor4, []int{0, 0} } // Status defines the status of a release. type Status struct { @@ -67,7 +67,7 @@ type Status struct { 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 (*Status) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{0} } func (m *Status) GetLastTestSuiteRun() *TestSuite { if m != nil { @@ -81,9 +81,9 @@ func init() { proto.RegisterEnum("hapi.release.Status_Code", Status_Code_name, Status_Code_value) } -func init() { proto.RegisterFile("hapi/release/status.proto", fileDescriptor3) } +func init() { proto.RegisterFile("hapi/release/status.proto", fileDescriptor4) } -var fileDescriptor3 = []byte{ +var fileDescriptor4 = []byte{ // 291 bytes of a gzipped FileDescriptorProto 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, diff --git a/pkg/proto/hapi/release/test_run.pb.go b/pkg/proto/hapi/release/test_run.pb.go index 46bdf81fc..7304c3e83 100644 --- a/pkg/proto/hapi/release/test_run.pb.go +++ b/pkg/proto/hapi/release/test_run.pb.go @@ -36,7 +36,7 @@ var TestRun_Status_value = map[string]int32{ 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} } +func (TestRun_Status) EnumDescriptor() ([]byte, []int) { return fileDescriptor5, []int{0, 0} } type TestRun struct { Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` @@ -49,7 +49,7 @@ type TestRun struct { 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 (*TestRun) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{0} } func (m *TestRun) GetStartedAt() *google_protobuf.Timestamp { if m != nil { @@ -70,9 +70,9 @@ func init() { proto.RegisterEnum("hapi.release.TestRun_Status", TestRun_Status_name, TestRun_Status_value) } -func init() { proto.RegisterFile("hapi/release/test_run.proto", fileDescriptor4) } +func init() { proto.RegisterFile("hapi/release/test_run.proto", fileDescriptor5) } -var fileDescriptor4 = []byte{ +var fileDescriptor5 = []byte{ // 265 bytes of a gzipped FileDescriptorProto 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, diff --git a/pkg/proto/hapi/release/test_suite.pb.go b/pkg/proto/hapi/release/test_suite.pb.go index f168bf1d2..304cded78 100644 --- a/pkg/proto/hapi/release/test_suite.pb.go +++ b/pkg/proto/hapi/release/test_suite.pb.go @@ -27,7 +27,7 @@ type TestSuite struct { 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 (*TestSuite) Descriptor() ([]byte, []int) { return fileDescriptor6, []int{0} } func (m *TestSuite) GetStartedAt() *google_protobuf.Timestamp { if m != nil { @@ -54,9 +54,9 @@ func init() { proto.RegisterType((*TestSuite)(nil), "hapi.release.TestSuite") } -func init() { proto.RegisterFile("hapi/release/test_suite.proto", fileDescriptor5) } +func init() { proto.RegisterFile("hapi/release/test_suite.proto", fileDescriptor6) } -var fileDescriptor5 = []byte{ +var fileDescriptor6 = []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, diff --git a/pkg/proto/hapi/services/tiller.pb.go b/pkg/proto/hapi/services/tiller.pb.go index 1706750fa..c718c98d1 100644 --- a/pkg/proto/hapi/services/tiller.pb.go +++ b/pkg/proto/hapi/services/tiller.pb.go @@ -41,6 +41,7 @@ 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_release6 "k8s.io/helm/pkg/proto/hapi/release" import hapi_release4 "k8s.io/helm/pkg/proto/hapi/release" import hapi_release3 "k8s.io/helm/pkg/proto/hapi/release" import hapi_version "k8s.io/helm/pkg/proto/hapi/version" @@ -253,10 +254,7 @@ func (*GetReleaseLogsRequest) ProtoMessage() {} func (*GetReleaseLogsRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } type GetReleaseLogsResponse struct { - // Source is the name of the release that generated the log - Source string `protobuf:"bytes,1,opt,name=source" json:"source,omitempty"` - // Log is a single log line - Log string `protobuf:"bytes,2,opt,name=log" json:"log,omitempty"` + Log *hapi_release6.Log `protobuf:"bytes,1,opt,name=log" json:"log,omitempty"` } func (m *GetReleaseLogsResponse) Reset() { *m = GetReleaseLogsResponse{} } @@ -264,6 +262,13 @@ func (m *GetReleaseLogsResponse) String() string { return proto.Compa func (*GetReleaseLogsResponse) ProtoMessage() {} func (*GetReleaseLogsResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} } +func (m *GetReleaseLogsResponse) GetLog() *hapi_release6.Log { + if m != nil { + return m.Log + } + return nil +} + // UpdateReleaseRequest updates a release. type UpdateReleaseRequest struct { // The name of the release @@ -1089,82 +1094,82 @@ var _ReleaseService_serviceDesc = grpc.ServiceDesc{ func init() { proto.RegisterFile("hapi/services/tiller.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ - // 1226 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0xdd, 0x6e, 0xe3, 0x44, - 0x14, 0xae, 0xe3, 0xfc, 0x9e, 0x76, 0x43, 0x76, 0xb6, 0x4d, 0x5d, 0x0b, 0x50, 0x31, 0x82, 0x66, - 0x77, 0xd9, 0x14, 0xc2, 0x15, 0x12, 0x42, 0x6a, 0xbb, 0x51,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, - 0x0f, 0xda, 0x2b, 0xac, 0x47, 0x9a, 0xb4, 0xcc, 0xde, 0xc3, 0x8a, 0xb1, 0x8b, 0x05, 0xbc, 0x97, - 0x79, 0x9e, 0x51, 0x01, 0x34, 0xf9, 0x53, 0x89, 0xf9, 0xa2, 0xa4, 0x76, 0x26, 0x29, 0x49, 0x68, - 0xf7, 0x24, 0x95, 0x66, 0xcb, 0x7b, 0x92, 0xca, 0x70, 0xa3, 0xb5, 0x86, 0x5c, 0x68, 0xdb, 0xa1, - 0x2f, 0x5d, 0x47, 0xb4, 0x84, 0x0a, 0x6e, 0xdf, 0x25, 0x44, 0xf3, 0x69, 0x09, 0xcd, 0x65, 0xcb, - 0x1f, 0xc2, 0x8f, 0x4d, 0xa5, 0x7a, 0x59, 0xe7, 0xff, 0x6d, 0x7f, 0xf9, 0x5f, 0x00, 0x00, 0x00, - 0xff, 0xff, 0x33, 0x5c, 0xa4, 0xea, 0x3e, 0x10, 0x00, 0x00, + // 1229 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0xdd, 0x72, 0xdb, 0x44, + 0x14, 0x8e, 0x2c, 0xc7, 0x3f, 0x27, 0x69, 0x48, 0xb7, 0xf9, 0x51, 0x35, 0xc0, 0x04, 0x75, 0xa0, + 0x6e, 0x4b, 0x1d, 0x30, 0x57, 0xcc, 0x00, 0x33, 0x69, 0xea, 0x49, 0x0a, 0x26, 0x9d, 0x91, 0xdb, + 0x32, 0xc3, 0x30, 0x78, 0x14, 0x7b, 0xed, 0x88, 0xca, 0x5a, 0xa3, 0x5d, 0x85, 0xe6, 0x96, 0x3b, + 0x1e, 0x85, 0xb7, 0xe0, 0x01, 0x80, 0x67, 0x62, 0xb4, 0x3f, 0xb2, 0x56, 0x91, 0x12, 0xe1, 0x1b, + 0x6b, 0x77, 0xcf, 0xd9, 0xf3, 0xf3, 0x9d, 0x93, 0x6f, 0x4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, 0x1a, 0xf2, + 0x61, 0xcb, 0x8d, 0x43, 0xe9, 0x3a, 0xa1, 0x25, 0x54, 0x72, 0xfb, 0x3a, 0x21, 0xda, 0x8f, 0x2a, + 0x68, 0x2e, 0x5b, 0xfe, 0x19, 0xfc, 0xd8, 0x52, 0xaa, 0xe7, 0x0d, 0xfe, 0x8f, 0xf6, 0x17, 0xff, + 0x05, 0x00, 0x00, 0xff, 0xff, 0x60, 0x54, 0x63, 0x84, 0x51, 0x10, 0x00, 0x00, } diff --git a/pkg/tiller/logdistributor/log_streamer.go b/pkg/tiller/logdistributor/log_streamer.go index bb4c90b0c..a5d9f5c88 100644 --- a/pkg/tiller/logdistributor/log_streamer.go +++ b/pkg/tiller/logdistributor/log_streamer.go @@ -1,48 +1,87 @@ package logdistributor -import "fmt" +import ( + rspb "k8s.io/helm/pkg/proto/hapi/release" +) -type Log struct { - Log string +type Logsub struct { + C chan *rspb.Log + release string + sources []rspb.Log_Source + level rspb.Log_Level } -type Subscription struct { - c chan<- *Log +type release struct { + name string + sourceMappings map[rspb.Log_Source]map[*Logsub]bool } -type Listener struct { - subs map[*Subscription]bool +type Pubsub struct { + releases map[string]*release } -type Distributor struct { - listeners map[string]*Listener +func New() *Pubsub { + rls := make(map[string]*release) + return &Pubsub{releases: rls} } -func (l *Listener) subscribe(c chan<- *Log) *Subscription { - sub := &Subscription{c} - l.subs[sub] = true - return sub +func newRelease(name string) *release { + rs := &release{name: name} + rs.sourceMappings = make(map[rspb.Log_Source]map[*Logsub]bool, len(rspb.Log_Source_name)) + return rs } -func (d *Distributor) Subscribe() { +func (rs *release) subscribe(sub *Logsub) { + for _, source := range sub.sources { + log_source := rspb.Log_Source(source) + if _, ok := rs.sourceMappings[log_source]; !ok { + subs := make(map[*Logsub]bool, 1) + rs.sourceMappings[log_source] = subs + } + rs.sourceMappings[log_source][sub] = true + } +} +func (ps *Pubsub) subscribe(sub *Logsub) { + if _, ok := ps.releases[sub.release]; !ok { + rs := newRelease(sub.release) + rs.subscribe(sub) + ps.releases[sub.release] = rs + } + ps.releases[sub.release].subscribe(sub) } -func (l *Listener) unsubscribe(sub *Subscription) { - delete(l.subs, sub) +func (ps *Pubsub) Subscribe(release string, level rspb.Log_Level, sources ...rspb.Log_Source) *Logsub { + ch := make(chan *rspb.Log) + ls := &Logsub{C: ch, release: release, level: level, sources: sources} + ps.subscribe(ls) + return ls } -func (l *Listener) writeLog(log *Log) error { - for _, s := range l.subs { - s.c <- log +func (ps *Pubsub) Unsubscribe(sub *Logsub) { + if rs, ok := ps.releases[sub.release]; ok { + for source, subMap := range rs.sourceMappings { + delete(subMap, sub) + if len(subMap) == 0 { + delete(rs.sourceMappings, source) + } + } + if len(rs.sourceMappings) == 0 { + delete(ps.releases, sub.release) + } } - return nil } -func (d *Distributor) WriteLog(log *Log, release string) error { - l := d.listeners[release] - if l == nil { - return fmt.Errorf("No listeners configured for %s", release) +func (ps *Pubsub) PubLog(rls string, source rspb.Log_Source, level rspb.Log_Level, message string) { + log := &rspb.Log{Release: rls, Source: source, Level: level, Log: message} + if rls, ok := ps.releases[log.Release]; ok { + if subs, ok := rls.sourceMappings[log.Source]; ok { + for sub := range subs { + if sub.level >= log.Level { + sub.C <- log + } + } + } } - return l.writeLog(log) } + diff --git a/pkg/tiller/logdistributor/log_streamer_test.go b/pkg/tiller/logdistributor/log_streamer_test.go index b12dfcb76..576dea31b 100644 --- a/pkg/tiller/logdistributor/log_streamer_test.go +++ b/pkg/tiller/logdistributor/log_streamer_test.go @@ -3,40 +3,87 @@ package logdistributor import ( "testing" "fmt" + rspb "k8s.io/helm/pkg/proto/hapi/release" ) -func TestDistributor_WriteLog(t *testing.T) { - d := &Distributor{} - l := &Log{Log: "Test log"} - d.WriteLog(l, "testrelease") +func TestPubsub_Subscribe(t *testing.T) { + ps := New() + rlsName := "testrls" - if len(d.listeners) != 1 { - t.Errorf("Invalid number of listeners present: %d (expecting 1)", len(d.listeners)) + ps.Subscribe(rlsName, rspb.Log_WARNING, rspb.Log_HOOK) + if len(ps.releases[rlsName].sourceMappings) != 1 { + t.Error("testrls should have one log source entry") + } + ps.Subscribe(rlsName, rspb.Log_WARNING, rspb.Log_POD) + if len(ps.releases[rlsName].sourceMappings) != 2 { + t.Error("testrls should have two log source entries") + } + + if len(ps.releases[rlsName].sourceMappings[rspb.Log_HOOK]) != 1 { + t.Error("testrls should have one subscription to the Log_HOOK event stream") + } + if len(ps.releases[rlsName].sourceMappings[rspb.Log_POD]) != 1 { + t.Error("testrls should have one subscription to the Log_POD event stream") + } + if len(ps.releases[rlsName].sourceMappings[rspb.Log_SYSTEM]) != 0 { + t.Error("testrls should have no subscriptions to the Log_SYSTEM event stream") } } -func BenchmarkDistributor_WriteLog(b *testing.B) { +func TestPubsub_Unsubscribe(t *testing.T) { + ps := New() + rlsName := "testrls" + + sub := ps.Subscribe(rlsName, rspb.Log_WARNING, rspb.Log_HOOK) + if len(ps.releases[rlsName].sourceMappings) != 1 { + t.Error("testrls should have one log source entry") + } + + ps.Unsubscribe(sub) + if _, ok := ps.releases[rlsName]; ok { + t.Error("pubsub should have no entry for testrls") + } + + sub2 := ps.Subscribe(rlsName, rspb.Log_WARNING, rspb.Log_HOOK) + sub3 := ps.Subscribe(rlsName, rspb.Log_WARNING, rspb.Log_POD) + + if len(ps.releases[rlsName].sourceMappings) != 2 { + t.Error("testrls should have two log source entries") + } + + ps.Unsubscribe(sub3) + + if len(ps.releases[rlsName].sourceMappings) != 1 { + t.Error("testrls should have one log source entry") + } + + ps.Unsubscribe(sub2) + if _, ok := ps.releases[rlsName]; ok { + t.Error("pubsub should have no entry for testrls") + } + } -func ExampleDistributor_WriteLog() { - sub := &Subscription{} - c := make(chan *Log) - sub.c = c +func TestPubsub_PubLog(t *testing.T) { - go func(){ - for l := range c { - fmt.Println(l.Log) - } +} +func Example() { + ps := New() + sub := ps.Subscribe("testrls", rspb.Log_WARNING, rspb.Log_HOOK, rspb.Log_POD) + + go func() { for { select { - case l := <-c: + case l := <-sub.C: fmt.Println(l.Log) } } }() - sub.c <- &Log{Log: "Test log!"} + // No output as log level is too low for the configured subscription + ps.PubLog("testrls", rspb.Log_POD, rspb.Log_DEBUG, "Test log!") + // Picked up by the subscription + ps.PubLog("testrls", rspb.Log_POD, rspb.Log_ERR, "Test log!") // Output: Test log! } - From 24d5b30856018c7a2bff744b1031bf9dc476fc80 Mon Sep 17 00:00:00 2001 From: John Welsh Date: Thu, 27 Apr 2017 01:20:15 -0700 Subject: [PATCH 04/14] Added a stubbed out logs command --- cmd/helm/logs.go | 134 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 cmd/helm/logs.go diff --git a/cmd/helm/logs.go b/cmd/helm/logs.go new file mode 100644 index 000000000..b635e6186 --- /dev/null +++ b/cmd/helm/logs.go @@ -0,0 +1,134 @@ +/* +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 main + +import ( + "fmt" + "io" + "regexp" + "text/tabwriter" + + "github.com/gosuri/uitable" + "github.com/gosuri/uitable/util/strutil" + "github.com/spf13/cobra" + + "k8s.io/helm/pkg/helm" + "k8s.io/helm/pkg/proto/hapi/release" + "k8s.io/helm/pkg/proto/hapi/services" + "k8s.io/helm/pkg/timeconv" +) + +var statusHelp = ` +This command shows the status of a named release. +The status consists of: +- last deployment time +- k8s namespace in which the release lives +- state of the release (can be: UNKNOWN, DEPLOYED, DELETED, SUPERSEDED, FAILED or DELETING) +- list of resources that this release consists of, sorted by kind +- details on last test suite run, if applicable +- additional notes provided by the chart +` + +type statusCmd struct { + release string + out io.Writer + client helm.Interface + version int32 +} + +func newStatusCmd(client helm.Interface, out io.Writer) *cobra.Command { + status := &statusCmd{ + out: out, + client: client, + } + + cmd := &cobra.Command{ + Use: "status [flags] RELEASE_NAME", + Short: "displays the status of the named release", + Long: statusHelp, + PersistentPreRunE: setupConnection, + RunE: func(cmd *cobra.Command, args []string) error { + if len(args) == 0 { + return errReleaseRequired + } + status.release = args[0] + if status.client == nil { + status.client = helm.NewClient(helm.Host(settings.TillerHost)) + } + return status.run() + }, + } + + cmd.PersistentFlags().Int32Var(&status.version, "revision", 0, "if set, display the status of the named release with revision") + + return cmd +} + +func (s *statusCmd) run() error { + res, err := s.client.ReleaseStatus(s.release, helm.StatusReleaseVersion(s.version)) + if err != nil { + return prettyError(err) + } + + PrintStatus(s.out, res) + return nil +} + +// PrintStatus prints out the status of a release. Shared because also used by +// install / upgrade +func PrintStatus(out io.Writer, res *services.GetReleaseStatusResponse) { + if res.Info.LastDeployed != nil { + fmt.Fprintf(out, "LAST DEPLOYED: %s\n", timeconv.String(res.Info.LastDeployed)) + } + fmt.Fprintf(out, "NAMESPACE: %s\n", res.Namespace) + fmt.Fprintf(out, "STATUS: %s\n", res.Info.Status.Code) + fmt.Fprintf(out, "\n") + if len(res.Info.Status.Resources) > 0 { + re := regexp.MustCompile(" +") + + w := tabwriter.NewWriter(out, 0, 0, 2, ' ', tabwriter.TabIndent) + fmt.Fprintf(w, "RESOURCES:\n%s\n", re.ReplaceAllString(res.Info.Status.Resources, "\t")) + w.Flush() + } + if res.Info.Status.LastTestSuiteRun != nil { + lastRun := res.Info.Status.LastTestSuiteRun + fmt.Fprintf(out, "TEST SUITE:\n%s\n%s\n\n%s\n", + fmt.Sprintf("Last Started: %s", timeconv.String(lastRun.StartedAt)), + fmt.Sprintf("Last Completed: %s", timeconv.String(lastRun.CompletedAt)), + formatTestResults(lastRun.Results)) + } + + if len(res.Info.Status.Notes) > 0 { + fmt.Fprintf(out, "NOTES:\n%s\n", res.Info.Status.Notes) + } +} + +func formatTestResults(results []*release.TestRun) string { + tbl := uitable.New() + tbl.MaxColWidth = 50 + tbl.AddRow("TEST", "STATUS", "INFO", "STARTED", "COMPLETED") + for i := 0; i < len(results); i++ { + r := results[i] + n := r.Name + s := strutil.PadRight(r.Status.String(), 10, ' ') + i := r.Info + ts := timeconv.String(r.StartedAt) + tc := timeconv.String(r.CompletedAt) + tbl.AddRow(n, s, i, ts, tc) + } + return tbl.String() +} From b1fbc391edfb97b15dfa546a1243d962551906f8 Mon Sep 17 00:00:00 2001 From: John Welsh Date: Thu, 27 Apr 2017 01:20:28 -0700 Subject: [PATCH 05/14] Added a stubbed out logs command --- cmd/helm/helm.go | 1 + cmd/helm/logs.go | 105 ++++++++++------------------------- pkg/helm/client.go | 31 +++++++---- pkg/tiller/release_server.go | 21 +++++++ 4 files changed, 70 insertions(+), 88 deletions(-) diff --git a/cmd/helm/helm.go b/cmd/helm/helm.go index ced336ac4..e20e5835e 100644 --- a/cmd/helm/helm.go +++ b/cmd/helm/helm.go @@ -134,6 +134,7 @@ func newRootCmd(out io.Writer) *cobra.Command { addFlagsTLS(newHistoryCmd(nil, out)), addFlagsTLS(newInstallCmd(nil, out)), addFlagsTLS(newListCmd(nil, out)), + addFlagsTLS(newLogsCmd(nil, out)), addFlagsTLS(newRollbackCmd(nil, out)), addFlagsTLS(newStatusCmd(nil, out)), addFlagsTLS(newUpgradeCmd(nil, out)), diff --git a/cmd/helm/logs.go b/cmd/helm/logs.go index b635e6186..a43b12a33 100644 --- a/cmd/helm/logs.go +++ b/cmd/helm/logs.go @@ -17,118 +17,69 @@ limitations under the License. package main import ( - "fmt" "io" - "regexp" - "text/tabwriter" - - "github.com/gosuri/uitable" - "github.com/gosuri/uitable/util/strutil" "github.com/spf13/cobra" "k8s.io/helm/pkg/helm" - "k8s.io/helm/pkg/proto/hapi/release" - "k8s.io/helm/pkg/proto/hapi/services" - "k8s.io/helm/pkg/timeconv" + "fmt" ) -var statusHelp = ` -This command shows the status of a named release. -The status consists of: -- last deployment time -- k8s namespace in which the release lives -- state of the release (can be: UNKNOWN, DEPLOYED, DELETED, SUPERSEDED, FAILED or DELETING) -- list of resources that this release consists of, sorted by kind -- details on last test suite run, if applicable -- additional notes provided by the chart +var logsHelp = ` +This command gets logs for a named release ` -type statusCmd struct { +type logsCmd struct { release string out io.Writer client helm.Interface version int32 } -func newStatusCmd(client helm.Interface, out io.Writer) *cobra.Command { - status := &statusCmd{ +func newLogsCmd(client helm.Interface, out io.Writer) *cobra.Command { + logs := &logsCmd{ out: out, client: client, } cmd := &cobra.Command{ - Use: "status [flags] RELEASE_NAME", - Short: "displays the status of the named release", - Long: statusHelp, + Use: "logs [flags] RELEASE_NAME", + Short: "Streams logs for the given release", + Long: logsHelp, PersistentPreRunE: setupConnection, RunE: func(cmd *cobra.Command, args []string) error { if len(args) == 0 { return errReleaseRequired } - status.release = args[0] - if status.client == nil { - status.client = helm.NewClient(helm.Host(settings.TillerHost)) + logs.release = args[0] + if logs.client == nil { + logs.client = helm.NewClient(helm.Host(settings.TillerHost)) } - return status.run() + return logs.run() }, } - cmd.PersistentFlags().Int32Var(&status.version, "revision", 0, "if set, display the status of the named release with revision") - return cmd } -func (s *statusCmd) run() error { - res, err := s.client.ReleaseStatus(s.release, helm.StatusReleaseVersion(s.version)) +func (l *logsCmd) run() error { + done := make(chan struct{}) + stream, err := l.client.ReleaseLogs(l.release, done) + + fmt.Println("Listening for logs") + for { + select { + case l, ok := <-stream: + if !ok { + return nil + } + fmt.Println(l) + } + } + if err != nil { return prettyError(err) } - PrintStatus(s.out, res) return nil } -// PrintStatus prints out the status of a release. Shared because also used by -// install / upgrade -func PrintStatus(out io.Writer, res *services.GetReleaseStatusResponse) { - if res.Info.LastDeployed != nil { - fmt.Fprintf(out, "LAST DEPLOYED: %s\n", timeconv.String(res.Info.LastDeployed)) - } - fmt.Fprintf(out, "NAMESPACE: %s\n", res.Namespace) - fmt.Fprintf(out, "STATUS: %s\n", res.Info.Status.Code) - fmt.Fprintf(out, "\n") - if len(res.Info.Status.Resources) > 0 { - re := regexp.MustCompile(" +") - - w := tabwriter.NewWriter(out, 0, 0, 2, ' ', tabwriter.TabIndent) - fmt.Fprintf(w, "RESOURCES:\n%s\n", re.ReplaceAllString(res.Info.Status.Resources, "\t")) - w.Flush() - } - if res.Info.Status.LastTestSuiteRun != nil { - lastRun := res.Info.Status.LastTestSuiteRun - fmt.Fprintf(out, "TEST SUITE:\n%s\n%s\n\n%s\n", - fmt.Sprintf("Last Started: %s", timeconv.String(lastRun.StartedAt)), - fmt.Sprintf("Last Completed: %s", timeconv.String(lastRun.CompletedAt)), - formatTestResults(lastRun.Results)) - } - - if len(res.Info.Status.Notes) > 0 { - fmt.Fprintf(out, "NOTES:\n%s\n", res.Info.Status.Notes) - } -} - -func formatTestResults(results []*release.TestRun) string { - tbl := uitable.New() - tbl.MaxColWidth = 50 - tbl.AddRow("TEST", "STATUS", "INFO", "STARTED", "COMPLETED") - for i := 0; i < len(results); i++ { - r := results[i] - n := r.Name - s := strutil.PadRight(r.Status.String(), 10, ' ') - i := r.Info - ts := timeconv.String(r.StartedAt) - tc := timeconv.String(r.CompletedAt) - tbl.AddRow(n, s, i, ts, tc) - } - return tbl.String() -} diff --git a/pkg/helm/client.go b/pkg/helm/client.go index 02f9097d2..ddb34658e 100644 --- a/pkg/helm/client.go +++ b/pkg/helm/client.go @@ -404,19 +404,28 @@ func (h *Client) logs(ctx context.Context, req *rls.GetReleaseLogsRequest, done defer close(out) defer c.Close() for { - select { - case rs := s.Recv(): - if err == io.EOF { - return - } - if err != nil { - fmt.Println("gRPC error streaming logs: ", grpc.ErrorDesc(err)) - return - } - out <- rs - case <-done: + rs, err := s.Recv() + if err == io.EOF { + return + } + if err != nil { + fmt.Println("gRPC error streaming logs: ", grpc.ErrorDesc(err)) return } + out <- rs + //select { + ////case rs, err := s.Recv(): + //// if err == io.EOF { + //// return + //// } + //// if err != nil { + //// fmt.Println("gRPC error streaming logs: ", grpc.ErrorDesc(err)) + //// return + //// } + //// out <- rs + //case <-done: + // return + //} } }() diff --git a/pkg/tiller/release_server.go b/pkg/tiller/release_server.go index 5bd0a48de..c122086b9 100644 --- a/pkg/tiller/release_server.go +++ b/pkg/tiller/release_server.go @@ -42,6 +42,8 @@ import ( "k8s.io/helm/pkg/tiller/environment" "k8s.io/helm/pkg/timeconv" "k8s.io/helm/pkg/version" + "k8s.io/helm/pkg/tiller/logdistributor" + "time" ) // releaseNameMaxLen is the maximum length of a release name. @@ -84,6 +86,7 @@ var ValidName = regexp.MustCompile("^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])+ type ReleaseServer struct { env *environment.Environment clientset internalclientset.Interface + logs *logdistributor.Pubsub } // NewReleaseServer creates a new release server. @@ -91,6 +94,7 @@ func NewReleaseServer(env *environment.Environment, clientset internalclientset. return &ReleaseServer{ env: env, clientset: clientset, + logs: logdistributor.New(), } } @@ -281,6 +285,23 @@ func (s *ReleaseServer) GetReleaseContent(c ctx.Context, req *services.GetReleas return &services.GetReleaseContentResponse{Release: rel}, err } +func (s *ReleaseServer) GetReleaseLogs(req *services.GetReleaseLogsRequest, stream services.ReleaseService_GetReleaseLogsServer) error { + t := time.NewTicker(time.Second) + //go func() { + for { + select { + case <-t.C: + fmt.Println("Sending a log") + stream.Send(&services.GetReleaseLogsResponse{Log: &release.Log{Log: "Test log!"}}) + } + } + //}() + fmt.Println("Out of the for loop") + + stream.Send(&services.GetReleaseLogsResponse{Log: &release.Log{Log: "Starting to stream logs!"}}) + return nil +} + // UpdateRelease takes an existing release and new information, and upgrades the release. func (s *ReleaseServer) UpdateRelease(c ctx.Context, req *services.UpdateReleaseRequest) (*services.UpdateReleaseResponse, error) { currentRelease, updatedRelease, err := s.prepareUpdate(req) From f70b1db6f92b987d9e93e9af8b382efce7bdb4a1 Mon Sep 17 00:00:00 2001 From: John Welsh Date: Thu, 27 Apr 2017 02:17:08 -0700 Subject: [PATCH 06/14] Moved to bidirectional RPC --- pkg/helm/client.go | 11 +- pkg/proto/hapi/services/tiller.pb.go | 188 ++++++++++++++------------- pkg/tiller/release_server.go | 30 +++-- 3 files changed, 126 insertions(+), 103 deletions(-) diff --git a/pkg/helm/client.go b/pkg/helm/client.go index ddb34658e..c77b61c0b 100644 --- a/pkg/helm/client.go +++ b/pkg/helm/client.go @@ -393,24 +393,29 @@ func (h *Client) logs(ctx context.Context, req *rls.GetReleaseLogsRequest, done } rlc := rls.NewReleaseServiceClient(c) - s, err := rlc.GetReleaseLogs(ctx, req) + s, err := rlc.GetReleaseLogs(ctx) + fmt.Println("Got s: ", s, " err: ", err) if err != nil { return nil, err } + s.Send(req) + fmt.Println("Sent req") + out := make(chan *rls.GetReleaseLogsResponse) go func() { defer close(out) defer c.Close() for { + fmt.Println("Waiting on recv") rs, err := s.Recv() + fmt.Println("Got rs: ", s, " err: ", err) if err == io.EOF { return } if err != nil { - fmt.Println("gRPC error streaming logs: ", grpc.ErrorDesc(err)) - return + fmt.Println() } out <- rs //select { diff --git a/pkg/proto/hapi/services/tiller.pb.go b/pkg/proto/hapi/services/tiller.pb.go index c718c98d1..817730f03 100644 --- a/pkg/proto/hapi/services/tiller.pb.go +++ b/pkg/proto/hapi/services/tiller.pb.go @@ -600,7 +600,7 @@ type ReleaseServiceClient interface { // GetReleaseContent retrieves the release content (chart + value) for the specified release. GetReleaseContent(ctx context.Context, in *GetReleaseContentRequest, opts ...grpc.CallOption) (*GetReleaseContentResponse, error) // GetReleaseLogs returns a stream of logging information from the release - GetReleaseLogs(ctx context.Context, in *GetReleaseLogsRequest, opts ...grpc.CallOption) (ReleaseService_GetReleaseLogsClient, error) + GetReleaseLogs(ctx context.Context, opts ...grpc.CallOption) (ReleaseService_GetReleaseLogsClient, error) // UpdateRelease updates release content. UpdateRelease(ctx context.Context, in *UpdateReleaseRequest, opts ...grpc.CallOption) (*UpdateReleaseResponse, error) // InstallRelease requests installation of a chart as a new release. @@ -675,22 +675,17 @@ func (c *releaseServiceClient) GetReleaseContent(ctx context.Context, in *GetRel return out, nil } -func (c *releaseServiceClient) GetReleaseLogs(ctx context.Context, in *GetReleaseLogsRequest, opts ...grpc.CallOption) (ReleaseService_GetReleaseLogsClient, error) { +func (c *releaseServiceClient) GetReleaseLogs(ctx context.Context, opts ...grpc.CallOption) (ReleaseService_GetReleaseLogsClient, error) { stream, err := grpc.NewClientStream(ctx, &_ReleaseService_serviceDesc.Streams[1], c.cc, "/hapi.services.tiller.ReleaseService/GetReleaseLogs", opts...) if err != nil { return nil, err } x := &releaseServiceGetReleaseLogsClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } return x, nil } type ReleaseService_GetReleaseLogsClient interface { + Send(*GetReleaseLogsRequest) error Recv() (*GetReleaseLogsResponse, error) grpc.ClientStream } @@ -699,6 +694,10 @@ type releaseServiceGetReleaseLogsClient struct { grpc.ClientStream } +func (x *releaseServiceGetReleaseLogsClient) Send(m *GetReleaseLogsRequest) error { + return x.ClientStream.SendMsg(m) +} + func (x *releaseServiceGetReleaseLogsClient) Recv() (*GetReleaseLogsResponse, error) { m := new(GetReleaseLogsResponse) if err := x.ClientStream.RecvMsg(m); err != nil { @@ -806,7 +805,7 @@ type ReleaseServiceServer interface { // GetReleaseContent retrieves the release content (chart + value) for the specified release. GetReleaseContent(context.Context, *GetReleaseContentRequest) (*GetReleaseContentResponse, error) // GetReleaseLogs returns a stream of logging information from the release - GetReleaseLogs(*GetReleaseLogsRequest, ReleaseService_GetReleaseLogsServer) error + GetReleaseLogs(ReleaseService_GetReleaseLogsServer) error // UpdateRelease updates release content. UpdateRelease(context.Context, *UpdateReleaseRequest) (*UpdateReleaseResponse, error) // InstallRelease requests installation of a chart as a new release. @@ -885,15 +884,12 @@ func _ReleaseService_GetReleaseContent_Handler(srv interface{}, ctx context.Cont } func _ReleaseService_GetReleaseLogs_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(GetReleaseLogsRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(ReleaseServiceServer).GetReleaseLogs(m, &releaseServiceGetReleaseLogsServer{stream}) + return srv.(ReleaseServiceServer).GetReleaseLogs(&releaseServiceGetReleaseLogsServer{stream}) } type ReleaseService_GetReleaseLogsServer interface { Send(*GetReleaseLogsResponse) error + Recv() (*GetReleaseLogsRequest, error) grpc.ServerStream } @@ -905,6 +901,14 @@ func (x *releaseServiceGetReleaseLogsServer) Send(m *GetReleaseLogsResponse) err return x.ServerStream.SendMsg(m) } +func (x *releaseServiceGetReleaseLogsServer) Recv() (*GetReleaseLogsRequest, error) { + m := new(GetReleaseLogsRequest) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + func _ReleaseService_UpdateRelease_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UpdateReleaseRequest) if err := dec(in); err != nil { @@ -1081,6 +1085,7 @@ var _ReleaseService_serviceDesc = grpc.ServiceDesc{ StreamName: "GetReleaseLogs", Handler: _ReleaseService_GetReleaseLogs_Handler, ServerStreams: true, + ClientStreams: true, }, { StreamName: "RunReleaseTest", @@ -1094,82 +1099,83 @@ var _ReleaseService_serviceDesc = grpc.ServiceDesc{ func init() { proto.RegisterFile("hapi/services/tiller.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ - // 1229 bytes of a gzipped FileDescriptorProto + // 1233 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0xdd, 0x72, 0xdb, 0x44, - 0x14, 0x8e, 0x2c, 0xc7, 0x3f, 0x27, 0x69, 0x48, 0xb7, 0xf9, 0x51, 0x35, 0xc0, 0x04, 0x75, 0xa0, - 0x6e, 0x4b, 0x1d, 0x30, 0x57, 0xcc, 0x00, 0x33, 0x69, 0xea, 0x49, 0x0a, 0x26, 0x9d, 0x91, 0xdb, - 0x32, 0xc3, 0x30, 0x78, 0x14, 0x7b, 0xed, 0x88, 0xca, 0x5a, 0xa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0x82, 0xa8, 0x9b, 0x78, 0x1a, 0x92, 0x88, 0x75, 0x93, 0x9f, 0x67, 0x57, 0x6e, 0x83, 0xf2, 0x6f, - 0x62, 0x77, 0xea, 0x07, 0x0c, 0x47, 0x56, 0x5d, 0xd8, 0x15, 0x3b, 0x74, 0x02, 0xc0, 0xed, 0x92, - 0x68, 0x82, 0x23, 0x6b, 0x9d, 0x9b, 0xee, 0x54, 0x30, 0xfd, 0x32, 0xd1, 0x77, 0xdb, 0x54, 0x2d, - 0xd1, 0x57, 0xb0, 0x29, 0x20, 0x19, 0x8d, 0xc9, 0x04, 0x53, 0xab, 0x71, 0x60, 0x76, 0xb6, 0x7a, - 0xf7, 0x85, 0x29, 0x85, 0xfc, 0x50, 0x80, 0x76, 0x4c, 0x26, 0xd8, 0xdd, 0x10, 0xea, 0xc9, 0x9a, - 0xa2, 0xf7, 0xa1, 0x1d, 0x7a, 0x73, 0x4c, 0x17, 0xde, 0x18, 0x5b, 0x4d, 0x1e, 0xe1, 0xf2, 0xc0, - 0xf9, 0x19, 0x5a, 0xca, 0xb9, 0xd3, 0x83, 0x86, 0x48, 0x0d, 0x6d, 0x40, 0xf3, 0xf5, 0xd9, 0x77, - 0x67, 0x2f, 0x7f, 0x38, 0xdb, 0x5e, 0x43, 0x2d, 0xa8, 0x9f, 0x1d, 0x7d, 0xdf, 0xdf, 0x36, 0xd0, - 0x5d, 0xb8, 0x33, 0x38, 0x1a, 0xbe, 0x1a, 0xb9, 0xfd, 0x41, 0xff, 0x68, 0xd8, 0x7f, 0xbe, 0x5d, - 0x73, 0x3e, 0x84, 0x76, 0x1a, 0x33, 0x6a, 0x82, 0x79, 0x34, 0x3c, 0x16, 0x57, 0x9e, 0xf7, 0x87, - 0xc7, 0xdb, 0x86, 0xf3, 0x87, 0x01, 0x3b, 0x7a, 0x89, 0xe8, 0x82, 0x84, 0x14, 0x27, 0x35, 0x1a, - 0x93, 0x38, 0x4c, 0x6b, 0xc4, 0x37, 0x08, 0x41, 0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 0xd7, 0xf8, + 0xbf, 0xda, 0x5f, 0xff, 0x17, 0x00, 0x00, 0xff, 0xff, 0x78, 0x8f, 0xed, 0x5d, 0x53, 0x10, 0x00, + 0x00, } diff --git a/pkg/tiller/release_server.go b/pkg/tiller/release_server.go index c122086b9..46f0bf480 100644 --- a/pkg/tiller/release_server.go +++ b/pkg/tiller/release_server.go @@ -285,20 +285,32 @@ func (s *ReleaseServer) GetReleaseContent(c ctx.Context, req *services.GetReleas return &services.GetReleaseContentResponse{Release: rel}, err } -func (s *ReleaseServer) GetReleaseLogs(req *services.GetReleaseLogsRequest, stream services.ReleaseService_GetReleaseLogsServer) error { +func (s *ReleaseServer) GetReleaseLogs(svc services.ReleaseService_GetReleaseLogsServer) error { t := time.NewTicker(time.Second) - //go func() { + done := make(chan struct{}) + go func() { + for { + select { + case <-t.C: + fmt.Println("Sending a log") + svc.Send(&services.GetReleaseLogsResponse{Log: &release.Log{Log: "Test log!"}}) + case <-done: + return + } + } + }() + for { - select { - case <-t.C: - fmt.Println("Sending a log") - stream.Send(&services.GetReleaseLogsResponse{Log: &release.Log{Log: "Test log!"}}) + rq, err := svc.Recv() + fmt.Println("Req: ", rq, " Error: ", err) + if err != nil { + done <- struct{}{} + break } + s.logs.Subscribe(rq.Name, ) + rq.Name } - //}() - fmt.Println("Out of the for loop") - stream.Send(&services.GetReleaseLogsResponse{Log: &release.Log{Log: "Starting to stream logs!"}}) return nil } From 8602ba648f222cbee41a2e77d967d3dab92ccfd9 Mon Sep 17 00:00:00 2001 From: John Welsh Date: Fri, 28 Apr 2017 03:38:17 -0700 Subject: [PATCH 07/14] cleaned up api a bit --- _proto/hapi/release/log.proto | 52 ++++--- _proto/hapi/services/tiller.proto | 7 +- cmd/helm/install.go | 36 ++--- cmd/helm/logs.go | 4 +- pkg/helm/client.go | 6 +- pkg/helm/interface.go | 3 +- pkg/proto/hapi/release/hook.pb.go | 1 + pkg/proto/hapi/release/log.pb.go | 117 ++++++++------- pkg/proto/hapi/services/tiller.pb.go | 171 +++++++++++----------- pkg/tiller/logdistributor/log_streamer.go | 20 +-- pkg/tiller/release_server.go | 33 +++-- 11 files changed, 240 insertions(+), 210 deletions(-) diff --git a/_proto/hapi/release/log.proto b/_proto/hapi/release/log.proto index e1152030f..591f6ebae 100644 --- a/_proto/hapi/release/log.proto +++ b/_proto/hapi/release/log.proto @@ -21,30 +21,36 @@ import "google/protobuf/timestamp.proto"; option go_package = "release"; +// Allows filtering by log event source +enum LogSource { + HOOK = 0; + TEST = 1; + POD = 2; + SYSTEM = 3; +} + +// Syslog log levels +enum LogLevel { + EMERG = 0; + ALERT = 1; + CRIT = 2; + ERR = 3; + WARNING = 4; + NOTICE = 5; + INFO = 6; + DEBUG = 7; +} + +message LogSubscription { + string release = 1; + LogLevel level = 2; + repeated LogSource sources = 3; +} + message Log { - // Allows filtering by log event source - enum Source { - HOOK = 0; - TEST = 1; - POD = 2; - SYSTEM = 3; - } - - // Syslog log levels - enum Level { - EMERG = 0; - ALERT = 1; - CRIT = 2; - ERR = 3; - WARNING = 4; - NOTICE = 5; - INFO = 6; - DEBUG = 7; - } - - Source source = 1; - Level level = 2; - string release = 3; + string release = 1; + LogLevel level = 2; + LogSource source = 3; string log = 4; google.protobuf.Timestamp timestamp = 5; } diff --git a/_proto/hapi/services/tiller.proto b/_proto/hapi/services/tiller.proto index 53ce0016b..836ba15af 100644 --- a/_proto/hapi/services/tiller.proto +++ b/_proto/hapi/services/tiller.proto @@ -57,7 +57,7 @@ service ReleaseService { } // GetReleaseLogs returns a stream of logging information from the release - rpc GetReleaseLogs(GetReleaseLogsRequest) returns (stream GetReleaseLogsResponse) { + rpc GetReleaseLogs(stream GetReleaseLogsRequest) returns (stream GetReleaseLogsResponse) { } // UpdateRelease updates release content. @@ -188,10 +188,7 @@ message GetReleaseContentResponse { } message GetReleaseLogsRequest { - // Name is the name of the release - string name = 1; - // Version is the version of the release - int32 version = 2; + hapi.release.LogSubscription subscription = 1; } message GetReleaseLogsResponse { diff --git a/cmd/helm/install.go b/cmd/helm/install.go index 36ce27d4f..c4f7bdaa0 100644 --- a/cmd/helm/install.go +++ b/cmd/helm/install.go @@ -177,22 +177,22 @@ func newInstallCmd(c helm.Interface, out io.Writer) *cobra.Command { return cmd } -func streamLogs(client helm.Interface, rlsName string, done <-chan struct{}) error { - logs, err := client.ReleaseLogs(rlsName, done) - if err != nil { - return err - } - - go func() { - select { - case log := <-logs: - fmt.Println(log.Log) - case <-done: - return - } - }() - return nil -} +//func streamLogs(client helm.Interface, rlsName string, done <-chan struct{}) error { +// logs, err := client.ReleaseLogs(rlsName, done) +// if err != nil { +// return err +// } +// +// go func() { +// select { +// case log := <-logs: +// fmt.Println(log.Log) +// case <-done: +// return +// } +// }() +// return nil +//} func (i *installCmd) run() error { debug("CHART PATH: %s\n", i.chartPath) @@ -226,8 +226,8 @@ func (i *installCmd) run() error { checkDependencies(chartRequested, req, i.out) } - done := make(chan struct{}) - streamLogs(i.client, i.name, done) + //done := make(chan struct{}) + //streamLogs(i.client, i.name, done) res, err := i.client.InstallReleaseFromChart( chartRequested, i.namespace, diff --git a/cmd/helm/logs.go b/cmd/helm/logs.go index a43b12a33..1fc210d2d 100644 --- a/cmd/helm/logs.go +++ b/cmd/helm/logs.go @@ -22,6 +22,7 @@ import ( "k8s.io/helm/pkg/helm" "fmt" + "k8s.io/helm/pkg/proto/hapi/release" ) var logsHelp = ` @@ -63,7 +64,7 @@ func newLogsCmd(client helm.Interface, out io.Writer) *cobra.Command { func (l *logsCmd) run() error { done := make(chan struct{}) - stream, err := l.client.ReleaseLogs(l.release, done) + stream, err := l.client.ReleaseLogs(l.release, release.LogLevel_DEBUG, done, release.LogSource_SYSTEM, release.LogSource_POD) fmt.Println("Listening for logs") for { @@ -77,6 +78,7 @@ func (l *logsCmd) run() error { } if err != nil { + done <- struct{}{} return prettyError(err) } diff --git a/pkg/helm/client.go b/pkg/helm/client.go index c77b61c0b..12fdc3b42 100644 --- a/pkg/helm/client.go +++ b/pkg/helm/client.go @@ -28,6 +28,7 @@ import ( "k8s.io/helm/pkg/proto/hapi/chart" rls "k8s.io/helm/pkg/proto/hapi/services" "fmt" + "k8s.io/helm/pkg/proto/hapi/release" ) // Client manages client side of the helm-tiller protocol @@ -217,9 +218,10 @@ func (h *Client) RollbackRelease(rlsName string, opts ...RollbackOption) (*rls.R } // ReleaseLogs returns a channel streaming log data from the release -func (h *Client) ReleaseLogs(rlsName string, done <-chan struct{}) (<-chan *rls.GetReleaseLogsResponse, error) { +func (h *Client) ReleaseLogs(rlsName string, level release.LogLevel, done <-chan struct{}, sources ...release.LogSource) (<-chan *rls.GetReleaseLogsResponse, error) { ctx := NewContext() - req := &rls.GetReleaseLogsRequest{Name: rlsName} + sub := &release.LogSubscription{Release: rlsName, Level: level, Sources: sources} + req := &rls.GetReleaseLogsRequest{Subscription: sub} return h.logs(ctx, req, done) } diff --git a/pkg/helm/interface.go b/pkg/helm/interface.go index 2320c18f1..7ea2eaf80 100644 --- a/pkg/helm/interface.go +++ b/pkg/helm/interface.go @@ -19,6 +19,7 @@ package helm import ( "k8s.io/helm/pkg/proto/hapi/chart" rls "k8s.io/helm/pkg/proto/hapi/services" + "k8s.io/helm/pkg/proto/hapi/release" ) // Interface for helm client for mocking in tests @@ -28,7 +29,7 @@ type Interface interface { InstallReleaseFromChart(chart *chart.Chart, namespace string, opts ...InstallOption) (*rls.InstallReleaseResponse, error) DeleteRelease(rlsName string, opts ...DeleteOption) (*rls.UninstallReleaseResponse, error) ReleaseStatus(rlsName string, opts ...StatusOption) (*rls.GetReleaseStatusResponse, error) - ReleaseLogs(rlsName string, done <-chan struct{}) (<-chan *rls.GetReleaseLogsResponse, error) + ReleaseLogs(rlsName string, level release.LogLevel, done <-chan struct{}, sources ...release.LogSource) (<-chan *rls.GetReleaseLogsResponse, error) UpdateRelease(rlsName, chStr string, opts ...UpdateOption) (*rls.UpdateReleaseResponse, error) UpdateReleaseFromChart(rlsName string, chart *chart.Chart, opts ...UpdateOption) (*rls.UpdateReleaseResponse, error) RollbackRelease(rlsName string, opts ...RollbackOption) (*rls.RollbackReleaseResponse, error) diff --git a/pkg/proto/hapi/release/hook.pb.go b/pkg/proto/hapi/release/hook.pb.go index 8989146b3..272da0590 100644 --- a/pkg/proto/hapi/release/hook.pb.go +++ b/pkg/proto/hapi/release/hook.pb.go @@ -17,6 +17,7 @@ It is generated from these files: It has these top-level messages: Hook Info + LogSubscription Log Release Status diff --git a/pkg/proto/hapi/release/log.pb.go b/pkg/proto/hapi/release/log.pb.go index e965daf69..04b606b05 100644 --- a/pkg/proto/hapi/release/log.pb.go +++ b/pkg/proto/hapi/release/log.pb.go @@ -15,48 +15,48 @@ var _ = fmt.Errorf var _ = math.Inf // Allows filtering by log event source -type Log_Source int32 +type LogSource int32 const ( - Log_HOOK Log_Source = 0 - Log_TEST Log_Source = 1 - Log_POD Log_Source = 2 - Log_SYSTEM Log_Source = 3 + LogSource_HOOK LogSource = 0 + LogSource_TEST LogSource = 1 + LogSource_POD LogSource = 2 + LogSource_SYSTEM LogSource = 3 ) -var Log_Source_name = map[int32]string{ +var LogSource_name = map[int32]string{ 0: "HOOK", 1: "TEST", 2: "POD", 3: "SYSTEM", } -var Log_Source_value = map[string]int32{ +var LogSource_value = map[string]int32{ "HOOK": 0, "TEST": 1, "POD": 2, "SYSTEM": 3, } -func (x Log_Source) String() string { - return proto.EnumName(Log_Source_name, int32(x)) +func (x LogSource) String() string { + return proto.EnumName(LogSource_name, int32(x)) } -func (Log_Source) EnumDescriptor() ([]byte, []int) { return fileDescriptor2, []int{0, 0} } +func (LogSource) EnumDescriptor() ([]byte, []int) { return fileDescriptor2, []int{0} } // Syslog log levels -type Log_Level int32 +type LogLevel int32 const ( - Log_EMERG Log_Level = 0 - Log_ALERT Log_Level = 1 - Log_CRIT Log_Level = 2 - Log_ERR Log_Level = 3 - Log_WARNING Log_Level = 4 - Log_NOTICE Log_Level = 5 - Log_INFO Log_Level = 6 - Log_DEBUG Log_Level = 7 + LogLevel_EMERG LogLevel = 0 + LogLevel_ALERT LogLevel = 1 + LogLevel_CRIT LogLevel = 2 + LogLevel_ERR LogLevel = 3 + LogLevel_WARNING LogLevel = 4 + LogLevel_NOTICE LogLevel = 5 + LogLevel_INFO LogLevel = 6 + LogLevel_DEBUG LogLevel = 7 ) -var Log_Level_name = map[int32]string{ +var LogLevel_name = map[int32]string{ 0: "EMERG", 1: "ALERT", 2: "CRIT", @@ -66,7 +66,7 @@ var Log_Level_name = map[int32]string{ 6: "INFO", 7: "DEBUG", } -var Log_Level_value = map[string]int32{ +var LogLevel_value = map[string]int32{ "EMERG": 0, "ALERT": 1, "CRIT": 2, @@ -77,15 +77,26 @@ var Log_Level_value = map[string]int32{ "DEBUG": 7, } -func (x Log_Level) String() string { - return proto.EnumName(Log_Level_name, int32(x)) +func (x LogLevel) String() string { + return proto.EnumName(LogLevel_name, int32(x)) } -func (Log_Level) EnumDescriptor() ([]byte, []int) { return fileDescriptor2, []int{0, 1} } +func (LogLevel) EnumDescriptor() ([]byte, []int) { return fileDescriptor2, []int{1} } + +type LogSubscription struct { + Release string `protobuf:"bytes,1,opt,name=release" json:"release,omitempty"` + Level LogLevel `protobuf:"varint,2,opt,name=level,enum=hapi.release.LogLevel" json:"level,omitempty"` + Sources []LogSource `protobuf:"varint,3,rep,packed,name=sources,enum=hapi.release.LogSource" json:"sources,omitempty"` +} + +func (m *LogSubscription) Reset() { *m = LogSubscription{} } +func (m *LogSubscription) String() string { return proto.CompactTextString(m) } +func (*LogSubscription) ProtoMessage() {} +func (*LogSubscription) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0} } type Log struct { - Source Log_Source `protobuf:"varint,1,opt,name=source,enum=hapi.release.Log_Source" json:"source,omitempty"` - Level Log_Level `protobuf:"varint,2,opt,name=level,enum=hapi.release.Log_Level" json:"level,omitempty"` - Release string `protobuf:"bytes,3,opt,name=release" json:"release,omitempty"` + Release string `protobuf:"bytes,1,opt,name=release" json:"release,omitempty"` + Level LogLevel `protobuf:"varint,2,opt,name=level,enum=hapi.release.LogLevel" json:"level,omitempty"` + Source LogSource `protobuf:"varint,3,opt,name=source,enum=hapi.release.LogSource" json:"source,omitempty"` Log string `protobuf:"bytes,4,opt,name=log" json:"log,omitempty"` Timestamp *google_protobuf.Timestamp `protobuf:"bytes,5,opt,name=timestamp" json:"timestamp,omitempty"` } @@ -93,7 +104,7 @@ type Log struct { func (m *Log) Reset() { *m = Log{} } func (m *Log) String() string { return proto.CompactTextString(m) } func (*Log) ProtoMessage() {} -func (*Log) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0} } +func (*Log) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{1} } func (m *Log) GetTimestamp() *google_protobuf.Timestamp { if m != nil { @@ -103,33 +114,37 @@ func (m *Log) GetTimestamp() *google_protobuf.Timestamp { } func init() { + proto.RegisterType((*LogSubscription)(nil), "hapi.release.LogSubscription") proto.RegisterType((*Log)(nil), "hapi.release.Log") - proto.RegisterEnum("hapi.release.Log_Source", Log_Source_name, Log_Source_value) - proto.RegisterEnum("hapi.release.Log_Level", Log_Level_name, Log_Level_value) + proto.RegisterEnum("hapi.release.LogSource", LogSource_name, LogSource_value) + proto.RegisterEnum("hapi.release.LogLevel", LogLevel_name, LogLevel_value) } func init() { proto.RegisterFile("hapi/release/log.proto", fileDescriptor2) } var fileDescriptor2 = []byte{ - // 317 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x8f, 0x4b, 0x4b, 0xfb, 0x40, - 0x14, 0xc5, 0x9b, 0x77, 0x73, 0xfb, 0xe7, 0xcf, 0x65, 0x16, 0x3a, 0x74, 0x63, 0xe9, 0xaa, 0x1b, - 0x27, 0x5a, 0x37, 0x6e, 0xfb, 0x18, 0x6b, 0x30, 0x4d, 0x64, 0x12, 0x11, 0x5d, 0x08, 0xad, 0x8c, - 0xb1, 0x90, 0x32, 0xa5, 0x0f, 0xbf, 0xae, 0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x9e, 0x09, 0x4a, - 0x42, 0xf0, 0xf8, 0x9c, 0x8b, 0x19, 0xb6, 0xf4, 0x38, 0x4a, 0xb8, 0xd0, 0x9e, 0x36, 0xb8, 0x13, - 0x11, 0x17, 0x68, 0x6b, 0x37, 0x17, 0x02, 0x1d, 0xd2, 0x81, 0xe0, 0x71, 0x24, 0xd2, 0x38, 0x9d, - 0xa1, 0xab, 0x5f, 0xa5, 0x59, 0x11, 0x4f, 0x38, 0x7a, 0x9a, 0x8d, 0xd3, 0x9b, 0x0c, 0x7d, 0xfd, - 0x60, 0xca, 0xc7, 0x0f, 0x33, 0x0c, 0xc6, 0xe1, 0x73, 0xd3, 0x74, 0xe9, 0x9b, 0xf0, 0x57, 0x5f, - 0x01, 0x00, 0x00, 0xff, 0xff, 0xe3, 0x7b, 0x56, 0xb1, 0xbc, 0x01, 0x00, 0x00, + // 359 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x90, 0xcf, 0x6e, 0x9b, 0x40, + 0x10, 0xc6, 0x8d, 0x97, 0x3f, 0x66, 0x5c, 0xb9, 0xab, 0x3d, 0xb8, 0xc8, 0x97, 0x22, 0x9f, 0x90, + 0x55, 0x81, 0xea, 0xf6, 0xd0, 0xab, 0xff, 0x6c, 0x5d, 0x54, 0x0c, 0xd5, 0x42, 0x55, 0xb5, 0x37, + 0x6c, 0x6d, 0x09, 0x12, 0xce, 0x22, 0xc0, 0x79, 0x8a, 0x3c, 0x59, 0x9e, 0x2a, 0x5a, 0x30, 0x4e, + 0xa4, 0x28, 0xb7, 0xdc, 0x66, 0x77, 0x7e, 0xf3, 0x7d, 0x33, 0x1f, 0x4c, 0x6f, 0xd2, 0x32, 0xf7, + 0x2a, 0x5e, 0xf0, 0xb4, 0xe6, 0x5e, 0x21, 0x32, 0xb7, 0xac, 0x44, 0x23, 0xc8, 0x3b, 0xf9, 0xef, + 0x5e, 0xfe, 0x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 0xc4, 0x04, 0x8d, 0xee, 0x29, 0xdb, 0xe1, 0x81, + 0x2c, 0x57, 0x01, 0x65, 0x72, 0x6c, 0x04, 0xea, 0x86, 0xf9, 0x09, 0x1e, 0x4a, 0x01, 0xca, 0x18, + 0x46, 0x64, 0x0c, 0xc6, 0x9f, 0x15, 0x0b, 0xfd, 0x70, 0x87, 0x55, 0xa9, 0x16, 0x46, 0x89, 0xbf, + 0xa1, 0x58, 0x93, 0xac, 0x1f, 0x7e, 0x8f, 0xb0, 0x2e, 0x05, 0xb6, 0x74, 0xfd, 0x7b, 0x87, 0x8d, + 0xb5, 0xf9, 0xaf, 0x8f, 0xf3, 0xa0, 0xb7, 0x27, 0x7c, 0x79, 0x0c, 0x00, 0x00, 0xff, 0xff, 0x5f, + 0x53, 0x1a, 0x42, 0x4f, 0x02, 0x00, 0x00, } diff --git a/pkg/proto/hapi/services/tiller.pb.go b/pkg/proto/hapi/services/tiller.pb.go index 817730f03..f5d315347 100644 --- a/pkg/proto/hapi/services/tiller.pb.go +++ b/pkg/proto/hapi/services/tiller.pb.go @@ -242,10 +242,7 @@ func (m *GetReleaseContentResponse) GetRelease() *hapi_release5.Release { } type GetReleaseLogsRequest 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"` + Subscription *hapi_release6.LogSubscription `protobuf:"bytes,1,opt,name=subscription" json:"subscription,omitempty"` } func (m *GetReleaseLogsRequest) Reset() { *m = GetReleaseLogsRequest{} } @@ -253,6 +250,13 @@ func (m *GetReleaseLogsRequest) String() string { return proto.Compac func (*GetReleaseLogsRequest) ProtoMessage() {} func (*GetReleaseLogsRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } +func (m *GetReleaseLogsRequest) GetSubscription() *hapi_release6.LogSubscription { + if m != nil { + return m.Subscription + } + return nil +} + type GetReleaseLogsResponse struct { Log *hapi_release6.Log `protobuf:"bytes,1,opt,name=log" json:"log,omitempty"` } @@ -1099,83 +1103,84 @@ var _ReleaseService_serviceDesc = grpc.ServiceDesc{ func init() { proto.RegisterFile("hapi/services/tiller.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ - // 1233 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0xdd, 0x72, 0xdb, 0x44, - 0x14, 0x8e, 0x2c, 0xc7, 0x3f, 0x27, 0x69, 0x70, 0xb7, 0x89, 0xa3, 0x6a, 0x80, 0x09, 0xea, 0x40, - 0xdd, 0x96, 0x3a, 0xc5, 0x5c, 0x31, 0x03, 0xcc, 0xa4, 0xa9, 0x27, 0x29, 0x98, 0x74, 0x46, 0x6e, - 0xcb, 0x0c, 0xc3, 0xe0, 0x51, 0xec, 0xb5, 0x2b, 0x2a, 0x6b, 0x5d, 0xed, 0x2a, 0x34, 0xb7, 0xdc, - 0xf1, 0x28, 0xbc, 0x05, 0x2f, 0x40, 0x9f, 0x89, 0xd1, 0xfe, 0xc8, 0x5e, 0x45, 0x4a, 0x84, 0x6f, - 0xac, 0xdd, 0x3d, 0x67, 0xcf, 0xcf, 0x77, 0x4e, 0xbe, 0x3d, 0x01, 0xfb, 0x8d, 0xb7, 0xf0, 0x0f, - 0x29, 0x8e, 0x2e, 0xfc, 0x31, 0xa6, 0x87, 0xcc, 0x0f, 0x02, 0x1c, 0x75, 0x17, 0x11, 0x61, 0x04, - 0xed, 0x26, 0xb2, 0xae, 0x92, 0x75, 0x85, 0xcc, 0x6e, 0xf3, 0x1b, 0xe3, 0x37, 0x5e, 0xc4, 0xc4, - 0xaf, 0xd0, 0xb6, 0xf7, 0x57, 0xcf, 0x49, 0x38, 0xf5, 0x67, 0x52, 0x20, 0x5c, 0x44, 0x38, 0xc0, - 0x1e, 0xc5, 0xea, 0x2b, 0x65, 0x6d, 0x4d, 0x16, 0x90, 0x99, 0x66, 0x4c,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0x6c, 0xa9, 0x4e, 0x57, 0xbd, 0x1e, 0x93, 0x90, 0xe1, - 0x90, 0xad, 0x17, 0xff, 0x00, 0xee, 0xe6, 0x58, 0x92, 0x09, 0x1c, 0x42, 0x5d, 0x86, 0xc6, 0xad, - 0x15, 0xe2, 0xaa, 0xb4, 0x9c, 0x3e, 0xec, 0x2d, 0xad, 0x0d, 0xc8, 0x6c, 0x4d, 0x50, 0xbf, 0x83, - 0x76, 0xd6, 0x8c, 0x8c, 0xe8, 0x1e, 0x98, 0x01, 0x99, 0xc9, 0x68, 0x6e, 0xeb, 0xd1, 0x0c, 0xc8, - 0xcc, 0x4d, 0xa4, 0xce, 0xbf, 0x15, 0xd8, 0x7d, 0xb5, 0x98, 0x78, 0x0c, 0xab, 0x00, 0xaf, 0x89, - 0xe2, 0x3e, 0x6c, 0x72, 0x4a, 0x93, 0x15, 0x91, 0x36, 0x05, 0xef, 0x1d, 0x27, 0xbf, 0xae, 0x90, - 0xa3, 0x87, 0x50, 0xbb, 0xf0, 0x82, 0x18, 0x53, 0x5e, 0x8e, 0xb4, 0x76, 0x52, 0x93, 0xf3, 0xa1, - 0x2b, 0x35, 0xd0, 0x3e, 0xd4, 0x27, 0xd1, 0xe5, 0x28, 0x8a, 0x43, 0x4e, 0x04, 0x0d, 0xb7, 0x36, - 0x89, 0x2e, 0xdd, 0x38, 0x44, 0xf7, 0xe0, 0xd6, 0xc4, 0xa7, 0xde, 0x79, 0x80, 0x47, 0x6f, 0x08, - 0x79, 0x4b, 0x39, 0x17, 0x34, 0xdc, 0x6d, 0x79, 0x78, 0x9a, 0x9c, 0x21, 0x3b, 0xe9, 0xe7, 0x71, - 0x84, 0x3d, 0x86, 0xad, 0x1a, 0x97, 0xa7, 0xfb, 0x04, 0x34, 0xe6, 0xcf, 0x31, 0x89, 0x19, 0xff, - 0x03, 0x36, 0x5d, 0xb5, 0x45, 0x9f, 0xc1, 0x76, 0x84, 0x29, 0x66, 0x23, 0x19, 0x65, 0x83, 0x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bf, 0xef, 0x60, 0x47, 0x1f, - 0x12, 0xd0, 0xa3, 0x9b, 0x8c, 0xac, 0x4c, 0x24, 0xf6, 0x97, 0xe5, 0x94, 0x95, 0xbb, 0x8e, 0xf1, - 0xc4, 0x40, 0xbf, 0xc3, 0x2d, 0xed, 0x21, 0x44, 0x05, 0x05, 0xca, 0x1b, 0x3e, 0xec, 0x47, 0xa5, - 0x74, 0xd3, 0xf4, 0xe6, 0xb0, 0xa3, 0x33, 0x5c, 0x51, 0x7a, 0xb9, 0x4f, 0x46, 0x51, 0x7a, 0xf9, - 0xa4, 0xe9, 0x6c, 0x24, 0xad, 0x93, 0x25, 0xa0, 0xa2, 0xd6, 0x29, 0x20, 0xcb, 0xa2, 0xd6, 0x29, - 0xe2, 0x35, 0x67, 0x03, 0x79, 0x00, 0x4b, 0xfe, 0x41, 0xf7, 0x0b, 0x2b, 0xa2, 0xd3, 0x96, 0xdd, - 0xb9, 0x59, 0x31, 0x75, 0xb1, 0x80, 0x8f, 0x32, 0x0f, 0x34, 0x2a, 0x80, 0x26, 0x7f, 0x2e, 0xb1, - 0x1f, 0x97, 0xd4, 0xce, 0x24, 0x25, 0x29, 0xed, 0x9a, 0xa4, 0x74, 0xbe, 0xbc, 0x26, 0xa9, 0x0c, - 0x3b, 0x3a, 0x1b, 0xc8, 0x87, 0x1d, 0x37, 0x0e, 0xa5, 0xeb, 0x84, 0x98, 0x50, 0xc1, 0xed, 0xab, - 0x94, 0x68, 0x3f, 0x28, 0xa1, 0xb9, 0xa4, 0x94, 0xa7, 0xf0, 0x4b, 0x43, 0xa9, 0x9e, 0xd7, 0xf8, - 0xbf, 0xda, 0x5f, 0xff, 0x17, 0x00, 0x00, 0xff, 0xff, 0x78, 0x8f, 0xed, 0x5d, 0x53, 0x10, 0x00, - 0x00, + // 1257 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0xdb, 0x6e, 0xdb, 0x46, + 0x10, 0x35, 0x45, 0x59, 0x97, 0xb1, 0xe3, 0x3a, 0x1b, 0x5f, 0x18, 0xa2, 0x29, 0x5c, 0x06, 0x6d, + 0x94, 0xa4, 0x91, 0x53, 0xf7, 0xa9, 0x40, 0x5b, 0xc0, 0x71, 0x04, 0x3b, 0xad, 0xea, 0x00, 0x54, + 0x92, 0x02, 0x41, 0x51, 0x81, 0x96, 0x56, 0x32, 0x1b, 0x8a, 0xab, 0x70, 0x97, 0x6e, 0xfc, 0xda, + 0xb7, 0x7e, 0x4a, 0xff, 0xa2, 0x3f, 0xd0, 0x7c, 0x53, 0xc1, 0xbd, 0x50, 0x5c, 0x8a, 0xb4, 0x59, + 0xbf, 0x88, 0xdc, 0x9d, 0xd9, 0x33, 0x33, 0x67, 0x86, 0xb3, 0x23, 0xb0, 0xcf, 0xbd, 0xb9, 0xbf, + 0x4f, 0x71, 0x74, 0xe1, 0x8f, 0x30, 0xdd, 0x67, 0x7e, 0x10, 0xe0, 0xa8, 0x3b, 0x8f, 0x08, 0x23, + 0x68, 0x2b, 0x91, 0x75, 0x95, 0xac, 0x2b, 0x64, 0xf6, 0x0e, 0x3f, 0x31, 0x3a, 0xf7, 0x22, 0x26, + 0x7e, 0x85, 0xb6, 0xbd, 0x9b, 0xdd, 0x27, 0xe1, 0xc4, 0x9f, 0x4a, 0x81, 0x30, 0x11, 0xe1, 0x00, + 0x7b, 0x14, 0xab, 0xa7, 0x94, 0xed, 0x68, 0xb2, 0x80, 0x4c, 0x35, 0x30, 0xb5, 0xef, 0x87, 0x13, + 0x22, 0x05, 0x77, 0x35, 0x01, 0x65, 0x1e, 0x8b, 0xa9, 0x66, 0xe7, 0x02, 0x47, 0xd4, 0x27, 0xa1, + 0x7a, 0x0a, 0x99, 0xf3, 0x4f, 0x0d, 0xee, 0xf4, 0x7d, 0xca, 0x5c, 0x71, 0x90, 0xba, 0xf8, 0x7d, + 0x8c, 0x29, 0x43, 0x5b, 0xb0, 0x1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0x83, 0xde, 0xf3, 0xcd, + 0x9a, 0xf3, 0x19, 0xb4, 0x53, 0x9f, 0x51, 0x13, 0xcc, 0xc3, 0xc1, 0x91, 0x38, 0xf2, 0xbc, 0x37, + 0x38, 0xda, 0x34, 0x9c, 0xbf, 0x0c, 0xd8, 0xd2, 0x53, 0x44, 0xe7, 0x24, 0xa4, 0x38, 0xc9, 0xd1, + 0x88, 0xc4, 0x61, 0x9a, 0x23, 0xbe, 0x40, 0x08, 0xea, 0x21, 0xfe, 0xa0, 0x32, 0xc4, 0xdf, 0x13, + 0x4d, 0x46, 0x98, 0x17, 0xf0, 0xec, 0x98, 0xae, 0x58, 0xa0, 0xaf, 0xa1, 0x25, 0x43, 0xa7, 0x56, + 0x7d, 0xcf, 0xec, 0xac, 0x1d, 0x6c, 0xeb, 0x84, 0x48, 0x8b, 0x6e, 0xaa, 0xe6, 0x1c, 0xc3, 0xee, + 0x31, 0x56, 0x9e, 0x08, 0xbe, 0x54, 0xc5, 0x24, 0x76, 0xbd, 0x19, 0xe6, 0xce, 0x24, 0x76, 0xbd, + 0x19, 0x46, 0x16, 0x34, 0x65, 0xb9, 0x71, 0x77, 0x56, 0x5d, 0xb5, 0x74, 0x18, 0x58, 0xcb, 0x40, + 0x32, 0xae, 0x22, 0xa4, 0x2f, 0xa1, 0x9e, 0x14, 0x3b, 0x87, 0x59, 0x3b, 0x40, 0xba, 0x9f, 0x2f, + 0xc2, 0x09, 0x71, 0xb9, 0x5c, 0x4f, 0x95, 0x99, 0x4f, 0xd5, 0x49, 0xd6, 0xea, 0x11, 0x09, 0x19, + 0x0e, 0xd9, 0xcd, 0xfc, 0xef, 0xc3, 0xdd, 0x02, 0x24, 0x19, 0xc0, 0x3e, 0x34, 0xa5, 0x6b, 0x1c, + 0xad, 0x94, 0x57, 0xa5, 0xe5, 0xbc, 0x85, 0xed, 0x05, 0x5a, 0x9f, 0x4c, 0x53, 0x52, 0x0f, 0x61, + 0x9d, 0xc6, 0x67, 0x74, 0x14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 0x81, 0x7e, 0x87, 0x5b, 0xda, 0x45, 0x88, 0x4a, 0x12, + 0x54, 0x34, 0x7c, 0xd8, 0x8f, 0x2b, 0xe9, 0xa6, 0xe1, 0xcd, 0x60, 0x43, 0xef, 0x70, 0x65, 0xe1, + 0x15, 0x5e, 0x19, 0x65, 0xe1, 0x15, 0x37, 0x4d, 0x67, 0x25, 0x29, 0x9d, 0x7c, 0x03, 0x2a, 0x2b, + 0x9d, 0x92, 0x66, 0x59, 0x56, 0x3a, 0x65, 0x7d, 0xcd, 0x59, 0x41, 0x1e, 0xc0, 0xa2, 0xff, 0xa0, + 0x07, 0xa5, 0x19, 0xd1, 0xdb, 0x96, 0xdd, 0xb9, 0x5e, 0x31, 0x35, 0x31, 0x87, 0x4f, 0x72, 0x17, + 0x34, 0x2a, 0xa1, 0xa6, 0x78, 0x2e, 0xb1, 0x9f, 0x54, 0xd4, 0xce, 0x05, 0x25, 0x5b, 0xda, 0x15, + 0x41, 0xe9, 0xfd, 0xf2, 0x8a, 0xa0, 0x72, 0xdd, 0xd1, 0x59, 0x41, 0x3e, 0x6c, 0xb8, 0x71, 0x28, + 0x4d, 0x27, 0x8d, 0x09, 0x95, 0x9c, 0x5e, 0x6e, 0x89, 0xf6, 0xc3, 0x0a, 0x9a, 0x8b, 0x96, 0xf2, + 0x0c, 0xde, 0xb6, 0x94, 0xea, 0x59, 0x83, 0xff, 0xff, 0xfe, 0xe6, 0xbf, 0x00, 0x00, 0x00, 0xff, + 0xff, 0xd2, 0xe7, 0x93, 0xb8, 0x68, 0x10, 0x00, 0x00, } diff --git a/pkg/tiller/logdistributor/log_streamer.go b/pkg/tiller/logdistributor/log_streamer.go index a5d9f5c88..da0091ffd 100644 --- a/pkg/tiller/logdistributor/log_streamer.go +++ b/pkg/tiller/logdistributor/log_streamer.go @@ -7,13 +7,13 @@ import ( type Logsub struct { C chan *rspb.Log release string - sources []rspb.Log_Source - level rspb.Log_Level + sources []rspb.LogSource + level rspb.LogLevel } type release struct { name string - sourceMappings map[rspb.Log_Source]map[*Logsub]bool + sourceMappings map[rspb.LogSource]map[*Logsub]bool } type Pubsub struct { @@ -27,18 +27,18 @@ func New() *Pubsub { func newRelease(name string) *release { rs := &release{name: name} - rs.sourceMappings = make(map[rspb.Log_Source]map[*Logsub]bool, len(rspb.Log_Source_name)) + rs.sourceMappings = make(map[rspb.LogSource]map[*Logsub]bool, len(rspb.LogSource_name)) return rs } func (rs *release) subscribe(sub *Logsub) { for _, source := range sub.sources { - log_source := rspb.Log_Source(source) - if _, ok := rs.sourceMappings[log_source]; !ok { + logSource := rspb.LogSource(source) + if _, ok := rs.sourceMappings[logSource]; !ok { subs := make(map[*Logsub]bool, 1) - rs.sourceMappings[log_source] = subs + rs.sourceMappings[logSource] = subs } - rs.sourceMappings[log_source][sub] = true + rs.sourceMappings[logSource][sub] = true } } @@ -51,7 +51,7 @@ func (ps *Pubsub) subscribe(sub *Logsub) { ps.releases[sub.release].subscribe(sub) } -func (ps *Pubsub) Subscribe(release string, level rspb.Log_Level, sources ...rspb.Log_Source) *Logsub { +func (ps *Pubsub) Subscribe(release string, level rspb.LogLevel, sources ...rspb.LogSource) *Logsub { ch := make(chan *rspb.Log) ls := &Logsub{C: ch, release: release, level: level, sources: sources} ps.subscribe(ls) @@ -72,7 +72,7 @@ func (ps *Pubsub) Unsubscribe(sub *Logsub) { } } -func (ps *Pubsub) PubLog(rls string, source rspb.Log_Source, level rspb.Log_Level, message string) { +func (ps *Pubsub) PubLog(rls string, source rspb.LogSource, level rspb.LogLevel, message string) { log := &rspb.Log{Release: rls, Source: source, Level: level, Log: message} if rls, ok := ps.releases[log.Release]; ok { if subs, ok := rls.sourceMappings[log.Source]; ok { diff --git a/pkg/tiller/release_server.go b/pkg/tiller/release_server.go index 46f0bf480..968bf1b43 100644 --- a/pkg/tiller/release_server.go +++ b/pkg/tiller/release_server.go @@ -43,7 +43,6 @@ import ( "k8s.io/helm/pkg/timeconv" "k8s.io/helm/pkg/version" "k8s.io/helm/pkg/tiller/logdistributor" - "time" ) // releaseNameMaxLen is the maximum length of a release name. @@ -255,6 +254,8 @@ func (s *ReleaseServer) GetReleaseStatus(c ctx.Context, req *services.GetRelease Info: rel.Info, } + s.logs.PubLog(req.Name, release.LogSource_SYSTEM, release.LogLevel_INFO, "Got release status for the release") + // Ok, we got the status of the release as we had jotted down, now we need to match the // manifest we stashed away with reality from the cluster. kubeCli := s.env.KubeClient @@ -286,29 +287,29 @@ func (s *ReleaseServer) GetReleaseContent(c ctx.Context, req *services.GetReleas } func (s *ReleaseServer) GetReleaseLogs(svc services.ReleaseService_GetReleaseLogsServer) error { - t := time.NewTicker(time.Second) done := make(chan struct{}) - go func() { - for { - select { - case <-t.C: - fmt.Println("Sending a log") - svc.Send(&services.GetReleaseLogsResponse{Log: &release.Log{Log: "Test log!"}}) - case <-done: - return - } - } - }() for { rq, err := svc.Recv() - fmt.Println("Req: ", rq, " Error: ", err) if err != nil { + fmt.Println("Errored: ", err, ", Closing stream") done <- struct{}{} break } - s.logs.Subscribe(rq.Name, ) - rq.Name + + sub := s.logs.Subscribe(rq.Subscription.Release, rq.Subscription.Level, rq.Subscription.Sources...) + go func() { + for { + select { + case l := <-sub.C: + fmt.Println("Sending a log") + svc.Send(&services.GetReleaseLogsResponse{Log: l}) + case <-done: + s.logs.Unsubscribe(sub) + return + } + } + }() } return nil From 1c980873bbbd1dcd7488af472aa4754fa61c7f4d Mon Sep 17 00:00:00 2001 From: John Welsh Date: Thu, 4 May 2017 14:10:28 -0700 Subject: [PATCH 08/14] Update log consumption --- cmd/helm/logs.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/cmd/helm/logs.go b/cmd/helm/logs.go index 1fc210d2d..f5be93fe5 100644 --- a/cmd/helm/logs.go +++ b/cmd/helm/logs.go @@ -65,6 +65,10 @@ func newLogsCmd(client helm.Interface, out io.Writer) *cobra.Command { func (l *logsCmd) run() error { done := make(chan struct{}) stream, err := l.client.ReleaseLogs(l.release, release.LogLevel_DEBUG, done, release.LogSource_SYSTEM, release.LogSource_POD) + if err != nil { + done <- struct{}{} + return prettyError(err) + } fmt.Println("Listening for logs") for { @@ -73,15 +77,10 @@ func (l *logsCmd) run() error { if !ok { return nil } - fmt.Println(l) + fmt.Println(l.Log.Log) } } - if err != nil { - done <- struct{}{} - return prettyError(err) - } - return nil } From 07458b1701a65195499a7a1fdd4bc156ae7a3c72 Mon Sep 17 00:00:00 2001 From: John Welsh Date: Thu, 4 May 2017 14:13:16 -0700 Subject: [PATCH 09/14] Add new universal value for enums --- _proto/hapi/release/log.proto | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/_proto/hapi/release/log.proto b/_proto/hapi/release/log.proto index 591f6ebae..a9cb85ead 100644 --- a/_proto/hapi/release/log.proto +++ b/_proto/hapi/release/log.proto @@ -23,22 +23,24 @@ option go_package = "release"; // Allows filtering by log event source enum LogSource { - HOOK = 0; - TEST = 1; - POD = 2; - SYSTEM = 3; + UNIVERSAL = 0; + HOOK = 1; + TEST = 2; + POD = 3; + SYSTEM = 4; } // Syslog log levels enum LogLevel { - EMERG = 0; - ALERT = 1; - CRIT = 2; - ERR = 3; - WARNING = 4; - NOTICE = 5; - INFO = 6; - DEBUG = 7; + UNIVERSAL = 0; + EMERG = 1; + ALERT = 2; + CRIT = 3; + ERR = 4; + WARNING = 5; + NOTICE = 6; + INFO = 7; + DEBUG = 8; } message LogSubscription { From b6af209c829ca059dc624cd72fd76f27194adf65 Mon Sep 17 00:00:00 2001 From: John Welsh Date: Thu, 4 May 2017 14:26:27 -0700 Subject: [PATCH 10/14] Updated proto definition --- _proto/hapi/release/log.proto | 51 ++-- pkg/proto/hapi/chart/config.pb.go | 14 -- pkg/proto/hapi/chart/metadata.pb.go | 112 --------- pkg/proto/hapi/chart/template.pb.go | 14 -- pkg/proto/hapi/release/hook.pb.go | 42 ---- pkg/proto/hapi/release/info.pb.go | 7 - pkg/proto/hapi/release/log.pb.go | 165 ++++++------ pkg/proto/hapi/release/release.pb.go | 28 --- pkg/proto/hapi/release/status.pb.go | 21 -- pkg/proto/hapi/release/test_run.pb.go | 21 -- pkg/proto/hapi/services/tiller.pb.go | 347 +------------------------- pkg/proto/hapi/version/version.pb.go | 21 -- 12 files changed, 114 insertions(+), 729 deletions(-) diff --git a/_proto/hapi/release/log.proto b/_proto/hapi/release/log.proto index a9cb85ead..5825d67d8 100644 --- a/_proto/hapi/release/log.proto +++ b/_proto/hapi/release/log.proto @@ -21,38 +21,39 @@ import "google/protobuf/timestamp.proto"; option go_package = "release"; -// Allows filtering by log event source -enum LogSource { - UNIVERSAL = 0; - HOOK = 1; - TEST = 2; - POD = 3; - SYSTEM = 4; -} - -// Syslog log levels -enum LogLevel { - UNIVERSAL = 0; - EMERG = 1; - ALERT = 2; - CRIT = 3; - ERR = 4; - WARNING = 5; - NOTICE = 6; - INFO = 7; - DEBUG = 8; -} message LogSubscription { string release = 1; - LogLevel level = 2; - repeated LogSource sources = 3; + Log.Level level = 2; + repeated Log.Source sources = 3; } message Log { + // Allows filtering by log event source + enum Source { + UNKNOWN = 0; + HOOK = 1; + TEST = 2; + POD = 3; + SYSTEM = 4; + } + + // Syslog log levels + enum Level { + UNIVERSAL = 0; + EMERG = 1; + ALERT = 2; + CRIT = 3; + ERR = 4; + WARNING = 5; + NOTICE = 6; + INFO = 7; + DEBUG = 8; + } + string release = 1; - LogLevel level = 2; - LogSource source = 3; + Level level = 2; + Source source = 3; string log = 4; google.protobuf.Timestamp timestamp = 5; } diff --git a/pkg/proto/hapi/chart/config.pb.go b/pkg/proto/hapi/chart/config.pb.go index 4a8b36d89..73ab3ec47 100644 --- a/pkg/proto/hapi/chart/config.pb.go +++ b/pkg/proto/hapi/chart/config.pb.go @@ -24,13 +24,6 @@ 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 @@ -48,13 +41,6 @@ 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") diff --git a/pkg/proto/hapi/chart/metadata.pb.go b/pkg/proto/hapi/chart/metadata.pb.go index 82abb04ff..339ae9772 100644 --- a/pkg/proto/hapi/chart/metadata.pb.go +++ b/pkg/proto/hapi/chart/metadata.pb.go @@ -47,20 +47,6 @@ func (m *Maintainer) String() string { return proto.CompactTextString 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 "" -} - // 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 @@ -103,48 +89,6 @@ 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 @@ -152,62 +96,6 @@ func (m *Metadata) GetMaintainers() []*Maintainer { 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 init() { proto.RegisterType((*Maintainer)(nil), "hapi.chart.Maintainer") proto.RegisterType((*Metadata)(nil), "hapi.chart.Metadata") diff --git a/pkg/proto/hapi/chart/template.pb.go b/pkg/proto/hapi/chart/template.pb.go index 416269d18..74ecc4292 100644 --- a/pkg/proto/hapi/chart/template.pb.go +++ b/pkg/proto/hapi/chart/template.pb.go @@ -29,20 +29,6 @@ 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") } diff --git a/pkg/proto/hapi/release/hook.pb.go b/pkg/proto/hapi/release/hook.pb.go index 8fec76e5e..272da0590 100644 --- a/pkg/proto/hapi/release/hook.pb.go +++ b/pkg/proto/hapi/release/hook.pb.go @@ -112,41 +112,6 @@ 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 @@ -154,13 +119,6 @@ func (m *Hook) GetLastRun() *google_protobuf.Timestamp { return nil } -func (m *Hook) GetWeight() int32 { - if m != nil { - return m.Weight - } - return 0 -} - func init() { proto.RegisterType((*Hook)(nil), "hapi.release.Hook") proto.RegisterEnum("hapi.release.Hook_Event", Hook_Event_name, Hook_Event_value) diff --git a/pkg/proto/hapi/release/info.pb.go b/pkg/proto/hapi/release/info.pb.go index f86f2801e..37886303d 100644 --- a/pkg/proto/hapi/release/info.pb.go +++ b/pkg/proto/hapi/release/info.pb.go @@ -58,13 +58,6 @@ func (m *Info) GetDeleted() *google_protobuf.Timestamp { return nil } -func (m *Info) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - func init() { proto.RegisterType((*Info)(nil), "hapi.release.Info") } diff --git a/pkg/proto/hapi/release/log.pb.go b/pkg/proto/hapi/release/log.pb.go index 04b606b05..7d4c4414a 100644 --- a/pkg/proto/hapi/release/log.pb.go +++ b/pkg/proto/hapi/release/log.pb.go @@ -15,77 +15,83 @@ var _ = fmt.Errorf var _ = math.Inf // Allows filtering by log event source -type LogSource int32 +type Log_Source int32 const ( - LogSource_HOOK LogSource = 0 - LogSource_TEST LogSource = 1 - LogSource_POD LogSource = 2 - LogSource_SYSTEM LogSource = 3 + Log_UNKNOWN Log_Source = 0 + Log_HOOK Log_Source = 1 + Log_TEST Log_Source = 2 + Log_POD Log_Source = 3 + Log_SYSTEM Log_Source = 4 ) -var LogSource_name = map[int32]string{ - 0: "HOOK", - 1: "TEST", - 2: "POD", - 3: "SYSTEM", +var Log_Source_name = map[int32]string{ + 0: "UNKNOWN", + 1: "HOOK", + 2: "TEST", + 3: "POD", + 4: "SYSTEM", } -var LogSource_value = map[string]int32{ - "HOOK": 0, - "TEST": 1, - "POD": 2, - "SYSTEM": 3, +var Log_Source_value = map[string]int32{ + "UNKNOWN": 0, + "HOOK": 1, + "TEST": 2, + "POD": 3, + "SYSTEM": 4, } -func (x LogSource) String() string { - return proto.EnumName(LogSource_name, int32(x)) +func (x Log_Source) String() string { + return proto.EnumName(Log_Source_name, int32(x)) } -func (LogSource) EnumDescriptor() ([]byte, []int) { return fileDescriptor2, []int{0} } +func (Log_Source) EnumDescriptor() ([]byte, []int) { return fileDescriptor2, []int{1, 0} } // Syslog log levels -type LogLevel int32 +type Log_Level int32 const ( - LogLevel_EMERG LogLevel = 0 - LogLevel_ALERT LogLevel = 1 - LogLevel_CRIT LogLevel = 2 - LogLevel_ERR LogLevel = 3 - LogLevel_WARNING LogLevel = 4 - LogLevel_NOTICE LogLevel = 5 - LogLevel_INFO LogLevel = 6 - LogLevel_DEBUG LogLevel = 7 + Log_UNIVERSAL Log_Level = 0 + Log_EMERG Log_Level = 1 + Log_ALERT Log_Level = 2 + Log_CRIT Log_Level = 3 + Log_ERR Log_Level = 4 + Log_WARNING Log_Level = 5 + Log_NOTICE Log_Level = 6 + Log_INFO Log_Level = 7 + Log_DEBUG Log_Level = 8 ) -var LogLevel_name = map[int32]string{ - 0: "EMERG", - 1: "ALERT", - 2: "CRIT", - 3: "ERR", - 4: "WARNING", - 5: "NOTICE", - 6: "INFO", - 7: "DEBUG", +var Log_Level_name = map[int32]string{ + 0: "UNIVERSAL", + 1: "EMERG", + 2: "ALERT", + 3: "CRIT", + 4: "ERR", + 5: "WARNING", + 6: "NOTICE", + 7: "INFO", + 8: "DEBUG", } -var LogLevel_value = map[string]int32{ - "EMERG": 0, - "ALERT": 1, - "CRIT": 2, - "ERR": 3, - "WARNING": 4, - "NOTICE": 5, - "INFO": 6, - "DEBUG": 7, +var Log_Level_value = map[string]int32{ + "UNIVERSAL": 0, + "EMERG": 1, + "ALERT": 2, + "CRIT": 3, + "ERR": 4, + "WARNING": 5, + "NOTICE": 6, + "INFO": 7, + "DEBUG": 8, } -func (x LogLevel) String() string { - return proto.EnumName(LogLevel_name, int32(x)) +func (x Log_Level) String() string { + return proto.EnumName(Log_Level_name, int32(x)) } -func (LogLevel) EnumDescriptor() ([]byte, []int) { return fileDescriptor2, []int{1} } +func (Log_Level) EnumDescriptor() ([]byte, []int) { return fileDescriptor2, []int{1, 1} } type LogSubscription struct { - Release string `protobuf:"bytes,1,opt,name=release" json:"release,omitempty"` - Level LogLevel `protobuf:"varint,2,opt,name=level,enum=hapi.release.LogLevel" json:"level,omitempty"` - Sources []LogSource `protobuf:"varint,3,rep,packed,name=sources,enum=hapi.release.LogSource" json:"sources,omitempty"` + Release string `protobuf:"bytes,1,opt,name=release" json:"release,omitempty"` + Level Log_Level `protobuf:"varint,2,opt,name=level,enum=hapi.release.Log_Level" json:"level,omitempty"` + Sources []Log_Source `protobuf:"varint,3,rep,packed,name=sources,enum=hapi.release.Log_Source" json:"sources,omitempty"` } func (m *LogSubscription) Reset() { *m = LogSubscription{} } @@ -95,8 +101,8 @@ func (*LogSubscription) Descriptor() ([]byte, []int) { return fileDescriptor2, [ type Log struct { Release string `protobuf:"bytes,1,opt,name=release" json:"release,omitempty"` - Level LogLevel `protobuf:"varint,2,opt,name=level,enum=hapi.release.LogLevel" json:"level,omitempty"` - Source LogSource `protobuf:"varint,3,opt,name=source,enum=hapi.release.LogSource" json:"source,omitempty"` + Level Log_Level `protobuf:"varint,2,opt,name=level,enum=hapi.release.Log_Level" json:"level,omitempty"` + Source Log_Source `protobuf:"varint,3,opt,name=source,enum=hapi.release.Log_Source" json:"source,omitempty"` Log string `protobuf:"bytes,4,opt,name=log" json:"log,omitempty"` Timestamp *google_protobuf.Timestamp `protobuf:"bytes,5,opt,name=timestamp" json:"timestamp,omitempty"` } @@ -116,35 +122,36 @@ func (m *Log) GetTimestamp() *google_protobuf.Timestamp { func init() { proto.RegisterType((*LogSubscription)(nil), "hapi.release.LogSubscription") proto.RegisterType((*Log)(nil), "hapi.release.Log") - proto.RegisterEnum("hapi.release.LogSource", LogSource_name, LogSource_value) - proto.RegisterEnum("hapi.release.LogLevel", LogLevel_name, LogLevel_value) + proto.RegisterEnum("hapi.release.Log_Source", Log_Source_name, Log_Source_value) + proto.RegisterEnum("hapi.release.Log_Level", Log_Level_name, Log_Level_value) } func init() { proto.RegisterFile("hapi/release/log.proto", fileDescriptor2) } var fileDescriptor2 = []byte{ - // 359 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x90, 0xcf, 0x6e, 0x9b, 0x40, - 0x10, 0xc6, 0x8d, 0x97, 0x3f, 0x66, 0x5c, 0xb9, 0xab, 0x3d, 0xb8, 0xc8, 0x97, 0x22, 0x9f, 0x90, - 0x55, 0x81, 0xea, 0xf6, 0xd0, 0xab, 0xff, 0x6c, 0x5d, 0x54, 0x0c, 0xd5, 0x42, 0x55, 0xb5, 0x37, - 0x6c, 0x6d, 0x09, 0x12, 0xce, 0x22, 0xc0, 0x79, 0x8a, 0x3c, 0x59, 0x9e, 0x2a, 0x5a, 0x30, 0x4e, - 0xa4, 0x28, 0xb7, 0xdc, 0x66, 0x77, 0x7e, 0xf3, 0x7d, 0x33, 0x1f, 0x4c, 0x6f, 0xd2, 0x32, 0xf7, - 0x2a, 0x5e, 0xf0, 0xb4, 0xe6, 0x5e, 0x21, 0x32, 0xb7, 0xac, 0x44, 0x23, 0xc8, 0x3b, 0xf9, 0xef, - 0x5e, 0xfe, 0x67, 0x1f, 0x33, 0x21, 0xb2, 0x82, 0x7b, 0x6d, 0xef, 0x70, 0xfe, 0xef, 0x35, 0xf9, - 0x89, 0xd7, 0x4d, 0x7a, 0x2a, 0x3b, 0x7c, 0x7e, 0xaf, 0xc0, 0xfb, 0x40, 0x64, 0xf1, 0xf9, 0x50, - 0x1f, 0xab, 0xbc, 0x6c, 0x72, 0x71, 0x4b, 0x2c, 0x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bf, - 0xa1, 0x58, 0x93, 0xac, 0x1f, 0x7e, 0x8f, 0xb0, 0x2e, 0x05, 0xb6, 0x74, 0xfd, 0x7b, 0x87, 0x8d, - 0xb5, 0xf9, 0xaf, 0x8f, 0xf3, 0xa0, 0xb7, 0x27, 0x7c, 0x79, 0x0c, 0x00, 0x00, 0xff, 0xff, 0x5f, - 0x53, 0x1a, 0x42, 0x4f, 0x02, 0x00, 0x00, + // 379 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x90, 0x4f, 0x8f, 0xd3, 0x30, + 0x10, 0xc5, 0x37, 0x75, 0xfe, 0x34, 0xb3, 0xb0, 0x58, 0x3e, 0x80, 0xb5, 0x17, 0xa2, 0x9c, 0x72, + 0xc1, 0x41, 0xe1, 0xc2, 0x09, 0xa9, 0xbb, 0x6b, 0x4a, 0xb4, 0x59, 0x07, 0x39, 0x29, 0x15, 0xdc, + 0xda, 0xca, 0x84, 0x48, 0x29, 0x8e, 0x92, 0x94, 0x8f, 0xc1, 0x17, 0xe6, 0x82, 0x9c, 0x34, 0x80, + 0x84, 0xb8, 0x71, 0x1b, 0x7b, 0x7e, 0xf3, 0xde, 0xcc, 0x83, 0xa7, 0x5f, 0x76, 0x6d, 0x1d, 0x77, + 0xaa, 0x51, 0xbb, 0x5e, 0xc5, 0x8d, 0xae, 0x58, 0xdb, 0xe9, 0x41, 0x93, 0x47, 0xe6, 0x9f, 0x9d, + 0xff, 0xaf, 0x9f, 0x57, 0x5a, 0x57, 0x8d, 0x8a, 0xc7, 0xde, 0xfe, 0xf4, 0x39, 0x1e, 0xea, 0xa3, + 0xea, 0x87, 0xdd, 0xb1, 0x9d, 0xf0, 0xf0, 0xbb, 0x05, 0x4f, 0x32, 0x5d, 0x15, 0xa7, 0x7d, 0x7f, + 0xe8, 0xea, 0x76, 0xa8, 0xf5, 0x57, 0x42, 0xc1, 0x3b, 0xcf, 0x53,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 0x23, 0xc6, 0xa5, 0xc4, 0xb6, 0xb1, 0xdd, 0xae, 0xa4, 0x48, 0xc5, 0x1a, 0x3b, 0x46, 0x59, + 0xe4, 0x65, 0x7a, 0xcb, 0xb1, 0x6b, 0xd8, 0x54, 0xbc, 0xcd, 0xb1, 0x67, 0x04, 0xee, 0xf8, 0xcd, + 0x66, 0x8d, 0x97, 0x37, 0xfe, 0xa7, 0x39, 0xe6, 0xbd, 0x3b, 0x1e, 0xf6, 0xea, 0x67, 0x00, 0x00, + 0x00, 0xff, 0xff, 0xd5, 0xde, 0x02, 0xe9, 0x69, 0x02, 0x00, 0x00, } diff --git a/pkg/proto/hapi/release/release.pb.go b/pkg/proto/hapi/release/release.pb.go index f58ce1502..e37f039f6 100644 --- a/pkg/proto/hapi/release/release.pb.go +++ b/pkg/proto/hapi/release/release.pb.go @@ -42,13 +42,6 @@ func (m *Release) String() string { return proto.CompactTextString(m) func (*Release) ProtoMessage() {} func (*Release) Descriptor() ([]byte, []int) { return fileDescriptor3, []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 @@ -70,13 +63,6 @@ func (m *Release) GetConfig() *hapi_chart.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 @@ -84,20 +70,6 @@ func (m *Release) GetHooks() []*Hook { 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") } diff --git a/pkg/proto/hapi/release/status.pb.go b/pkg/proto/hapi/release/status.pb.go index 71ed631c8..e93d26330 100644 --- a/pkg/proto/hapi/release/status.pb.go +++ b/pkg/proto/hapi/release/status.pb.go @@ -69,27 +69,6 @@ func (m *Status) String() string { return proto.CompactTextString(m) func (*Status) ProtoMessage() {} func (*Status) Descriptor() ([]byte, []int) { return fileDescriptor4, []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 diff --git a/pkg/proto/hapi/release/test_run.pb.go b/pkg/proto/hapi/release/test_run.pb.go index a40a410f8..7304c3e83 100644 --- a/pkg/proto/hapi/release/test_run.pb.go +++ b/pkg/proto/hapi/release/test_run.pb.go @@ -51,27 +51,6 @@ func (m *TestRun) String() string { return proto.CompactTextString(m) func (*TestRun) ProtoMessage() {} func (*TestRun) Descriptor() ([]byte, []int) { return fileDescriptor5, []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 diff --git a/pkg/proto/hapi/services/tiller.pb.go b/pkg/proto/hapi/services/tiller.pb.go index 0b3d19071..f5d315347 100644 --- a/pkg/proto/hapi/services/tiller.pb.go +++ b/pkg/proto/hapi/services/tiller.pb.go @@ -141,55 +141,6 @@ func (m *ListReleasesRequest) String() string { return proto.CompactT 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 { } @@ -217,27 +168,6 @@ func (m *ListReleasesResponse) String() string { return proto.Compact 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 @@ -258,20 +188,6 @@ func (m *GetReleaseStatusRequest) String() string { return proto.Comp 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. @@ -287,13 +203,6 @@ func (m *GetReleaseStatusResponse) String() string { return proto.Com 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 @@ -301,13 +210,6 @@ func (m *GetReleaseStatusResponse) GetInfo() *hapi_release4.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 @@ -321,20 +223,6 @@ func (m *GetReleaseContentRequest) String() string { return proto.Com 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 -} - // GetReleaseContentResponse is a response containing the contents of a release. type GetReleaseContentResponse struct { // The release content @@ -416,13 +304,6 @@ func (m *UpdateReleaseRequest) String() string { return proto.Compact func (*UpdateReleaseRequest) ProtoMessage() {} func (*UpdateReleaseRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} } -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 @@ -437,55 +318,6 @@ func (m *UpdateReleaseRequest) GetValues() *hapi_chart.Config { 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 -} - // UpdateReleaseResponse is the response to an update request. type UpdateReleaseResponse struct { Release *hapi_release5.Release `protobuf:"bytes,1,opt,name=release" json:"release,omitempty"` @@ -526,55 +358,6 @@ func (m *RollbackReleaseRequest) String() string { return proto.Compa func (*RollbackReleaseRequest) ProtoMessage() {} func (*RollbackReleaseRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} } -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 -} - // RollbackReleaseResponse is the response to an update request. type RollbackReleaseResponse struct { Release *hapi_release5.Release `protobuf:"bytes,1,opt,name=release" json:"release,omitempty"` @@ -638,55 +421,6 @@ func (m *InstallReleaseRequest) GetValues() *hapi_chart.Config { 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 -} - // InstallReleaseResponse is the response from a release installation. type InstallReleaseResponse struct { Release *hapi_release5.Release `protobuf:"bytes,1,opt,name=release" json:"release,omitempty"` @@ -721,34 +455,6 @@ func (m *UninstallReleaseRequest) String() string { return proto.Comp func (*UninstallReleaseRequest) ProtoMessage() {} func (*UninstallReleaseRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} } -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. @@ -769,13 +475,6 @@ func (m *UninstallReleaseResponse) GetRelease() *hapi_release5.Release { return nil } -func (m *UninstallReleaseResponse) GetInfo() string { - if m != nil { - return m.Info - } - return "" -} - // GetVersionRequest requests for version information. type GetVersionRequest struct { } @@ -814,20 +513,6 @@ func (m *GetHistoryRequest) String() string { return proto.CompactTex func (*GetHistoryRequest) ProtoMessage() {} func (*GetHistoryRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{19} } -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 -} - // GetHistoryResponse is received in response to a GetHistory rpc. type GetHistoryResponse struct { Releases []*hapi_release5.Release `protobuf:"bytes,1,rep,name=releases" json:"releases,omitempty"` @@ -860,27 +545,6 @@ func (m *TestReleaseRequest) String() string { return proto.CompactTe func (*TestReleaseRequest) ProtoMessage() {} func (*TestReleaseRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{21} } -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"` @@ -891,13 +555,6 @@ func (m *TestReleaseResponse) String() string { return proto.CompactT func (*TestReleaseResponse) ProtoMessage() {} func (*TestReleaseResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{22} } -func (m *TestReleaseResponse) GetMsg() string { - if m != nil { - return m.Msg - } - return "" -} - func init() { proto.RegisterType((*ListReleasesRequest)(nil), "hapi.services.tiller.ListReleasesRequest") proto.RegisterType((*ListSort)(nil), "hapi.services.tiller.ListSort") @@ -932,7 +589,7 @@ var _ grpc.ClientConn // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 +const _ = grpc.SupportPackageIsVersion3 // Client API for ReleaseService service @@ -1440,7 +1097,7 @@ var _ReleaseService_serviceDesc = grpc.ServiceDesc{ ServerStreams: true, }, }, - Metadata: "hapi/services/tiller.proto", + Metadata: fileDescriptor0, } func init() { proto.RegisterFile("hapi/services/tiller.proto", fileDescriptor0) } diff --git a/pkg/proto/hapi/version/version.pb.go b/pkg/proto/hapi/version/version.pb.go index e3d8a7096..adbee1a33 100644 --- a/pkg/proto/hapi/version/version.pb.go +++ b/pkg/proto/hapi/version/version.pb.go @@ -40,27 +40,6 @@ func (m *Version) String() string { return proto.CompactTextString(m) func (*Version) ProtoMessage() {} func (*Version) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } -func (m *Version) GetSemVer() string { - if m != nil { - return m.SemVer - } - return "" -} - -func (m *Version) GetGitCommit() string { - if m != nil { - return m.GitCommit - } - return "" -} - -func (m *Version) GetGitTreeState() string { - if m != nil { - return m.GitTreeState - } - return "" -} - func init() { proto.RegisterType((*Version)(nil), "hapi.version.Version") } From 910679b1d4555204b95627379a4a1f6983ff6e9d Mon Sep 17 00:00:00 2001 From: John Welsh Date: Thu, 4 May 2017 14:36:15 -0700 Subject: [PATCH 11/14] Updated all the things to new protobuf --- cmd/helm/logs.go | 2 +- pkg/helm/client.go | 2 +- pkg/helm/interface.go | 2 +- .../{logdistributor => logs}/log_streamer.go | 22 +++++++++---------- .../log_streamer_test.go | 2 +- pkg/tiller/release_server.go | 8 +++---- 6 files changed, 19 insertions(+), 19 deletions(-) rename pkg/tiller/{logdistributor => logs}/log_streamer.go (71%) rename pkg/tiller/{logdistributor => logs}/log_streamer_test.go (99%) diff --git a/cmd/helm/logs.go b/cmd/helm/logs.go index f5be93fe5..7dd320f86 100644 --- a/cmd/helm/logs.go +++ b/cmd/helm/logs.go @@ -64,7 +64,7 @@ func newLogsCmd(client helm.Interface, out io.Writer) *cobra.Command { func (l *logsCmd) run() error { done := make(chan struct{}) - stream, err := l.client.ReleaseLogs(l.release, release.LogLevel_DEBUG, done, release.LogSource_SYSTEM, release.LogSource_POD) + stream, err := l.client.ReleaseLogs(l.release, release.Log_DEBUG, done, release.Log_SYSTEM, release.Log_POD) if err != nil { done <- struct{}{} return prettyError(err) diff --git a/pkg/helm/client.go b/pkg/helm/client.go index 12fdc3b42..100a4dd48 100644 --- a/pkg/helm/client.go +++ b/pkg/helm/client.go @@ -218,7 +218,7 @@ func (h *Client) RollbackRelease(rlsName string, opts ...RollbackOption) (*rls.R } // ReleaseLogs returns a channel streaming log data from the release -func (h *Client) ReleaseLogs(rlsName string, level release.LogLevel, done <-chan struct{}, sources ...release.LogSource) (<-chan *rls.GetReleaseLogsResponse, error) { +func (h *Client) ReleaseLogs(rlsName string, level release.Log_Level, done <-chan struct{}, sources ...release.Log_Source) (<-chan *rls.GetReleaseLogsResponse, error) { ctx := NewContext() sub := &release.LogSubscription{Release: rlsName, Level: level, Sources: sources} req := &rls.GetReleaseLogsRequest{Subscription: sub} diff --git a/pkg/helm/interface.go b/pkg/helm/interface.go index 7ea2eaf80..39a8c9c34 100644 --- a/pkg/helm/interface.go +++ b/pkg/helm/interface.go @@ -29,7 +29,7 @@ type Interface interface { InstallReleaseFromChart(chart *chart.Chart, namespace string, opts ...InstallOption) (*rls.InstallReleaseResponse, error) DeleteRelease(rlsName string, opts ...DeleteOption) (*rls.UninstallReleaseResponse, error) ReleaseStatus(rlsName string, opts ...StatusOption) (*rls.GetReleaseStatusResponse, error) - ReleaseLogs(rlsName string, level release.LogLevel, done <-chan struct{}, sources ...release.LogSource) (<-chan *rls.GetReleaseLogsResponse, error) + ReleaseLogs(rlsName string, level release.Log_Level, done <-chan struct{}, sources ...release.Log_Source) (<-chan *rls.GetReleaseLogsResponse, error) UpdateRelease(rlsName, chStr string, opts ...UpdateOption) (*rls.UpdateReleaseResponse, error) UpdateReleaseFromChart(rlsName string, chart *chart.Chart, opts ...UpdateOption) (*rls.UpdateReleaseResponse, error) RollbackRelease(rlsName string, opts ...RollbackOption) (*rls.RollbackReleaseResponse, error) diff --git a/pkg/tiller/logdistributor/log_streamer.go b/pkg/tiller/logs/log_streamer.go similarity index 71% rename from pkg/tiller/logdistributor/log_streamer.go rename to pkg/tiller/logs/log_streamer.go index da0091ffd..ab0d95205 100644 --- a/pkg/tiller/logdistributor/log_streamer.go +++ b/pkg/tiller/logs/log_streamer.go @@ -1,4 +1,4 @@ -package logdistributor +package logs import ( rspb "k8s.io/helm/pkg/proto/hapi/release" @@ -7,13 +7,13 @@ import ( type Logsub struct { C chan *rspb.Log release string - sources []rspb.LogSource - level rspb.LogLevel + sources []rspb.Log_Source + level rspb.Log_Level } type release struct { name string - sourceMappings map[rspb.LogSource]map[*Logsub]bool + sourceMappings map[rspb.Log_Source]map[*Logsub]bool } type Pubsub struct { @@ -27,18 +27,18 @@ func New() *Pubsub { func newRelease(name string) *release { rs := &release{name: name} - rs.sourceMappings = make(map[rspb.LogSource]map[*Logsub]bool, len(rspb.LogSource_name)) + rs.sourceMappings = make(map[rspb.Log_Source]map[*Logsub]bool, len(rspb.Log_Source_name)) return rs } func (rs *release) subscribe(sub *Logsub) { for _, source := range sub.sources { - logSource := rspb.LogSource(source) - if _, ok := rs.sourceMappings[logSource]; !ok { + Log_Source := rspb.Log_Source(source) + if _, ok := rs.sourceMappings[Log_Source]; !ok { subs := make(map[*Logsub]bool, 1) - rs.sourceMappings[logSource] = subs + rs.sourceMappings[Log_Source] = subs } - rs.sourceMappings[logSource][sub] = true + rs.sourceMappings[Log_Source][sub] = true } } @@ -51,7 +51,7 @@ func (ps *Pubsub) subscribe(sub *Logsub) { ps.releases[sub.release].subscribe(sub) } -func (ps *Pubsub) Subscribe(release string, level rspb.LogLevel, sources ...rspb.LogSource) *Logsub { +func (ps *Pubsub) Subscribe(release string, level rspb.Log_Level, sources ...rspb.Log_Source) *Logsub { ch := make(chan *rspb.Log) ls := &Logsub{C: ch, release: release, level: level, sources: sources} ps.subscribe(ls) @@ -72,7 +72,7 @@ func (ps *Pubsub) Unsubscribe(sub *Logsub) { } } -func (ps *Pubsub) PubLog(rls string, source rspb.LogSource, level rspb.LogLevel, message string) { +func (ps *Pubsub) PubLog(rls string, source rspb.Log_Source, level rspb.Log_Level, message string) { log := &rspb.Log{Release: rls, Source: source, Level: level, Log: message} if rls, ok := ps.releases[log.Release]; ok { if subs, ok := rls.sourceMappings[log.Source]; ok { diff --git a/pkg/tiller/logdistributor/log_streamer_test.go b/pkg/tiller/logs/log_streamer_test.go similarity index 99% rename from pkg/tiller/logdistributor/log_streamer_test.go rename to pkg/tiller/logs/log_streamer_test.go index 576dea31b..2fa8e50b3 100644 --- a/pkg/tiller/logdistributor/log_streamer_test.go +++ b/pkg/tiller/logs/log_streamer_test.go @@ -1,4 +1,4 @@ -package logdistributor +package logs import ( "testing" diff --git a/pkg/tiller/release_server.go b/pkg/tiller/release_server.go index bc1f30f4f..e660756dd 100644 --- a/pkg/tiller/release_server.go +++ b/pkg/tiller/release_server.go @@ -42,7 +42,7 @@ import ( "k8s.io/helm/pkg/tiller/environment" "k8s.io/helm/pkg/timeconv" "k8s.io/helm/pkg/version" - "k8s.io/helm/pkg/tiller/logdistributor" + "k8s.io/helm/pkg/tiller/logs" ) // releaseNameMaxLen is the maximum length of a release name. @@ -85,7 +85,7 @@ var ValidName = regexp.MustCompile("^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])+ type ReleaseServer struct { env *environment.Environment clientset internalclientset.Interface - logs *logdistributor.Pubsub + logs *logs.Pubsub } // NewReleaseServer creates a new release server. @@ -93,7 +93,7 @@ func NewReleaseServer(env *environment.Environment, clientset internalclientset. return &ReleaseServer{ env: env, clientset: clientset, - logs: logdistributor.New(), + logs: logs.New(), } } @@ -254,7 +254,7 @@ func (s *ReleaseServer) GetReleaseStatus(c ctx.Context, req *services.GetRelease Info: rel.Info, } - s.logs.PubLog(req.Name, release.LogSource_SYSTEM, release.LogLevel_INFO, "Got release status for the release") + s.logs.PubLog(req.Name, release.Log_SYSTEM, release.Log_INFO, "Got release status for the release") // Ok, we got the status of the release as we had jotted down, now we need to match the // manifest we stashed away with reality from the cluster. From 5672d5d3baca2b4c5872fe8bf8ae3e74d6d9bef3 Mon Sep 17 00:00:00 2001 From: John Welsh Date: Thu, 4 May 2017 15:28:24 -0700 Subject: [PATCH 12/14] Cleaned up stream closure --- cmd/helm/logs.go | 1 + pkg/helm/client.go | 29 +++++++++-------------------- 2 files changed, 10 insertions(+), 20 deletions(-) diff --git a/cmd/helm/logs.go b/cmd/helm/logs.go index 7dd320f86..4bba63bb3 100644 --- a/cmd/helm/logs.go +++ b/cmd/helm/logs.go @@ -78,6 +78,7 @@ func (l *logsCmd) run() error { return nil } fmt.Println(l.Log.Log) + done<- struct{}{} } } diff --git a/pkg/helm/client.go b/pkg/helm/client.go index 100a4dd48..9392e0700 100644 --- a/pkg/helm/client.go +++ b/pkg/helm/client.go @@ -396,46 +396,35 @@ func (h *Client) logs(ctx context.Context, req *rls.GetReleaseLogsRequest, done rlc := rls.NewReleaseServiceClient(c) s, err := rlc.GetReleaseLogs(ctx) - fmt.Println("Got s: ", s, " err: ", err) if err != nil { return nil, err } - s.Send(req) - fmt.Println("Sent req") - out := make(chan *rls.GetReleaseLogsResponse) + go func() { + <-done + s.CloseSend() + }() + go func() { defer close(out) defer c.Close() for { - fmt.Println("Waiting on recv") rs, err := s.Recv() - fmt.Println("Got rs: ", s, " err: ", err) if err == io.EOF { return } if err != nil { - fmt.Println() + fmt.Println("gRPC error streaming logs: ", grpc.ErrorDesc(err)) + return } out <- rs - //select { - ////case rs, err := s.Recv(): - //// if err == io.EOF { - //// return - //// } - //// if err != nil { - //// fmt.Println("gRPC error streaming logs: ", grpc.ErrorDesc(err)) - //// return - //// } - //// out <- rs - //case <-done: - // return - //} } }() + s.Send(req) + return out, nil } From ed5e59c4ff1678be65fad6b045af571737e874e0 Mon Sep 17 00:00:00 2001 From: John Welsh Date: Thu, 4 May 2017 17:21:22 -0700 Subject: [PATCH 13/14] Initial port of kubectl logs --- pkg/kube/pod_logs.go | 186 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 186 insertions(+) create mode 100644 pkg/kube/pod_logs.go diff --git a/pkg/kube/pod_logs.go b/pkg/kube/pod_logs.go new file mode 100644 index 000000000..89eb9309c --- /dev/null +++ b/pkg/kube/pod_logs.go @@ -0,0 +1,186 @@ +package kube + +import ( + "time" + "k8s.io/kubernetes/pkg/kubectl/cmd" + "io" + "math" + "errors" + "k8s.io/kubernetes/pkg/api" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" + "k8s.io/kubernetes/pkg/kubectl/resource" + "k8s.io/kubernetes/pkg/api/validation" + "k8s.io/apimachinery/pkg/runtime" +) + +// Mimics kubectl logs functionality + +var ( + selectorTail int64 = 10 +) + +// All options that can be passed to kubectl logs +type LogOptions struct { + // Specify if the logs should be streamed. + Follow bool + // Include timestamps on each line in the log output + Timestamps bool + // Maximum bytes of logs to return. Defaults to no limit. + LimitBytes int64 + // If true, print the logs for the previous instance of the container in a pod if it exists. + Previous bool + // Lines of recent log file to display. Defaults to -1 with no selector, showing all log lines otherwise 10, if a selector is provided. + Tail int64 + // Only return logs after a specific date (RFC3339). Defaults to all logs. Only one of since-time / since may be used. + SinceTime time.Time + // Only return logs newer than a relative duration like 5s, 2m, or 3h. Defaults to all logs. Only one of since-time / since may be used. + Since time.Duration + // Print the logs of this container + Container string + // Selector (label query) to filter on. + Selector string + // Namespace to query for logs + Namespace string + // Resource to query for logs + Resource string +} + +func NewOptions() *LogOptions { + return &LogOptions{ + Follow: false, + Timestamps: false, + LimitBytes: 0, + Previous: false, + Tail: -1, + SinceTime: nil, + Since: nil, + Container: "", + Selector: "", + Namespace: "", + Resource: "", + } +} + +func (o *LogOptions) ExecuteLogRequest(out io.Writer) { + f := cmdutil.NewFactory(nil) + Complete(o, f, out) +} + +func Complete(opts *LogOptions, f cmdutil.Factory, out io.Writer) (*cmd.LogsOptions, error) { + o := &cmd.LogsOptions{} + containerName := opts.Container + selector := opts.Selector + if len(opts.Resource) != 0 && len(opts.Selector) != 0 { + return nil, errors.New("Specify either a selector or a resource, not both") + } + o.Namespace = opts.Namespace + if o.Namespace == "" { + return nil, errors.New("Namespace is required") + } + + logOptions := &api.PodLogOptions{ + Container: containerName, + Follow: opts.Follow, + Previous: opts.Previous, + Timestamps: opts.Timestamps, + } + if opts.SinceTime { + t := metav1.NewTime(opts.SinceTime) + logOptions.SinceTime = &t + } + if opts.LimitBytes != 0 { + logOptions.LimitBytes = &opts.LimitBytes + } + if opts.Tail != -1 { + logOptions.TailLines = &opts.Tail + } + if opts.Since { + // round up to the nearest second + sec := int64(math.Ceil(opts.Since.Seconds())) + logOptions.SinceSeconds = &sec + } + o.Options = logOptions + o.LogsForObject = f.LogsForObject + o.ClientMapper = resource.ClientMapperFunc(f.ClientForMapping) + o.Out = out + + if len(selector) != 0 { + if logOptions.Follow { + return nil, errors.New("only one of follow (-f) or selector (-l) is allowed") + } + if len(logOptions.Container) != 0 { + return nil, errors.New( "a container cannot be specified when using a selector (-l)") + } + if logOptions.TailLines == nil { + logOptions.TailLines = &selectorTail + } + } + + mapper, typer := f.Object() + decoder := f.Decoder(true) + if o.Object == nil { + builder := resource.NewBuilder(mapper, typer, o.ClientMapper, decoder). + NamespaceParam(o.Namespace).DefaultNamespace(). + SingleResourceType() + if o.ResourceArg != "" { + builder.ResourceNames("pods", o.ResourceArg) + } + if selector != "" { + builder.ResourceTypes("pods").SelectorParam(selector) + } + infos, err := builder.Do().Infos() + if err != nil { + return nil, err + } + if selector == "" && len(infos) != 1 { + return nil, errors.New("expected a resource") + } + o.Object = infos[0].Object + } + + return o, nil +} + +func Validate(o *cmd.LogsOptions) error { + logsOptions, ok := o.Options.(*api.PodLogOptions) + if !ok { + return errors.New("unexpected logs options object") + } + if errs := validation.ValidatePodLogOptions(logsOptions); len(errs) > 0 { + return errs.ToAggregate() + } + + return nil +} + +// RunLogs retrieves a pod log +func RunLogs(o *cmd.LogsOptions) error { + switch t := o.Object.(type) { + case *api.PodList: + for _, p := range t.Items { + if err := getLogs(o, &p); err != nil { + return err + } + } + return nil + default: + return getLogs(o, o.Object) + } +} + +func getLogs(o *cmd.LogsOptions, obj runtime.Object) error { + req, err := o.LogsForObject(obj, o.Options) + if err != nil { + return err + } + + readCloser, err := req.Stream() + if err != nil { + return err + } + defer readCloser.Close() + + _, err = io.Copy(o.Out, readCloser) + return err +} \ No newline at end of file From 44f93e0f4c5aa33ccb361edeab16f59194db7800 Mon Sep 17 00:00:00 2001 From: John Welsh Date: Wed, 17 May 2017 11:44:03 -0700 Subject: [PATCH 14/14] Continuing logs with kubectl approach --- glide.lock | 38 ++- pkg/kube/pod_logs.go | 22 +- pkg/proto/hapi/chart/config.pb.go | 14 + pkg/proto/hapi/chart/metadata.pb.go | 112 ++++++++ pkg/proto/hapi/chart/template.pb.go | 14 + pkg/proto/hapi/release/hook.pb.go | 42 +++ pkg/proto/hapi/release/info.pb.go | 37 ++- pkg/proto/hapi/release/log.pb.go | 49 ++++ pkg/proto/hapi/release/release.pb.go | 28 ++ pkg/proto/hapi/release/status.pb.go | 21 ++ pkg/proto/hapi/release/test_run.pb.go | 21 ++ pkg/proto/hapi/services/tiller.pb.go | 389 ++++++++++++++++++++++++-- pkg/proto/hapi/version/version.pb.go | 21 ++ pkg/tiller/logs/log_streamer.go | 19 ++ pkg/tiller/release_server.go | 7 +- 15 files changed, 783 insertions(+), 51 deletions(-) diff --git a/glide.lock b/glide.lock index 802cf5df8..4018b5b4e 100644 --- a/glide.lock +++ b/glide.lock @@ -1,5 +1,5 @@ -hash: e323e66f9aba77578f7dcc0886e3117ebc373bc391374b2d5ddd293c276c8966 -updated: 2017-05-02T22:27:03.674351365-04:00 +hash: 6ee139cf584a7c74de86b7bfe1269ea8a467bc710801cb2a8156980cbad43180 +updated: 2017-05-15T12:47:50.482052914-07:00 imports: - name: bitbucket.org/ww/goautoneg version: 75cd24fc2f2c2a2088577d12123ddee5f54e0675 @@ -23,7 +23,12 @@ imports: - name: github.com/BurntSushi/toml version: b26d9c308763d68093482582cea63d69be07a0f0 - name: github.com/chai2010/gettext-go - version: bf70f2a70fb1b1f36d90d671a72795984eab0fcb + version: c6fed771bfd517099caf0f7a961671fa8ed08723 + subpackages: + - gettext + - gettext/mo + - gettext/plural + - gettext/po - name: github.com/coreos/go-oidc version: be73733bb8cc830d0205609b95d125215f8e9c70 subpackages: @@ -46,6 +51,8 @@ imports: version: 5215b55f46b2b919f50a1df0eaa5886afe4e3b3d subpackages: - spew +- name: github.com/daviddengcn/go-colortext + version: 511bcaf42ccd42c38aba7427b6673277bf19e2a1 - name: github.com/dgrijalva/jwt-go version: 01aeca54ebda6e0fbfafd0a524d234159c05ec20 - name: github.com/docker/distribution @@ -166,6 +173,8 @@ imports: - buffer - jlexer - jwriter +- name: github.com/MakeNowJust/heredoc + version: 1d91351acdc1cb2f2c995864674b754134b86ca7 - name: github.com/Masterminds/semver version: 3f0ab6d4ab4bed1c61caf056b63a6e62190c7801 - name: github.com/Masterminds/sprig @@ -204,6 +213,8 @@ imports: version: 8a290539e2e8629dbc4e6bad948158f790ec31f4 - name: github.com/PuerkitoBio/urlesc version: 5bd2802263f21d8788851d5305584c82a5c75d7e +- name: github.com/renstrom/dedent + version: 020d11c3b9c0c7a3c2efcc8e5cf5b9ef7bcea21f - name: github.com/russross/blackfriday version: 300106c228d52c8941d4b3de6054a6062a86dda3 - name: github.com/satori/go.uuid @@ -345,6 +356,7 @@ imports: - pkg/util/httpstream/spdy - pkg/util/intstr - pkg/util/json + - pkg/util/jsonmergepatch - pkg/util/mergepatch - pkg/util/net - pkg/util/rand @@ -468,8 +480,13 @@ imports: - util/homedir - util/integer - util/jsonpath +- name: k8s.io/heapster + version: c2ac40f1adf8c42a79badddb2a2acd673cae3bcb + subpackages: + - metrics/api/v1/types + - metrics/apis/metrics/v1alpha1 - name: k8s.io/kubernetes - version: 477efc3cbe6a7effca06bd1452fa356e2201e1ee + version: 0480917b552be33e2dba47386e51decb1a211df6 subpackages: - federation/apis/federation - federation/apis/federation/install @@ -488,6 +505,7 @@ imports: - pkg/api/pod - pkg/api/service - pkg/api/testapi + - pkg/api/unversioned - pkg/api/util - pkg/api/v1 - pkg/api/validation @@ -595,9 +613,18 @@ imports: - pkg/credentialprovider - pkg/features - pkg/fieldpath + - pkg/generated - pkg/kubectl + - pkg/kubectl/cmd + - pkg/kubectl/cmd/auth + - pkg/kubectl/cmd/config + - pkg/kubectl/cmd/rollout + - pkg/kubectl/cmd/set + - pkg/kubectl/cmd/templates - pkg/kubectl/cmd/testing - pkg/kubectl/cmd/util + - pkg/kubectl/cmd/util/editor + - pkg/kubectl/metricsutil - pkg/kubectl/resource - pkg/kubelet/qos - pkg/kubelet/server/remotecommand @@ -608,14 +635,17 @@ imports: - pkg/security/apparmor - pkg/serviceaccount - pkg/util + - pkg/util/crlf - pkg/util/exec - pkg/util/hash + - pkg/util/i18n - pkg/util/interrupt - pkg/util/labels - pkg/util/net/sets - pkg/util/node - pkg/util/parsers - pkg/util/slice + - pkg/util/taints - pkg/util/term - pkg/version - pkg/watch/json diff --git a/pkg/kube/pod_logs.go b/pkg/kube/pod_logs.go index 89eb9309c..a584ef767 100644 --- a/pkg/kube/pod_logs.go +++ b/pkg/kube/pod_logs.go @@ -33,9 +33,9 @@ type LogOptions struct { // Lines of recent log file to display. Defaults to -1 with no selector, showing all log lines otherwise 10, if a selector is provided. Tail int64 // Only return logs after a specific date (RFC3339). Defaults to all logs. Only one of since-time / since may be used. - SinceTime time.Time + SinceTime *time.Time // Only return logs newer than a relative duration like 5s, 2m, or 3h. Defaults to all logs. Only one of since-time / since may be used. - Since time.Duration + Since *time.Duration // Print the logs of this container Container string // Selector (label query) to filter on. @@ -46,7 +46,7 @@ type LogOptions struct { Resource string } -func NewOptions() *LogOptions { +func NewLogOptions() *LogOptions { return &LogOptions{ Follow: false, Timestamps: false, @@ -62,9 +62,15 @@ func NewOptions() *LogOptions { } } -func (o *LogOptions) ExecuteLogRequest(out io.Writer) { +func (o *LogOptions) ExecuteLogRequest(out io.Writer) error { f := cmdutil.NewFactory(nil) - Complete(o, f, out) + logsOptions, err := Complete(o, f, out) + if err != nil { + return err + } + Validate(logsOptions) + RunLogs(logsOptions) + return nil } func Complete(opts *LogOptions, f cmdutil.Factory, out io.Writer) (*cmd.LogsOptions, error) { @@ -85,8 +91,8 @@ func Complete(opts *LogOptions, f cmdutil.Factory, out io.Writer) (*cmd.LogsOpti Previous: opts.Previous, Timestamps: opts.Timestamps, } - if opts.SinceTime { - t := metav1.NewTime(opts.SinceTime) + if opts.SinceTime != nil { + t := metav1.NewTime(*opts.SinceTime) logOptions.SinceTime = &t } if opts.LimitBytes != 0 { @@ -95,7 +101,7 @@ func Complete(opts *LogOptions, f cmdutil.Factory, out io.Writer) (*cmd.LogsOpti if opts.Tail != -1 { logOptions.TailLines = &opts.Tail } - if opts.Since { + if opts.Since != nil { // round up to the nearest second sec := int64(math.Ceil(opts.Since.Seconds())) logOptions.SinceSeconds = &sec diff --git a/pkg/proto/hapi/chart/config.pb.go b/pkg/proto/hapi/chart/config.pb.go index 73ab3ec47..4a8b36d89 100644 --- a/pkg/proto/hapi/chart/config.pb.go +++ b/pkg/proto/hapi/chart/config.pb.go @@ -24,6 +24,13 @@ 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 @@ -41,6 +48,13 @@ 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") diff --git a/pkg/proto/hapi/chart/metadata.pb.go b/pkg/proto/hapi/chart/metadata.pb.go index 339ae9772..82abb04ff 100644 --- a/pkg/proto/hapi/chart/metadata.pb.go +++ b/pkg/proto/hapi/chart/metadata.pb.go @@ -47,6 +47,20 @@ func (m *Maintainer) String() string { return proto.CompactTextString 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 "" +} + // 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 @@ -89,6 +103,48 @@ 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 @@ -96,6 +152,62 @@ func (m *Metadata) GetMaintainers() []*Maintainer { 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 init() { proto.RegisterType((*Maintainer)(nil), "hapi.chart.Maintainer") proto.RegisterType((*Metadata)(nil), "hapi.chart.Metadata") diff --git a/pkg/proto/hapi/chart/template.pb.go b/pkg/proto/hapi/chart/template.pb.go index 74ecc4292..416269d18 100644 --- a/pkg/proto/hapi/chart/template.pb.go +++ b/pkg/proto/hapi/chart/template.pb.go @@ -29,6 +29,20 @@ 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") } diff --git a/pkg/proto/hapi/release/hook.pb.go b/pkg/proto/hapi/release/hook.pb.go index 272da0590..8fec76e5e 100644 --- a/pkg/proto/hapi/release/hook.pb.go +++ b/pkg/proto/hapi/release/hook.pb.go @@ -112,6 +112,41 @@ 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 @@ -119,6 +154,13 @@ func (m *Hook) GetLastRun() *google_protobuf.Timestamp { return nil } +func (m *Hook) GetWeight() int32 { + if m != nil { + return m.Weight + } + return 0 +} + func init() { proto.RegisterType((*Hook)(nil), "hapi.release.Hook") proto.RegisterEnum("hapi.release.Hook_Event", Hook_Event_name, Hook_Event_value) diff --git a/pkg/proto/hapi/release/info.pb.go b/pkg/proto/hapi/release/info.pb.go index 37886303d..9485ad058 100644 --- a/pkg/proto/hapi/release/info.pb.go +++ b/pkg/proto/hapi/release/info.pb.go @@ -22,7 +22,7 @@ type Info struct { // 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" json:"Description,omitempty"` + Description string `protobuf:"bytes,5,opt,name=Description" json:"Description,omitempty"` } func (m *Info) Reset() { *m = Info{} } @@ -58,6 +58,13 @@ func (m *Info) GetDeleted() *google_protobuf.Timestamp { return nil } +func (m *Info) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + func init() { proto.RegisterType((*Info)(nil), "hapi.release.Info") } @@ -65,20 +72,20 @@ func init() { func init() { proto.RegisterFile("hapi/release/info.proto", fileDescriptor1) } var fileDescriptor1 = []byte{ - // 236 bytes of a gzipped FileDescriptorProto + // 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, 0x69, 0x19, 0x2c, 0x24, 0x42, 0x16, 0x22, 0xa6, 0x0e, 0xc8, + 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, 0x03, 0x65, 0xea, 0xea, 0xef, 0xbd, 0xcf, 0xef, - 0xd8, 0xc5, 0xa7, 0x74, 0xa6, 0xf5, 0x60, 0x41, 0x06, 0x68, 0x4d, 0xaf, 0x51, 0x38, 0x8f, 0x84, - 0x7c, 0xbe, 0x07, 0x22, 0x83, 0xfa, 0x6a, 0x83, 0xb8, 0xb1, 0xd0, 0x46, 0xb6, 0xde, 0xe9, 0x96, - 0xcc, 0x16, 0x02, 0xc9, 0xad, 0x4b, 0xf1, 0xfa, 0xf2, 0x9f, 0x27, 0x90, 0xa4, 0x5d, 0x48, 0xe8, - 0xfa, 0x7b, 0xc4, 0xc6, 0xcf, 0xbd, 0x46, 0x7e, 0xc3, 0x26, 0x09, 0x54, 0x45, 0x53, 0x2c, 0xcb, - 0xdb, 0x73, 0x71, 0xf8, 0x87, 0x78, 0x89, 0xac, 0xcb, 0x19, 0xfe, 0xc8, 0xce, 0xb4, 0xf1, 0x81, - 0xde, 0x15, 0x38, 0x8b, 0x5f, 0xa0, 0xaa, 0x51, 0x6c, 0xd5, 0x22, 0x6d, 0x11, 0xc3,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xa3, 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/log.pb.go b/pkg/proto/hapi/release/log.pb.go index 7d4c4414a..5bf48f03e 100644 --- a/pkg/proto/hapi/release/log.pb.go +++ b/pkg/proto/hapi/release/log.pb.go @@ -99,6 +99,27 @@ func (m *LogSubscription) String() string { return proto.CompactTextS func (*LogSubscription) ProtoMessage() {} func (*LogSubscription) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0} } +func (m *LogSubscription) GetRelease() string { + if m != nil { + return m.Release + } + return "" +} + +func (m *LogSubscription) GetLevel() Log_Level { + if m != nil { + return m.Level + } + return Log_UNIVERSAL +} + +func (m *LogSubscription) GetSources() []Log_Source { + if m != nil { + return m.Sources + } + return nil +} + type Log struct { Release string `protobuf:"bytes,1,opt,name=release" json:"release,omitempty"` Level Log_Level `protobuf:"varint,2,opt,name=level,enum=hapi.release.Log_Level" json:"level,omitempty"` @@ -112,6 +133,34 @@ func (m *Log) String() string { return proto.CompactTextString(m) } func (*Log) ProtoMessage() {} func (*Log) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{1} } +func (m *Log) GetRelease() string { + if m != nil { + return m.Release + } + return "" +} + +func (m *Log) GetLevel() Log_Level { + if m != nil { + return m.Level + } + return Log_UNIVERSAL +} + +func (m *Log) GetSource() Log_Source { + if m != nil { + return m.Source + } + return Log_UNKNOWN +} + +func (m *Log) GetLog() string { + if m != nil { + return m.Log + } + return "" +} + func (m *Log) GetTimestamp() *google_protobuf.Timestamp { if m != nil { return m.Timestamp diff --git a/pkg/proto/hapi/release/release.pb.go b/pkg/proto/hapi/release/release.pb.go index e37f039f6..f58ce1502 100644 --- a/pkg/proto/hapi/release/release.pb.go +++ b/pkg/proto/hapi/release/release.pb.go @@ -42,6 +42,13 @@ func (m *Release) String() string { return proto.CompactTextString(m) func (*Release) ProtoMessage() {} func (*Release) Descriptor() ([]byte, []int) { return fileDescriptor3, []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 @@ -63,6 +70,13 @@ func (m *Release) GetConfig() *hapi_chart.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 @@ -70,6 +84,20 @@ func (m *Release) GetHooks() []*Hook { 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") } diff --git a/pkg/proto/hapi/release/status.pb.go b/pkg/proto/hapi/release/status.pb.go index e93d26330..71ed631c8 100644 --- a/pkg/proto/hapi/release/status.pb.go +++ b/pkg/proto/hapi/release/status.pb.go @@ -69,6 +69,27 @@ func (m *Status) String() string { return proto.CompactTextString(m) func (*Status) ProtoMessage() {} func (*Status) Descriptor() ([]byte, []int) { return fileDescriptor4, []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 diff --git a/pkg/proto/hapi/release/test_run.pb.go b/pkg/proto/hapi/release/test_run.pb.go index 7304c3e83..a40a410f8 100644 --- a/pkg/proto/hapi/release/test_run.pb.go +++ b/pkg/proto/hapi/release/test_run.pb.go @@ -51,6 +51,27 @@ func (m *TestRun) String() string { return proto.CompactTextString(m) func (*TestRun) ProtoMessage() {} func (*TestRun) Descriptor() ([]byte, []int) { return fileDescriptor5, []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 diff --git a/pkg/proto/hapi/services/tiller.pb.go b/pkg/proto/hapi/services/tiller.pb.go index f5d315347..aaedd932b 100644 --- a/pkg/proto/hapi/services/tiller.pb.go +++ b/pkg/proto/hapi/services/tiller.pb.go @@ -141,6 +141,55 @@ func (m *ListReleasesRequest) String() string { return proto.CompactT 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 { } @@ -168,6 +217,27 @@ func (m *ListReleasesResponse) String() string { return proto.Compact 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 @@ -188,6 +258,20 @@ func (m *GetReleaseStatusRequest) String() string { return proto.Comp 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. @@ -203,6 +287,13 @@ func (m *GetReleaseStatusResponse) String() string { return proto.Com 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 @@ -210,6 +301,13 @@ func (m *GetReleaseStatusResponse) GetInfo() *hapi_release4.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 @@ -223,6 +321,20 @@ func (m *GetReleaseContentRequest) String() string { return proto.Com 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 +} + // GetReleaseContentResponse is a response containing the contents of a release. type GetReleaseContentResponse struct { // The release content @@ -304,6 +416,13 @@ func (m *UpdateReleaseRequest) String() string { return proto.Compact func (*UpdateReleaseRequest) ProtoMessage() {} func (*UpdateReleaseRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} } +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 @@ -318,6 +437,55 @@ func (m *UpdateReleaseRequest) GetValues() *hapi_chart.Config { 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 +} + // UpdateReleaseResponse is the response to an update request. type UpdateReleaseResponse struct { Release *hapi_release5.Release `protobuf:"bytes,1,opt,name=release" json:"release,omitempty"` @@ -358,6 +526,55 @@ func (m *RollbackReleaseRequest) String() string { return proto.Compa func (*RollbackReleaseRequest) ProtoMessage() {} func (*RollbackReleaseRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} } +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 +} + // RollbackReleaseResponse is the response to an update request. type RollbackReleaseResponse struct { Release *hapi_release5.Release `protobuf:"bytes,1,opt,name=release" json:"release,omitempty"` @@ -421,6 +638,55 @@ func (m *InstallReleaseRequest) GetValues() *hapi_chart.Config { 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 +} + // InstallReleaseResponse is the response from a release installation. type InstallReleaseResponse struct { Release *hapi_release5.Release `protobuf:"bytes,1,opt,name=release" json:"release,omitempty"` @@ -455,6 +721,34 @@ func (m *UninstallReleaseRequest) String() string { return proto.Comp func (*UninstallReleaseRequest) ProtoMessage() {} func (*UninstallReleaseRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} } +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. @@ -475,6 +769,13 @@ func (m *UninstallReleaseResponse) GetRelease() *hapi_release5.Release { return nil } +func (m *UninstallReleaseResponse) GetInfo() string { + if m != nil { + return m.Info + } + return "" +} + // GetVersionRequest requests for version information. type GetVersionRequest struct { } @@ -485,7 +786,7 @@ func (*GetVersionRequest) ProtoMessage() {} func (*GetVersionRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{17} } type GetVersionResponse struct { - Version *hapi_version.Version `protobuf:"bytes,1,opt,name=Version,json=version" json:"Version,omitempty"` + Version *hapi_version.Version `protobuf:"bytes,1,opt,name=Version" json:"Version,omitempty"` } func (m *GetVersionResponse) Reset() { *m = GetVersionResponse{} } @@ -513,6 +814,20 @@ func (m *GetHistoryRequest) String() string { return proto.CompactTex func (*GetHistoryRequest) ProtoMessage() {} func (*GetHistoryRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{19} } +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 +} + // GetHistoryResponse is received in response to a GetHistory rpc. type GetHistoryResponse struct { Releases []*hapi_release5.Release `protobuf:"bytes,1,rep,name=releases" json:"releases,omitempty"` @@ -545,6 +860,27 @@ func (m *TestReleaseRequest) String() string { return proto.CompactTe func (*TestReleaseRequest) ProtoMessage() {} func (*TestReleaseRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{21} } +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"` @@ -555,6 +891,13 @@ func (m *TestReleaseResponse) String() string { return proto.CompactT func (*TestReleaseResponse) ProtoMessage() {} func (*TestReleaseResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{22} } +func (m *TestReleaseResponse) GetMsg() string { + if m != nil { + return m.Msg + } + return "" +} + func init() { proto.RegisterType((*ListReleasesRequest)(nil), "hapi.services.tiller.ListReleasesRequest") proto.RegisterType((*ListSort)(nil), "hapi.services.tiller.ListSort") @@ -589,7 +932,7 @@ var _ grpc.ClientConn // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion3 +const _ = grpc.SupportPackageIsVersion4 // Client API for ReleaseService service @@ -1097,7 +1440,7 @@ var _ReleaseService_serviceDesc = grpc.ServiceDesc{ ServerStreams: true, }, }, - Metadata: fileDescriptor0, + Metadata: "hapi/services/tiller.proto", } func init() { proto.RegisterFile("hapi/services/tiller.proto", fileDescriptor0) } @@ -1163,24 +1506,24 @@ var fileDescriptor0 = []byte{ 0x1e, 0x47, 0x53, 0x2c, 0xa9, 0x15, 0x8b, 0x6c, 0x8c, 0x75, 0x2d, 0x46, 0x67, 0x08, 0xd6, 0xb2, 0x0f, 0x37, 0x8c, 0x28, 0xf1, 0x3a, 0xbd, 0x78, 0xda, 0xe2, 0x92, 0x71, 0xee, 0xc0, 0xed, 0x63, 0xcc, 0xde, 0x88, 0x0f, 0x40, 0x86, 0xe7, 0xf4, 0x00, 0x65, 0x37, 0x17, 0xf6, 0xe4, 0x96, 0x6e, - 0x4f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a6, 0xe1, 0xcd, 0x60, 0x43, 0xef, 0x70, 0x65, 0xe1, - 0x15, 0x5e, 0x19, 0x65, 0xe1, 0x15, 0x37, 0x4d, 0x67, 0x25, 0x29, 0x9d, 0x7c, 0x03, 0x2a, 0x2b, - 0x9d, 0x92, 0x66, 0x59, 0x56, 0x3a, 0x65, 0x7d, 0xcd, 0x59, 0x41, 0x1e, 0xc0, 0xa2, 0xff, 0xa0, - 0x07, 0xa5, 0x19, 0xd1, 0xdb, 0x96, 0xdd, 0xb9, 0x5e, 0x31, 0x35, 0x31, 0x87, 0x4f, 0x72, 0x17, - 0x34, 0x2a, 0xa1, 0xa6, 0x78, 0x2e, 0xb1, 0x9f, 0x54, 0xd4, 0xce, 0x05, 0x25, 0x5b, 0xda, 0x15, - 0x41, 0xe9, 0xfd, 0xf2, 0x8a, 0xa0, 0x72, 0xdd, 0xd1, 0x59, 0x41, 0x3e, 0x6c, 0xb8, 0x71, 0x28, - 0x4d, 0x27, 0x8d, 0x09, 0x95, 0x9c, 0x5e, 0x6e, 0x89, 0xf6, 0xc3, 0x0a, 0x9a, 0x8b, 0x96, 0xf2, - 0x0c, 0xde, 0xb6, 0x94, 0xea, 0x59, 0x83, 0xff, 0xff, 0xfe, 0xe6, 0xbf, 0x00, 0x00, 0x00, 0xff, - 0xff, 0xd2, 0xe7, 0x93, 0xb8, 0x68, 0x10, 0x00, 0x00, + 0x4f, 0x4d, 0x61, 0x4a, 0x5f, 0x69, 0x39, 0xdf, 0x72, 0xec, 0x13, 0x9f, 0x32, 0x12, 0x5d, 0x5e, + 0x45, 0xdd, 0x26, 0x98, 0x33, 0xef, 0x83, 0xbc, 0x97, 0x92, 0x57, 0xe7, 0x98, 0x7b, 0x90, 0x1e, + 0x95, 0x1e, 0x64, 0x6f, 0x79, 0xa3, 0xda, 0x2d, 0xff, 0x2b, 0xa0, 0x57, 0x38, 0x1d, 0x38, 0xae, + 0xb9, 0x20, 0x55, 0x12, 0x6a, 0x7a, 0xa1, 0x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xc3, 0x27, 0xb9, 0x0b, + 0x1a, 0x95, 0x50, 0x53, 0x3c, 0x97, 0xd8, 0x4f, 0x2a, 0x6a, 0xe7, 0x82, 0x92, 0x2d, 0xed, 0x8a, + 0xa0, 0xf4, 0x7e, 0x79, 0x45, 0x50, 0xb9, 0xee, 0xe8, 0xac, 0x20, 0x1f, 0x36, 0xdc, 0x38, 0x94, + 0xa6, 0x93, 0xc6, 0x84, 0x4a, 0x4e, 0x2f, 0xb7, 0x44, 0xfb, 0x61, 0x05, 0xcd, 0x45, 0x4b, 0x79, + 0x06, 0x6f, 0x5b, 0x4a, 0xf5, 0xac, 0xc1, 0xff, 0x7f, 0x7f, 0xf3, 0x5f, 0x00, 0x00, 0x00, 0xff, + 0xff, 0x43, 0x76, 0x4a, 0x56, 0x68, 0x10, 0x00, 0x00, } diff --git a/pkg/proto/hapi/version/version.pb.go b/pkg/proto/hapi/version/version.pb.go index adbee1a33..e3d8a7096 100644 --- a/pkg/proto/hapi/version/version.pb.go +++ b/pkg/proto/hapi/version/version.pb.go @@ -40,6 +40,27 @@ func (m *Version) String() string { return proto.CompactTextString(m) func (*Version) ProtoMessage() {} func (*Version) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } +func (m *Version) GetSemVer() string { + if m != nil { + return m.SemVer + } + return "" +} + +func (m *Version) GetGitCommit() string { + if m != nil { + return m.GitCommit + } + return "" +} + +func (m *Version) GetGitTreeState() string { + if m != nil { + return m.GitTreeState + } + return "" +} + func init() { proto.RegisterType((*Version)(nil), "hapi.version.Version") } diff --git a/pkg/tiller/logs/log_streamer.go b/pkg/tiller/logs/log_streamer.go index ab0d95205..0c2329e39 100644 --- a/pkg/tiller/logs/log_streamer.go +++ b/pkg/tiller/logs/log_streamer.go @@ -2,6 +2,7 @@ package logs import ( rspb "k8s.io/helm/pkg/proto/hapi/release" + "strings" ) type Logsub struct { @@ -11,6 +12,13 @@ type Logsub struct { level rspb.Log_Level } +type LogWriter struct { + rls string + source rspb.Log_Source + level rspb.Log_Level + ps *Pubsub +} + type release struct { name string sourceMappings map[rspb.Log_Source]map[*Logsub]bool @@ -85,3 +93,14 @@ func (ps *Pubsub) PubLog(rls string, source rspb.Log_Source, level rspb.Log_Leve } } +func (ps *Pubsub) GetWriter(rls string, source rspb.Log_Source, level rspb.Log_Level) *LogWriter { + return &LogWriter{rls: rls, source: source, level: level, ps: ps} +} + +func (lw *LogWriter) Write(p []byte) (n int, err error) { + logs := strings.Split(string(p), "\n") + for _, l := range logs { + lw.ps.PubLog(lw.rls, lw.source, lw.level, l) + } + return len(p), nil +} diff --git a/pkg/tiller/release_server.go b/pkg/tiller/release_server.go index e660756dd..d2acb615b 100644 --- a/pkg/tiller/release_server.go +++ b/pkg/tiller/release_server.go @@ -254,7 +254,12 @@ func (s *ReleaseServer) GetReleaseStatus(c ctx.Context, req *services.GetRelease Info: rel.Info, } - s.logs.PubLog(req.Name, release.Log_SYSTEM, release.Log_INFO, "Got release status for the release") + logOptions := kube.NewLogOptions() + logOptions.Resource = "tiller-deploy-1491950541-666lt" + logOptions.Namespace = "kube-system" + w := s.logs.GetWriter(req.Name, release.Log_SYSTEM, release.Log_INFO) + + err := logOptions.ExecuteLogRequest(w) // Ok, we got the status of the release as we had jotted down, now we need to match the // manifest we stashed away with reality from the cluster.