Skip to content

Commit bc1e7c6

Browse files
author
zhipengzuo
committed
add namespaces info for logPrefix
1 parent 4cc44fb commit bc1e7c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/kubelet/images/image_manager.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ func (m *imageManager) logIt(ref *v1.ObjectReference, eventtype, event, prefix,
8686
// EnsureImageExists pulls the image for the specified pod and container, and returns
8787
// (imageRef, error message, error).
8888
func (m *imageManager) EnsureImageExists(pod *v1.Pod, container *v1.Container, pullSecrets []v1.Secret, podSandboxConfig *runtimeapi.PodSandboxConfig) (string, string, error) {
89-
logPrefix := fmt.Sprintf("%s/%s", pod.Name, container.Image)
89+
logPrefix := fmt.Sprintf("%s/%s/%s", pod.Namespace, pod.Name, container.Image)
9090
ref, err := kubecontainer.GenerateContainerRef(pod, container)
9191
if err != nil {
9292
klog.Errorf("Couldn't make a ref to pod %v, container %v: '%v'", pod.Name, container.Name, err)

0 commit comments

Comments
 (0)