From 63be90dda50885ccef7c2dee08c34a6b8e82b3a6 Mon Sep 17 00:00:00 2001 From: Sam Leavens Date: Mon, 31 Jul 2017 14:30:56 -0700 Subject: [PATCH] feat(*): add k8s version to version debug cmd When 'helm version --debug' is run, this will print the kubernetes server version as well as the helm client and server versions. Closes #1398 --- _proto/Makefile | 28 ++- _proto/hapi/kube/info.proto | 25 +++ _proto/hapi/kube/version.proto | 31 +++ _proto/hapi/services/tiller.proto | 12 ++ cmd/helm/version.go | 15 +- cmd/tiller/tiller.go | 8 + pkg/helm/client.go | 24 +++ pkg/helm/fake.go | 20 ++ pkg/helm/interface.go | 1 + pkg/proto/hapi/chart/chart.pb.go | 3 +- pkg/proto/hapi/chart/config.pb.go | 3 +- pkg/proto/hapi/chart/metadata.pb.go | 3 +- pkg/proto/hapi/chart/template.pb.go | 3 +- pkg/proto/hapi/kube/info.pb.go | 64 ++++++ pkg/proto/hapi/kube/version.pb.go | 119 +++++++++++ pkg/proto/hapi/release/hook.pb.go | 3 +- pkg/proto/hapi/release/info.pb.go | 3 +- pkg/proto/hapi/release/release.pb.go | 3 +- pkg/proto/hapi/release/status.pb.go | 3 +- pkg/proto/hapi/release/test_run.pb.go | 3 +- pkg/proto/hapi/release/test_suite.pb.go | 3 +- pkg/proto/hapi/rudder/rudder.pb.go | 3 +- pkg/proto/hapi/services/tiller.pb.go | 256 ++++++++++++++++-------- pkg/proto/hapi/version/version.pb.go | 3 +- pkg/tiller/info_service.go | 61 ++++++ pkg/tiller/release_server.go | 2 +- 26 files changed, 598 insertions(+), 104 deletions(-) create mode 100644 _proto/hapi/kube/info.proto create mode 100644 _proto/hapi/kube/version.proto create mode 100644 pkg/proto/hapi/kube/info.pb.go create mode 100644 pkg/proto/hapi/kube/version.pb.go create mode 100644 pkg/tiller/info_service.go diff --git a/_proto/Makefile b/_proto/Makefile index 39f72d441..ce624619d 100644 --- a/_proto/Makefile +++ b/_proto/Makefile @@ -8,13 +8,13 @@ dst = ../pkg/proto target = go plugins = grpc -chart_ias = $(subst $(space),$(comma),$(addsuffix =$(import_path)/$(chart_pkg),$(addprefix M,$(chart_pbs)))) -chart_pbs = $(sort $(wildcard hapi/chart/*.proto)) -chart_pkg = chart +chart_ias = $(subst $(space),$(comma),$(addsuffix =$(import_path)/$(chart_pkg),$(addprefix M,$(chart_pbs)))) +chart_pbs = $(sort $(wildcard hapi/chart/*.proto)) +chart_pkg = chart -release_ias = $(subst $(space),$(comma),$(addsuffix =$(import_path)/$(release_pkg),$(addprefix M,$(release_pbs)))) -release_pbs = $(sort $(wildcard hapi/release/*.proto)) -release_pkg = release +release_ias = $(subst $(space),$(comma),$(addsuffix =$(import_path)/$(release_pkg),$(addprefix M,$(release_pbs)))) +release_pbs = $(sort $(wildcard hapi/release/*.proto)) +release_pkg = release services_ias = $(subst $(space),$(comma),$(addsuffix =$(import_path)/$(services_pkg),$(addprefix M,$(services_pbs)))) services_pbs = $(sort $(wildcard hapi/services/*.proto)) @@ -24,14 +24,18 @@ rudder_ias = $(subst $(space),$(comma),$(addsuffix =$(import_path)/$(rudder_pkg) rudder_pbs = $(sort $(wildcard hapi/rudder/*.proto)) rudder_pkg = rudder -version_ias = $(subst $(space),$(comma),$(addsuffix =$(import_path)/$(version_pkg),$(addprefix M,$(version_pbs)))) -version_pbs = $(sort $(wildcard hapi/version/*.proto)) -version_pkg = version +version_ias = $(subst $(space),$(comma),$(addsuffix =$(import_path)/$(version_pkg),$(addprefix M,$(version_pbs)))) +version_pbs = $(sort $(wildcard hapi/version/*.proto)) +version_pkg = version + +kube_ias = $(subst $(space),$(comma),$(addsuffix =$(import_path)/$(kube_pkg),$(addprefix M,$(kube_pbs)))) +kube_pbs = $(sort $(wildcard hapi/kube/*.proto)) +kube_pkg = kube google_deps = Mgoogle/protobuf/timestamp.proto=github.com/golang/protobuf/ptypes/timestamp,Mgoogle/protobuf/any.proto=github.com/golang/protobuf/ptypes/any .PHONY: all -all: chart release services rudder version +all: chart release services rudder version kube .PHONY: chart chart: @@ -53,6 +57,10 @@ rudder: version: PATH=../bin:$(PATH) protoc --$(target)_out=plugins=$(plugins),$(google_deps):$(dst) $(version_pbs) +.PHONY: kube +kube: + PATH=../bin:$(PATH) protoc --$(target)_out=plugins=$(plugins),$(google_deps):$(dst) $(kube_pbs) + .PHONY: clean clean: @rm -rf $(dst)/hapi 2>/dev/null diff --git a/_proto/hapi/kube/info.proto b/_proto/hapi/kube/info.proto new file mode 100644 index 000000000..9ecb757e7 --- /dev/null +++ b/_proto/hapi/kube/info.proto @@ -0,0 +1,25 @@ +// Copyright 2017 The Kubernetes Authors All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package hapi.kube; + +import "hapi/kube/version.proto"; + +option go_package = "kube"; + +message Info { + hapi.kube.Version Version = 1; +} diff --git a/_proto/hapi/kube/version.proto b/_proto/hapi/kube/version.proto new file mode 100644 index 000000000..8ada2d3fb --- /dev/null +++ b/_proto/hapi/kube/version.proto @@ -0,0 +1,31 @@ +// Copyright 2017 The Kubernetes Authors All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package hapi.kube; + +option go_package = "kube"; + +message Version { + string major = 1; + string minor = 2; + string git_version = 3; + string git_commit = 4; + string git_tree_state = 5; + string build_date = 6; + string go_version = 7; + string compiler = 8; + string platform = 9; +} diff --git a/_proto/hapi/services/tiller.proto b/_proto/hapi/services/tiller.proto index 1fb6a86e9..405384d5a 100644 --- a/_proto/hapi/services/tiller.proto +++ b/_proto/hapi/services/tiller.proto @@ -23,6 +23,7 @@ import "hapi/release/info.proto"; import "hapi/release/test_run.proto"; import "hapi/release/status.proto"; import "hapi/version/version.proto"; +import "hapi/kube/info.proto"; option go_package = "services"; @@ -85,6 +86,11 @@ service ReleaseService { } } +service InfoService { + rpc GetKubeInfo(GetKubeInfoRequest) returns (GetKubeInfoResponse) { + } +} + // ListReleasesRequest requests a list of releases. // // Releases can be retrieved in chunks by setting limit and offset. @@ -333,5 +339,11 @@ message TestReleaseRequest { message TestReleaseResponse { string msg = 1; hapi.release.TestRun.Status status = 2; +} + +message GetKubeInfoRequest { +} +message GetKubeInfoResponse { + hapi.kube.Info Info = 1; } diff --git a/cmd/helm/version.go b/cmd/helm/version.go index 64c66b348..425ebdccf 100644 --- a/cmd/helm/version.go +++ b/cmd/helm/version.go @@ -71,9 +71,9 @@ func newVersionCmd(c helm.Interface, out io.Writer) *cobra.Command { if !version.showClient && !version.showServer { version.showClient, version.showServer = true, true } - if version.showServer { + if version.showServer || settings.Debug { // We do this manually instead of in PreRun because we only - // need a tunnel if server version is requested. + // need a tunnel if server version or debug is requested. setupConnection(cmd, args) } version.client = ensureHelmClient(version.client) @@ -89,6 +89,17 @@ func newVersionCmd(c helm.Interface, out io.Writer) *cobra.Command { } func (v *versionCmd) run() error { + if settings.Debug { + resp, err := v.client.GetKubeInfo() + if err != nil { + if grpc.Code(err) == codes.Unimplemented { + return errors.New("server is too old to know kubernetes info") + } + debug("%s", err) + return errors.New("cannot connect to Tiller") + } + debug("Kubernetes: %+v\n", resp.Info) + } if v.showClient { cv := version.GetVersionProto() diff --git a/cmd/tiller/tiller.go b/cmd/tiller/tiller.go index 2a4cf066e..45b09b823 100644 --- a/cmd/tiller/tiller.go +++ b/cmd/tiller/tiller.go @@ -171,6 +171,14 @@ func start() { } }() + go func() { + svc := tiller.NewInfoServer(env, clientset) + services.RegisterInfoServiceServer(rootServer, svc) + if err := rootServer.Serve(lstn); err != nil { + srvErrCh <- err + } + }() + go func() { mux := newProbesMux() diff --git a/pkg/helm/client.go b/pkg/helm/client.go index dbaf01d96..25381161a 100644 --- a/pkg/helm/client.go +++ b/pkg/helm/client.go @@ -197,6 +197,19 @@ func (h *Client) GetVersion(opts ...VersionOption) (*rls.GetVersionResponse, err return h.version(ctx, req) } +// GetKubeInfo returns the kubernetes server information. +func (h *Client) GetKubeInfo() (*rls.GetKubeInfoResponse, error) { + req := &rls.GetKubeInfoRequest{} + ctx := NewContext() + + if h.opts.before != nil { + if err := h.opts.before(ctx, req); err != nil { + return nil, err + } + } + return h.kubeInfo(ctx, req) +} + // RollbackRelease rolls back a release to the previous version. func (h *Client) RollbackRelease(rlsName string, opts ...RollbackOption) (*rls.RollbackReleaseResponse, error) { for _, opt := range opts { @@ -403,6 +416,17 @@ func (h *Client) version(ctx context.Context, req *rls.GetVersionRequest) (*rls. return rlc.GetVersion(ctx, req) } +func (h *Client) kubeInfo(ctx context.Context, req *rls.GetKubeInfoRequest) (*rls.GetKubeInfoResponse, error) { + c, err := h.connect(ctx) + if err != nil { + return nil, err + } + defer c.Close() + + rlc := rls.NewInfoServiceClient(c) + return rlc.GetKubeInfo(ctx, req) +} + // Executes tiller.GetHistory RPC. func (h *Client) history(ctx context.Context, req *rls.GetHistoryRequest) (*rls.GetHistoryResponse, error) { c, err := h.connect(ctx) diff --git a/pkg/helm/fake.go b/pkg/helm/fake.go index c66777673..e24d02d42 100644 --- a/pkg/helm/fake.go +++ b/pkg/helm/fake.go @@ -21,6 +21,7 @@ import ( "sync" "k8s.io/helm/pkg/proto/hapi/chart" + "k8s.io/helm/pkg/proto/hapi/kube" "k8s.io/helm/pkg/proto/hapi/release" rls "k8s.io/helm/pkg/proto/hapi/services" "k8s.io/helm/pkg/proto/hapi/version" @@ -78,6 +79,25 @@ func (c *FakeClient) GetVersion(opts ...VersionOption) (*rls.GetVersionResponse, }, nil } +// GetKubeInfo returns fake kubernetes server information +func (c *FakeClient) GetKubeInfo() (*rls.GetKubeInfoResponse, error) { + return &rls.GetKubeInfoResponse{ + Info: &kube.Info{ + Version: &kube.Version{ + Major: "0", + Minor: "1", + GitVersion: "2", + GitCommit: "3", + GitTreeState: "4", + BuildDate: "5", + GoVersion: "6", + Compiler: "7", + Platform: "8", + }, + }, + }, nil +} + // UpdateReleaseFromChart returns nil, nil func (c *FakeClient) UpdateReleaseFromChart(rlsName string, chart *chart.Chart, opts ...UpdateOption) (*rls.UpdateReleaseResponse, error) { return nil, nil diff --git a/pkg/helm/interface.go b/pkg/helm/interface.go index bff110b34..636d622d6 100644 --- a/pkg/helm/interface.go +++ b/pkg/helm/interface.go @@ -34,5 +34,6 @@ type Interface interface { ReleaseContent(rlsName string, opts ...ContentOption) (*rls.GetReleaseContentResponse, error) ReleaseHistory(rlsName string, opts ...HistoryOption) (*rls.GetHistoryResponse, error) GetVersion(opts ...VersionOption) (*rls.GetVersionResponse, error) + GetKubeInfo() (*rls.GetKubeInfoResponse, error) RunReleaseTest(rlsName string, opts ...ReleaseTestOption) (<-chan *rls.TestReleaseResponse, <-chan error) } diff --git a/pkg/proto/hapi/chart/chart.pb.go b/pkg/proto/hapi/chart/chart.pb.go index a884ed552..dbb188e91 100644 --- a/pkg/proto/hapi/chart/chart.pb.go +++ b/pkg/proto/hapi/chart/chart.pb.go @@ -1,5 +1,6 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. +// Code generated by protoc-gen-go. // source: hapi/chart/chart.proto +// DO NOT EDIT! /* Package chart is a generated protocol buffer package. diff --git a/pkg/proto/hapi/chart/config.pb.go b/pkg/proto/hapi/chart/config.pb.go index 30c652700..4a8b36d89 100644 --- a/pkg/proto/hapi/chart/config.pb.go +++ b/pkg/proto/hapi/chart/config.pb.go @@ -1,5 +1,6 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. +// Code generated by protoc-gen-go. // source: hapi/chart/config.proto +// DO NOT EDIT! package chart diff --git a/pkg/proto/hapi/chart/metadata.pb.go b/pkg/proto/hapi/chart/metadata.pb.go index af9f58153..0574e6df9 100644 --- a/pkg/proto/hapi/chart/metadata.pb.go +++ b/pkg/proto/hapi/chart/metadata.pb.go @@ -1,5 +1,6 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. +// Code generated by protoc-gen-go. // source: hapi/chart/metadata.proto +// DO NOT EDIT! package chart diff --git a/pkg/proto/hapi/chart/template.pb.go b/pkg/proto/hapi/chart/template.pb.go index 439aec5a8..416269d18 100644 --- a/pkg/proto/hapi/chart/template.pb.go +++ b/pkg/proto/hapi/chart/template.pb.go @@ -1,5 +1,6 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. +// Code generated by protoc-gen-go. // source: hapi/chart/template.proto +// DO NOT EDIT! package chart diff --git a/pkg/proto/hapi/kube/info.pb.go b/pkg/proto/hapi/kube/info.pb.go new file mode 100644 index 000000000..58b075336 --- /dev/null +++ b/pkg/proto/hapi/kube/info.pb.go @@ -0,0 +1,64 @@ +// Code generated by protoc-gen-go. +// source: hapi/kube/info.proto +// DO NOT EDIT! + +/* +Package kube is a generated protocol buffer package. + +It is generated from these files: + hapi/kube/info.proto + hapi/kube/version.proto + +It has these top-level messages: + Info + Version +*/ +package kube + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package + +type Info struct { + Version *Version `protobuf:"bytes,1,opt,name=Version" json:"Version,omitempty"` +} + +func (m *Info) Reset() { *m = Info{} } +func (m *Info) String() string { return proto.CompactTextString(m) } +func (*Info) ProtoMessage() {} +func (*Info) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } + +func (m *Info) GetVersion() *Version { + if m != nil { + return m.Version + } + return nil +} + +func init() { + proto.RegisterType((*Info)(nil), "hapi.kube.Info") +} + +func init() { proto.RegisterFile("hapi/kube/info.proto", fileDescriptor0) } + +var fileDescriptor0 = []byte{ + // 109 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xc9, 0x48, 0x2c, 0xc8, + 0xd4, 0xcf, 0x2e, 0x4d, 0x4a, 0xd5, 0xcf, 0xcc, 0x4b, 0xcb, 0xd7, 0x2b, 0x28, 0xca, 0x2f, 0xc9, + 0x17, 0xe2, 0x04, 0x89, 0xea, 0x81, 0x44, 0xa5, 0xc4, 0x11, 0x0a, 0xca, 0x52, 0x8b, 0x8a, 0x33, + 0xf3, 0xf3, 0x20, 0x6a, 0x94, 0x4c, 0xb8, 0x58, 0x3c, 0xf3, 0xd2, 0xf2, 0x85, 0x74, 0xb8, 0xd8, + 0xc3, 0x20, 0x12, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0xdc, 0x46, 0x42, 0x7a, 0x70, 0xdd, 0x7a, 0x50, + 0x99, 0x20, 0x98, 0x12, 0x27, 0xb6, 0x28, 0x16, 0x90, 0x44, 0x12, 0x1b, 0xd8, 0x10, 0x63, 0x40, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x9c, 0x44, 0x5d, 0xcd, 0x80, 0x00, 0x00, 0x00, +} diff --git a/pkg/proto/hapi/kube/version.pb.go b/pkg/proto/hapi/kube/version.pb.go new file mode 100644 index 000000000..6c68b2d95 --- /dev/null +++ b/pkg/proto/hapi/kube/version.pb.go @@ -0,0 +1,119 @@ +// Code generated by protoc-gen-go. +// source: hapi/kube/version.proto +// DO NOT EDIT! + +package kube + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +type Version struct { + Major string `protobuf:"bytes,1,opt,name=major" json:"major,omitempty"` + Minor string `protobuf:"bytes,2,opt,name=minor" json:"minor,omitempty"` + GitVersion string `protobuf:"bytes,3,opt,name=git_version,json=gitVersion" json:"git_version,omitempty"` + GitCommit string `protobuf:"bytes,4,opt,name=git_commit,json=gitCommit" json:"git_commit,omitempty"` + GitTreeState string `protobuf:"bytes,5,opt,name=git_tree_state,json=gitTreeState" json:"git_tree_state,omitempty"` + BuildDate string `protobuf:"bytes,6,opt,name=build_date,json=buildDate" json:"build_date,omitempty"` + GoVersion string `protobuf:"bytes,7,opt,name=go_version,json=goVersion" json:"go_version,omitempty"` + Compiler string `protobuf:"bytes,8,opt,name=compiler" json:"compiler,omitempty"` + Platform string `protobuf:"bytes,9,opt,name=platform" json:"platform,omitempty"` +} + +func (m *Version) Reset() { *m = Version{} } +func (m *Version) String() string { return proto.CompactTextString(m) } +func (*Version) ProtoMessage() {} +func (*Version) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} } + +func (m *Version) GetMajor() string { + if m != nil { + return m.Major + } + return "" +} + +func (m *Version) GetMinor() string { + if m != nil { + return m.Minor + } + return "" +} + +func (m *Version) GetGitVersion() string { + if m != nil { + return m.GitVersion + } + 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 (m *Version) GetBuildDate() string { + if m != nil { + return m.BuildDate + } + return "" +} + +func (m *Version) GetGoVersion() string { + if m != nil { + return m.GoVersion + } + return "" +} + +func (m *Version) GetCompiler() string { + if m != nil { + return m.Compiler + } + return "" +} + +func (m *Version) GetPlatform() string { + if m != nil { + return m.Platform + } + return "" +} + +func init() { + proto.RegisterType((*Version)(nil), "hapi.kube.Version") +} + +func init() { proto.RegisterFile("hapi/kube/version.proto", fileDescriptor1) } + +var fileDescriptor1 = []byte{ + // 229 bytes of a gzipped FileDescriptorProto + 0x1f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x5c, 0xc1, 0x72, 0xc3, 0xa9, 0xa5, 0x06, 0x25, 0x2c, + 0x5d, 0x8e, 0xd9, 0x5c, 0xdb, 0x54, 0xfa, 0xc5, 0x92, 0x42, 0xde, 0xb9, 0x21, 0x3f, 0x65, 0x9f, + 0x33, 0xfb, 0x4d, 0x9d, 0xf9, 0xb7, 0x1e, 0x8f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x9c, 0x4d, 0x8a, + 0x4f, 0x48, 0x01, 0x00, 0x00, +} diff --git a/pkg/proto/hapi/release/hook.pb.go b/pkg/proto/hapi/release/hook.pb.go index bd9391c50..5a53080be 100644 --- a/pkg/proto/hapi/release/hook.pb.go +++ b/pkg/proto/hapi/release/hook.pb.go @@ -1,5 +1,6 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. +// Code generated by protoc-gen-go. // source: hapi/release/hook.proto +// DO NOT EDIT! /* Package release is a generated protocol buffer package. diff --git a/pkg/proto/hapi/release/info.pb.go b/pkg/proto/hapi/release/info.pb.go index 7a7ccdd74..9485ad058 100644 --- a/pkg/proto/hapi/release/info.pb.go +++ b/pkg/proto/hapi/release/info.pb.go @@ -1,5 +1,6 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. +// Code generated by protoc-gen-go. // source: hapi/release/info.proto +// DO NOT EDIT! package release diff --git a/pkg/proto/hapi/release/release.pb.go b/pkg/proto/hapi/release/release.pb.go index 511b543d7..47b321b50 100644 --- a/pkg/proto/hapi/release/release.pb.go +++ b/pkg/proto/hapi/release/release.pb.go @@ -1,5 +1,6 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. +// Code generated by protoc-gen-go. // source: hapi/release/release.proto +// DO NOT EDIT! package release diff --git a/pkg/proto/hapi/release/status.pb.go b/pkg/proto/hapi/release/status.pb.go index 284892642..ea7008d8c 100644 --- a/pkg/proto/hapi/release/status.pb.go +++ b/pkg/proto/hapi/release/status.pb.go @@ -1,5 +1,6 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. +// Code generated by protoc-gen-go. // source: hapi/release/status.proto +// DO NOT EDIT! package release diff --git a/pkg/proto/hapi/release/test_run.pb.go b/pkg/proto/hapi/release/test_run.pb.go index 4d39d17c2..bd3c0ab2b 100644 --- a/pkg/proto/hapi/release/test_run.pb.go +++ b/pkg/proto/hapi/release/test_run.pb.go @@ -1,5 +1,6 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. +// Code generated by protoc-gen-go. // source: hapi/release/test_run.proto +// DO NOT EDIT! package release diff --git a/pkg/proto/hapi/release/test_suite.pb.go b/pkg/proto/hapi/release/test_suite.pb.go index b7fa26147..f168bf1d2 100644 --- a/pkg/proto/hapi/release/test_suite.pb.go +++ b/pkg/proto/hapi/release/test_suite.pb.go @@ -1,5 +1,6 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. +// Code generated by protoc-gen-go. // source: hapi/release/test_suite.proto +// DO NOT EDIT! package release diff --git a/pkg/proto/hapi/rudder/rudder.pb.go b/pkg/proto/hapi/rudder/rudder.pb.go index 6e26d71eb..3f64ba713 100644 --- a/pkg/proto/hapi/rudder/rudder.pb.go +++ b/pkg/proto/hapi/rudder/rudder.pb.go @@ -1,5 +1,6 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. +// Code generated by protoc-gen-go. // source: hapi/rudder/rudder.proto +// DO NOT EDIT! /* Package rudder is a generated protocol buffer package. diff --git a/pkg/proto/hapi/services/tiller.pb.go b/pkg/proto/hapi/services/tiller.pb.go index 023749c4f..c0f86975b 100644 --- a/pkg/proto/hapi/services/tiller.pb.go +++ b/pkg/proto/hapi/services/tiller.pb.go @@ -1,5 +1,6 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. +// Code generated by protoc-gen-go. // source: hapi/services/tiller.proto +// DO NOT EDIT! /* Package services is a generated protocol buffer package. @@ -29,6 +30,8 @@ It has these top-level messages: GetHistoryResponse TestReleaseRequest TestReleaseResponse + GetKubeInfoRequest + GetKubeInfoResponse */ package services @@ -42,6 +45,7 @@ import hapi_release4 "k8s.io/helm/pkg/proto/hapi/release" import hapi_release1 "k8s.io/helm/pkg/proto/hapi/release" import hapi_release3 "k8s.io/helm/pkg/proto/hapi/release" import hapi_version "k8s.io/helm/pkg/proto/hapi/version" +import hapi_kube1 "k8s.io/helm/pkg/proto/hapi/kube" import ( context "golang.org/x/net/context" @@ -889,6 +893,30 @@ func (m *TestReleaseResponse) GetStatus() hapi_release1.TestRun_Status { return hapi_release1.TestRun_UNKNOWN } +type GetKubeInfoRequest struct { +} + +func (m *GetKubeInfoRequest) Reset() { *m = GetKubeInfoRequest{} } +func (m *GetKubeInfoRequest) String() string { return proto.CompactTextString(m) } +func (*GetKubeInfoRequest) ProtoMessage() {} +func (*GetKubeInfoRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{21} } + +type GetKubeInfoResponse struct { + Info *hapi_kube1.Info `protobuf:"bytes,1,opt,name=Info" json:"Info,omitempty"` +} + +func (m *GetKubeInfoResponse) Reset() { *m = GetKubeInfoResponse{} } +func (m *GetKubeInfoResponse) String() string { return proto.CompactTextString(m) } +func (*GetKubeInfoResponse) ProtoMessage() {} +func (*GetKubeInfoResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{22} } + +func (m *GetKubeInfoResponse) GetInfo() *hapi_kube1.Info { + if m != nil { + return m.Info + } + return nil +} + func init() { proto.RegisterType((*ListReleasesRequest)(nil), "hapi.services.tiller.ListReleasesRequest") proto.RegisterType((*ListSort)(nil), "hapi.services.tiller.ListSort") @@ -911,6 +939,8 @@ func init() { proto.RegisterType((*GetHistoryResponse)(nil), "hapi.services.tiller.GetHistoryResponse") proto.RegisterType((*TestReleaseRequest)(nil), "hapi.services.tiller.TestReleaseRequest") proto.RegisterType((*TestReleaseResponse)(nil), "hapi.services.tiller.TestReleaseResponse") + proto.RegisterType((*GetKubeInfoRequest)(nil), "hapi.services.tiller.GetKubeInfoRequest") + proto.RegisterType((*GetKubeInfoResponse)(nil), "hapi.services.tiller.GetKubeInfoResponse") proto.RegisterEnum("hapi.services.tiller.ListSort_SortBy", ListSort_SortBy_name, ListSort_SortBy_value) proto.RegisterEnum("hapi.services.tiller.ListSort_SortOrder", ListSort_SortOrder_name, ListSort_SortOrder_value) } @@ -1365,85 +1395,153 @@ var _ReleaseService_serviceDesc = grpc.ServiceDesc{ Metadata: "hapi/services/tiller.proto", } +// Client API for InfoService service + +type InfoServiceClient interface { + GetKubeInfo(ctx context.Context, in *GetKubeInfoRequest, opts ...grpc.CallOption) (*GetKubeInfoResponse, error) +} + +type infoServiceClient struct { + cc *grpc.ClientConn +} + +func NewInfoServiceClient(cc *grpc.ClientConn) InfoServiceClient { + return &infoServiceClient{cc} +} + +func (c *infoServiceClient) GetKubeInfo(ctx context.Context, in *GetKubeInfoRequest, opts ...grpc.CallOption) (*GetKubeInfoResponse, error) { + out := new(GetKubeInfoResponse) + err := grpc.Invoke(ctx, "/hapi.services.tiller.InfoService/GetKubeInfo", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Server API for InfoService service + +type InfoServiceServer interface { + GetKubeInfo(context.Context, *GetKubeInfoRequest) (*GetKubeInfoResponse, error) +} + +func RegisterInfoServiceServer(s *grpc.Server, srv InfoServiceServer) { + s.RegisterService(&_InfoService_serviceDesc, srv) +} + +func _InfoService_GetKubeInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetKubeInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(InfoServiceServer).GetKubeInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/hapi.services.tiller.InfoService/GetKubeInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(InfoServiceServer).GetKubeInfo(ctx, req.(*GetKubeInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _InfoService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "hapi.services.tiller.InfoService", + HandlerType: (*InfoServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetKubeInfo", + Handler: _InfoService_GetKubeInfo_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "hapi/services/tiller.proto", +} + func init() { proto.RegisterFile("hapi/services/tiller.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ - // 1217 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0xdd, 0x6e, 0xe3, 0xc4, - 0x17, 0xaf, 0xf3, 0x9d, 0x93, 0x36, 0xff, 0x74, 0x9a, 0xb6, 0xae, 0xff, 0x0b, 0x2a, 0x46, 0xb0, - 0xd9, 0x85, 0x4d, 0x21, 0x70, 0x83, 0x84, 0x90, 0xba, 0xdd, 0xa8, 0x2d, 0x94, 0xae, 0xe4, 0x6c, - 0x17, 0x09, 0x01, 0x91, 0x9b, 0x4c, 0x5a, 0xb3, 0x8e, 0x27, 0x78, 0xc6, 0x65, 0x7b, 0xcb, 0x1d, - 0x8f, 0xc2, 0x5b, 0xf0, 0x1e, 0x5c, 0xc2, 0x83, 0x20, 0xcf, 0x87, 0xeb, 0x49, 0xed, 0xd6, 0xf4, - 0x26, 0x9e, 0x99, 0xf3, 0xfd, 0x3b, 0x67, 0xce, 0x9c, 0x80, 0x75, 0xe9, 0x2e, 0xbc, 0x3d, 0x8a, - 0xc3, 0x2b, 0x6f, 0x82, 0xe9, 0x1e, 0xf3, 0x7c, 0x1f, 0x87, 0xfd, 0x45, 0x48, 0x18, 0x41, 0xdd, - 0x98, 0xd6, 0x57, 0xb4, 0xbe, 0xa0, 0x59, 0x5b, 0x5c, 0x62, 0x72, 0xe9, 0x86, 0x4c, 0xfc, 0x0a, - 0x6e, 0x6b, 0x3b, 0x7d, 0x4e, 0x82, 0x99, 0x77, 0x21, 0x09, 0xc2, 0x44, 0x88, 0x7d, 0xec, 0x52, - 0xac, 0xbe, 0x9a, 0x90, 0xa2, 0x79, 0xc1, 0x8c, 0x48, 0xc2, 0xff, 0x35, 0x02, 0xc3, 0x94, 0x8d, - 0xc3, 0x28, 0x90, 0xc4, 0x1d, 0x8d, 0x48, 0x99, 0xcb, 0x22, 0xaa, 0x19, 0xbb, 0xc2, 0x21, 0xf5, - 0x48, 0xa0, 0xbe, 0x82, 0x66, 0xff, 0x59, 0x82, 0x8d, 0x13, 0x8f, 0x32, 0x47, 0x08, 0x52, 0x07, - 0xff, 0x12, 0x61, 0xca, 0x50, 0x17, 0xaa, 0xbe, 0x37, 0xf7, 0x98, 0x69, 0xec, 0x1a, 0xbd, 0xb2, - 0x23, 0x36, 0x68, 0x0b, 0x6a, 0x64, 0x36, 0xa3, 0x98, 0x99, 0xa5, 0x5d, 0xa3, 0xd7, 0x74, 0xe4, - 0x0e, 0x7d, 0x05, 0x75, 0x4a, 0x42, 0x36, 0x3e, 0xbf, 0x36, 0xcb, 0xbb, 0x46, 0xaf, 0x3d, 0xf8, - 0xa0, 0x9f, 0x85, 0x53, 0x3f, 0xb6, 0x34, 0x22, 0x21, 0xeb, 0xc7, 0x3f, 0xcf, 0xaf, 0x9d, 0x1a, - 0xe5, 0xdf, 0x58, 0xef, 0xcc, 0xf3, 0x19, 0x0e, 0xcd, 0x8a, 0xd0, 0x2b, 0x76, 0xe8, 0x10, 0x80, - 0xeb, 0x25, 0xe1, 0x14, 0x87, 0x66, 0x95, 0xab, 0xee, 0x15, 0x50, 0xfd, 0x32, 0xe6, 0x77, 0x9a, - 0x54, 0x2d, 0xd1, 0x97, 0xb0, 0x2a, 0x20, 0x19, 0x4f, 0xc8, 0x14, 0x53, 0xb3, 0xb6, 0x5b, 0xee, - 0xb5, 0x07, 0x3b, 0x42, 0x95, 0x82, 0x7f, 0x24, 0x40, 0x3b, 0x20, 0x53, 0xec, 0xb4, 0x04, 0x7b, - 0xbc, 0xa6, 0xe8, 0x11, 0x34, 0x03, 0x77, 0x8e, 0xe9, 0xc2, 0x9d, 0x60,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x11, 0x87, 0xd3, 0xf5, 0x54, 0x95, 0x97, 0x53, 0x75, 0x94, 0xb6, 0x7a, 0x40, 0x02, - 0x86, 0x03, 0xf6, 0x30, 0xff, 0x4f, 0x60, 0x27, 0x43, 0x93, 0x0c, 0x60, 0x0f, 0xea, 0xd2, 0x35, - 0xae, 0x2d, 0x17, 0x57, 0xc5, 0x65, 0xff, 0x5d, 0x82, 0xee, 0xd9, 0x62, 0xea, 0x32, 0xac, 0x48, - 0x77, 0x38, 0xf5, 0x18, 0xaa, 0xbc, 0xa3, 0x48, 0x2c, 0xd6, 0x85, 0x6e, 0xd1, 0x76, 0x0e, 0xe2, - 0x5f, 0x47, 0xd0, 0xd1, 0x53, 0xa8, 0x5d, 0xb9, 0x7e, 0x84, 0x29, 0x07, 0x22, 0x41, 0x4d, 0x72, - 0xf2, 0x76, 0xe4, 0x48, 0x0e, 0xb4, 0x0d, 0xf5, 0x69, 0x78, 0x1d, 0xf7, 0x13, 0x7e, 0x05, 0x1b, - 0x4e, 0x6d, 0x1a, 0x5e, 0x3b, 0x51, 0x80, 0xde, 0x87, 0xb5, 0xa9, 0x47, 0xdd, 0x73, 0x1f, 0x8f, - 0x2f, 0x09, 0x79, 0x43, 0xf9, 0x2d, 0x6c, 0x38, 0xab, 0xf2, 0xf0, 0x28, 0x3e, 0x43, 0x56, 0x5c, - 0x49, 0x93, 0x10, 0xbb, 0x0c, 0x9b, 0x35, 0x4e, 0x4f, 0xf6, 0x31, 0x86, 0xcc, 0x9b, 0x63, 0x12, - 0x31, 0x7e, 0x75, 0xca, 0x8e, 0xda, 0xa2, 0xf7, 0x60, 0x35, 0xc4, 0x14, 0xb3, 0xb1, 0xf4, 0xb2, - 0xc1, 0x25, 0x5b, 0xfc, 0xec, 0xb5, 0x70, 0x0b, 0x41, 0xe5, 0x57, 0xd7, 0x63, 0x66, 0x93, 0x93, - 0xf8, 0x5a, 0x88, 0x45, 0x14, 0x2b, 0x31, 0x50, 0x62, 0x11, 0xc5, 0x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0xaf, 0x1a, 0x7d, 0x20, 0xb1, 0xf6, 0x0a, 0xf3, 0x27, - 0x76, 0x7f, 0x86, 0x35, 0xed, 0x85, 0x43, 0x39, 0x68, 0x65, 0xcd, 0x1a, 0xd6, 0x47, 0x85, 0x78, - 0x13, 0x5b, 0x73, 0x68, 0xeb, 0x4d, 0x0a, 0xe5, 0x28, 0xc8, 0xec, 0xfa, 0xd6, 0xc7, 0xc5, 0x98, - 0x13, 0x73, 0x14, 0x3a, 0xcb, 0x3d, 0x24, 0x2f, 0x8f, 0x39, 0xfd, 0x2e, 0x2f, 0x8f, 0x79, 0xad, - 0xc9, 0x5e, 0x41, 0x2e, 0xc0, 0x4d, 0x0b, 0x41, 0x8f, 0x73, 0x13, 0xa2, 0x77, 0x1e, 0xab, 0x77, - 0x3f, 0x63, 0x62, 0x62, 0x01, 0xff, 0x5b, 0x7a, 0x63, 0x51, 0x0e, 0x34, 0xd9, 0x03, 0x87, 0xf5, - 0xac, 0x20, 0xf7, 0x52, 0x50, 0xb2, 0x2b, 0xdd, 0x11, 0x94, 0xde, 0xf2, 0xee, 0x08, 0x6a, 0xa9, - 0xc1, 0xd9, 0x2b, 0xc8, 0x83, 0xb6, 0x13, 0x05, 0xd2, 0x74, 0xdc, 0x16, 0x50, 0x8e, 0xf4, 0xed, - 0xae, 0x66, 0x3d, 0x29, 0xc0, 0x79, 0x73, 0xbf, 0x9f, 0xc3, 0xf7, 0x0d, 0xc5, 0x7a, 0x5e, 0xe3, - 0xff, 0x69, 0x3f, 0xfb, 0x37, 0x00, 0x00, 0xff, 0xff, 0xf3, 0x7c, 0x9c, 0x49, 0xc1, 0x0f, 0x00, - 0x00, + // 1284 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0xdd, 0x72, 0xdb, 0xc4, + 0x17, 0x8f, 0xfc, 0xed, 0xe3, 0xd4, 0x75, 0x37, 0x6e, 0xa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0xf8, 0xfd, 0x19, + 0x6e, 0x68, 0x77, 0x26, 0x2a, 0x40, 0x2b, 0x6f, 0x7a, 0xb1, 0x3e, 0x2a, 0xa5, 0x9b, 0xf8, 0x5a, + 0x41, 0x57, 0xa7, 0x3d, 0x54, 0x60, 0x20, 0xf7, 0x1e, 0xb1, 0x3e, 0x2e, 0xa7, 0x9c, 0xb8, 0x23, + 0xd0, 0xcb, 0xb2, 0x52, 0x51, 0x1d, 0x0b, 0x18, 0xb4, 0xa8, 0x8e, 0x45, 0x64, 0x67, 0x6f, 0x20, + 0x17, 0xe0, 0x9c, 0x94, 0xd0, 0xfd, 0xc2, 0x82, 0xe8, 0x5c, 0x66, 0x0d, 0xae, 0x56, 0x4c, 0x5c, + 0xac, 0xe1, 0x66, 0xe6, 0xd6, 0x46, 0x05, 0xd0, 0xe4, 0x8f, 0x30, 0xd6, 0xa3, 0x92, 0xda, 0x99, + 0xa4, 0x24, 0xcf, 0x5d, 0x92, 0x94, 0x4e, 0xa2, 0x97, 0x24, 0x95, 0xa1, 0x4c, 0x7b, 0x03, 0x79, + 0xd0, 0x75, 0xe2, 0x40, 0xba, 0x66, 0x44, 0x83, 0x0a, 0x4e, 0x5f, 0xe4, 0x49, 0xeb, 0x41, 0x09, + 0xcd, 0xf3, 0xef, 0x7b, 0x44, 0xa0, 0xc3, 0x58, 0x46, 0x31, 0xcb, 0x02, 0x3a, 0x29, 0xa2, 0x42, + 0xc5, 0x41, 0x67, 0x18, 0xae, 0xc8, 0x6d, 0x0e, 0xeb, 0xd9, 0x1b, 0x8f, 0xe1, 0xfb, 0x96, 0x52, + 0x9c, 0x35, 0xf8, 0x5f, 0xf3, 0xcf, 0xfe, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x1c, 0x17, 0x8f, 0xe3, + 0x9e, 0x10, 0x00, 0x00, } diff --git a/pkg/proto/hapi/version/version.pb.go b/pkg/proto/hapi/version/version.pb.go index 13c8568f0..e3d8a7096 100644 --- a/pkg/proto/hapi/version/version.pb.go +++ b/pkg/proto/hapi/version/version.pb.go @@ -1,5 +1,6 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. +// Code generated by protoc-gen-go. // source: hapi/version/version.proto +// DO NOT EDIT! /* Package version is a generated protocol buffer package. diff --git a/pkg/tiller/info_service.go b/pkg/tiller/info_service.go new file mode 100644 index 000000000..0ec0e1ddb --- /dev/null +++ b/pkg/tiller/info_service.go @@ -0,0 +1,61 @@ +/* +Copyright 2017 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 tiller + +import ( + "golang.org/x/net/context" + "k8s.io/helm/pkg/proto/hapi/kube" + "k8s.io/helm/pkg/proto/hapi/services" + "k8s.io/helm/pkg/tiller/environment" + "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset" +) + +// InfoServer implements the server-side gRPC endpoint for the HAPI info service. +type InfoServer struct { + clientset internalclientset.Interface + env *environment.Environment +} + +// GetKubeInfo returns Kubernetes server information. +func (s *InfoServer) GetKubeInfo(context.Context, *services.GetKubeInfoRequest) (*services.GetKubeInfoResponse, error) { + v, err := s.clientset.Discovery().ServerVersion() + if err != nil { + return nil, err + } + i := &kube.Info{ + Version: &kube.Version{ + Major: v.Major, + Minor: v.Minor, + GitVersion: v.GitVersion, + GitCommit: v.GitCommit, + GitTreeState: v.GitTreeState, + BuildDate: v.BuildDate, + GoVersion: v.GoVersion, + Compiler: v.Compiler, + Platform: v.Platform, + }, + } + return &services.GetKubeInfoResponse{Info: i}, nil +} + +// NewInfoServer returns a new InfoServer. +func NewInfoServer(env *environment.Environment, clientset internalclientset.Interface) *InfoServer { + return &InfoServer{ + env: env, + clientset: clientset, + } +} diff --git a/pkg/tiller/release_server.go b/pkg/tiller/release_server.go index 44d5d847a..6ac67610d 100644 --- a/pkg/tiller/release_server.go +++ b/pkg/tiller/release_server.go @@ -78,7 +78,7 @@ var ListDefaultLimit int64 = 512 // prevents an empty string from matching. var ValidName = regexp.MustCompile("^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])+$") -// ReleaseServer implements the server-side gRPC endpoint for the HAPI services. +// ReleaseServer implements the server-side gRPC endpoint for the release service. type ReleaseServer struct { ReleaseModule env *environment.Environment