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
78871859
Commit
78871859
authored
May 10, 2017
by
fengyun.pan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add check for getting kubeclient
parent
a9f0be9b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
client.go
pkg/kube/client.go
+5
-1
wait.go
pkg/kube/wait.go
+4
-1
No files found.
pkg/kube/client.go
View file @
78871859
...
@@ -429,7 +429,11 @@ func updateResource(c *Client, target *resource.Info, currentObj runtime.Object,
...
@@ -429,7 +429,11 @@ func updateResource(c *Client, target *resource.Info, currentObj runtime.Object,
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
return
nil
}
}
client
,
_
:=
c
.
ClientSet
()
client
,
err
:=
c
.
ClientSet
()
if
err
!=
nil
{
return
err
}
pods
,
err
:=
client
.
Core
()
.
Pods
(
target
.
Namespace
)
.
List
(
metav1
.
ListOptions
{
pods
,
err
:=
client
.
Core
()
.
Pods
(
target
.
Namespace
)
.
List
(
metav1
.
ListOptions
{
FieldSelector
:
fields
.
Everything
()
.
String
(),
FieldSelector
:
fields
.
Everything
()
.
String
(),
...
...
pkg/kube/wait.go
View file @
78871859
...
@@ -46,7 +46,10 @@ type deployment struct {
...
@@ -46,7 +46,10 @@ type deployment struct {
func
(
c
*
Client
)
waitForResources
(
timeout
time
.
Duration
,
created
Result
)
error
{
func
(
c
*
Client
)
waitForResources
(
timeout
time
.
Duration
,
created
Result
)
error
{
log
.
Printf
(
"beginning wait for resources with timeout of %v"
,
timeout
)
log
.
Printf
(
"beginning wait for resources with timeout of %v"
,
timeout
)
cs
,
_
:=
c
.
ClientSet
()
cs
,
err
:=
c
.
ClientSet
()
if
err
!=
nil
{
return
err
}
client
:=
versionedClientsetForDeployment
(
cs
)
client
:=
versionedClientsetForDeployment
(
cs
)
return
wait
.
Poll
(
2
*
time
.
Second
,
timeout
,
func
()
(
bool
,
error
)
{
return
wait
.
Poll
(
2
*
time
.
Second
,
timeout
,
func
()
(
bool
,
error
)
{
pods
:=
[]
v1
.
Pod
{}
pods
:=
[]
v1
.
Pod
{}
...
...
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