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
d9f72deb
Commit
d9f72deb
authored
Apr 24, 2017
by
Maciej Kwiek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add comments to exported Rudder methods
Added make target Lowered docker image sizes Updated ruder.pb.go
parent
1c9ae557
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
87 additions
and
10 deletions
+87
-10
Makefile
Makefile
+7
-2
rudder.go
cmd/rudder/rudder.go
+1
-3
rudder.pb.go
pkg/proto/hapi/rudder/rudder.pb.go
+73
-3
release_modules.go
pkg/tiller/release_modules.go
+4
-0
Dockerfile.experimental
rootfs/Dockerfile.experimental
+1
-1
Dockerfile.rudder
rootfs/Dockerfile.rudder
+1
-1
No files found.
Makefile
View file @
d9f72deb
...
...
@@ -61,15 +61,20 @@ docker-binary: BINDIR = ./rootfs
docker-binary
:
GOFLAGS += -a -installsuffix cgo
docker-binary
:
GOOS
=
linux
GOARCH
=
amd64
CGO_ENABLED
=
0
$(GO)
build
-o
$(BINDIR)
/tiller
$(GOFLAGS)
-tags
'
$(TAGS)
'
-ldflags
'
$(LDFLAGS)
'
k8s.io/helm/cmd/tiller
GOOS
=
linux
GOARCH
=
amd64
CGO_ENABLED
=
0
$(GO)
build
-o
$(BINDIR)
/rudder
$(GOFLAGS)
-tags
'
$(TAGS)
'
-ldflags
'
$(LDFLAGS)
'
k8s.io/helm/cmd/rudder
.PHONY
:
docker-build
docker-build
:
check-docker docker-binary
docker build
--rm
-t
${
IMAGE
}
rootfs
docker tag
${
IMAGE
}
${
MUTABLE_IMAGE
}
.PHONY
:
docker-binary-rudder
docker-binary-rudder
:
BINDIR = ./rootfs
docker-binary-rudder
:
GOFLAGS += -a -installsuffix cgo
docker-binary-rudder
:
GOOS
=
linux
GOARCH
=
amd64
CGO_ENABLED
=
0
$(GO)
build
-o
$(BINDIR)
/rudder
$(GOFLAGS)
-tags
'
$(TAGS)
'
-ldflags
'
$(LDFLAGS)
'
k8s.io/helm/cmd/rudder
.PHONY
:
docker-build-experimental
docker-build-experimental
:
check-docker docker-binary
docker-build-experimental
:
check-docker docker-binary
docker-binary-rudder
docker build
--rm
-t
${
IMAGE
}
rootfs
-f
rootfs/Dockerfile.experimental
docker tag
${
IMAGE
}
${
MUTABLE_IMAGE
}
docker build
--rm
-t
${
IMAGE_RUDDER
}
rootfs
-f
rootfs/Dockerfile.rudder
...
...
cmd/rudder/rudder.go
View file @
d9f72deb
...
...
@@ -59,7 +59,7 @@ func main() {
// ReleaseModuleServiceServer provides implementation for rudderAPI.ReleaseModuleServiceServer
type
ReleaseModuleServiceServer
struct
{}
// Version
is not yet implemented
// Version
returns Rudder version based on helm version
func
(
r
*
ReleaseModuleServiceServer
)
Version
(
ctx
context
.
Context
,
in
*
rudderAPI
.
VersionReleaseRequest
)
(
*
rudderAPI
.
VersionReleaseResponse
,
error
)
{
grpclog
.
Print
(
"version"
)
return
&
rudderAPI
.
VersionReleaseResponse
{
...
...
@@ -100,8 +100,6 @@ func (r *ReleaseModuleServiceServer) DeleteRelease(ctx context.Context, in *rudd
if
len
(
allErrors
)
>
0
{
err
=
fmt
.
Errorf
(
allErrors
)
}
else
{
err
=
nil
}
return
&
rudderAPI
.
DeleteReleaseResponse
{
...
...
pkg/proto/hapi/rudder/rudder.pb.go
View file @
d9f72deb
...
...
@@ -88,6 +88,20 @@ func (m *Result) String() string { return proto.CompactTextString(m)
func
(
*
Result
)
ProtoMessage
()
{}
func
(
*
Result
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor0
,
[]
int
{
0
}
}
func
(
m
*
Result
)
GetInfo
()
string
{
if
m
!=
nil
{
return
m
.
Info
}
return
""
}
func
(
m
*
Result
)
GetLog
()
[]
string
{
if
m
!=
nil
{
return
m
.
Log
}
return
nil
}
type
VersionReleaseRequest
struct
{
}
...
...
@@ -106,6 +120,20 @@ func (m *VersionReleaseResponse) String() string { return proto.Compa
func
(
*
VersionReleaseResponse
)
ProtoMessage
()
{}
func
(
*
VersionReleaseResponse
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor0
,
[]
int
{
2
}
}
func
(
m
*
VersionReleaseResponse
)
GetName
()
string
{
if
m
!=
nil
{
return
m
.
Name
}
return
""
}
func
(
m
*
VersionReleaseResponse
)
GetVersion
()
string
{
if
m
!=
nil
{
return
m
.
Version
}
return
""
}
type
InstallReleaseRequest
struct
{
Release
*
hapi_release5
.
Release
`protobuf:"bytes,1,opt,name=release" json:"release,omitempty"`
}
...
...
@@ -213,6 +241,27 @@ func (m *UpgradeReleaseRequest) GetTarget() *hapi_release5.Release {
return
nil
}
func
(
m
*
UpgradeReleaseRequest
)
GetTimeout
()
int64
{
if
m
!=
nil
{
return
m
.
Timeout
}
return
0
}
func
(
m
*
UpgradeReleaseRequest
)
GetWait
()
bool
{
if
m
!=
nil
{
return
m
.
Wait
}
return
false
}
func
(
m
*
UpgradeReleaseRequest
)
GetRecreate
()
bool
{
if
m
!=
nil
{
return
m
.
Recreate
}
return
false
}
type
UpgradeReleaseResponse
struct
{
Release
*
hapi_release5
.
Release
`protobuf:"bytes,1,opt,name=release" json:"release,omitempty"`
Result
*
Result
`protobuf:"bytes,2,opt,name=result" json:"result,omitempty"`
...
...
@@ -264,6 +313,27 @@ func (m *RollbackReleaseRequest) GetTarget() *hapi_release5.Release {
return
nil
}
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
}
func
(
m
*
RollbackReleaseRequest
)
GetRecreate
()
bool
{
if
m
!=
nil
{
return
m
.
Recreate
}
return
false
}
type
RollbackReleaseResponse
struct
{
Release
*
hapi_release5
.
Release
`protobuf:"bytes,1,opt,name=release" json:"release,omitempty"`
Result
*
Result
`protobuf:"bytes,2,opt,name=result" json:"result,omitempty"`
...
...
@@ -351,7 +421,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
.
SupportPackageIsVersion
3
const
_
=
grpc
.
SupportPackageIsVersion
4
// Client API for ReleaseModuleService service
...
...
@@ -589,14 +659,14 @@ var _ReleaseModuleService_serviceDesc = grpc.ServiceDesc{
},
},
Streams
:
[]
grpc
.
StreamDesc
{},
Metadata
:
fileDescriptor0
,
Metadata
:
"hapi/rudder/rudder.proto"
,
}
func
init
()
{
proto
.
RegisterFile
(
"hapi/rudder/rudder.proto"
,
fileDescriptor0
)
}
var
fileDescriptor0
=
[]
byte
{
// 584 bytes of a gzipped FileDescriptorProto
0x1f
,
0x8b
,
0x08
,
0x00
,
0x00
,
0x0
0
,
0x00
,
0x00
,
0x02
,
0xff
,
0xd4
,
0x56
,
0xd1
,
0x8e
,
0xd2
,
0x40
,
0x1f
,
0x8b
,
0x08
,
0x00
,
0x00
,
0x0
9
,
0x6e
,
0x88
,
0x02
,
0xff
,
0xd4
,
0x56
,
0xd1
,
0x8e
,
0xd2
,
0x40
,
0x14
,
0xa5
,
0xcb
,
0x52
,
0xe0
,
0x92
,
0x55
,
0x32
,
0xd9
,
0x42
,
0xd3
,
0xf8
,
0x40
,
0xfa
,
0x60
,
0x88
,
0xeb
,
0x96
,
0x04
,
0x7d
,
0xf4
,
0x45
,
0x59
,
0xdc
,
0xdd
,
0x18
,
0xd9
,
0x64
,
0x2a
,
0x6e
,
0xe2
,
0x5b
,
0x17
,
0x2e
,
0x58
,
0x2d
,
0x6d
,
0x9d
,
0x4e
,
0xf7
,
0x51
,
0xfd
,
0x1a
,
0xff
,
0x43
,
0xbf
,
0xcc
,
0xb4
,
...
...
pkg/tiller/release_modules.go
View file @
d9f72deb
...
...
@@ -55,18 +55,21 @@ func (m *LocalReleaseModule) Create(r *release.Release, req *services.InstallRel
return
env
.
KubeClient
.
Create
(
r
.
Namespace
,
b
,
req
.
Timeout
,
req
.
Wait
)
}
// Update performs an update from current to target release
func
(
m
*
LocalReleaseModule
)
Update
(
current
,
target
*
release
.
Release
,
req
*
services
.
UpdateReleaseRequest
,
env
*
environment
.
Environment
)
error
{
c
:=
bytes
.
NewBufferString
(
current
.
Manifest
)
t
:=
bytes
.
NewBufferString
(
target
.
Manifest
)
return
env
.
KubeClient
.
Update
(
target
.
Namespace
,
c
,
t
,
req
.
Recreate
,
req
.
Timeout
,
req
.
Wait
)
}
// Rollback performs a rollback from current to target release
func
(
m
*
LocalReleaseModule
)
Rollback
(
current
,
target
*
release
.
Release
,
req
*
services
.
RollbackReleaseRequest
,
env
*
environment
.
Environment
)
error
{
c
:=
bytes
.
NewBufferString
(
current
.
Manifest
)
t
:=
bytes
.
NewBufferString
(
target
.
Manifest
)
return
env
.
KubeClient
.
Update
(
target
.
Namespace
,
c
,
t
,
req
.
Recreate
,
req
.
Timeout
,
req
.
Wait
)
}
// Status returns kubectl-like formatted status of release objects
func
(
m
*
LocalReleaseModule
)
Status
(
r
*
release
.
Release
,
req
*
services
.
GetReleaseStatusRequest
,
env
*
environment
.
Environment
)
(
string
,
error
)
{
return
env
.
KubeClient
.
Get
(
r
.
Namespace
,
bytes
.
NewBufferString
(
r
.
Manifest
))
}
...
...
@@ -116,6 +119,7 @@ func (m *RemoteReleaseModule) Rollback(current, target *release.Release, req *se
return
err
}
// Status returns status retrieved from rudder.ReleaseStatus
func
(
m
*
RemoteReleaseModule
)
Status
(
r
*
release
.
Release
,
req
*
services
.
GetReleaseStatusRequest
,
env
*
environment
.
Environment
)
(
string
,
error
)
{
statusRequest
:=
&
rudderAPI
.
ReleaseStatusRequest
{
Release
:
r
}
resp
,
err
:=
rudder
.
ReleaseStatus
(
statusRequest
)
...
...
rootfs/Dockerfile.experimental
View file @
d9f72deb
...
...
@@ -16,7 +16,7 @@ FROM alpine:3.3
ENV HOME /tmp
COPY
. /
COPY
tiller /tiller
EXPOSE 44134
...
...
rootfs/Dockerfile.rudder
View file @
d9f72deb
...
...
@@ -16,7 +16,7 @@ FROM alpine:3.3
ENV HOME /tmp
COPY
. /
COPY
rudder /rudder
EXPOSE 10001
...
...
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