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
8cacb2c3
Unverified
Commit
8cacb2c3
authored
Jul 24, 2019
by
Matthew Fisher
Committed by
GitHub
Jul 24, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6077 from tariq1890/fix_lint
fix golint issues reported by make test
parents
7ab62324
276bb9b1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
8 deletions
+17
-8
client.go
pkg/kube/client.go
+13
-5
client_test.go
pkg/kube/client_test.go
+1
-1
chartfile.go
pkg/lint/rules/chartfile.go
+2
-2
environment.go
pkg/tiller/environment/environment.go
+1
-0
No files found.
pkg/kube/client.go
View file @
8cacb2c3
...
@@ -314,7 +314,14 @@ func (c *Client) Get(namespace string, reader io.Reader) (string, error) {
...
@@ -314,7 +314,14 @@ func (c *Client) Get(namespace string, reader io.Reader) (string, error) {
return
buf
.
String
(),
nil
return
buf
.
String
(),
nil
}
}
// Deprecated; use UpdateWithOptions instead
// Update reads the current configuration and a target configuration from io.reader
// and creates resources that don't already exist, updates resources that have been modified
// in the target configuration and deletes resources from the current configuration that are
// not present in the target configuration.
//
// Namespace will set the namespaces.
//
// Deprecated: use UpdateWithOptions instead.
func
(
c
*
Client
)
Update
(
namespace
string
,
originalReader
,
targetReader
io
.
Reader
,
force
bool
,
recreate
bool
,
timeout
int64
,
shouldWait
bool
)
error
{
func
(
c
*
Client
)
Update
(
namespace
string
,
originalReader
,
targetReader
io
.
Reader
,
force
bool
,
recreate
bool
,
timeout
int64
,
shouldWait
bool
)
error
{
return
c
.
UpdateWithOptions
(
namespace
,
originalReader
,
targetReader
,
UpdateOptions
{
return
c
.
UpdateWithOptions
(
namespace
,
originalReader
,
targetReader
,
UpdateOptions
{
Force
:
force
,
Force
:
force
,
...
@@ -334,12 +341,13 @@ type UpdateOptions struct {
...
@@ -334,12 +341,13 @@ type UpdateOptions struct {
CleanupOnFail
bool
CleanupOnFail
bool
}
}
// UpdateWithOptions reads
in
the current configuration and a target configuration from io.reader
// UpdateWithOptions reads the current configuration and a target configuration from io.reader
// and creates resources that don't already exist
s
, updates resources that have been modified
// and creates resources that don't already exist, updates resources that have been modified
// in the target configuration and deletes resources from the current configuration that are
// in the target configuration and deletes resources from the current configuration that are
// not present in the target configuration.
// not present in the target configuration.
//
//
// Namespace will set the namespaces.
// Namespace will set the namespaces. UpdateOptions provides additional parameters to control
// update behavior.
func
(
c
*
Client
)
UpdateWithOptions
(
namespace
string
,
originalReader
,
targetReader
io
.
Reader
,
opts
UpdateOptions
)
error
{
func
(
c
*
Client
)
UpdateWithOptions
(
namespace
string
,
originalReader
,
targetReader
io
.
Reader
,
opts
UpdateOptions
)
error
{
original
,
err
:=
c
.
BuildUnstructured
(
namespace
,
originalReader
)
original
,
err
:=
c
.
BuildUnstructured
(
namespace
,
originalReader
)
if
err
!=
nil
{
if
err
!=
nil
{
...
@@ -552,7 +560,7 @@ func (c *Client) WatchUntilReady(namespace string, reader io.Reader, timeout int
...
@@ -552,7 +560,7 @@ func (c *Client) WatchUntilReady(namespace string, reader io.Reader, timeout int
return
perform
(
infos
,
c
.
watchTimeout
(
time
.
Duration
(
timeout
)
*
time
.
Second
))
return
perform
(
infos
,
c
.
watchTimeout
(
time
.
Duration
(
timeout
)
*
time
.
Second
))
}
}
// Wa
tch
UntilCRDEstablished polls the given CRD until it reaches the established
// Wa
it
UntilCRDEstablished polls the given CRD until it reaches the established
// state. A CRD needs to reach the established state before CRs can be created.
// state. A CRD needs to reach the established state before CRs can be created.
//
//
// If a naming conflict condition is found, this function will return an error.
// If a naming conflict condition is found, this function will return an error.
...
...
pkg/kube/client_test.go
View file @
8cacb2c3
...
@@ -558,7 +558,7 @@ func TestWaitUntilCRDEstablished(t *testing.T) {
...
@@ -558,7 +558,7 @@ func TestWaitUntilCRDEstablished(t *testing.T) {
}
else
{
}
else
{
crd
=
crdWithConditions
crd
=
crdWithConditions
}
}
requestCount
+=
1
requestCount
++
return
newResponse
(
200
,
&
crd
)
return
newResponse
(
200
,
&
crd
)
}),
}),
}
}
...
...
pkg/lint/rules/chartfile.go
View file @
8cacb2c3
...
@@ -51,7 +51,7 @@ func Chartfile(linter *support.Linter) {
...
@@ -51,7 +51,7 @@ func Chartfile(linter *support.Linter) {
linter
.
RunLinterRule
(
support
.
ErrorSev
,
chartFileName
,
validateChartNameDirMatch
(
linter
.
ChartDir
,
chartFile
))
linter
.
RunLinterRule
(
support
.
ErrorSev
,
chartFileName
,
validateChartNameDirMatch
(
linter
.
ChartDir
,
chartFile
))
// Chart metadata
// Chart metadata
linter
.
RunLinterRule
(
support
.
ErrorSev
,
chartFileName
,
validateChartA
pi
Version
(
chartFile
))
linter
.
RunLinterRule
(
support
.
ErrorSev
,
chartFileName
,
validateChartA
PI
Version
(
chartFile
))
linter
.
RunLinterRule
(
support
.
ErrorSev
,
chartFileName
,
validateChartVersion
(
chartFile
))
linter
.
RunLinterRule
(
support
.
ErrorSev
,
chartFileName
,
validateChartVersion
(
chartFile
))
linter
.
RunLinterRule
(
support
.
ErrorSev
,
chartFileName
,
validateChartEngine
(
chartFile
))
linter
.
RunLinterRule
(
support
.
ErrorSev
,
chartFileName
,
validateChartEngine
(
chartFile
))
linter
.
RunLinterRule
(
support
.
ErrorSev
,
chartFileName
,
validateChartMaintainer
(
chartFile
))
linter
.
RunLinterRule
(
support
.
ErrorSev
,
chartFileName
,
validateChartMaintainer
(
chartFile
))
...
@@ -97,7 +97,7 @@ func validateChartNameDirMatch(chartDir string, cf *chart.Metadata) error {
...
@@ -97,7 +97,7 @@ func validateChartNameDirMatch(chartDir string, cf *chart.Metadata) error {
return
nil
return
nil
}
}
func
validateChartA
pi
Version
(
cf
*
chart
.
Metadata
)
error
{
func
validateChartA
PI
Version
(
cf
*
chart
.
Metadata
)
error
{
if
cf
.
ApiVersion
==
""
{
if
cf
.
ApiVersion
==
""
{
return
errors
.
New
(
"apiVersion is required"
)
return
errors
.
New
(
"apiVersion is required"
)
}
}
...
...
pkg/tiller/environment/environment.go
View file @
8cacb2c3
...
@@ -255,6 +255,7 @@ func (p *PrintingKubeClient) WaitAndGetCompletedPodPhase(namespace string, reade
...
@@ -255,6 +255,7 @@ func (p *PrintingKubeClient) WaitAndGetCompletedPodPhase(namespace string, reade
return
v1
.
PodUnknown
,
err
return
v1
.
PodUnknown
,
err
}
}
// WaitUntilCRDEstablished implements KubeClient WaitUntilCRDEstablished.
func
(
p
*
PrintingKubeClient
)
WaitUntilCRDEstablished
(
reader
io
.
Reader
,
timeout
time
.
Duration
)
error
{
func
(
p
*
PrintingKubeClient
)
WaitUntilCRDEstablished
(
reader
io
.
Reader
,
timeout
time
.
Duration
)
error
{
_
,
err
:=
io
.
Copy
(
p
.
Out
,
reader
)
_
,
err
:=
io
.
Copy
(
p
.
Out
,
reader
)
return
err
return
err
...
...
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