mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-15 06:01:50 +00:00
Remove some docker references
This commit is contained in:
@@ -1696,7 +1696,8 @@ func getPodReadyCondition(spec *api.PodSpec, statuses []api.ContainerStatus) []a
|
|||||||
return ready
|
return ready
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetPodStatus returns information from Docker about the containers in a pod
|
// GetPodStatus returns information of the containers in the pod from the
|
||||||
|
// container runtime.
|
||||||
func (kl *Kubelet) GetPodStatus(podFullName string) (api.PodStatus, error) {
|
func (kl *Kubelet) GetPodStatus(podFullName string) (api.PodStatus, error) {
|
||||||
// Check to see if we have a cached version of the status.
|
// Check to see if we have a cached version of the status.
|
||||||
cachedPodStatus, found := kl.statusManager.GetPodStatus(podFullName)
|
cachedPodStatus, found := kl.statusManager.GetPodStatus(podFullName)
|
||||||
@@ -1722,14 +1723,14 @@ func (kl *Kubelet) generatePodStatus(pod *api.Pod) (api.PodStatus, error) {
|
|||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// Error handling
|
// Error handling
|
||||||
glog.Infof("Query docker container info for pod %q failed with error (%v)", podFullName, err)
|
glog.Infof("Query container info for pod %q failed with error (%v)", podFullName, err)
|
||||||
if strings.Contains(err.Error(), "resource temporarily unavailable") {
|
if strings.Contains(err.Error(), "resource temporarily unavailable") {
|
||||||
// Leave upstream layer to decide what to do
|
// Leave upstream layer to decide what to do
|
||||||
return api.PodStatus{}, err
|
return api.PodStatus{}, err
|
||||||
} else {
|
} else {
|
||||||
pendingStatus := api.PodStatus{
|
pendingStatus := api.PodStatus{
|
||||||
Phase: api.PodPending,
|
Phase: api.PodPending,
|
||||||
Message: fmt.Sprintf("Query docker container info failed with error (%v)", err),
|
Message: fmt.Sprintf("Query container info failed with error (%v)", err),
|
||||||
}
|
}
|
||||||
return pendingStatus, nil
|
return pendingStatus, nil
|
||||||
}
|
}
|
||||||
|
@@ -84,10 +84,10 @@ func (p *podWorkers) managePodLoop(podUpdates <-chan workUpdate) {
|
|||||||
for newWork := range podUpdates {
|
for newWork := range podUpdates {
|
||||||
func() {
|
func() {
|
||||||
defer p.checkForUpdates(newWork.pod.UID, newWork.updateCompleteFn)
|
defer p.checkForUpdates(newWork.pod.UID, newWork.updateCompleteFn)
|
||||||
// We would like to have the state of Docker from at least the moment
|
// We would like to have the state of the containers from at least
|
||||||
// when we finished the previous processing of that pod.
|
// the moment when we finished the previous processing of that pod.
|
||||||
if err := p.runtimeCache.ForceUpdateIfOlder(minRuntimeCacheTime); err != nil {
|
if err := p.runtimeCache.ForceUpdateIfOlder(minRuntimeCacheTime); err != nil {
|
||||||
glog.Errorf("Error updating docker cache: %v", err)
|
glog.Errorf("Error updating the container runtime cache: %v", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
pods, err := p.runtimeCache.GetPods()
|
pods, err := p.runtimeCache.GetPods()
|
||||||
|
Reference in New Issue
Block a user