Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WithInitialKubernetesContainers missing enrichment #2660

Open
amitschendel opened this issue Mar 28, 2024 · 3 comments
Open

WithInitialKubernetesContainers missing enrichment #2660

amitschendel opened this issue Mar 28, 2024 · 3 comments

Comments

@amitschendel
Copy link
Contributor

Current situation

Using WithInitialKubernetesContainers gets all the containers from the api server but doesn't enrich them with runtime metadata.

Impact

Forces using WithContainerRuntimeEnrichment in order to list the initial containers.

Ideal future situation

Adding enrichment.

Implementation options

[ Optional: please provide one or more options for implementing the feature requested ]

Additional information

[ Please Add any information that does not fit into any of the above sections here ]

@blanquicet
Copy link
Member

Hi @amitschendel, that's the expected behaviour. Enriching containers with runtime metadata implies additional calls to the runtime for each container, thus it's not done by default but only if requested.

@amitschendel
Copy link
Contributor Author

This requires the user to implement the logic of figuring the container runtime and then doing the enrichment. I would expect ig to have this logic built in.

@blanquicet
Copy link
Member

blanquicet commented Apr 8, 2024

You can initialize WithMultipleContainerRuntimesEnrichment(rc) with runtimes most commonly used in k8s:

    rc := []*containerutilsTypes.RuntimeConfig{
	    {Name: "docker"},
	    {Name: "containerd"},
	    {Name: "crio"},
    }

And IG will find the proper runtime for each container and enrich it with the runtime metadata.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 New
Development

No branches or pull requests

2 participants