Summary
The k8seventgenerationprocessor should emit ContainerImage entity state events and RelatesTo relationship state events connecting ContainerImage to KubernetesContainerImage when processing pod manifests.
Background
The processor already emits KubernetesContainerImage and KubernetesResourceUsesImage events. Entity schemas for ContainerImage and the RelatesTo relationship connecting it to KubernetesContainerImage are defined in entity-service-schemas but the collector never emits these events.
Changes Required
- Add
transformContainersToCICDContainerImageLogs function to emit ContainerImage entities deduplicated by oci.manifest.digest per pod manifest
- Add
transformContainersToCICDContainerImageRelatesToLogs function to emit RelatesTo relationships with ContainerImage source and KubernetesContainerImage destination
- Wire both functions into PodManifest case in processor.go
- Process main + init containers, skip ephemeral containers
- Best-effort error handling: skip malformed/empty ImageIDs with warnings
Summary
The
k8seventgenerationprocessorshould emitContainerImageentity state events andRelatesTorelationship state events connectingContainerImagetoKubernetesContainerImagewhen processing pod manifests.Background
The processor already emits
KubernetesContainerImageandKubernetesResourceUsesImageevents. Entity schemas forContainerImageand theRelatesTorelationship connecting it toKubernetesContainerImageare defined in entity-service-schemas but the collector never emits these events.Changes Required
transformContainersToCICDContainerImageLogsfunction to emitContainerImageentities deduplicated byoci.manifest.digestper pod manifesttransformContainersToCICDContainerImageRelatesToLogsfunction to emitRelatesTorelationships withContainerImagesource andKubernetesContainerImagedestination