Skip to content

Commit 439476d

Browse files
committed
fix(fluentbit): build charts error
1 parent 1b15bb3 commit 439476d

12 files changed

Lines changed: 37 additions & 37 deletions

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ RUN export GO111MODULE=on \
1111
&& init-stack go mod vendor \
1212
&& init-stack go build \
1313
-ldflags "-X main.Revision=${BUILD_TAG} -X main.BuildDate=${BUILD_DATE}" \
14-
-buildmode=c-shared -o /var/lib/fluent-bit/out_drycc.so drycc.go
14+
-buildmode=c-shared -o /var/lib/fluent-bit/out_drycc.so plugin/out_drycc.go
1515

1616

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

Makefile

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,51 @@
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/*)
45
DRYCC_REGISTRY ?= ${DEV_REGISTRY}
56
IMAGE_PREFIX ?= drycc
67
PLATFORM ?= linux/amd64,linux/arm64
78
REPO_PATH := github.com/drycc/${SHORT_NAME}
8-
DEV_ENV_BUILD = go build -ldflags "-X 'main.Revision=$(BUILD_TAG)' -X 'main.BuildDate=$(BUILD_DATE)'" -buildmode=c-shared -o _dist/out_drycc.so .
9+
DEV_ENV_BUILD = go build -ldflags "-X 'main.Revision=$(BUILD_TAG)' -X 'main.BuildDate=$(BUILD_DATE)'" -buildmode=c-shared -o _dist/out_drycc.so plugin/out_drycc.go
910
DEV_ENV_IMAGE := ${DEV_REGISTRY}/drycc/go-dev
1011
DEV_ENV_WORK_DIR := /opt/drycc/go/src/${REPO_PATH}
1112
DEV_ENV_PREFIX := docker run --rm -v ${CURDIR}:${DEV_ENV_WORK_DIR} -w ${DEV_ENV_WORK_DIR}
1213

1314
include versioning.mk
1415

16+
1517
build: docker-build
1618
push: docker-push
1719

18-
bootstrap:
20+
check-docker:
21+
@if [ -z $$(which docker) ]; then \
22+
echo "Missing docker client which is required for development"; \
23+
exit 2; \
24+
fi
25+
26+
bootstrap: check-docker
1927
$(DEV_ENV_PREFIX) $(DEV_ENV_IMAGE) go mod vendor
2028

21-
build-binary:
29+
build-binary: check-docker
2230
$(DEV_ENV_PREFIX) $(DEV_ENV_IMAGE) $(DEV_ENV_BUILD)
2331

24-
docker-build:
32+
docker-build: check-docker
2533
docker build --build-arg CODENAME=${CODENAME} --build-arg BUILD_TAG=${BUILD_TAG} --build-arg BUILD_DATE=${BUILD_DATE} -t ${IMAGE} .
2634
docker tag ${IMAGE} ${MUTABLE_IMAGE}
2735

28-
docker-buildx:
36+
docker-buildx: check-docker
2937
docker buildx build --platform ${PLATFORM} --build-arg CODENAME=${CODENAME} --build-arg BUILD_TAG=${BUILD_TAG} --build-arg BUILD_DATE=${BUILD_DATE} -t ${IMAGE} . --push
3038

31-
test: docker-build
32-
_scripts/tests.sh test-unit ${IMAGE}
39+
test: test-style
40+
41+
test-style: check-docker
42+
$(DEV_ENV_PREFIX) $(DEV_ENV_IMAGE) make style-check
43+
44+
style-check:
45+
gofmt -l -w -s plugin
46+
go vet plugin
47+
lint
48+
shellcheck $(SHELL_SCRIPTS)
3349

3450
clean:
3551
rm -rf _dist

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,20 @@ applications on your own servers. Drycc builds on [Kubernetes](http://kubernetes
66
a lightweight, [Heroku-inspired](http://heroku.com) workflow.
77

88
## About
9-
This is an centos7 based image for running [fluentbit](http://fluentbit.io). It is built for the purpose of running on a kubernetes cluster.
9+
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

1111
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.
1212

1313

14-
## Chart values
14+
## Helm Chart
15+
Once you have installed the Helm client, you can deploy a Fluentbit Chart into a Kubernetes cluster.
1516

17+
### Chart repos
18+
19+
* Stable Charts: oci://registry.drycc.cc/charts/fluentbit
20+
* Testing Charts: oci://registry.drycc.cc/charts-testing/fluentbit
21+
22+
### Chart values
1623
```sh
1724
helm show values oci://registry.drycc.cc/charts-testing/fluentbit
1825
```

_scripts/tests.sh

Lines changed: 0 additions & 26 deletions
This file was deleted.

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

File renamed without changes.

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

File renamed without changes.

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

File renamed without changes.

charts/fluentd/templates/logger-fluentbit-daemon.yaml renamed to charts/fluentbit/templates/logger-fluentbit-daemon.yaml

File renamed without changes.

charts/fluentd/templates/logger-fluentbit-service-account.yaml renamed to charts/fluentbit/templates/logger-fluentbit-service-account.yaml

File renamed without changes.

0 commit comments

Comments
 (0)