def pod_issue_investigator(event: KubernetesResourceEvent):
    """
    Enriches alert with a finding that investigates the pods issues
    Note:
        The only supported resources for investigation are "Deployment", "DaemonSet", "ReplicaSet", "Pod", "StatefulSet", "Job"
    """
    resource = event.get_resource()
    if resource.kind not in supported_resources:
        raise ActionException(
            ErrorCodes.RESOURCE_NOT_SUPPORTED, f"Pod investigator is not supported for resource {resource.kind}"
        )

    if resource.kind == "Job":
        job_pods = get_job_all_pods(resource)
        pods = job_pods if job_pods else []
    elif resource.kind == "Pod":
        pods = [resource]
    else:
        # if the kind is Deployment", "DaemonSet", "ReplicaSet", "StatefulSet"
        selector = build_selector_query(resource.spec.selector)
        pods = PodList.listNamespacedPod(namespace=resource.metadata.namespace, label_selector=selector).obj.items

    pods_with_issues = [pod for pod in pods if detect_pod_issue(pod) != PodIssue.NoneDetected]
    if not pods_with_issues:
        logging.info(f"No pod issues discovered for {resource.kind} {resource.metadata.name}")
        return
    # Investigate first issue found
    first_pod = pods_with_issues[0]
    pod_issue = detect_pod_issue(first_pod)
    message, reason = get_pod_issue_message_and_reason(first_pod)
    report_pod_issue(event, pods_with_issues, pod_issue, message, reason)

    Enriches alert with a finding that investigates the pods issues
    Note:
        The only supported resources for investigation are "Deployment", "DaemonSet", "ReplicaSet", "Pod", "StatefulSet", "Job"
    
playbooks/robusta_playbooks/pod_investigator_enricher.py