mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 09:22:44 +00:00
rename rkt makeruntimePod
This commit is contained in:
parent
e83a4e3fd8
commit
a58c7a0de7
@ -599,10 +599,10 @@ func (r *runtime) RunPod(pod *api.Pod) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// makeruntimePod constructs the container runtime pod. It will:
|
// makeRuntimePod constructs the container runtime pod. It will:
|
||||||
// 1, Construct the pod by the information stored in the unit file.
|
// 1, Construct the pod by the information stored in the unit file.
|
||||||
// 2, Construct the pod status from pod info.
|
// 2, Construct the pod status from pod info.
|
||||||
func (r *runtime) makeruntimePod(unitName string, podInfos map[string]*podInfo) (*kubecontainer.Pod, error) {
|
func (r *runtime) makeRuntimePod(unitName string, podInfos map[string]*podInfo) (*kubecontainer.Pod, error) {
|
||||||
f, err := os.Open(path.Join(systemdServiceDir, unitName))
|
f, err := os.Open(path.Join(systemdServiceDir, unitName))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@ -669,7 +669,7 @@ func (r *runtime) GetPods(all bool) ([]*kubecontainer.Pod, error) {
|
|||||||
if !all && u.SubState != "running" {
|
if !all && u.SubState != "running" {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
pod, err := r.makeruntimePod(u.Name, podInfos)
|
pod, err := r.makeRuntimePod(u.Name, podInfos)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
glog.Warningf("rkt: Cannot construct pod from unit file: %v.", err)
|
glog.Warningf("rkt: Cannot construct pod from unit file: %v.", err)
|
||||||
continue
|
continue
|
||||||
|
Loading…
Reference in New Issue
Block a user