🤖 Generated by the Agentic Engineer
Description
Kubescape's runtime callbacks request Kubernetes Pod metadata for standalone runtime containers that have no Pod identity. This produces failed metadata retries and stops the rule-manager registration before its normal monitoring lifecycle. Keep standalone monitoring separate from Kubernetes enrichment instead of suppressing the resulting errors.
Steps to Reproduce
- Register a non-host, standalone runtime container with an empty Kubernetes namespace and Pod name.
- Exercise the real container-watcher and rule-manager callbacks with bounded fake Kubernetes/cache dependencies.
- Observe the Pod lookup with an empty identity and the rule-manager wait for shared Kubernetes metadata that cannot be populated.
These steps describe a required regression reproduction, not a claim that an executable regression test has already been completed.
Expected Behavior
Standalone registrations retain their supported context and monitoring lifecycle without asking for a nonexistent Kubernetes Pod. Genuine Kubernetes registrations keep their enrichment, retries and failure reporting. Removal and shutdown terminate the affected registration cleanly.
Actual Behavior
The public container-watcher callback bypasses Pod enrichment only for the virtual host container. The rule-manager entrypoint likewise bypasses its shared-data wait only for that host identity, although the context detector explicitly supports standalone registrations. The same distinction remains in upstream main at this investigation.
Acceptance Criteria
Additional Context
Part of #2447. This is separate from the exited-container and API-conflict classification handled by the existing compatibility patch. Public evidence is limited to upstream source and synthetic reproduction design; production logs, identities and topology remain private. Upstream contribution authority is being requested separately.
Description
Kubescape's runtime callbacks request Kubernetes Pod metadata for standalone runtime containers that have no Pod identity. This produces failed metadata retries and stops the rule-manager registration before its normal monitoring lifecycle. Keep standalone monitoring separate from Kubernetes enrichment instead of suppressing the resulting errors.
Steps to Reproduce
These steps describe a required regression reproduction, not a claim that an executable regression test has already been completed.
Expected Behavior
Standalone registrations retain their supported context and monitoring lifecycle without asking for a nonexistent Kubernetes Pod. Genuine Kubernetes registrations keep their enrichment, retries and failure reporting. Removal and shutdown terminate the affected registration cleanly.
Actual Behavior
The public container-watcher callback bypasses Pod enrichment only for the virtual host container. The rule-manager entrypoint likewise bypasses its shared-data wait only for that host identity, although the context detector explicitly supports standalone registrations. The same distinction remains in upstream main at this investigation.
Acceptance Criteria
Additional Context
Part of #2447. This is separate from the exited-container and API-conflict classification handled by the existing compatibility patch. Public evidence is limited to upstream source and synthetic reproduction design; production logs, identities and topology remain private. Upstream contribution authority is being requested separately.