Skip to content

Commit

Permalink
Merge pull request #3 from sparkfabrik/fix/match_regex_on_custom_filters
Browse files Browse the repository at this point in the history
fix: change kubernetes filter use Match_regex in custom filters
  • Loading branch information
Monska85 authored Jun 3, 2024
2 parents 65efbcc + 01fd4ca commit 1f6966f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [0.3.1] - 2024-06-03

[Compare with previous version](https://github.com/sparkfabrik/terraform-helm-fluentbit/compare/0.3.0...0.3.1)

### Changed

- Fix: change `kubernetes` filter to match platform and fluentbit logs as well. Use `Match_regex` instead of `Match` in other filters.

## [0.3.0] - 2024-05-22

[Compare with previous version](https://github.com/sparkfabrik/terraform-helm-fluentbit/compare/0.2.0...0.3.0)
Expand Down
12 changes: 7 additions & 5 deletions files/values.yml.tftpl
Original file line number Diff line number Diff line change
Expand Up @@ -118,35 +118,37 @@ filter:
enabled: false
additionalFilters: |
%{~ for tag in ["application", "platform", "fluentbit"] ~}
[FILTER]
Name kubernetes
Match application.*
Match_regex ${tag}.*
Kube_URL https://kubernetes.default.svc:443
Kube_Tag_Prefix application.var.log.containers.
Kube_Tag_Prefix ${tag}.var.log.containers.
Merge_Log On
Merge_Log_Key log_processed
K8S-Logging.Parser On
K8S-Logging.Exclude Off
Labels Off
Annotations Off
%{~ endfor ~}
[FILTER]
Name nest
Match application.*
Match_regex application.*|platform.*|fluentbit.*
Operation lift
Nested_under kubernetes
Add_prefix Kube.
[FILTER]
Name modify
Match application.*
Match_regex application.*|platform.*|fluentbit.*
Remove Kube.<Metadata_1>
Remove Kube.<Metadata_2>
Remove Kube.<Metadata_3>
[FILTER]
Name nest
Match application.*
Match_regex application.*|platform.*|fluentbit.*
Operation nest
Wildcard Kube.*
Nested_under kubernetes
Expand Down

0 comments on commit 1f6966f

Please sign in to comment.