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

Bfs/vz 10302 #17

Open
wants to merge 131 commits into
base: oracle/release/2.2.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
131 commits
Select commit Hold shift + click to select a range
27c4756
Add influxdb Output
Apr 7, 2023
edec16e
Add InfluxDB to Output Filters
Apr 7, 2023
c146399
fix rewrite_tag match rule and trim start of string pattern
adiforluls Apr 8, 2023
66738f4
Merge pull request #692 from verrazzano/aditya/few-fixes
benjaminhuo Apr 11, 2023
840a840
Merge pull request #690 from jynolen/feature/influxdb-plugin
benjaminhuo Apr 11, 2023
a69991d
Fix/missing log level (#691)
jynolen Apr 12, 2023
a6ecadf
Add EnvVars support to FluentD
MioOgbeni Apr 12, 2023
34a1bfe
Add Pod Annotations support to FluentD
MioOgbeni Apr 12, 2023
dabb9a4
Merge pull request #697 from broker-consulting/env-vars-for-fluentd
benjaminhuo Apr 21, 2023
39cd7df
Merge pull request #698 from broker-consulting/annotations-for-fluentd
benjaminhuo Apr 21, 2023
3a0da3d
fluent operator & fluentbit: Added tolerations, nodeSelector + more (…
felfa01 Apr 26, 2023
31c63a6
build(deps): Bump k8s.io/apimachinery from 0.26.3 to 0.27.1 (#701)
dependabot[bot] Apr 26, 2023
35aaa2d
envVars support in fluentbit helm template
felfa01 Apr 28, 2023
41bd8fe
Merge pull request #706 from felfa01/master
benjaminhuo Apr 29, 2023
c30275f
Add uri field for each telemetry type, remove old uri field
JensLoe Apr 28, 2023
57777b0
generate manifests with command "make manifests"
JensLoe Apr 29, 2023
2a0979c
run "make generate"
JensLoe Apr 29, 2023
75ce9ab
generate API-doc
JensLoe Apr 29, 2023
c3e1dcb
Merge pull request #708 from JensLoe/master
benjaminhuo May 4, 2023
8cda650
build(deps): Bump helm/chart-testing-action from 2.1.0 to 2.4.0 (#710)
dependabot[bot] May 4, 2023
fac16e5
build(deps): Bump k8s.io/klog/v2 from 2.90.1 to 2.100.1 (#712)
dependabot[bot] May 4, 2023
a51ca40
build(deps): Bump golang in /cmd/fluent-watcher/fluentbit (#714)
dependabot[bot] May 4, 2023
9f17db3
build(deps): Bump golang in /cmd/fluent-manager (#713)
dependabot[bot] May 4, 2023
c45061a
Adjust fluentd watcher dependabot (#716)
benjaminhuo May 4, 2023
8b69310
build(deps): Bump alpine in /cmd/fluent-watcher/fluentd (#719)
dependabot[bot] May 4, 2023
f4e408b
build(deps): Bump golang in /cmd/fluent-watcher/fluentd (#717)
dependabot[bot] May 4, 2023
78a79f9
build(deps): Bump golang in /docs/best-practice/forwarding-logs-via-h…
dependabot[bot] May 4, 2023
0d80a1c
build(deps): Bump arm64v8/ruby in /cmd/fluent-watcher/fluentd (#718)
dependabot[bot] May 4, 2023
216f1a4
remove the deprecated -i flag in go build (#720)
benjaminhuo May 4, 2023
a93283e
Adjust fluentd arm64 image build timeout (#721)
benjaminhuo May 4, 2023
0ecb23a
Fluent-bit upgrade to v2.1.2
wenchajun May 6, 2023
8055cba
Merge pull request #723 from wenchajun/fb
benjaminhuo May 6, 2023
49a3201
Fix(docs): Update cluster outputs docs link
lewis262626 May 6, 2023
d41f58f
Merge pull request #724 from lewis262626/patch-1
benjaminhuo May 8, 2023
1e907c6
Add fluentbit.affinity configuration
wigust May 4, 2023
5adb861
Merge pull request #726 from wigust/fluentbit-affinity
benjaminhuo May 9, 2023
455f088
Adjust edge metrics collection config (#736)
benjaminhuo May 16, 2023
0dcbab9
Fluent-bit upgrade to v2.1.2
wenchajun May 21, 2023
f906bca
add some fluentbit helm opts
adiforluls May 21, 2023
769f05e
dereference pointers in parser filter plugin for fluentd
jjsiv May 21, 2023
e53a7aa
Merge pull request #742 from wenchajun/2.3
benjaminhuo May 22, 2023
ade205a
Merge pull request #745 from jjsiv/master
benjaminhuo May 22, 2023
25105d3
fluentbit namespace-logging: only generate rewrite tag config once fo…
adiforluls May 22, 2023
2a36469
add fluentd in_tail plugin
jjsiv May 22, 2023
56d3424
Merge pull request #746 from verrazzano/aditya/fb-ns-cfgs-rt
adiforluls May 23, 2023
c5babfb
Merge pull request #743 from verrazzano/aditya/helm-opts
adiforluls May 23, 2023
b124028
Align CRDs and Operator with the fluentbit loki output (#756)
felfa01 May 24, 2023
70e213d
Merge pull request #753 from jjsiv/master
benjaminhuo May 24, 2023
70078ed
add missing fluentd buffer options
jjsiv May 24, 2023
3e89811
Merge pull request #757 from jjsiv/fix-buffer-params
jjsiv May 26, 2023
9896dec
fix(735): allow setting PodSecurityContext
erhudy May 21, 2023
002f369
Merge pull request #744 from erhudy/set-sts-fsgroup
benjaminhuo May 28, 2023
213c22d
build(deps): Bump k8s.io/apimachinery from 0.27.1 to 0.27.2 (#751)
dependabot[bot] May 30, 2023
813e48f
build(deps): Bump github.com/onsi/gomega from 1.27.6 to 1.27.7 (#748)
dependabot[bot] May 30, 2023
be74093
minor typo fix
Jun 1, 2023
b3f1f87
Merge pull request #764 from ksdpmx/typo
benjaminhuo Jun 1, 2023
2f9ce89
add AWS Kinesis Data Streams output plugin
ksdpmx Jun 1, 2023
4d05bc5
Fluent-bit upgrade to v2.1.4
wenchajun Jun 2, 2023
473a7d5
Merge pull request #767 from wenchajun/2.1.4
benjaminhuo Jun 2, 2023
60cf1e8
Merge pull request #768 from ksdpmx/kinesis
benjaminhuo Jun 2, 2023
c9af5f8
build(deps): Bump helm/kind-action from 1.5.0 to 1.7.0 (#765)
dependabot[bot] Jun 2, 2023
76ada94
fix typo for estimate_current_event in fluentd
ksdpmx Jun 2, 2023
16c04ae
Merge pull request #769 from ksdpmx/typo
benjaminhuo Jun 2, 2023
6c59ca0
add scheduler support for fluentbit & fluentd
ksdpmx Jun 2, 2023
6058ba3
add global loglevel support for fluentd
ksdpmx Jun 2, 2023
6080b20
Merge pull request #770 from ksdpmx/loglevel
benjaminhuo Jun 2, 2023
df8bc16
Merge branch 'master' into scheduler
ksdpmx Jun 2, 2023
b2a709e
Merge pull request #771 from ksdpmx/scheduler
benjaminhuo Jun 3, 2023
aa5f5bd
release 2.3.0
wenchajun Jun 5, 2023
0c00638
Merge pull request #772 from wenchajun/release-2.3
benjaminhuo Jun 5, 2023
05a8e81
add scheduler support for fluentbit collector
ksdpmx Jun 6, 2023
1547896
Merge pull request #776 from ksdpmx/scheduler_collector
benjaminhuo Jun 6, 2023
fa6fb43
fix: finalizer deletion and adoption cleanup and fix for 3 controllers
ksdpmx Jun 6, 2023
899b4fd
Add stripUnderscores in fluent-operator helm values for fluentbit Inp…
karan56625 Jun 2, 2023
7760383
Merge pull request #782 from verrazzano/karak/introduce_stripUndersco…
adiforluls Jun 8, 2023
6ba12bb
Fix: Correct fluentd prase TimeFormat config key
Jakob3xD Jun 7, 2023
60f082e
Fix: Correct Kubebuilder validation for TimeType from *string to string
Jakob3xD Jun 7, 2023
1ff5f8b
Render mainfests
Jakob3xD Jun 8, 2023
677ce61
Add condition on fluentdFilter and add optios to add more filter
karan56625 Jun 8, 2023
4896e5a
Merge pull request #780 from Jakob3xD/jh-time-format
benjaminhuo Jun 9, 2023
080555c
Merge pull request #777 from ksdpmx/collector_finalizer
benjaminhuo Jun 9, 2023
5ab3823
Merge pull request #785 from verrazzano/karak/add_systemdUnit_filter_…
benjaminhuo Jun 9, 2023
1388395
Add Security context for fluentBit
karan56625 Jun 9, 2023
34cd78e
rename field podSecurityContext to securityContext
karan56625 Jun 9, 2023
a09f06f
Merge pull request #790 from verrazzano/karak/fix_unknownfield_podSec…
benjaminhuo Jun 10, 2023
8882b3a
Merge pull request #788 from verrazzano/karak/add_pod_security_option…
benjaminhuo Jun 10, 2023
070574c
Add fluent operator security context for container
karan56625 Jun 12, 2023
7d5eabe
Merge pull request #792 from verrazzano/karak/add_container_security_…
benjaminhuo Jun 13, 2023
fed8efd
add security context for fluenbit container
karan56625 Jun 15, 2023
7820789
Merge pull request #796 from verrazzano/karak/add_security_context_fo…
adiforluls Jun 16, 2023
39d6adf
storageClassName field not taken into account (#798)
antrema Jun 19, 2023
bef526d
Merge pull request #799 from antrema/master
benjaminhuo Jun 19, 2023
ab72254
Adds the fluentd output plugin for Datadog (#803)
joshuabaird Jun 21, 2023
251932e
Feat: Add DefaultFilterSelector and DefaultOutputSelector to fluentd …
Jakob3xD Jun 27, 2023
df4f02e
Specify init container resources for fluent-operator deployment
gnadaban Jun 29, 2023
96d504e
Update fluentd base Dockerfile
kaiohenricunha Jun 30, 2023
e0e2528
Merge pull request #820 from kaiohenricunha/patch-1
benjaminhuo Jul 3, 2023
cbbe438
fix: plugins document index
sakateka Jul 3, 2023
7564fa6
add S3 output plugin for Fluent Bit
gregorycuellar Jun 30, 2023
bb88e0a
Update the _helpers.tpl file
wenchajun Jul 3, 2023
921b894
Merge pull request #823 from wenchajun/helm
benjaminhuo Jul 3, 2023
fa9e9f8
Merge pull request #822 from sakateka/fix-docs
benjaminhuo Jul 3, 2023
82f995b
Merge pull request #819 from gregorycuellar/master
benjaminhuo Jul 3, 2023
6ee70d3
Merge pull request #817 from gnadaban/bugfix/gee/add-missing-resource…
benjaminhuo Jul 3, 2023
9b4e764
Upgrade fluentbit-operator to fluent-operator
wenchajun Jun 7, 2023
5779839
Update upgrade.sh
wenchajun Jul 4, 2023
12f4190
Update upgrade.sh
wenchajun Jul 5, 2023
5b16383
Merge pull request #779 from wenchajun/upgrade
benjaminhuo Jul 5, 2023
ad95a05
fix: incorrect field names in fluentd buffer plugin
erhudy Jul 6, 2023
c8a0624
Merge pull request #824 from erhudy/fix-buffer-fields
benjaminhuo Jul 9, 2023
abbb7ef
build(deps): Bump github.com/go-openapi/errors from 0.20.3 to 0.20.4 …
dependabot[bot] Jul 9, 2023
cdd17b8
build(deps): Bump github.com/onsi/gomega from 1.27.7 to 1.27.8 (#794)
dependabot[bot] Jul 9, 2023
9b917a7
build(deps): Bump golang in /cmd/fluent-manager (#783)
dependabot[bot] Jul 9, 2023
88ab30b
Support system layer in service section of fluenbit
karan56625 Jul 7, 2023
59e9bad
Merge pull request #825 from verrazzano/karak/support_file_system_as_…
benjaminhuo Jul 10, 2023
2dfdc19
build(deps): Bump k8s.io/apimachinery from 0.27.2 to 0.27.3 (#828)
dependabot[bot] Jul 13, 2023
95955c5
build(deps): Bump golang in /cmd/fluent-manager (#830)
dependabot[bot] Jul 13, 2023
9085a2c
build(deps): Bump golang in /docs/best-practice/forwarding-logs-via-h…
dependabot[bot] Jul 13, 2023
8534c47
Fluent-bit upgrade to v2.1.6
wenchajun Jul 13, 2023
1630d7b
Merge pull request #832 from wenchajun/master
benjaminhuo Jul 13, 2023
0e2326c
add support to run fluentbit as daemonset
karan56625 Jul 17, 2023
2d7a792
update dockter
karan56625 Jul 17, 2023
21c654b
update docker file
karan56625 Jul 17, 2023
c9dc4fc
fix
karan56625 Jul 17, 2023
33a2d6b
fix2
karan56625 Jul 17, 2023
78cb300
fix
karan56625 Jul 18, 2023
80408ee
fix disabling daemonset
karan56625 Jul 18, 2023
2dc2b61
fix
karan56625 Jul 18, 2023
aefd144
fix
karan56625 Jul 19, 2023
058c653
add mode
karan56625 Jul 20, 2023
7acdd61
final fix
karan56625 Jul 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ updates:
schedule:
interval: "daily"
- package-ecosystem: "docker"
directory: "/cmd/fluent-watcher/fluentd/base"
directory: "/cmd/fluent-watcher/fluentd"
schedule:
interval: "daily"
- package-ecosystem: "docker"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-fb-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ on:
- "pkg/filenotify/**"

env:
FB_IMG: 'kubesphere/fluent-bit:v2.0.11'
FB_IMG_DEBUG: 'kubesphere/fluent-bit:v2.0.11-debug'
FB_IMG: 'kubesphere/fluent-bit:v2.1.6'
FB_IMG_DEBUG: 'kubesphere/fluent-bit:v2.1.6-debug'

jobs:
build:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-fd-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:

build-arm64:
runs-on: ubuntu-latest
timeout-minutes: 45
timeout-minutes: 90
name: Build arm64 Image for Fluentd
steps:
- name: Install Go
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
id: buildx
uses: docker/setup-buildx-action@v2

- name: Build and Push arm64 Image for Fluentd
- name: Build and Push arm64 base Image for Fluentd
run: |
make build-fd-arm64-base -e FD_IMG_BASE=${{ env.FD_IMG_BASE }}

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
python-version: 3.7

- name: Set up chart-testing
uses: helm/chart-testing-action@v2.1.0
uses: helm/chart-testing-action@v2.4.0

- name: Run chart-testing (list-changed)
id: list-changed
Expand All @@ -38,7 +38,7 @@ jobs:
run: ct lint --chart-dirs charts/fluent-operator --config charts/ct.yaml

- name: Create kind cluster
uses: helm/kind-action@v1.5.0
uses: helm/kind-action@v1.7.0
if: steps.list-changed.outputs.changed == 'true'

- name: Run chart-testing (install)
Expand Down
46 changes: 46 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,49 @@
## 2.3.0 / 2023-06-05
### Features
- Feat: Adding influxdb plugin (#690)
- Feat: Add EnvVars support to FluentD (#697)
- Feat: Add Pod Annotations support to FluentD (#698)
- Feat: Fluent operator & fluentbit: Added tolerations, nodeSelector + more (#704)
- Feat: Add fluentbit.affinity configuration (#726)
- Feat: Allow setting fluentd PodSecurityContext (#744)
- Feat: Fluentd in_tail plugin (#753)
- Feat: Add missing fluentd buffer options (#757)
- Feat: Add AWS Kinesis Data Streams output plugin for Fluent Bit (#768)
- Feat: Add global log_level support for fluentd (#770)
- Feat: Add scheduler support for fluentbit & fluentd (#771)

### ENHANCEMENT
- EnvVars support in fluentbit helm template (#706)
- Add uri field for each telemetry type in opentelemetry plugin, remove old uri field (#708)
- Adjust fluentd watcher dependabot (#716)
- remove the deprecated -i flag in go build (#720)
- Adjust fluentd arm64 image build timeout (#721)
- Adjust edge metrics collection config (#736)
- Add some fluentbit helm opts (#743)
- Align CRDs and Operator with the fluentbit loki output (#756)
- Fluent-bit upgrade to v2.1.4 (#767)
- build(deps): Bump k8s.io/apimachinery from 0.26.3 to 0.27.1 (#701)
- build(deps): Bump helm/chart-testing-action from 2.1.0 to 2.4.0 (#710)
- build(deps): Bump k8s.io/klog/v2 from 2.90.1 to 2.100.1 (#712)
- build(deps): Bump golang from 1.20.3-alpine3.17 to 1.20.4-alpine3.17 in /cmd/fluent-manager (#713)
- build(deps): Bump golang from 1.20.3-alpine3.16 to 1.20.4-alpine3.16 in /cmd/fluent-watcher/fluentbit (#714)
- build(deps): Bump golang from 1.20.2 to 1.20.4 in /docs/best-practice/forwarding-logs-via-http (#715)
- build(deps): Bump golang from 1.19.2-alpine3.16 to 1.20.4-alpine3.16 in /cmd/fluent-watcher/fluentd (#717)
- build(deps): Bump arm64v8/ruby from 3.1-slim-bullseye to 3.2-slim-bullseye in /cmd/fluent-watcher/fluentd (#718)
- build(deps): Bump alpine from 3.16 to 3.17 in /cmd/fluent-watcher/fluentd (#719)
- build(deps): Bump github.com/onsi/gomega from 1.27.6 to 1.27.7 (#748)
- build(deps): Bump k8s.io/apimachinery from 0.27.1 to 0.27.2 (#751)
- build(deps): Bump helm/kind-action from 1.5.0 to 1.7.0 (#765)

### BUGFIX
- Fix: Fix missing log level (#691)
- Fix: Fix rewrite_tag match rule and trim start of string pattern (#692)
- Fix(docs): Update cluster outputs docs link (#724)
- Fix: dereference pointers in parser filter plugin for fluentd (#745)
- Fix: fluentbit namespace-logging: only generate rewrite tag config once (#746)
- Fix: minor typo fix for firehose (#764)
- Fix: fix typo for estimate_current_event in fluentd (#769)

## 2.2.0 / 2023-04-07
### Features
- Feat: Adding Fluentd cloudwatch plugin (#586)
Expand Down
13 changes: 9 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
VERSION?=$(shell cat VERSION | tr -d " \t\n\r")
# Image URL to use all building/pushing image targets
FB_IMG ?= kubesphere/fluent-bit:v2.0.11
FB_IMG_DEBUG ?= kubesphere/fluent-bit:v2.0.11-debug
FB_IMG ?= kubesphere/fluent-bit:v2.1.6
FB_IMG_DEBUG ?= kubesphere/fluent-bit:v2.1.6-debug
FD_IMG ?= kubesphere/fluentd:v1.15.3
FO_IMG ?= kubesphere/fluent-operator:$(VERSION)
FD_IMG_BASE ?= kubesphere/fluentd:v1.15.3-arm64-base
Expand Down Expand Up @@ -150,6 +150,11 @@ CONTROLLER_GEN = $(shell pwd)/bin/controller-gen
controller-gen: go-deps ## Download controller-gen locally if necessary.
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/[email protected])

GINKGO = $(shell pwd)/bin/ginkgo
ginkgo: go-deps ## Download controller-gen locally if necessary.
$(call go-get-tool,$(GINKGO),github.com/onsi/ginkgo/[email protected])


KUSTOMIZE = $(shell pwd)/bin/kustomize
kustomize: go-deps ## Download kustomize locally if necessary.
$(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/[email protected])
Expand Down Expand Up @@ -179,10 +184,10 @@ go-deps: # download go dependencies
docs-update: # update api docs
go run ./cmd/doc-gen/main.go

e2e: # make e2e tests
e2e: ginkgo # make e2e tests
chmod a+x tests/scripts/fluentd_e2e.sh && bash tests/scripts/fluentd_e2e.sh

helm-e2e: # make helm e2e tests
helm-e2e: ginkgo # make helm e2e tests
chmod a+x tests/scripts/fluentd_helm_e2e.sh && bash tests/scripts/fluentd_helm_e2e.sh

update-helm-package: # update helm repo
Expand Down
1 change: 1 addition & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ This page describes the release process and the currently planned schedule for u
| v2.0.1 | 2023-02-08 | Elon Cheng (GitHub: @wenchajun) |
| v2.1.0 | 2023-03-13 | Elon Cheng (GitHub: @wenchajun) |
| v2.2.0 | 2023-04-07 | Elon Cheng (GitHub: @wenchajun) |
| v2.3.0 | 2023-06-05 | Elon Cheng (GitHub: @wenchajun) |

# How to cut a new release

Expand Down
5 changes: 5 additions & 0 deletions apis/fluentbit/v1alpha2/clusterfilter_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ type FilterSpec struct {
// A regular expression to match against the tags of incoming records.
// Use this option if you want to use the full regex syntax.
MatchRegex string `json:"matchRegex,omitempty"`
// +kubebuilder:validation:Enum:=off;error;warning;info;debug;trace
LogLevel string `json:"logLevel,omitempty"`
// A set of filter plugins in order.
FilterItems []FilterItem `json:"filters,omitempty"`
}
Expand Down Expand Up @@ -117,6 +119,9 @@ func (list ClusterFilterList) Load(sl plugins.SecretLoader) (string, error) {
if p.Name() != "" {
buf.WriteString(fmt.Sprintf(" Name %s\n", p.Name()))
}
if item.Spec.LogLevel != "" {
buf.WriteString(fmt.Sprintf(" Log_Level %s\n", item.Spec.LogLevel))
}
if item.Spec.Match != "" {
buf.WriteString(fmt.Sprintf(" Match %s\n", item.Spec.Match))
}
Expand Down
48 changes: 47 additions & 1 deletion apis/fluentbit/v1alpha2/clusterfluentbitconfig_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,27 @@ type FluentBitConfigSpec struct {
Namespace *string `json:"namespace,omitempty"`
}

type Storage struct {
// Select an optional location in the file system to store streams and chunks of data/
Path string `json:"path,omitempty"`
// Configure the synchronization mode used to store the data into the file system
// +kubebuilder:validation:Enum:=normal;full
Sync string `json:"sync,omitempty"`
// Enable the data integrity check when writing and reading data from the filesystem
// +kubebuilder:validation:Enum:=on;off
Checksum string `json:"checksum,omitempty"`
// This option configure a hint of maximum value of memory to use when processing these records
BacklogMemLimit string `json:"backlogMemLimit,omitempty"`
// If the input plugin has enabled filesystem storage type, this property sets the maximum number of Chunks that can be up in memory
MaxChunksUp *int64 `json:"maxChunksUp,omitempty"`
// If http_server option has been enabled in the Service section, this option registers a new endpoint where internal metrics of the storage layer can be consumed
// +kubebuilder:validation:Enum:=on;off
Metrics string `json:"metrics,omitempty"`
// When enabled, irrecoverable chunks will be deleted during runtime, and any other irrecoverable chunk located in the configured storage path directory will be deleted when Fluent-Bit starts.
// +kubebuilder:validation:Enum:=on;off
DeleteIrrecoverableChunks string `json:"deleteIrrecoverableChunks,omitempty"`
}

type Service struct {
// If true go to background on start
Daemon *bool `json:"daemon,omitempty"`
Expand Down Expand Up @@ -76,10 +97,12 @@ type Service struct {
// File to log diagnostic output
LogFile string `json:"logFile,omitempty"`
// Diagnostic level (error/warning/info/debug/trace)
// +kubebuilder:validation:Enum:=error;warning;info;debug;trace
// +kubebuilder:validation:Enum:=off;error;warning;info;debug;trace
LogLevel string `json:"logLevel,omitempty"`
// Optional 'parsers' config file (can be multiple)
ParsersFile string `json:"parsersFile,omitempty"`
// Configure a global environment for the storage layer in Service. It is recommended to configure the volume and volumeMount separately for this storage. The hostPath type should be used for that Volume in Fluentbit daemon set.
Storage *Storage `json:"storage,omitempty"`
}

// +kubebuilder:object:root=true
Expand Down Expand Up @@ -149,6 +172,29 @@ func (s *Service) Params() *params.KVs {
if s.ParsersFile != "" {
m.Insert("Parsers_File", s.ParsersFile)
}
if s.Storage != nil {
if s.Storage.Path != "" {
m.Insert("storage.path", s.Storage.Path)
}
if s.Storage.Sync != "" {
m.Insert("storage.sync", s.Storage.Sync)
}
if s.Storage.Checksum != "" {
m.Insert("storage.checksum", s.Storage.Checksum)
}
if s.Storage.BacklogMemLimit != "" {
m.Insert("storage.backlog.mem_limit", s.Storage.BacklogMemLimit)
}
if s.Storage.Metrics != "" {
m.Insert("storage.metrics", s.Storage.Metrics)
}
if s.Storage.MaxChunksUp != nil {
m.Insert("storage.max_chunks_up", fmt.Sprint(*s.Storage.MaxChunksUp))
}
if s.Storage.DeleteIrrecoverableChunks != "" {
m.Insert("storage.delete_irrecoverable_chunks", s.Storage.DeleteIrrecoverableChunks)
}
}
return m
}

Expand Down
5 changes: 5 additions & 0 deletions apis/fluentbit/v1alpha2/clusterinput_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ type InputSpec struct {
// A user friendly alias name for this input plugin.
// Used in metrics for distinction of each configured input.
Alias string `json:"alias,omitempty"`
// +kubebuilder:validation:Enum:=off;error;warning;info;debug;trace
LogLevel string `json:"logLevel,omitempty"`
// Dummy defines Dummy Input configuration.
Dummy *input.Dummy `json:"dummy,omitempty"`
// Tail defines Tail Input configuration.
Expand Down Expand Up @@ -101,6 +103,9 @@ func (list ClusterInputList) Load(sl plugins.SecretLoader) (string, error) {
if item.Spec.Alias != "" {
buf.WriteString(fmt.Sprintf(" Alias %s\n", item.Spec.Alias))
}
if item.Spec.LogLevel != "" {
buf.WriteString(fmt.Sprintf(" Log_Level %s\n", item.Spec.LogLevel))
}
kvs, err := p.Params(sl)
if err != nil {
return err
Expand Down
16 changes: 15 additions & 1 deletion apis/fluentbit/v1alpha2/clusteroutput_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ type OutputSpec struct {
// A user friendly alias name for this output plugin.
// Used in metrics for distinction of each configured output.
Alias string `json:"alias,omitempty"`
// Set the plugin's logging verbosity level. Allowed values are: off, error, warn, info, debug and trace, Defaults to the SERVICE section's Log_Level
// +kubebuilder:validation:Enum:=off;error;warning;info;debug;trace
LogLevel string `json:"logLevel,omitempty"`

// AzureBlob defines AzureBlob Output Configuration
AzureBlob *output.AzureBlob `json:"azureBlob,omitempty"`
// AzureLogAnalytics defines AzureLogAnalytics Output Configuration
Expand Down Expand Up @@ -72,10 +76,14 @@ type OutputSpec struct {
Loki *output.Loki `json:"loki,omitempty"`
// Syslog defines Syslog Output configuration.
Syslog *output.Syslog `json:"syslog,omitempty"`
// InfluxDB defines InfluxDB Output configuration.
InfluxDB *output.InfluxDB `json:"influxDB,omitempty"`
// DataDog defines DataDog Output configuration.
DataDog *output.DataDog `json:"datadog,omitempty"`
// Firehose defines Firehose Output configuration.
Fireose *output.Firehose `json:"firehose,omitempty"`
Firehose *output.Firehose `json:"firehose,omitempty"`
// Kinesis defines Kinesis Output configuration.
Kinesis *output.Kinesis `json:"kinesis,omitempty"`
// Stackdriver defines Stackdriver Output Configuration
Stackdriver *output.Stackdriver `json:"stackdriver,omitempty"`
// Splunk defines Splunk Output Configuration
Expand All @@ -86,6 +94,9 @@ type OutputSpec struct {
OpenTelemetry *output.OpenTelemetry `json:"opentelemetry,omitempty"`
// PrometheusRemoteWrite_types defines Prometheus Remote Write configuration.
PrometheusRemoteWrite *output.PrometheusRemoteWrite `json:"prometheusRemoteWrite,omitempty"`
// S3 defines S3 Output configuration.
S3 *output.S3 `json:"s3,omitempty"`

// CustomPlugin defines Custom Output configuration.
CustomPlugin *custom.CustomPlugin `json:"customPlugin,omitempty"`
}
Expand Down Expand Up @@ -139,6 +150,9 @@ func (list ClusterOutputList) Load(sl plugins.SecretLoader) (string, error) {
if item.Spec.Match != "" {
buf.WriteString(fmt.Sprintf(" Match %s\n", item.Spec.Match))
}
if item.Spec.LogLevel != "" {
buf.WriteString(fmt.Sprintf(" Log_Level %s\n", item.Spec.LogLevel))
}
if item.Spec.MatchRegex != "" {
buf.WriteString(fmt.Sprintf(" Match_Regex %s\n", item.Spec.MatchRegex))
}
Expand Down
2 changes: 2 additions & 0 deletions apis/fluentbit/v1alpha2/collector_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ type CollectorSpec struct {
Ports []corev1.ContainerPort `json:"ports,omitempty"`
// Service represents configurations on the fluent-bit service.
Service CollectorService `json:"service,omitempty"`
// SchedulerName represents the desired scheduler for the Fluentbit collector pods
SchedulerName string `json:"schedulerName,omitempty"`
}

// CollectorService defines the service of the FluentBit
Expand Down
4 changes: 4 additions & 0 deletions apis/fluentbit/v1alpha2/fluentbit_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ type FluentBitSpec struct {
Labels map[string]string `json:"labels,omitempty"`
// SecurityContext holds pod-level security attributes and common container settings.
SecurityContext *corev1.PodSecurityContext `json:"securityContext,omitempty"`
// ContainerSecurityContext holds container-level security attributes.
ContainerSecurityContext *corev1.SecurityContext `json:"containerSecurityContext,omitempty"`
// Host networking is requested for this pod. Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false.
HostNetwork bool `json:"hostNetwork,omitempty"`
// EnvVars represent environment variables that can be passed to fluentbit pods.
Expand All @@ -96,6 +98,8 @@ type FluentBitSpec struct {
MetricsPort int32 `json:"metricsPort,omitempty"`
// Service represents configurations on the fluent-bit service.
Service FluentBitService `json:"service,omitempty"`
// SchedulerName represents the desired scheduler for fluent-bit pods.
SchedulerName string `json:"schedulerName,omitempty"`
}

// FluentBitService defines the service of the FluentBit
Expand Down
2 changes: 1 addition & 1 deletion apis/fluentbit/v1alpha2/plugins/custom/custom_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
// +kubebuilder:object:generate:=true

// CustomPlugin is used to support filter plugins that are not implemented yet. <br />
// **For example usage, refer to https://github.com/jjsiv/fluent-operator/blob/master/docs/best-practice/custom-plugin.md**
// **For example usage, refer to https://github.com/fluent/fluent-operator/blob/master/docs/best-practice/custom-plugin.md**
type CustomPlugin struct {
Config string `json:"config,omitempty"`
}
Expand Down
12 changes: 12 additions & 0 deletions apis/fluentbit/v1alpha2/plugins/input/systemd_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ type Systemd struct {
// Remove the leading underscore of the Journald field (key). For example the Journald field _PID becomes the key PID.
// +kubebuilder:validation:Enum:=on;off
StripUnderscores string `json:"stripUnderscores,omitempty"`
// Specify the buffering mechanism to use. It can be memory or filesystem
// +kubebuilder:validation:Enum:=filesystem;memory
StorageType string `json:"storageType,omitempty"`
// Specifies if the input plugin should be paused (stop ingesting new data) when the storage.max_chunks_up value is reached.
// +kubebuilder:validation:Enum:=on;off
PauseOnChunksOverlimit string `json:"pauseOnChunksOverlimit,omitempty"`
}

func (_ *Systemd) Name() string {
Expand Down Expand Up @@ -85,6 +91,12 @@ func (s *Systemd) Params(_ plugins.SecretLoader) (*params.KVs, error) {
if s.StripUnderscores != "" {
kvs.Insert("Strip_Underscores", s.StripUnderscores)
}
if s.StorageType != "" {
kvs.Insert("storage.type", s.StorageType)
}
if s.PauseOnChunksOverlimit != "" {
kvs.Insert("storage.pause_on_chunks_overlimit", s.PauseOnChunksOverlimit)
}

return kvs, nil
}
12 changes: 12 additions & 0 deletions apis/fluentbit/v1alpha2/plugins/input/tail_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@ type Tail struct {
// This will help to reassembly multiline messages originally split by Docker or CRI
//Specify one or Multiline Parser definition to apply to the content.
MultilineParser string `json:"multilineParser,omitempty"`
// Specify the buffering mechanism to use. It can be memory or filesystem
// +kubebuilder:validation:Enum:=filesystem;memory
StorageType string `json:"storageType,omitempty"`
// Specifies if the input plugin should be paused (stop ingesting new data) when the storage.max_chunks_up value is reached.
// +kubebuilder:validation:Enum:=on;off
PauseOnChunksOverlimit string `json:"pauseOnChunksOverlimit,omitempty"`
}

func (_ *Tail) Name() string {
Expand Down Expand Up @@ -179,5 +185,11 @@ func (t *Tail) Params(_ plugins.SecretLoader) (*params.KVs, error) {
if t.MultilineParser != "" {
kvs.Insert("multiline.parser", t.MultilineParser)
}
if t.StorageType != "" {
kvs.Insert("storage.type", t.StorageType)
}
if t.PauseOnChunksOverlimit != "" {
kvs.Insert("storage.pause_on_chunks_overlimit", t.PauseOnChunksOverlimit)
}
return kvs, nil
}
Loading