mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-13 11:25:19 +00:00
fix golint failures of pkg/kubelet/prober pkg/kubelet/secret
This commit is contained in:
@@ -50,8 +50,8 @@ type prober struct {
|
||||
// probe types needs different httprobe instances so they don't
|
||||
// share a connection pool which can cause collsions to the
|
||||
// same host:port and transient failures. See #49740.
|
||||
readinessHttp httprobe.Prober
|
||||
livenessHttp httprobe.Prober
|
||||
readinessHTTP httprobe.Prober
|
||||
livenessHTTP httprobe.Prober
|
||||
tcp tcprobe.Prober
|
||||
runner kubecontainer.ContainerCommandRunner
|
||||
|
||||
@@ -69,8 +69,8 @@ func newProber(
|
||||
const followNonLocalRedirects = false
|
||||
return &prober{
|
||||
exec: execprobe.New(),
|
||||
readinessHttp: httprobe.New(followNonLocalRedirects),
|
||||
livenessHttp: httprobe.New(followNonLocalRedirects),
|
||||
readinessHTTP: httprobe.New(followNonLocalRedirects),
|
||||
livenessHTTP: httprobe.New(followNonLocalRedirects),
|
||||
tcp: tcprobe.New(),
|
||||
runner: runner,
|
||||
refManager: refManager,
|
||||
@@ -175,10 +175,10 @@ func (pb *prober) runProbe(probeType probeType, p *v1.Probe, pod *v1.Pod, status
|
||||
headers := buildHeader(p.HTTPGet.HTTPHeaders)
|
||||
klog.V(4).Infof("HTTP-Probe Headers: %v", headers)
|
||||
if probeType == liveness {
|
||||
return pb.livenessHttp.Probe(url, headers, timeout)
|
||||
} else { // readiness
|
||||
return pb.readinessHttp.Probe(url, headers, timeout)
|
||||
return pb.livenessHTTP.Probe(url, headers, timeout)
|
||||
}
|
||||
// readiness
|
||||
return pb.readinessHTTP.Probe(url, headers, timeout)
|
||||
}
|
||||
if p.TCPSocket != nil {
|
||||
port, err := extractPort(p.TCPSocket.Port, container)
|
||||
|
||||
Reference in New Issue
Block a user