-
Notifications
You must be signed in to change notification settings - Fork 77
feat: fluent bit logs collector in k8s backend #2653
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d74e9a2
to
7296120
Compare
mieubrisse
approved these changes
Feb 20, 2025
...end/logs_collector_functions/implementations/fluentbit/fluentbit_logs_collector_container.go
Outdated
Show resolved
Hide resolved
...end/logs_collector_functions/implementations/fluentbit/fluentbit_logs_collector_container.go
Outdated
Show resolved
Hide resolved
...end/logs_collector_functions/implementations/fluentbit/fluentbit_logs_collector_container.go
Outdated
Show resolved
Hide resolved
...b/lib/backend_impls/kubernetes/kubernetes_kurtosis_backend/engine_functions/create_engine.go
Show resolved
Hide resolved
...ib/lib/backend_impls/kubernetes/kubernetes_kurtosis_backend/engine_functions/stop_engines.go
Outdated
Show resolved
Hide resolved
...kend_impls/kubernetes/kubernetes_kurtosis_backend/logs_collector_functions/shared_helpers.go
Outdated
Show resolved
Hide resolved
...kend_impls/kubernetes/kubernetes_kurtosis_backend/logs_collector_functions/shared_helpers.go
Outdated
Show resolved
Hide resolved
...ainer-engine-lib/lib/backend_impls/kubernetes/kubernetes_manager/consts/kubernetes_consts.go
Outdated
Show resolved
Hide resolved
...end_impls/kubernetes/object_attributes_provider/logs_collector_object_attributes_provider.go
Show resolved
Hide resolved
...end_impls/kubernetes/object_attributes_provider/logs_collector_object_attributes_provider.go
Outdated
Show resolved
Hide resolved
This was referenced Feb 28, 2025
github-merge-queue bot
pushed a commit
that referenced
this pull request
Mar 12, 2025
…cess (#2663) ## Description The vector logs aggregator needs labels such as `enclave_uuid` , `service_uuid`, etc. to write logs out to the proper filepaths. To enrich the log stream with these labels, the fluentbit logs collector uses the `kubernetes` filter: https://docs.fluentbit.io/manual/pipeline/filters/kubernetes. The filter works by having the logs collector query the k8s api server for necessary information (pods labels in this case) about each pod. To query the api server, the logs collector needs perms. This change adds those perms in the form of a `ServiceAccount` given a `ClusterRole` with acess via a `ClusterRoleBinding`. ## Is this change user facing? NO ## References #2653
github-merge-queue bot
pushed a commit
that referenced
this pull request
Mar 18, 2025
## Description This PR adds a vector logs aggregator to the kubernetes backend and has it output logs to a shared volume, mouned to the engine pod. Additionally, it migrates the k8s backend to use the `PersistentVolumeLogsDatabaseClient` so now both Docker and K8s are streaming from a persistent volume containing logs aggregated by Vector. To use kubernetes logging, users will need to use the v4 config and specify the engine node they'd like the engine to be placed on. Both the aggregator and engine will be placed on this node every `kurtosis engine start` so the engine has access to the same logs db. ``` config-version: 4 should-send-metrics: true kurtosis-clusters: ... minikube: type: "kubernetes" config: kubernetes-cluster-name: "minikube" enclave-size-in-megabytes: 10 storage-class: "standard" engine-node-name: "minikube-m02" ... ``` ## Is this change user facing? YES ## References #2653 #2663
github-merge-queue bot
pushed a commit
that referenced
this pull request
Mar 20, 2025
🤖 I have created a release *beep* *boop* --- ## [1.6.0]( 8EC5 1.5.0...1.6.0) (2025-03-18) ### Features * add resources to logs collector daemonset for k8s api server access ([#2663](#2663)) ([5ae473c](5ae473c)) * export service logs (Docker) ([#2668](#2668)) ([1651249](1651249)) * fluent bit logs collector in k8s backend ([#2653](#2653)) ([05e3813](05e3813)) * vector logs aggregator in k8s ([#2669](#2669)) ([106e4a2](106e4a2)) ### Bug Fixes * exit codes on tasks ([#2654](#2654)) ([ffd86b8](ffd86b8)) * push ci docs ([#2680](#2680)) ([61857f0](61857f0)) * stdout for file inspect ([#2658](#2658)) ([6ae51a3](6ae51a3)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR is part 1 in adding centralized logging to the K8s backend. Similar to the Docker backend, this change implements the deployment/management of a fluentbit logs collector's via a k8s
DaemonSet
. TheDaemonSet
deploys fluent bit log collection pods on every node in a k8s cluster. The logs collector is configured to pick up logs from all user services in enclaves running on that node.Currently, it's configured to output the log stream to stdout - in pt 2. the logs will be sent to a Vector aggregator.
Is this change user facing?
NO