Skip to content

Commit 4131c75

Browse files
authored
Merge pull request #228 from kube-logging/pepov-fluentbitagent
Update fluentbitagent references and fix persistent config
2 parents 79bd019 + 398e122 commit 4131c75

File tree

1 file changed

+61
-82
lines changed

1 file changed

+61
-82
lines changed

content/docs/logging-infrastructure/fluentbit.md

Lines changed: 61 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ To migrate your **spec.fluentbit** configuration from the Logging resource to a
3636

3737
```yaml
3838
apiVersion: logging.banzaicloud.io/v1beta1
39-
kind: Logging
39+
kind: FluentbitAgent
4040
metadata:
41-
name: example-logging-resource
41+
name: example
4242
spec:
43-
fluentd: {}
44-
fluentbit:
43+
inputTail:
44+
storage.type: filesystem
4545
positiondb:
4646
hostPath:
4747
path: ""
@@ -72,6 +72,8 @@ To migrate your **spec.fluentbit** configuration from the Logging resource to a
7272
# Use the name of the logging resource
7373
name: example-logging-resource
7474
spec:
75+
inputTail:
76+
storage.type: filesystem
7577
positiondb:
7678
hostPath:
7779
path: ""
@@ -100,16 +102,12 @@ Fluent Bit Kubernetes Filter allows you to enrich your log files with Kubernetes
100102
101103
```yaml
102104
apiVersion: logging.banzaicloud.io/v1beta1
103-
kind: Logging
105+
kind: FluentbitAgent
104106
metadata:
105-
name: default-logging-simple
107+
name: default
106108
spec:
107-
fluentd: {}
108-
fluentbit:
109-
filterKubernetes:
110-
Kube_URL: "https://kubernetes.default.svc:443"
111-
Match: "kube.*"
112-
controlNamespace: logging
109+
filterKubernetes:
110+
Kube_URL: "https://kubernetes.default.svc:443"
113111
```
114112
115113
For the detailed list of available parameters for this plugin, see {{% xref "/docs/configuration/crds/v1beta1/fluentbit_types.md#filterkubernetes" %}}.
@@ -121,16 +119,14 @@ The tail input plugin allows to monitor one or several text files. It has a simi
121119
122120
```yaml
123121
apiVersion: logging.banzaicloud.io/v1beta1
124-
kind: Logging
122+
kind: FluentbitAgent
125123
metadata:
126124
name: default-logging-simple
127125
spec:
128-
fluentd: {}
129-
fluentbit:
130-
inputTail:
131-
Refresh_Interval: "60"
132-
Rotate_Wait: "5"
133-
controlNamespace: logging
126+
inputTail:
127+
storage.type: filesystem
128+
Refresh_Interval: "60"
129+
Rotate_Wait: "5"
134130
```
135131
136132
For the detailed list of available parameters for this plugin, see {{% xref "/docs/configuration/crds/v1beta1/fluentbit_types.md#inputtail" %}}.
@@ -142,15 +138,14 @@ Buffering in Fluent Bit places the processed data into a temporal location until
142138

143139
```yaml
144140
apiVersion: logging.banzaicloud.io/v1beta1
145-
kind: Logging
141+
kind: FluentbitAgent
146142
metadata:
147143
name: default-logging-simple
148144
spec:
149-
fluentd: {}
150-
fluentbit:
151-
bufferStorage:
152-
storage.path: /buffers
153-
controlNamespace: logging
145+
inputTail:
146+
storage.type: filesystem
147+
bufferStorage:
148+
storage.path: /buffers
154149
```
155150

156151
For the detailed list of available parameters for this plugin, see {{% xref "/docs/configuration/crds/v1beta1/fluentbit_types.md#bufferstorage" %}}.
@@ -160,40 +155,34 @@ For the detailed list of available parameters for this plugin, see {{% xref "/do
160155

161156
```yaml
162157
apiVersion: logging.banzaicloud.io/v1beta1
163-
kind: Logging
158+
kind: FluentbitAgent
164159
metadata:
165160
name: default-logging-simple
166161
spec:
167-
fluentd: {}
168-
fluentbit:
169-
bufferStorageVolume:
170-
hostPath:
171-
path: "" # leave it empty to automatically generate
172-
positiondb:
173-
hostPath:
174-
path: "" # leave it empty to automatically generate
175-
controlNamespace: logging
162+
inputTail:
163+
storage.type: filesystem
164+
bufferStorageVolume:
165+
hostPath:
166+
path: "" # leave it empty to automatically generate
167+
positiondb:
168+
hostPath:
169+
path: "" # leave it empty to automatically generate
176170
```
177171

178172
## Custom Fluent Bit image
179173

180-
You can deploy custom images by overriding the default images using the following parameters in the fluentd or fluentbit sections of the logging resource.
181-
182-
The following example deploys a custom fluentd image:
174+
You can deploy custom images by overriding the default images using the following parameters.
183175

184176
```yaml
185177
apiVersion: logging.banzaicloud.io/v1beta1
186-
kind: Logging
178+
kind: FluentbitAgent
187179
metadata:
188180
name: default-logging-simple
189181
spec:
190-
fluentd:
191-
image:
192-
repository: banzaicloud/fluentd
193-
tag: v1.10.4-alpine-1
194-
pullPolicy: IfNotPresent
195-
fluentbit: {}
196-
controlNamespace: logging
182+
image:
183+
repository: fluent/fluent-bit
184+
tag: 2.1.8-debug
185+
pullPolicy: IfNotPresent
197186
```
198187

199188
## Volume Mount
@@ -202,17 +191,14 @@ Defines a pod volume mount. For example:
202191

203192
```yaml
204193
apiVersion: logging.banzaicloud.io/v1beta1
205-
kind: Logging
194+
kind: FluentbitAgent
206195
metadata:
207-
name: default-logging-tls
196+
name: default-logging
208197
spec:
209-
fluentd: {}
210-
fluentbit:
211-
extraVolumeMounts:
212-
- source: /opt/docker
213-
destination: /opt/docker
214-
readOnly: true
215-
controlNamespace: logging
198+
extraVolumeMounts:
199+
- destination: /data/docker/containers
200+
readOnly: true
201+
source: /data/docker/containers
216202
```
217203

218204
For the detailed list of available parameters for this plugin, see {{% xref "/docs/configuration/crds/v1beta1/fluentbit_types.md#volumemount" %}}.
@@ -221,15 +207,12 @@ For the detailed list of available parameters for this plugin, see {{% xref "/do
221207

222208
```yaml
223209
apiVersion: logging.banzaicloud.io/v1beta1
224-
kind: Logging
210+
kind: FluentbitAgent
225211
metadata:
226212
name: default-logging-simple
227213
spec:
228-
fluentd: {}
229-
fluentbit:
230-
annotations:
231-
my-annotations/enable: true
232-
controlNamespace: logging
214+
annotations:
215+
my-annotations/enable: true
233216
```
234217

235218
## KubernetesStorage
@@ -249,30 +232,26 @@ A [Probe](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#cont
249232

250233
```yaml
251234
apiVersion: logging.banzaicloud.io/v1beta1
252-
kind: Logging
235+
kind: FluentbitAgent
253236
metadata:
254237
name: default-logging-simple
255238
spec:
256-
fluentbit:
257-
livenessProbe:
258-
periodSeconds: 60
259-
initialDelaySeconds: 600
260-
exec:
261-
command:
262-
- "/bin/sh"
263-
- "-c"
264-
- >
265-
LIVENESS_THRESHOLD_SECONDS=${LIVENESS_THRESHOLD_SECONDS:-300};
266-
if [ ! -e /buffers ];
267-
then
268-
exit 1;
269-
fi;
270-
touch -d "${LIVENESS_THRESHOLD_SECONDS} seconds ago" /tmp/marker-liveness;
271-
if [ -z "$(find /buffers -type d -newer /tmp/marker-liveness -print -quit)" ];
272-
then
273-
exit 1;
274-
fi;
275-
controlNamespace: logging
239+
livenessProbe:
240+
periodSeconds: 60
241+
initialDelaySeconds: 600
242+
exec:
243+
command:
244+
- "/bin/sh"
245+
- "-c"
246+
- >
247+
LIVENESS_THRESHOLD_SECONDS=${LIVENESS_THRESHOLD_SECONDS:-300};
248+
if [ ! -e /buffers ]; then
249+
exit 1;
250+
fi;
251+
touch -d "${LIVENESS_THRESHOLD_SECONDS} seconds ago" /tmp/marker-liveness;
252+
if [ -z "$(find /buffers -type d -newer /tmp/marker-liveness -print -quit)" ]; then
253+
exit 1;
254+
fi;
276255
```
277256

278257
You can use the following parameters:

0 commit comments

Comments
 (0)