Skip to content

Commit 59419c8

Browse files
committed
chore(fluentbit): use quickwit replace redis stream
1 parent 1f8c286 commit 59419c8

22 files changed

Lines changed: 294 additions & 340 deletions

Dockerfile

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,22 @@ RUN export GO111MODULE=on \
1010
&& init-stack go mod vendor \
1111
&& init-stack go build \
1212
-ldflags "-X main.Revision=${BUILD_TAG} -X main.BuildDate=${BUILD_DATE}" \
13-
-buildmode=c-shared -o /var/lib/fluent-bit/out_drycc.so plugin/out_drycc.go
13+
-buildmode=c-shared -o /var/lib/fluent-bit/out_quickwit.so plugin/out_quickwit.go
1414

1515

1616
FROM registry.drycc.cc/drycc/base:${CODENAME}
1717

1818
ENV DRYCC_UID=1001 \
1919
DRYCC_GID=1001 \
2020
FLUENT_BIT_VERSION=4.0.2 \
21-
DRYCC_HOME_DIR=/opt/drycc \
22-
FLUENT_BIT_PLUGINS_PATH=${DRYCC_HOME_DIR}/fluent-bit/plugins
21+
DRYCC_HOME_DIR=/opt/drycc
2322

2423
RUN groupadd drycc --gid ${DRYCC_GID} \
2524
&& useradd drycc -u ${DRYCC_UID} -g ${DRYCC_GID} -s /bin/bash -m -d ${DRYCC_HOME_DIR}
2625

2726
RUN install-stack fluent-bit ${FLUENT_BIT_VERSION} \
28-
&& mkdir -p ${FLUENT_BIT_PLUGINS_PATH} \
2927
&& chown -R ${DRYCC_UID}:${DRYCC_GID} ${DRYCC_HOME_DIR}/fluent-bit
3028

31-
COPY --chown=${DRYCC_UID}:${DRYCC_GID} --from=build /var/lib/fluent-bit/out_drycc.so ${FLUENT_BIT_PLUGINS_PATH}
32-
33-
ADD rootfs /
29+
COPY --chown=${DRYCC_UID}:${DRYCC_GID} --from=build /var/lib/fluent-bit/out_quickwit.so /opt/drycc/fluent-bit/lib
3430

3531
USER ${DRYCC_UID}
36-
37-
CMD ["/usr/local/bin/boot"]

Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
SHORT_NAME ?= fluentbit
22
BUILD_TAG ?= git-$(shell git rev-parse --short HEAD)
33
BUILD_DATE := $(shell date --rfc-3339=ns | tr " " T)
4-
SHELL_SCRIPTS = $(wildcard rootfs/usr/local/bin/*)
54
DRYCC_REGISTRY ?= ${DEV_REGISTRY}
65
IMAGE_PREFIX ?= drycc
76
PLATFORM ?= linux/amd64,linux/arm64
@@ -42,7 +41,6 @@ style-check:
4241
gofmt -l -w -s plugin
4342
go vet plugin
4443
lint
45-
shellcheck $(SHELL_SCRIPTS)
4644

4745
clean:
4846
rm -rf _dist

README.md

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ a lightweight, [Heroku-inspired](http://heroku.com) workflow.
88
## About
99
This is an debian based image for running [fluentbit](http://fluentbit.io). It is built for the purpose of running on a kubernetes cluster.
1010

11-
This image is in with [workflow](https://github.com/drycc/workflow) v2 to send all log data to the [logger](https://github.com/drycc/logger) component.
11+
This image is in with [workflow](https://github.com/drycc/workflow) v2 to send all log data to the [quickwit](https://github.com/drycc/quickwit) component.
1212

1313

1414
## Helm Chart
@@ -23,12 +23,3 @@ Once you have installed the Helm client, you can deploy a Fluentbit Chart into a
2323
```sh
2424
helm show values oci://registry.drycc.cc/charts-testing/fluentbit
2525
```
26-
27-
## Plugins
28-
29-
Fluent Bit currently supports integration of Golang plugins built as shared objects for output plugins only. The interface for the Golang plugins is currently under development but is functional.
30-
31-
### Drycc Output
32-
Drycc output is a custom fluentbit plugin that was written to forward data directly to drycc components while filtering out data that we did not care about. We have 2 pieces of information we care about currently.
33-
34-
Logs from applications that are written to stdout within the container and the controller logs that represent actions against those applications. These logs are sent to an internal messaging system ([VALKEY](https://valkey.io)) on a configurable topic. The logger component then reads those messages and stores the data in an ring buffer.

charts/fluentbit/Chart.lock

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
dependencies:
2+
- name: common
3+
repository: oci://registry.drycc.cc/charts
4+
version: 1.1.4
5+
digest: sha256:d101f4d0e796524281dec60d636aa301ba92a42d7c0468aa5072e721bdd48a6b
6+
generated: "2025-07-01T16:47:29.929607311+08:00"

charts/fluentbit/Chart.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ home: https://github.com/drycc/fluentbit
33
apiVersion: v2
44
appVersion: 1.0.0
55
version: v1.0.0
6+
dependencies:
7+
- name: common
8+
repository: oci://registry.drycc.cc/charts
9+
version: ~1.1.2
610
description: Log shipping mechanism for Drycc Workflow.
711
maintainers:
812
- name: Drycc Team
13.4 KB
Binary file not shown.
Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,8 @@
11
{{/* Generate fluentbit envs */}}
22
{{- define "fluentbit.envs" }}
33
env:
4-
{{- if (.Values.valkeyUrl) }}
5-
- name: DRYCC_VALKEY_URL
4+
- name: NAMESPACE
65
valueFrom:
7-
secretKeyRef:
8-
name: logger-fluentbit-creds
9-
key: valkey-url
10-
{{- else if .Values.valkey.enabled }}
11-
- name: VALKEY_PASSWORD
12-
valueFrom:
13-
secretKeyRef:
14-
name: valkey-creds
15-
key: password
16-
- name: DRYCC_VALKEY_URL
17-
value: "redis://:$(VALKEY_PASSWORD)@drycc-valkey.{{.Release.Namespace}}.svc.{{.Values.global.clusterDomain}}:16379/2"
18-
{{- end }}
6+
fieldRef:
7+
fieldPath: metadata.namespace
198
{{- end }}

charts/fluentbit/templates/logger-fluentbit-clusterrole.yaml renamed to charts/fluentbit/templates/fluentbit-clusterrole.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
kind: ClusterRole
22
apiVersion: rbac.authorization.k8s.io/v1
33
metadata:
4-
name: {{ printf "%s:drycc-logger-fluentbit" .Release.Namespace | quote }}
4+
name: {{ printf "%s:drycc-fluentbit" .Release.Namespace | quote }}
55
labels:
6-
app: drycc-logger-fluentbit
6+
app: drycc-fluentbit
77
heritage: drycc
88
rules:
99
- apiGroups: [""]

charts/fluentbit/templates/logger-fluentbit-clusterrolebinding.yaml renamed to charts/fluentbit/templates/fluentbit-clusterrolebinding.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
kind: ClusterRoleBinding
22
apiVersion: rbac.authorization.k8s.io/v1
33
metadata:
4-
name: {{ printf "%s:drycc-logger-fluentbit" .Release.Namespace | quote }}
4+
name: {{ printf "%s:drycc-fluentbit" .Release.Namespace | quote }}
55
labels:
6-
app: drycc-logger-fluentbit
6+
app: drycc-fluentbit
77
heritage: drycc
88
roleRef:
99
apiGroup: rbac.authorization.k8s.io
1010
kind: ClusterRole
11-
name: {{ printf "%s:drycc-logger-fluentbit" .Release.Namespace | quote }}
11+
name: {{ printf "%s:drycc-fluentbit" .Release.Namespace | quote }}
1212
subjects:
1313
- kind: ServiceAccount
14-
name: drycc-logger-fluentbit
14+
name: drycc-fluentbit
1515
namespace: {{ .Release.Namespace }}

charts/fluentbit/templates/logger-fluentbit-configmap.yaml renamed to charts/fluentbit/templates/fluentbit-configmap.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v1
22
kind: ConfigMap
33
metadata:
4-
name: logger-fluentbit-config
4+
name: fluentbit-config
55
namespace: {{ .Release.Namespace }}
66
labels:
77
heritage: drycc

0 commit comments

Comments
 (0)