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
9546b27d
Commit
9546b27d
authored
May 10, 2016
by
Matt Butcher
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #677 from technosophos/fix/style-pkg
fix(*): correct numerous golint errors
parents
68653814
75a1aa64
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
3 deletions
+24
-3
environment.go
cmd/tiller/environment/environment.go
+4
-0
values.go
pkg/chart/values.go
+1
-0
convert.go
pkg/helm/convert.go
+4
-0
error.go
pkg/helm/error.go
+9
-3
traverse.go
pkg/helm/traverse.go
+5
-0
chartfile.go
pkg/lint/chartfile.go
+1
-0
No files found.
cmd/tiller/environment/environment.go
View file @
9546b27d
...
@@ -150,6 +150,10 @@ func (p *PrintingKubeClient) Create(ns string, r io.Reader) error {
...
@@ -150,6 +150,10 @@ func (p *PrintingKubeClient) Create(ns string, r io.Reader) error {
_
,
err
:=
io
.
Copy
(
p
.
Out
,
r
)
_
,
err
:=
io
.
Copy
(
p
.
Out
,
r
)
return
err
return
err
}
}
// Delete implements KubeClient delete.
//
// It only prints out the content to be deleted.
func
(
p
*
PrintingKubeClient
)
Delete
(
ns
string
,
r
io
.
Reader
)
error
{
func
(
p
*
PrintingKubeClient
)
Delete
(
ns
string
,
r
io
.
Reader
)
error
{
_
,
err
:=
io
.
Copy
(
p
.
Out
,
r
)
_
,
err
:=
io
.
Copy
(
p
.
Out
,
r
)
return
err
return
err
...
...
pkg/chart/values.go
View file @
9546b27d
...
@@ -41,6 +41,7 @@ func (v Values) Table(name string) (Values, error) {
...
@@ -41,6 +41,7 @@ func (v Values) Table(name string) (Values, error) {
return
table
,
err
return
table
,
err
}
}
// Encode writes serialized Values information to the given io.Writer.
func
(
v
Values
)
Encode
(
w
io
.
Writer
)
error
{
func
(
v
Values
)
Encode
(
w
io
.
Writer
)
error
{
return
toml
.
NewEncoder
(
w
)
.
Encode
(
v
)
return
toml
.
NewEncoder
(
w
)
.
Encode
(
v
)
}
}
...
...
pkg/helm/convert.go
View file @
9546b27d
...
@@ -7,6 +7,7 @@ import (
...
@@ -7,6 +7,7 @@ import (
chartpbs
"github.com/kubernetes/helm/pkg/proto/hapi/chart"
chartpbs
"github.com/kubernetes/helm/pkg/proto/hapi/chart"
)
)
// ChartToProto converts a chart to its Protobuf struct representation.
func
ChartToProto
(
ch
*
chartutil
.
Chart
)
(
chpb
*
chartpbs
.
Chart
,
err
error
)
{
func
ChartToProto
(
ch
*
chartutil
.
Chart
)
(
chpb
*
chartpbs
.
Chart
,
err
error
)
{
chpb
=
new
(
chartpbs
.
Chart
)
chpb
=
new
(
chartpbs
.
Chart
)
...
@@ -42,6 +43,7 @@ func ChartToProto(ch *chartutil.Chart) (chpb *chartpbs.Chart, err error) {
...
@@ -42,6 +43,7 @@ func ChartToProto(ch *chartutil.Chart) (chpb *chartpbs.Chart, err error) {
return
return
}
}
// MetadataToProto converts Chart.yaml data into protocol buffere Metadata.
func
MetadataToProto
(
ch
*
chartutil
.
Chart
)
(
*
chartpbs
.
Metadata
,
error
)
{
func
MetadataToProto
(
ch
*
chartutil
.
Chart
)
(
*
chartpbs
.
Metadata
,
error
)
{
if
ch
==
nil
{
if
ch
==
nil
{
return
nil
,
ErrMissingChart
return
nil
,
ErrMissingChart
...
@@ -72,6 +74,7 @@ func MetadataToProto(ch *chartutil.Chart) (*chartpbs.Metadata, error) {
...
@@ -72,6 +74,7 @@ func MetadataToProto(ch *chartutil.Chart) (*chartpbs.Metadata, error) {
return
md
,
nil
return
md
,
nil
}
}
// TemplatesToProto converts chart templates to their protobuf representation.
func
TemplatesToProto
(
ch
*
chartutil
.
Chart
)
(
tpls
[]
*
chartpbs
.
Template
,
err
error
)
{
func
TemplatesToProto
(
ch
*
chartutil
.
Chart
)
(
tpls
[]
*
chartpbs
.
Template
,
err
error
)
{
if
ch
==
nil
{
if
ch
==
nil
{
return
nil
,
ErrMissingChart
return
nil
,
ErrMissingChart
...
@@ -98,6 +101,7 @@ func TemplatesToProto(ch *chartutil.Chart) (tpls []*chartpbs.Template, err error
...
@@ -98,6 +101,7 @@ func TemplatesToProto(ch *chartutil.Chart) (tpls []*chartpbs.Template, err error
return
return
}
}
// ValuesToProto converts a chart's values.toml data to protobuf.
func
ValuesToProto
(
ch
*
chartutil
.
Chart
)
(
*
chartpbs
.
Config
,
error
)
{
func
ValuesToProto
(
ch
*
chartutil
.
Chart
)
(
*
chartpbs
.
Config
,
error
)
{
if
ch
==
nil
{
if
ch
==
nil
{
return
nil
,
ErrMissingChart
return
nil
,
ErrMissingChart
...
...
pkg/helm/error.go
View file @
9546b27d
package
helm
package
helm
const
(
const
(
// ErrNotImplemented indicates that this API is not implemented.
ErrNotImplemented
=
Error
(
"helm api not implemented"
)
ErrNotImplemented
=
Error
(
"helm api not implemented"
)
// ErrInvalidSrvAddr indicates an invalid address to the Tiller server.
ErrInvalidSrvAddr
=
Error
(
"invalid tiller address"
)
ErrInvalidSrvAddr
=
Error
(
"invalid tiller address"
)
ErrMissingTpls
=
Error
(
"missing chart templates"
)
// ErrMissingTpls indicates that the templates are missing from a chart.
ErrMissingChart
=
Error
(
"missing chart metadata"
)
ErrMissingTpls
=
Error
(
"missing chart templates"
)
ErrMissingValues
=
Error
(
"missing chart values"
)
// ErrMissingChart indicates that the Chart.yaml data is missing.
ErrMissingChart
=
Error
(
"missing chart metadata"
)
// ErrMissingValues indicates that the config values.toml data is missing.
ErrMissingValues
=
Error
(
"missing chart values"
)
)
)
// Error represents a Helm client error.
// Error represents a Helm client error.
type
Error
string
type
Error
string
// Error returns a string representation of this error.
func
(
e
Error
)
Error
()
string
{
func
(
e
Error
)
Error
()
string
{
return
string
(
e
)
return
string
(
e
)
}
}
pkg/helm/traverse.go
View file @
9546b27d
...
@@ -50,6 +50,10 @@ import (
...
@@ -50,6 +50,10 @@ import (
//
//
//
//
// WalkChartFile walks a chart and returns a *chartObj.
//
// FIXME: Why does an exported function return an unexported struct whose only
// exported method is to return the object passed into this method?
func
WalkChartFile
(
chfi
*
chartutil
.
Chart
)
(
*
chartObj
,
error
)
{
func
WalkChartFile
(
chfi
*
chartutil
.
Chart
)
(
*
chartObj
,
error
)
{
root
:=
&
chartObj
{
file
:
chfi
}
root
:=
&
chartObj
{
file
:
chfi
}
err
:=
root
.
walkChartDeps
(
chfi
)
err
:=
root
.
walkChartDeps
(
chfi
)
...
@@ -62,6 +66,7 @@ type chartObj struct {
...
@@ -62,6 +66,7 @@ type chartObj struct {
deps
[]
*
chartObj
deps
[]
*
chartObj
}
}
// File returns the *chartutil.Chart associated with this *chartObj.
func
(
chd
*
chartObj
)
File
()
*
chartutil
.
Chart
{
func
(
chd
*
chartObj
)
File
()
*
chartutil
.
Chart
{
return
chd
.
file
return
chd
.
file
}
}
...
...
pkg/lint/chartfile.go
View file @
9546b27d
...
@@ -7,6 +7,7 @@ import (
...
@@ -7,6 +7,7 @@ import (
chartutil
"github.com/kubernetes/helm/pkg/chart"
chartutil
"github.com/kubernetes/helm/pkg/chart"
)
)
// Chartfile checks the Chart.yaml file for errors and warnings.
func
Chartfile
(
basepath
string
)
(
m
[]
Message
)
{
func
Chartfile
(
basepath
string
)
(
m
[]
Message
)
{
m
=
[]
Message
{}
m
=
[]
Message
{}
...
...
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