mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 23:47:50 +00:00
Change original PodStatus to APIPodStatus, and start using kubelet internal PodStatus in dockertools
This commit is contained in:
@@ -35,7 +35,7 @@ type HandlerRunner struct {
|
||||
}
|
||||
|
||||
type podStatusProvider interface {
|
||||
GetPodStatus(pod *api.Pod) (*api.PodStatus, error)
|
||||
GetAPIPodStatus(pod *api.Pod) (*api.PodStatus, error)
|
||||
}
|
||||
|
||||
func NewHandlerRunner(httpGetter kubetypes.HttpGetter, commandRunner kubecontainer.ContainerCommandRunner, containerManager podStatusProvider) kubecontainer.HandlerRunner {
|
||||
@@ -86,7 +86,7 @@ func resolvePort(portReference intstr.IntOrString, container *api.Container) (in
|
||||
func (hr *HandlerRunner) runHTTPHandler(pod *api.Pod, container *api.Container, handler *api.Handler) error {
|
||||
host := handler.HTTPGet.Host
|
||||
if len(host) == 0 {
|
||||
status, err := hr.containerManager.GetPodStatus(pod)
|
||||
status, err := hr.containerManager.GetAPIPodStatus(pod)
|
||||
if err != nil {
|
||||
glog.Errorf("Unable to get pod info, event handlers may be invalid.")
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user