Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
helm3
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
helm3
Commits
52c54b09
Commit
52c54b09
authored
Mar 22, 2017
by
Maciej Kwiek
Committed by
Maciej Kwiek
May 05, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move rudder proto to different package, add release status
parent
3cba189f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
91 additions
and
60 deletions
+91
-60
Makefile
_proto/Makefile
+9
-1
rudder.proto
_proto/hapi/rudder/rudder.proto
+29
-2
rudder.go
cmd/rudder/rudder.go
+18
-12
chart.pb.go
pkg/proto/hapi/chart/chart.pb.go
+1
-1
config.pb.go
pkg/proto/hapi/chart/config.pb.go
+1
-1
template.pb.go
pkg/proto/hapi/chart/template.pb.go
+1
-1
hook.pb.go
pkg/proto/hapi/release/hook.pb.go
+0
-12
info.pb.go
pkg/proto/hapi/release/info.pb.go
+1
-1
release.pb.go
pkg/proto/hapi/release/release.pb.go
+4
-4
status.pb.go
pkg/proto/hapi/release/status.pb.go
+5
-5
test_run.pb.go
pkg/proto/hapi/release/test_run.pb.go
+5
-5
test_suite.pb.go
pkg/proto/hapi/release/test_suite.pb.go
+4
-4
rudder.pb.go
pkg/proto/hapi/rudder/rudder.pb.go
+0
-0
tiller.pb.go
pkg/proto/hapi/services/tiller.pb.go
+1
-0
version.pb.go
pkg/proto/hapi/version/version.pb.go
+1
-1
client.go
pkg/rudder/client.go
+7
-7
release_modules.go
pkg/tiller/release_modules.go
+4
-3
No files found.
_proto/Makefile
View file @
52c54b09
...
...
@@ -20,6 +20,10 @@ services_ias = $(subst $(space),$(comma),$(addsuffix =$(import_path)/$(services_
services_pbs
=
$
(
sort
$
(
wildcard hapi/services/
*
.proto
))
services_pkg
=
services
rudder_ias
=
$
(
subst
$(space)
,
$(comma)
,
$
(
addsuffix
=
$(import_path)
/
$(rudder_pkg)
,
$
(
addprefix M,
$(rudder_pbs)
)))
rudder_pbs
=
$
(
sort
$
(
wildcard hapi/rudder/
*
.proto
))
rudder_pkg
=
rudder
version_ias
=
$
(
subst
$(space)
,
$(comma)
,
$
(
addsuffix
=
$(import_path)
/
$(version_pkg)
,
$
(
addprefix M,
$(version_pbs)
)))
version_pbs
=
$
(
sort
$
(
wildcard hapi/version/
*
.proto
))
version_pkg
=
version
...
...
@@ -27,7 +31,7 @@ version_pkg = version
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 version
all
:
chart release services
rudder
version
.PHONY
:
chart
chart
:
...
...
@@ -41,6 +45,10 @@ release:
services
:
PATH
=
../bin:
$(PATH)
protoc
--
$(target)_out
=
plugins
=
$(plugins)
,
$(google_deps)
,
$(chart_ias)
,
$(version_ias)
,
$(release_ias)
:
$(dst)
$(services_pbs)
.PHONY
:
rudder
rudder
:
PATH
=
../bin:
$(PATH)
protoc
--
$(target)_out
=
plugins
=
$(plugins)
,
$(google_deps)
,
$(chart_ias)
,
$(version_ias)
,
$(release_ias)
:
$(dst)
$(rudder_pbs)
.PHONY
:
version
version
:
PATH
=
../bin:
$(PATH)
protoc
--
$(target)_out
=
plugins
=
$(plugins)
,
$(google_deps)
:
$(dst)
$(version_pbs)
...
...
_proto/hapi/r
elease/modules
.proto
→
_proto/hapi/r
udder/rudder
.proto
View file @
52c54b09
// 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
.
release
;
package
hapi
.
services.rudder
;
import
"hapi/release/info.proto"
;
import
"hapi/release/release.proto"
;
option
go_package
=
"r
elease
"
;
option
go_package
=
"r
udder
"
;
service
ReleaseModuleService
{
rpc
Version
(
VersionReleaseRequest
)
returns
(
VersionReleaseResponse
)
{
...
...
@@ -25,6 +40,10 @@ service ReleaseModuleService {
// UpgradeRelease updates release content.
rpc
UpgradeRelease
(
UpgradeReleaseRequest
)
returns
(
UpgradeReleaseResponse
)
{
}
// ReleaseStatus retrieves release status.
rpc
ReleaseStatus
(
ReleaseStatusRequest
)
returns
(
ReleaseStatusResponse
)
{
}
}
message
Result
{
...
...
@@ -89,3 +108,11 @@ message RollbackReleaseResponse{
hapi.release.Release
release
=
1
;
Result
result
=
2
;
}
message
ReleaseStatusRequest
{
hapi.release.Release
release
=
1
;
}
message
ReleaseStatusResponse
{
hapi.release.Release
release
=
1
;
hapi.release.Info
info
=
2
;
}
cmd/rudder/rudder.go
View file @
52c54b09
...
...
@@ -26,7 +26,7 @@ import (
"google.golang.org/grpc/grpclog"
"k8s.io/helm/pkg/kube"
"k8s.io/helm/pkg/proto/hapi/release
"
rudderAPI
"k8s.io/helm/pkg/proto/hapi/rudder
"
"k8s.io/helm/pkg/rudder"
"k8s.io/helm/pkg/version"
)
...
...
@@ -39,57 +39,63 @@ func main() {
grpclog
.
Fatalf
(
"failed to listen: %v"
,
err
)
}
grpcServer
:=
grpc
.
NewServer
()
r
elease
.
RegisterReleaseModuleServiceServer
(
grpcServer
,
&
ReleaseModuleServiceServer
{})
r
udderAPI
.
RegisterReleaseModuleServiceServer
(
grpcServer
,
&
ReleaseModuleServiceServer
{})
grpclog
.
Print
(
"Server starting"
)
grpcServer
.
Serve
(
lis
)
grpclog
.
Print
(
"Server started"
)
}
// ReleaseModuleServiceServer provides implementation for r
elease
.ReleaseModuleServiceServer
// ReleaseModuleServiceServer provides implementation for r
udderAPI
.ReleaseModuleServiceServer
type
ReleaseModuleServiceServer
struct
{}
// Version is not yet implemented
func
(
r
*
ReleaseModuleServiceServer
)
Version
(
ctx
context
.
Context
,
in
*
r
elease
.
VersionReleaseRequest
)
(
*
release
.
VersionReleaseResponse
,
error
)
{
func
(
r
*
ReleaseModuleServiceServer
)
Version
(
ctx
context
.
Context
,
in
*
r
udderAPI
.
VersionReleaseRequest
)
(
*
rudderAPI
.
VersionReleaseResponse
,
error
)
{
grpclog
.
Print
(
"version"
)
return
&
r
elease
.
VersionReleaseResponse
{
return
&
r
udderAPI
.
VersionReleaseResponse
{
Name
:
"helm-rudder-native"
,
Version
:
version
.
Version
,
},
nil
}
// InstallRelease creates a release using kubeClient.Create
func
(
r
*
ReleaseModuleServiceServer
)
InstallRelease
(
ctx
context
.
Context
,
in
*
r
elease
.
InstallReleaseRequest
)
(
*
release
.
InstallReleaseResponse
,
error
)
{
func
(
r
*
ReleaseModuleServiceServer
)
InstallRelease
(
ctx
context
.
Context
,
in
*
r
udderAPI
.
InstallReleaseRequest
)
(
*
rudderAPI
.
InstallReleaseResponse
,
error
)
{
grpclog
.
Print
(
"install"
)
b
:=
bytes
.
NewBufferString
(
in
.
Release
.
Manifest
)
err
:=
kubeClient
.
Create
(
in
.
Release
.
Namespace
,
b
,
500
,
false
)
if
err
!=
nil
{
grpclog
.
Printf
(
"error when creating release: %s"
,
err
)
}
return
&
r
elease
.
InstallReleaseResponse
{},
err
return
&
r
udderAPI
.
InstallReleaseResponse
{},
err
}
// DeleteRelease is not implemented
func
(
r
*
ReleaseModuleServiceServer
)
DeleteRelease
(
ctx
context
.
Context
,
in
*
r
elease
.
DeleteReleaseRequest
)
(
*
release
.
DeleteReleaseResponse
,
error
)
{
func
(
r
*
ReleaseModuleServiceServer
)
DeleteRelease
(
ctx
context
.
Context
,
in
*
r
udderAPI
.
DeleteReleaseRequest
)
(
*
rudderAPI
.
DeleteReleaseResponse
,
error
)
{
grpclog
.
Print
(
"delete"
)
return
nil
,
nil
}
// RollbackRelease is not implemented
func
(
r
*
ReleaseModuleServiceServer
)
RollbackRelease
(
ctx
context
.
Context
,
in
*
r
elease
.
RollbackReleaseRequest
)
(
*
release
.
RollbackReleaseResponse
,
error
)
{
func
(
r
*
ReleaseModuleServiceServer
)
RollbackRelease
(
ctx
context
.
Context
,
in
*
r
udderAPI
.
RollbackReleaseRequest
)
(
*
rudderAPI
.
RollbackReleaseResponse
,
error
)
{
grpclog
.
Print
(
"rollback"
)
c
:=
bytes
.
NewBufferString
(
in
.
Current
.
Manifest
)
t
:=
bytes
.
NewBufferString
(
in
.
Target
.
Manifest
)
err
:=
kubeClient
.
Update
(
in
.
Target
.
Namespace
,
c
,
t
,
in
.
Recreate
,
in
.
Timeout
,
in
.
Wait
)
return
&
r
elease
.
RollbackReleaseResponse
{},
err
return
&
r
udderAPI
.
RollbackReleaseResponse
{},
err
}
// UpgradeRelease upgrades manifests using kubernetes client
func
(
r
*
ReleaseModuleServiceServer
)
UpgradeRelease
(
ctx
context
.
Context
,
in
*
r
elease
.
UpgradeReleaseRequest
)
(
*
release
.
UpgradeReleaseResponse
,
error
)
{
func
(
r
*
ReleaseModuleServiceServer
)
UpgradeRelease
(
ctx
context
.
Context
,
in
*
r
udderAPI
.
UpgradeReleaseRequest
)
(
*
rudderAPI
.
UpgradeReleaseResponse
,
error
)
{
grpclog
.
Print
(
"upgrade"
)
c
:=
bytes
.
NewBufferString
(
in
.
Current
.
Manifest
)
t
:=
bytes
.
NewBufferString
(
in
.
Target
.
Manifest
)
err
:=
kubeClient
.
Update
(
in
.
Target
.
Namespace
,
c
,
t
,
in
.
Recreate
,
in
.
Timeout
,
in
.
Wait
)
// upgrade response object should be changed to include status
return
&
release
.
UpgradeReleaseResponse
{},
err
return
&
rudderAPI
.
UpgradeReleaseResponse
{},
err
}
func
(
r
*
ReleaseModuleServiceServer
)
ReleaseStatus
(
context
.
Context
,
*
rudderAPI
.
ReleaseStatusRequest
)
(
*
rudderAPI
.
ReleaseStatusResponse
,
error
)
{
grpclog
.
Print
(
"status"
)
return
&
rudderAPI
.
ReleaseStatusResponse
{},
nil
}
pkg/proto/hapi/chart/chart.pb.go
View file @
52c54b09
...
...
@@ -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
,
0x0
9
,
0x6e
,
0x88
,
0x02
,
0xff
,
0x6c
,
0x90
,
0xb1
,
0x4e
,
0xc3
,
0x30
,
0x1f
,
0x8b
,
0x08
,
0x00
,
0x00
,
0x0
0
,
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
,
...
...
pkg/proto/hapi/chart/config.pb.go
View file @
52c54b09
...
...
@@ -64,7 +64,7 @@ func init() { proto.RegisterFile("hapi/chart/config.proto", fileDescriptor1) }
var
fileDescriptor1
=
[]
byte
{
// 182 bytes of a gzipped FileDescriptorProto
0x1f
,
0x8b
,
0x08
,
0x00
,
0x00
,
0x0
9
,
0x6e
,
0x88
,
0x02
,
0xff
,
0xe2
,
0x12
,
0xcf
,
0x48
,
0x2c
,
0xc8
,
0x1f
,
0x8b
,
0x08
,
0x00
,
0x00
,
0x0
0
,
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
,
...
...
pkg/proto/hapi/chart/template.pb.go
View file @
52c54b09
...
...
@@ -51,7 +51,7 @@ func init() { proto.RegisterFile("hapi/chart/template.proto", fileDescriptor3) }
var
fileDescriptor3
=
[]
byte
{
// 107 bytes of a gzipped FileDescriptorProto
0x1f
,
0x8b
,
0x08
,
0x00
,
0x00
,
0x0
9
,
0x6e
,
0x88
,
0x02
,
0xff
,
0xe2
,
0x92
,
0xcc
,
0x48
,
0x2c
,
0xc8
,
0x1f
,
0x8b
,
0x08
,
0x00
,
0x00
,
0x0
0
,
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
,
...
...
pkg/proto/hapi/release/hook.pb.go
View file @
52c54b09
...
...
@@ -8,7 +8,6 @@ Package release is a generated protocol buffer package.
It is generated from these files:
hapi/release/hook.proto
hapi/release/info.proto
hapi/release/modules.proto
hapi/release/release.proto
hapi/release/status.proto
hapi/release/test_run.proto
...
...
@@ -17,17 +16,6 @@ It is generated from these files:
It has these top-level messages:
Hook
Info
Result
VersionReleaseRequest
VersionReleaseResponse
InstallReleaseRequest
InstallReleaseResponse
DeleteReleaseRequest
DeleteReleaseResponse
UpgradeReleaseRequest
UpgradeReleaseResponse
RollbackReleaseRequest
RollbackReleaseResponse
Release
Status
TestRun
...
...
pkg/proto/hapi/release/info.pb.go
View file @
52c54b09
...
...
@@ -73,7 +73,7 @@ func init() { proto.RegisterFile("hapi/release/info.proto", fileDescriptor1) }
var
fileDescriptor1
=
[]
byte
{
// 235 bytes of a gzipped FileDescriptorProto
0x1f
,
0x8b
,
0x08
,
0x00
,
0x00
,
0x0
9
,
0x6e
,
0x88
,
0x02
,
0xff
,
0x84
,
0x8f
,
0x31
,
0x4f
,
0xc3
,
0x30
,
0x1f
,
0x8b
,
0x08
,
0x00
,
0x00
,
0x0
0
,
0x00
,
0x00
,
0x02
,
0xff
,
0x84
,
0x8f
,
0x31
,
0x4f
,
0xc3
,
0x30
,
0x10
,
0x85
,
0x95
,
0x52
,
0x5a
,
0xd5
,
0x6d
,
0x19
,
0x2c
,
0x24
,
0x42
,
0x16
,
0x22
,
0xa6
,
0x0e
,
0xc8
,
0x91
,
0x80
,
0x1d
,
0x81
,
0xba
,
0xb0
,
0x06
,
0x26
,
0x16
,
0xe4
,
0xe2
,
0x73
,
0xb1
,
0xe4
,
0xe6
,
0x2c
,
0xfb
,
0x3a
,
0xf0
,
0x2f
,
0xf8
,
0xc9
,
0xa8
,
0xb6
,
0x83
,
0xd2
,
0xa9
,
0xab
,
0xbf
,
0xf7
,
0x3e
,
0xbf
,
...
...
pkg/proto/hapi/release/release.pb.go
View file @
52c54b09
...
...
@@ -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
fileDescriptor
3
,
[]
int
{
0
}
}
func
(
*
Release
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor
2
,
[]
int
{
0
}
}
func
(
m
*
Release
)
GetName
()
string
{
if
m
!=
nil
{
...
...
@@ -102,11 +102,11 @@ func init() {
proto
.
RegisterType
((
*
Release
)(
nil
),
"hapi.release.Release"
)
}
func
init
()
{
proto
.
RegisterFile
(
"hapi/release/release.proto"
,
fileDescriptor
3
)
}
func
init
()
{
proto
.
RegisterFile
(
"hapi/release/release.proto"
,
fileDescriptor
2
)
}
var
fileDescriptor
3
=
[]
byte
{
var
fileDescriptor
2
=
[]
byte
{
// 256 bytes of a gzipped FileDescriptorProto
0x1f
,
0x8b
,
0x08
,
0x00
,
0x00
,
0x0
9
,
0x6e
,
0x88
,
0x02
,
0xff
,
0x64
,
0x90
,
0xbf
,
0x4e
,
0xc3
,
0x40
,
0x1f
,
0x8b
,
0x08
,
0x00
,
0x00
,
0x0
0
,
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
,
...
...
pkg/proto/hapi/release/status.pb.go
View file @
52c54b09
...
...
@@ -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
fileDescriptor
4
,
[]
int
{
0
,
0
}
}
func
(
Status_Code
)
EnumDescriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor
3
,
[]
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
fileDescriptor
4
,
[]
int
{
0
}
}
func
(
*
Status
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor
3
,
[]
int
{
0
}
}
func
(
m
*
Status
)
GetCode
()
Status_Code
{
if
m
!=
nil
{
...
...
@@ -102,11 +102,11 @@ func init() {
proto
.
RegisterEnum
(
"hapi.release.Status_Code"
,
Status_Code_name
,
Status_Code_value
)
}
func
init
()
{
proto
.
RegisterFile
(
"hapi/release/status.proto"
,
fileDescriptor
4
)
}
func
init
()
{
proto
.
RegisterFile
(
"hapi/release/status.proto"
,
fileDescriptor
3
)
}
var
fileDescriptor
4
=
[]
byte
{
var
fileDescriptor
3
=
[]
byte
{
// 291 bytes of a gzipped FileDescriptorProto
0x1f
,
0x8b
,
0x08
,
0x00
,
0x00
,
0x0
9
,
0x6e
,
0x88
,
0x02
,
0xff
,
0x54
,
0x90
,
0xdf
,
0x6a
,
0xc2
,
0x30
,
0x1f
,
0x8b
,
0x08
,
0x00
,
0x00
,
0x0
0
,
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
,
...
...
pkg/proto/hapi/release/test_run.pb.go
View file @
52c54b09
...
...
@@ -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
fileDescriptor
5
,
[]
int
{
0
,
0
}
}
func
(
TestRun_Status
)
EnumDescriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor
4
,
[]
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
fileDescriptor
5
,
[]
int
{
0
}
}
func
(
*
TestRun
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor
4
,
[]
int
{
0
}
}
func
(
m
*
TestRun
)
GetName
()
string
{
if
m
!=
nil
{
...
...
@@ -91,11 +91,11 @@ func init() {
proto
.
RegisterEnum
(
"hapi.release.TestRun_Status"
,
TestRun_Status_name
,
TestRun_Status_value
)
}
func
init
()
{
proto
.
RegisterFile
(
"hapi/release/test_run.proto"
,
fileDescriptor
5
)
}
func
init
()
{
proto
.
RegisterFile
(
"hapi/release/test_run.proto"
,
fileDescriptor
4
)
}
var
fileDescriptor
5
=
[]
byte
{
var
fileDescriptor
4
=
[]
byte
{
// 265 bytes of a gzipped FileDescriptorProto
0x1f
,
0x8b
,
0x08
,
0x00
,
0x00
,
0x0
9
,
0x6e
,
0x88
,
0x02
,
0xff
,
0x84
,
0x8f
,
0x41
,
0x4b
,
0xfb
,
0x40
,
0x1f
,
0x8b
,
0x08
,
0x00
,
0x00
,
0x0
0
,
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
,
...
...
pkg/proto/hapi/release/test_suite.pb.go
View file @
52c54b09
...
...
@@ -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
fileDescriptor
6
,
[]
int
{
0
}
}
func
(
*
TestSuite
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor
5
,
[]
int
{
0
}
}
func
(
m
*
TestSuite
)
GetStartedAt
()
*
google_protobuf
.
Timestamp
{
if
m
!=
nil
{
...
...
@@ -54,11 +54,11 @@ func init() {
proto
.
RegisterType
((
*
TestSuite
)(
nil
),
"hapi.release.TestSuite"
)
}
func
init
()
{
proto
.
RegisterFile
(
"hapi/release/test_suite.proto"
,
fileDescriptor
6
)
}
func
init
()
{
proto
.
RegisterFile
(
"hapi/release/test_suite.proto"
,
fileDescriptor
5
)
}
var
fileDescriptor
6
=
[]
byte
{
var
fileDescriptor
5
=
[]
byte
{
// 207 bytes of a gzipped FileDescriptorProto
0x1f
,
0x8b
,
0x08
,
0x00
,
0x00
,
0x0
9
,
0x6e
,
0x88
,
0x02
,
0xff
,
0x84
,
0x8f
,
0xc1
,
0x4a
,
0x86
,
0x40
,
0x1f
,
0x8b
,
0x08
,
0x00
,
0x00
,
0x0
0
,
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
,
...
...
pkg/proto/hapi/r
elease/modules
.pb.go
→
pkg/proto/hapi/r
udder/rudder
.pb.go
View file @
52c54b09
This diff is collapsed.
Click to expand it.
pkg/proto/hapi/services/tiller.pb.go
View file @
52c54b09
...
...
@@ -1342,6 +1342,7 @@ var _ReleaseService_serviceDesc = grpc.ServiceDesc{
func
init
()
{
proto
.
RegisterFile
(
"hapi/services/tiller.proto"
,
fileDescriptor0
)
}
var
fileDescriptor0
=
[]
byte
{
<<<<<<<
b2afe5ec3cb08ec6ff5ca4200bd954d33154c948
// 1170 bytes of a gzipped FileDescriptorProto
0x1f
,
0x8b
,
0x08
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x02
,
0xff
,
0x9c
,
0x57
,
0xdb
,
0x6e
,
0xe3
,
0x44
,
0x18
,
0xae
,
0xe3
,
0x1c
,
0xff
,
0x1e
,
0x48
,
0xa7
,
0x27
,
0xd7
,
0x02
,
0x54
,
0x8c
,
0xa0
,
0xd9
,
0x85
,
...
...
pkg/proto/hapi/version/version.pb.go
View file @
52c54b09
...
...
@@ -69,7 +69,7 @@ func init() { proto.RegisterFile("hapi/version/version.proto", fileDescriptor0)
var
fileDescriptor0
=
[]
byte
{
// 151 bytes of a gzipped FileDescriptorProto
0x1f
,
0x8b
,
0x08
,
0x00
,
0x00
,
0x0
9
,
0x6e
,
0x88
,
0x02
,
0xff
,
0xe2
,
0x92
,
0xca
,
0x48
,
0x2c
,
0xc8
,
0x1f
,
0x8b
,
0x08
,
0x00
,
0x00
,
0x0
0
,
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
,
...
...
pkg/rudder/client.go
View file @
52c54b09
...
...
@@ -22,7 +22,7 @@ import (
"golang.org/x/net/context"
"google.golang.org/grpc"
"k8s.io/helm/pkg/proto/hapi/release
"
rudderAPI
"k8s.io/helm/pkg/proto/hapi/rudder
"
)
// GrpcPort specifies port on which rudder will spawn a server
...
...
@@ -33,7 +33,7 @@ const (
var
grpcAddr
=
fmt
.
Sprintf
(
"127.0.0.1:%d"
,
GrpcPort
)
// InstallRelease calls Rudder InstallRelease method which should create provided release
func
InstallRelease
(
rel
*
r
elease
.
InstallReleaseRequest
)
(
*
release
.
InstallReleaseResponse
,
error
)
{
func
InstallRelease
(
rel
*
r
udderAPI
.
InstallReleaseRequest
)
(
*
rudderAPI
.
InstallReleaseResponse
,
error
)
{
//TODO(mkwiek): parametrize this
conn
,
err
:=
grpc
.
Dial
(
grpcAddr
,
grpc
.
WithInsecure
())
if
err
!=
nil
{
...
...
@@ -41,28 +41,28 @@ func InstallRelease(rel *release.InstallReleaseRequest) (*release.InstallRelease
}
defer
conn
.
Close
()
client
:=
r
elease
.
NewReleaseModuleServiceClient
(
conn
)
client
:=
r
udderAPI
.
NewReleaseModuleServiceClient
(
conn
)
return
client
.
InstallRelease
(
context
.
Background
(),
rel
)
}
// UpgradeRelease calls Rudder UpgradeRelease method which should perform update
func
UpgradeRelease
(
req
*
r
elease
.
UpgradeReleaseRequest
)
(
*
release
.
UpgradeReleaseResponse
,
error
)
{
func
UpgradeRelease
(
req
*
r
udderAPI
.
UpgradeReleaseRequest
)
(
*
rudderAPI
.
UpgradeReleaseResponse
,
error
)
{
conn
,
err
:=
grpc
.
Dial
(
grpcAddr
,
grpc
.
WithInsecure
())
if
err
!=
nil
{
return
nil
,
err
}
defer
conn
.
Close
()
client
:=
r
elease
.
NewReleaseModuleServiceClient
(
conn
)
client
:=
r
udderAPI
.
NewReleaseModuleServiceClient
(
conn
)
return
client
.
UpgradeRelease
(
context
.
Background
(),
req
)
}
// RollbackRelease calls Rudder RollbackRelease method which should perform update
func
RollbackRelease
(
req
*
r
elease
.
RollbackReleaseRequest
)
(
*
release
.
RollbackReleaseResponse
,
error
)
{
func
RollbackRelease
(
req
*
r
udderAPI
.
RollbackReleaseRequest
)
(
*
rudderAPI
.
RollbackReleaseResponse
,
error
)
{
conn
,
err
:=
grpc
.
Dial
(
grpcAddr
,
grpc
.
WithInsecure
())
if
err
!=
nil
{
return
nil
,
err
}
defer
conn
.
Close
()
client
:=
r
elease
.
NewReleaseModuleServiceClient
(
conn
)
client
:=
r
udderAPI
.
NewReleaseModuleServiceClient
(
conn
)
return
client
.
RollbackRelease
(
context
.
Background
(),
req
)
}
pkg/tiller/release_modules.go
View file @
52c54b09
...
...
@@ -20,6 +20,7 @@ import (
"bytes"
"k8s.io/helm/pkg/proto/hapi/release"
rudderAPI
"k8s.io/helm/pkg/proto/hapi/rudder"
"k8s.io/helm/pkg/proto/hapi/services"
"k8s.io/helm/pkg/rudder"
"k8s.io/helm/pkg/tiller/environment"
...
...
@@ -58,14 +59,14 @@ type RemoteReleaseModule struct{}
// Create calls rudder.InstallRelease
func
(
m
*
RemoteReleaseModule
)
Create
(
r
*
release
.
Release
,
req
*
services
.
InstallReleaseRequest
,
env
*
environment
.
Environment
)
error
{
request
:=
&
r
elease
.
InstallReleaseRequest
{
Release
:
r
}
request
:=
&
r
udderAPI
.
InstallReleaseRequest
{
Release
:
r
}
_
,
err
:=
rudder
.
InstallRelease
(
request
)
return
err
}
// Update calls rudder.UpgradeRelease
func
(
m
*
RemoteReleaseModule
)
Update
(
current
,
target
*
release
.
Release
,
req
*
services
.
UpdateReleaseRequest
,
env
*
environment
.
Environment
)
error
{
upgrade
:=
&
r
elease
.
UpgradeReleaseRequest
{
upgrade
:=
&
r
udderAPI
.
UpgradeReleaseRequest
{
Current
:
current
,
Target
:
target
,
Recreate
:
req
.
Recreate
,
...
...
@@ -78,7 +79,7 @@ func (m *RemoteReleaseModule) Update(current, target *release.Release, req *serv
// Rollback calls rudder.Rollback
func
(
m
*
RemoteReleaseModule
)
Rollback
(
current
,
target
*
release
.
Release
,
req
*
services
.
RollbackReleaseRequest
,
env
*
environment
.
Environment
)
error
{
rollback
:=
&
r
elease
.
RollbackReleaseRequest
{
rollback
:=
&
r
udderAPI
.
RollbackReleaseRequest
{
Current
:
current
,
Target
:
target
,
Recreate
:
req
.
Recreate
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment