feat: outdated aws-for-fluent-bit chart updated to use new high performance cloudwatch_logs plugin #919
+458
−27
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.
This PR is raised in extension of #903 which got closed because of some conflicting changes.
Issue
Resolves below issue/s:
#903
#901
Also can be added as resolver of:
#304
#719
#436
#671
Current fluent bit helm chart is outdated.
Aligning with recommendations from current repo to use New Higher Performance Core Fluent Bit Plugin.(https://github.com/fluent/fluent-bit/tree/master/plugins/out_cloudwatch_logs) is directly integrated into fluent bit.
It can achieve higher throughput and will consume less CPU and memory. The [new cloudwatch plugin].
It also provides features to send metrics to cloudwatch with cloudwatch metric namespaces and dimesions.
Has better credential management with sts_endpoint.
Description of changes
Checklist
[ x ] Added/modified documentation as required (such as the README.md for modified charts)
[ x ] Incremented the chart version in Chart.yaml for the modified chart(s)
[ x ] Manually tested. Describe what testing was done in the testing section below
[ x ] Make sure the title of the PR is a good description that can go into the release notes
Testing
added as part of argocd addon repository deployed with eks terraform blueprint. Here's the addon repo
configfile is correctly reflecting as per provided config
Helm chart deployed successfully

Chart version:
0.1.24
All pods up:

Testing template feature:
Added below config to generate a new loggroup per namespace and new stream per app
Namespace isolated logs being generated:

Application stream:

Additional features added
Support for S3
Support for opensearch
Sample data

Known issue
I noticed an issue that opensearch plugin doesnt work with record accessor, although it is mentioned in fluent-bit docs that it should.
I tried multiple combinations but it just doesnt seem to work. Raised an issue on fluentbit repo - fluent/fluent-bit#6914 . Have you seen this behaviour before?
Here's a setting example
Here's fluent bit log showing that index api call is not correct. Its literally sending in $kubernetes['namespace_name'] as string without resolving :

FYI I have raised below issues:
fluent bit : fluent/fluent-bit#6914
aws-for-fluent-bit: aws/aws-for-fluent-bit#557
Solution:
As per the notes on the issue, it is happening because latest public ecr image 2.31.3 is created with fluentbit 1.9.10 while the record accessor feature is introduced with fluent-bit 2.0.5. Current docker hub image for fluentbit is at 2.0.9 hence it works with that image.
Having said that we now know that the issue will resolve with later ecr image releases which will have base fluent bit image > 2.0.5
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.