Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkg/kubelet: minor cleanup for probe.go #4454

Merged
merged 1 commit into from
Feb 16, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 1 addition & 4 deletions pkg/kubelet/probe.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
var timeout time.Duration
timeout := defaultProbeTimeout
secs := p.TimeoutSeconds
if secs > 0 {
timeout = time.Duration(secs) * time.Second
} else {
timeout = defaultProbeTimeout
}
if p.Exec != nil {
return kl.prober.exec.Probe(kl.newExecInContainer(podFullName, podUID, container))
Expand Down Expand Up @@ -180,7 +178,6 @@ func (r *readinessStates) IsReady(c api.ContainerStatus) bool {
return false
}
return r.get(strings.TrimPrefix(c.ContainerID, "docker://"))

}

func (r *readinessStates) get(key string) bool {
Expand Down