You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
k8s reporter: snapshot aborts when a Running pod has an empty imageID #1194
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)
returnnil, nilcase corev1.PodRunning:
returnnil, 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
feat(snapshot k8s): report pods with partial digests when some contai…
refactor(snapshot k8s): parse container image IDs with distribution/r…