From 6bb90cfed03356a5a9f85a3cd415d0d0ae16b6dd Mon Sep 17 00:00:00 2001 From: Stefan Reimer Date: Fri, 28 Jan 2022 17:20:03 +0100 Subject: [PATCH] feat: version bump logging for 1.21 --- charts/kubezero-logging/Chart.yaml | 6 +- charts/kubezero-logging/README.md | 10 +- .../charts/fluent-bit/Chart.yaml | 8 +- .../charts/fluent-bit/README.md | 34 +++++++ .../charts/fluent-bit/templates/NOTES.txt | 3 +- .../charts/fluent-bit/templates/_helpers.tpl | 43 +++++++++ .../charts/fluent-bit/templates/_pod.tpl | 16 +++- .../templates/configmap-dashboards.yaml | 3 + .../fluent-bit/templates/configmap.yaml | 2 +- .../fluent-bit/templates/deployment.yaml | 2 + .../charts/fluent-bit/templates/hpa.yaml | 39 ++++++++ .../charts/fluent-bit/templates/ingress.yaml | 62 +++++++++++++ .../charts/fluent-bit/templates/pdb.yaml | 20 ++++ .../fluent-bit/templates/servicemonitor.yaml | 15 +++ .../charts/fluent-bit/values.yaml | 92 ++++++++++++++++++- .../charts/fluentd/Chart.yaml | 4 +- .../charts/fluentd/templates/NOTES.txt | 2 +- .../charts/fluentd/templates/_pod.tpl | 7 ++ .../charts/fluentd/templates/daemonset.yaml | 3 + .../charts/fluentd/templates/deployment.yaml | 3 + .../charts/fluentd/templates/statefulset.yaml | 5 +- .../charts/fluentd/values.yaml | 19 +++- charts/kubezero-logging/values.yaml | 2 +- 23 files changed, 375 insertions(+), 25 deletions(-) create mode 100644 charts/kubezero-logging/charts/fluent-bit/templates/hpa.yaml create mode 100644 charts/kubezero-logging/charts/fluent-bit/templates/ingress.yaml create mode 100644 charts/kubezero-logging/charts/fluent-bit/templates/pdb.yaml diff --git a/charts/kubezero-logging/Chart.yaml b/charts/kubezero-logging/Chart.yaml index bc41a53..4f7d026 100644 --- a/charts/kubezero-logging/Chart.yaml +++ b/charts/kubezero-logging/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: kubezero-logging description: KubeZero Umbrella Chart for complete EFK stack type: application -version: 0.7.16 +version: 0.7.17 appVersion: 1.6.0 home: https://kubezero.com icon: https://cdn.zero-downtime.net/assets/kubezero/logo-small-64.png @@ -23,9 +23,9 @@ dependencies: # repository: https://helm.elastic.co condition: eck-operator.enabled - name: fluentd - version: 0.3.0 + version: 0.3.5 condition: fluentd.enabled - name: fluent-bit - version: 0.19.2 + version: 0.19.18 condition: fluent-bit.enabled kubeVersion: ">= 1.18.0" diff --git a/charts/kubezero-logging/README.md b/charts/kubezero-logging/README.md index e9f69c8..452bcb4 100644 --- a/charts/kubezero-logging/README.md +++ b/charts/kubezero-logging/README.md @@ -1,6 +1,6 @@ # kubezero-logging -![Version: 0.7.16](https://img.shields.io/badge/Version-0.7.16-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.6.0](https://img.shields.io/badge/AppVersion-1.6.0-informational?style=flat-square) +![Version: 0.7.17](https://img.shields.io/badge/Version-0.7.17-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.6.0](https://img.shields.io/badge/AppVersion-1.6.0-informational?style=flat-square) KubeZero Umbrella Chart for complete EFK stack @@ -19,8 +19,8 @@ Kubernetes: `>= 1.18.0` | Repository | Name | Version | |------------|------|---------| | | eck-operator | 1.6.0 | -| | fluent-bit | 0.19.2 | -| | fluentd | 0.3.0 | +| | fluent-bit | 0.19.18 | +| | fluentd | 0.3.5 | | https://cdn.zero-downtime.net/charts/ | kubezero-lib | >= 0.1.3 | ## Changes from upstream @@ -59,7 +59,7 @@ Kubernetes: `>= 1.18.0` |-----|------|---------|-------------| | eck-operator.enabled | bool | `false` | | | eck-operator.installCRDs | bool | `false` | | -| eck-operator.nodeSelector."node-role.kubernetes.io/master" | string | `""` | | +| eck-operator.nodeSelector."node-role.kubernetes.io/control-plane" | string | `""` | | | eck-operator.tolerations[0].effect | string | `"NoSchedule"` | | | eck-operator.tolerations[0].key | string | `"node-role.kubernetes.io/master"` | | | elastic_password | string | `""` | | @@ -146,7 +146,7 @@ Kubernetes: `>= 1.18.0` | kibana.istio.enabled | bool | `false` | | | kibana.istio.gateway | string | `"istio-system/ingressgateway"` | | | kibana.istio.url | string | `""` | | -| version | string | `"7.13.4"` | | +| version | string | `"7.16.3"` | | ## Resources: diff --git a/charts/kubezero-logging/charts/fluent-bit/Chart.yaml b/charts/kubezero-logging/charts/fluent-bit/Chart.yaml index 5a2e752..ac3d6a5 100644 --- a/charts/kubezero-logging/charts/fluent-bit/Chart.yaml +++ b/charts/kubezero-logging/charts/fluent-bit/Chart.yaml @@ -1,9 +1,9 @@ annotations: artifacthub.io/changes: | - kind: changed - description: "Update Fluent Bit image to v1.8.9." + description: "Update fluent-bit image to 1.8.12." apiVersion: v1 -appVersion: 1.8.9 +appVersion: 1.8.12 description: Fast and lightweight log processor and forwarder or Linux, OSX and BSD family operating systems. home: https://fluentbit.io/ @@ -19,7 +19,9 @@ maintainers: name: naseemkullah - email: towmeykaw@gmail.com name: Towmeykaw +- email: steve.hipwell@gmail.com + name: stevehipwell name: fluent-bit sources: - https://github.com/fluent/fluent-bit/ -version: 0.19.2 +version: 0.19.18 diff --git a/charts/kubezero-logging/charts/fluent-bit/README.md b/charts/kubezero-logging/charts/fluent-bit/README.md index 0781cac..bf95f3c 100644 --- a/charts/kubezero-logging/charts/fluent-bit/README.md +++ b/charts/kubezero-logging/charts/fluent-bit/README.md @@ -21,3 +21,37 @@ helm install fluent-bit fluent/fluent-bit ```sh helm show values fluent/fluent-bit ``` + +## Using Lua scripts +Fluent Bit allows us to build filter to modify the incoming records using custom [Lua scripts.](https://docs.fluentbit.io/manual/pipeline/filters/lua) + +### How to use Lua scripts with this Chart + +First, you should add your Lua scripts to `luaScripts` in values.yaml, for example: + +```yaml +luaScripts: + filter_example.lua: | + function filter_name(tag, timestamp, record) + -- put your lua code here. + end +``` + +After that, the Lua scripts will be ready to be used as filters. So next step is to add your Fluent bit [filter](https://docs.fluentbit.io/manual/concepts/data-pipeline/filter) to `config.filters` in values.yaml, for example: + +```yaml +config: + filters: | + [FILTER] + Name lua + Match + script /fluent-bit/scripts/filter_example.lua + call filter_name +``` +Under the hood, the chart will: +- Create a configmap using `luaScripts`. +- Add a volumeMounts for each Lua scripts using the path `/fluent-bit/scripts/