Skip to content

Commit f78edc6

Browse files
committed
chore(fluentbit): change fluentbit match
1 parent 30cf4a7 commit f78edc6

3 files changed

Lines changed: 11 additions & 6 deletions

File tree

Dockerfile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,20 @@ FROM registry.drycc.cc/drycc/base:${CODENAME}
1919
ENV DRYCC_UID=1001 \
2020
DRYCC_GID=1001 \
2121
FLUENT_BIT_VERSION=2.1.8 \
22-
FLUENT_BIT_PLUGINS_PATH=/opt/drycc/fluent-bit/plugins
22+
DRYCC_HOME_DIR=/opt/drycc \
23+
FLUENT_BIT_PLUGINS_PATH=${DRYCC_HOME_DIR}/fluent-bit/plugins
24+
25+
RUN groupadd drycc --gid ${DRYCC_GID} \
26+
&& useradd drycc -u ${DRYCC_UID} -g ${DRYCC_GID} -s /bin/bash -m -d ${DRYCC_HOME_DIR}
2327

2428
RUN install-stack fluent-bit ${FLUENT_BIT_VERSION} \
2529
&& mkdir -p ${FLUENT_BIT_PLUGINS_PATH} \
26-
&& chown -R ${DRYCC_UID}:${DRYCC_GID} /opt/drycc/fluent-bit
30+
&& chown -R ${DRYCC_UID}:${DRYCC_GID} ${DRYCC_HOME_DIR}/fluent-bit
2731

2832
COPY --chown=${DRYCC_UID}:${DRYCC_GID} --from=build /var/lib/fluent-bit/out_drycc.so ${FLUENT_BIT_PLUGINS_PATH}
2933

3034
ADD rootfs /
35+
3136
USER ${DRYCC_UID}
3237

3338
CMD ["/usr/local/bin/boot"]

charts/fluentbit/values.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ config:
3030
DB.locking true
3131
Offset_Key offset
3232
Tag kubernetes.*
33-
Read_from_Head true
33+
Read_from_Head false
3434
multiline.parser docker,cri
3535
3636
## https://docs.fluentbit.io/manual/pipeline/filters
@@ -48,7 +48,7 @@ config:
4848
outputs: |
4949
[OUTPUT]
5050
Name drycc
51-
Match *
51+
Match kubernetes.*
5252
Addrs ${DRYCC_REDIS_ADDRS}
5353
Stream logs
5454
Max_Len 3000

rootfs/opt/drycc/fluent-bit/templates/fluent-bit.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
DB.locking true
1313
Offset_Key offset
1414
Tag kubernetes.*
15-
Read_from_Head true
15+
Read_from_Head false
1616
multiline.parser docker,cri
1717

1818
[FILTER]
@@ -26,7 +26,7 @@
2626

2727
[OUTPUT]
2828
Name drycc
29-
Match *
29+
Match kubernetes.*
3030
Addrs ${DRYCC_REDIS_ADDRS}
3131
Stream logs
3232
Max_Len 3000

0 commit comments

Comments
 (0)