Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
6f84bdab
Commit
6f84bdab
authored
Feb 16, 2015
by
Clayton Coleman
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4454 from xiang90/probe
pkg/kubelet: minor cleanup for probe.go
parents
f27bcf50
3c2ead5b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
4 deletions
+1
-4
probe.go
pkg/kubelet/probe.go
+1
-4
No files found.
pkg/kubelet/probe.go
View file @
6f84bdab
...
@@ -71,12 +71,10 @@ func (kl *Kubelet) probeContainer(p *api.Probe,
...
@@ -71,12 +71,10 @@ func (kl *Kubelet) probeContainer(p *api.Probe,
}
}
func
(
kl
*
Kubelet
)
runProbe
(
p
*
api
.
Probe
,
podFullName
string
,
podUID
types
.
UID
,
status
api
.
PodStatus
,
container
api
.
Container
)
(
probe
.
Result
,
error
)
{
func
(
kl
*
Kubelet
)
runProbe
(
p
*
api
.
Probe
,
podFullName
string
,
podUID
types
.
UID
,
status
api
.
PodStatus
,
container
api
.
Container
)
(
probe
.
Result
,
error
)
{
var
timeout
time
.
Duration
timeout
:=
defaultProbeTimeout
secs
:=
p
.
TimeoutSeconds
secs
:=
p
.
TimeoutSeconds
if
secs
>
0
{
if
secs
>
0
{
timeout
=
time
.
Duration
(
secs
)
*
time
.
Second
timeout
=
time
.
Duration
(
secs
)
*
time
.
Second
}
else
{
timeout
=
defaultProbeTimeout
}
}
if
p
.
Exec
!=
nil
{
if
p
.
Exec
!=
nil
{
return
kl
.
prober
.
exec
.
Probe
(
kl
.
newExecInContainer
(
podFullName
,
podUID
,
container
))
return
kl
.
prober
.
exec
.
Probe
(
kl
.
newExecInContainer
(
podFullName
,
podUID
,
container
))
...
@@ -180,7 +178,6 @@ func (r *readinessStates) IsReady(c api.ContainerStatus) bool {
...
@@ -180,7 +178,6 @@ func (r *readinessStates) IsReady(c api.ContainerStatus) bool {
return
false
return
false
}
}
return
r
.
get
(
strings
.
TrimPrefix
(
c
.
ContainerID
,
"docker://"
))
return
r
.
get
(
strings
.
TrimPrefix
(
c
.
ContainerID
,
"docker://"
))
}
}
func
(
r
*
readinessStates
)
get
(
key
string
)
bool
{
func
(
r
*
readinessStates
)
get
(
key
string
)
bool
{
...
...
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