Continuing logs with kubectl approach

pull/2342/head^2
John Welsh 8 years ago
parent ed5e59c4ff
commit 44f93e0f4c

38
glide.lock generated

@ -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

@ -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

@ -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")

@ -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")

@ -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")
}

@ -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)

@ -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, 0x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, 0xeb, 0x23, 0x4f, 0x20, 0x49, 0xfb, 0x90, 0xd0,
0xed, 0xef, 0x88, 0x8d, 0x5f, 0x3b, 0x8d, 0xfc, 0x8e, 0x4d, 0x12, 0x28, 0x8b, 0xba, 0x58, 0xcd,
0xef, 0x2f, 0xc5, 0xf0, 0x0f, 0xf1, 0x16, 0x59, 0x9b, 0x33, 0xfc, 0x99, 0x5d, 0x68, 0xe3, 0x03,
0x7d, 0x2a, 0x70, 0x16, 0x7f, 0x40, 0x95, 0xa3, 0xd8, 0xaa, 0x44, 0xda, 0x22, 0xfa, 0x2d, 0xe2,
0xbd, 0xdf, 0xd2, 0x2e, 0x63, 0x63, 0x9d, 0x0b, 0xfc, 0x89, 0x2d, 0xad, 0x1c, 0x1a, 0xce, 0x4e,
0x1a, 0x16, 0x87, 0xc2, 0xbf, 0xe0, 0x91, 0x4d, 0x15, 0x58, 0x20, 0x50, 0xe5, 0xf8, 0x64, 0xb5,
0x8f, 0xf2, 0x9a, 0xcd, 0xd7, 0x10, 0xbe, 0xbc, 0x71, 0x64, 0xb0, 0x2b, 0xcf, 0xeb, 0x62, 0x35,
0x6b, 0x87, 0x4f, 0x2f, 0xb3, 0x8f, 0x69, 0xbe, 0x7a, 0x33, 0x89, 0xa6, 0x87, 0xbf, 0x00, 0x00,
0x00, 0xff, 0xff, 0x1a, 0x52, 0x8f, 0x9c, 0x89, 0x01, 0x00, 0x00,
}

@ -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

@ -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")
}

@ -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

@ -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

@ -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, 0x4d, 0x61, 0x4a, 0x3f, 0xbd, 0x58, 0xbe, 0xe5, 0xd8, 0x27, 0x3e, 0x65, 0x24, 0xba, 0xbc,
0x8a, 0xba, 0x4d, 0x30, 0x67, 0xde, 0x07, 0x79, 0x2f, 0x25, 0xaf, 0xce, 0x31, 0xf7, 0x20, 0x3d,
0x2a, 0x3d, 0xc8, 0xde, 0xf2, 0x46, 0xb5, 0x5b, 0xfe, 0x57, 0x40, 0xaf, 0x70, 0x3a, 0x70, 0x5c,
0x73, 0x41, 0xaa, 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f5, 0xac, 0xc1, 0xff, 0x7f, 0x7f, 0xf3, 0x5f, 0x00, 0x00, 0x00, 0xff,
0xff, 0x43, 0x76, 0x4a, 0x56, 0x68, 0x10, 0x00, 0x00,
}

@ -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")
}

@ -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
}

@ -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.

Loading…
Cancel
Save