-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Need a common utils to call k8s api server #3424
Comments
As discussed during the SIG, we want to move storage extension to core, starting with the interface (this PR) so persistent buffer implementation (open-telemetry/opentelemetry-collector#2285) could use it **Link to tracking Issue:** #3424 **Testing:** Just the interface, no tests **Documentation:** README.md with API cc @djaglowski @tigrannajaryan
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping |
This issue has been closed as inactive because it has been stale for 120 days with no activity. |
Is your feature request related to a problem? Please describe.
Existing otel components contain some duplicate functionalities for calling the kubernetes api server:
watcher
use kubernetesinformers.SharedInformerFactory
to listen for resources changes continuously: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/k8sclusterreceiver/watcher.go.In addition, the AWS Container Insights project is also introducing another way to call the kubernetes api server through a lower-level
cache.reflector
api: #3367. Unlike Kubernetes informers that automatically maintain all the resource metadata in cache,cache.reflector
requires you to manage your own cache. So you can selectively keep only the things that are really needed. This is beneficial as we want to keep the memory usage as small as possible especially when you are monitoring a big cluster with a large number of different resources (e.g. pod, node, job, endpoint, service ...)Describe the solution you'd like
The duplicate functionalities doesn't seems to be a big issue at this moment. But as more receivers/processors begin to call k8s api server in the future, there is a need to provide a common k8s util for code reuse. I think the ideas is to provide at least two set of apis (one using kubernetes informers and one using
cache.reflector
). To design an easy-to-use and extendable k8s utils seems to be a big effort and will involve owners of multiple otel components. I don't imagine that this can be done in a short time. So I am proposing that we use the current feature request to track the relevant discussions and plans.For now, we still want to merge the PR into a aws internal folder for Container Insight usage due to the project timeline. But we are happy to discuss any refactoring about the code to make it also useful for other otel components.
The text was updated successfully, but these errors were encountered: