Skip to content

k8s reporter: snapshot aborts when a Running pod has an empty imageID #1194

Closed

Description

@dangrondahl

Problem

NewPodData in internal/kube/kube.go returns an error when a pod in phase Running has a container status with an empty ImageID. processPods treats any pod-level error as fatal: it cancels the remaining goroutines and returns. A single pod therefore aborts the snapshot for the whole cluster, and the environment stops receiving snapshots until that pod is removed.

The Failed phase already warns and skips, added in #625. Running was not covered.

case corev1.PodFailed:
    logger.Warn("skipping failed pod %s in namespace %s as it has containers without image IDs", pod.Name, pod.Namespace)
    return nil, nil
case corev1.PodRunning:
    return nil, fmt.Errorf("pod %s in namespace %s has containers without image IDs", pod.Name, pod.Namespace)

Current Behavior

Error: pod <name> in namespace <ns> has containers without image IDs

No snapshot is reported. Pods in every other namespace are dropped as well.

Expected Behavior

A pod with an unreadable image ID should not block the snapshot. Warn and skip the pod, report everything else.

Notes

ImageID can legitimately be empty on a Running pod: a container that has not finished pulling or starting, or a kubelet that has not yet populated the status. That is a transient state on a healthy cluster, not an error condition.

The current skip path also drops the whole pod when only one of its containers lacks an image ID, discarding digests already collected for the others. Worth deciding whether to skip the pod or report it with partial digests, and to apply the same rule to both phases.

Activity

  1. self-assigned this
    on Sep 16, 2026
  2. added 2 commits that reference this issue on Sep 16, 2026
    66cb415
    d71941b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions