示例#1
0
文件: kubelet.go 项目: nhr/kubernetes
// GetPodInfo returns information from Docker about the containers in a pod
func (kl *Kubelet) GetPodInfo(podFullName, uuid string) (api.PodInfo, error) {
	var manifest api.PodSpec
	for _, pod := range kl.pods {
		if GetPodFullName(&pod) == podFullName {
			manifest = pod.Spec
			break
		}
	}
	return dockertools.GetDockerPodInfo(kl.dockerClient, manifest, podFullName, uuid)
}
示例#2
0
// GetPodStatus returns information from Docker about the containers in a pod
func (kl *Kubelet) GetPodStatus(podFullName string, uid types.UID) (api.PodStatus, error) {
	var manifest api.PodSpec
	for _, pod := range kl.pods {
		if GetPodFullName(&pod) == podFullName {
			manifest = pod.Spec
			break
		}
	}

	info, err := dockertools.GetDockerPodInfo(kl.dockerClient, manifest, podFullName, uid)

	// TODO(dchen1107): Determine PodPhase here
	var podStatus api.PodStatus
	podStatus.Info = info

	return podStatus, err
}
示例#3
0
// GetPodInfo returns information from Docker about the containers in a pod
func (kl *Kubelet) GetPodInfo(podFullName, uuid string) (api.PodInfo, error) {
	return dockertools.GetDockerPodInfo(kl.dockerClient, podFullName, uuid)
}