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

Enabling external informer #1266

Merged
merged 7 commits into from
Oct 25, 2024
Merged

Conversation

mariomac
Copy link
Contributor

@mariomac mariomac commented Oct 17, 2024

This function enables a new configuration option that allows switching from the local Kube API informer client to a gRPC stream client that connects to the external beyla-k8s-cache service.

  • Integration tests
  • Creating the Docker image of the beyla-k8s-cache

There are some TO-DOs that will be left for future PRs, as this feature will still remain officially unreleased and hidden from the documentation.

This PR also fixes a bug: if Beyla was running with host network, the host.id was not properly retrieved.

@codecov-commenter
Copy link

codecov-commenter commented Oct 17, 2024

Codecov Report

Attention: Patch coverage is 79.31034% with 18 lines in your changes missing coverage. Please review.

Project coverage is 80.55%. Comparing base (ca5f23e) to head (56a67fb).

Files with missing lines Patch % Lines
pkg/internal/kube/cache_svc_client.go 76.47% 10 Missing and 2 partials ⚠️
pkg/internal/kube/informer_provider.go 82.35% 3 Missing ⚠️
pkg/internal/discover/watcher_kube.go 83.33% 0 Missing and 1 partial ⚠️
pkg/internal/kube/store.go 88.88% 1 Missing ⚠️
pkg/internal/pipe/global/host_id.go 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1266      +/-   ##
==========================================
+ Coverage   80.42%   80.55%   +0.13%     
==========================================
  Files         132      133       +1     
  Lines       13535    13596      +61     
==========================================
+ Hits        10885    10952      +67     
+ Misses       2133     2129       -4     
+ Partials      517      515       -2     
Flag Coverage Δ
integration-test 60.60% <9.19%> (-0.26%) ⬇️
k8s-integration-test 57.45% <74.71%> (+0.31%) ⬆️
oats-test 36.24% <1.14%> (-0.16%) ⬇️
unittests 52.78% <11.49%> (-0.28%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mariomac mariomac marked this pull request as ready for review October 22, 2024 13:49
@mariomac mariomac changed the title WIP: enabling external informer Enabling external informer Oct 22, 2024
@mariomac mariomac requested review from grcevski, rafaelroquetto and marctc and removed request for rafaelroquetto, marctc and grcevski October 22, 2024 13:49
@grcevski
Copy link
Contributor

LGTM! Good stuff!

@mariomac mariomac merged commit 76d52ee into grafana:main Oct 25, 2024
10 checks passed
@mariomac mariomac deleted the external-informer branch October 25, 2024 10:28
mattdurham pushed a commit to mattdurham/beyla that referenced this pull request Jan 22, 2025
* enabling external informer

* preparing integration tests

* Fixed tests

* almost-working tests with external cache

* specifying cache port in integration tests

* updating beyla-k8s-cache library
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants