Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
16 changes: 3 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
VERSION?=$(shell cat VERSION | tr -d " \t\n\r")
# Image URL to use all building/pushing image targets
FB_IMG ?= kubespheredev/fluent-bit:v1.7.3
OP_IMG ?= kubespheredev/fluentbit-operator:$(VERSION)
MIGRATOR_IMG ?= kubespheredev/fluentbit-operator:migrator
FB_IMG ?= kubesphere/fluent-bit:v1.7.3
OP_IMG ?= kubesphere/fluentbit-operator:$(VERSION)
AMD64 ?= -amd64
# Produce CRDs that work back to Kubernetes 1.11 (no version conversion)
CRD_OPTIONS ?= "crd:trivialVersions=true"
Expand Down Expand Up @@ -71,12 +70,8 @@ build-fb:
build-op: test
docker buildx build --push --platform linux/amd64,linux/arm64 -f cmd/manager/Dockerfile . -t ${OP_IMG}

# Build amd64/arm64 Fluent Bit migtator container image
build-migtator: test
docker buildx build --push --platform linux/amd64,linux/arm64 -f cmd/migrator/Dockerfile . -t ${MIGRATOR_IMG}

# Build all amd64 docker images
build-amd64: build-op-amd64 build-migtator-amd64
build-amd64: build-op-amd64

# Build amd64 Fluent Bit container image
build-fb-amd64:
Expand All @@ -86,14 +81,9 @@ build-fb-amd64:
build-op-amd64: test
docker build -f cmd/manager/Dockerfile . -t ${OP_IMG}${AMD64}

# Build amd64 Fluent Bit migtator container image
build-migtator-amd64: test
docker build -f cmd/migrator/Dockerfile . -t ${MIGRATOR_IMG}${AMD64}

# Push the amd64 docker image
push-amd64:
docker push ${OP_IMG}${AMD64}
docker push ${MIGRATOR_IMG}${AMD64}

# find or download controller-gen
# download controller-gen if necessary
Expand Down
26 changes: 16 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,21 +53,25 @@ To enable fluent-bit to pick up and use the latest config whenever the fluent-bi

Kubernetes v1.16.13+ is necessary for running Fluent Bit Operator.

### Quick Start

The quick start instructs you to deploy fluent bit with `dummy` as input and `stdout` as output, which is equivalent to execute the binary with `fluent-bit -i dummy -o stdout`.
### Install

Install the latest stable version

```shell
kubectl apply -f https://raw.githubusercontent.com/kubesphere/fluentbit-operator/release-0.7/manifests/setup/setup.yaml
kubectl apply -f https://raw.githubusercontent.com/kubesphere/fluentbit-operator/release-0.7/manifests/quick-start/quick-start.yaml
```

Install the development version

```shell
kubectl apply -f https://raw.githubusercontent.com/kubesphere/fluentbit-operator/master/manifests/setup/setup.yaml
```

### Quick Start

The quick start instructs you to deploy fluent bit with `dummy` as input and `stdout` as output, which is equivalent to execute the binary with `fluent-bit -i dummy -o stdout`.

```shell
kubectl apply -f https://raw.githubusercontent.com/kubesphere/fluentbit-operator/master/manifests/quick-start/quick-start.yaml
```

Expand All @@ -81,18 +85,21 @@ Once everything is up, you'll observe messages in fluent bit pod logs like below
[0] my_dummy: [1587991570.000172328, {"message"=>"dummy"}]
```

Success!
It means the FluentBit Operator works properly if you see the above messages, you can delete the quick start test by

```shell
kubectl delete -f https://raw.githubusercontent.com/kubesphere/fluentbit-operator/master/manifests/quick-start/quick-start.yaml
```

### Logging Stack
### Collect Kubernetes logs

This guide provisions a logging pipeline including the Fluent Bit DaemonSet and its log input/filter/output configurations.
This guide provisions a logging pipeline including the Fluent Bit DaemonSet and its log input/filter/output configurations to collect Kubernetes logs including container logs and kubelet logs.

![logging stack](docs/images/logging-stack.svg)

> Note that you need a running Elasticsearch v5+ cluster to receive log data before start. **Remember to adjust [output-elasticsearch.yaml](manifests/logging-stack/output-elasticsearch.yaml) to your own es setup**. Kafka and Fluentd outputs are optional and are turned off by default.

```shell
kubectl apply -f manifests/setup
kubectl apply -f manifests/logging-stack
```

Expand All @@ -105,12 +112,11 @@ green open ks-logstash-log-2020.04.26 uwQuoO90TwyigqYRW7MDYQ 1 1 99937 0 31.2m

Success!

#### Auditd
#### Collect auditd logs

The Linux audit framework provides a CAPP-compliant (Controlled Access Protection Profile) auditing system that reliably collects information about any security-relevant (or non-security-relevant) event on a system. Refer to `manifests/logging-stack/auditd`, it supports a method for collecting audit logs from the Linux audit framework.

```shell
kubectl apply -f manifests/setup
kubectl apply -f manifests/logging-stack/auditd
```

Expand Down
27 changes: 0 additions & 27 deletions cmd/migrator/Dockerfile

This file was deleted.

222 changes: 0 additions & 222 deletions cmd/migrator/main.go

This file was deleted.