Skip to content

Commit

Permalink
feat(fluent-bit-aggregator): Fixed config (#720)
Browse files Browse the repository at this point in the history
Signed-off-by: Steve Hipwell <steve.hipwell@gmail.com>
  • Loading branch information
stevehipwell committed Jun 16, 2023
1 parent c4ccf23 commit 153202a
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 11 deletions.
6 changes: 6 additions & 0 deletions charts/fluent-bit-aggregator/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Security - In case of vulnerabilities.
-->

## [v0.3.4] - 2023-06-16

### Fixed

- Fixed config.

## [v0.3.3] - 2023-06-16

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions charts/fluent-bit-aggregator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: fluent-bit-aggregator
description: Helm chart for Fluent Bit running as an aggregation stateful set.
type: application
version: 0.3.3
version: 0.3.4
appVersion: 2.1.4
keywords:
- fluent
Expand All @@ -23,4 +23,4 @@ annotations:
artifacthub.io/alternativeName: fluent-bit
artifacthub.io/changes: |
- kind: fixed
description: "Fixed config mount to support hot-reload."
description: "Fixed config."
8 changes: 4 additions & 4 deletions charts/fluent-bit-aggregator/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# fluent-bit-aggregator

![Version: 0.3.3](https://img.shields.io/badge/Version-0.3.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.1.4](https://img.shields.io/badge/AppVersion-2.1.4-informational?style=flat-square)
![Version: 0.3.4](https://img.shields.io/badge/Version-0.3.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.1.4](https://img.shields.io/badge/AppVersion-2.1.4-informational?style=flat-square)

Helm chart for Fluent Bit running as an aggregation stateful set.

Expand All @@ -22,14 +22,14 @@ Helm chart for Fluent Bit running as an aggregation stateful set.
To install the chart using the recommended OCI method you can use the following command.

```shell
helm upgrade --install fluent-bit-aggregator oci://ghcr.io/stevehipwell/helm-charts/fluent-bit-aggregator --version 0.3.3
helm upgrade --install fluent-bit-aggregator oci://ghcr.io/stevehipwell/helm-charts/fluent-bit-aggregator --version 0.3.4
```

Alternativly you can use the legacy non-OCI method via the following commands.

```shell
helm repo add stevehipwell https://stevehipwell.github.io/helm-charts/
helm upgrade --install fluent-bit-aggregator stevehipwell/fluent-bit-aggregator --version 0.3.3
helm upgrade --install fluent-bit-aggregator stevehipwell/fluent-bit-aggregator --version 0.3.4
```

## Values
Expand All @@ -46,7 +46,7 @@ helm upgrade --install fluent-bit-aggregator stevehipwell/fluent-bit-aggregator
| commonLabels | object | `{}` | Labels to add to all chart resources. |
| config.customParsers | string | `nil` | Custom parsers to configure. |
| config.extraFiles | object | `{}` | Extra files to mount to /fluent-bit/etc |
| config.luaScripts | object | `{}` | Lua scripts to configure. |
| config.luaScripts | object | `{}` | Lua scripts to configure, these will be created at /fluent-bit/scripts and need to be referenced by an absolute path. |
| config.pipeline | string | See _values.yaml_ | Fluent Bit pipeline configuration. |
| config.service | object | See _values.yaml_ | Fluent Bit service configuration. |
| config.storage | bool | `true` | If `true`, filesystem storage will be enabled. |
Expand Down
4 changes: 2 additions & 2 deletions charts/fluent-bit-aggregator/templates/configmap-config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- $serviceConfig := merge (dict "daemon" false "http_server" true "http_Port" .Values.service.httpPort "storage.path" (ternary "/fluent-bit/data" "" .Values.config.storage) "parsers_file" "parsers.conf") .Values.config.service -}}
{{- $serviceConfig := merge (dict "daemon" false "http_server" true "http_Port" .Values.service.httpPort "storage.path" (ternary "/fluent-bit/data" "" .Values.config.storage) "parsers_file" "/fluent-bit/etc/parsers.conf") .Values.config.service -}}
apiVersion: v1
kind: ConfigMap
metadata:
Expand All @@ -13,7 +13,7 @@ data:
{{ printf "%s %s" $k (toString $v) }}
{{- end }}
{{- if .Values.config.customParsers }}
parsers_file custom-parsers.conf
parsers_file /fluent-bit/etc/conf/custom-parsers.conf
{{- end }}
{{ print "" }}
{{- (tpl .Values.config.pipeline .) | nindent 4 }}
Expand Down
8 changes: 7 additions & 1 deletion charts/fluent-bit-aggregator/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,16 @@ spec:
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if or (not .Values.hotReload.enabled) .Values.podAnnotations }}
annotations:
{{- if not .Values.hotReload.enabled }}
checksum/config: {{ include (print $.Template.BasePath "/configmap-config.yaml") . | sha256sum }}
{{- end }}
checksum/scripts: {{ include (print $.Template.BasePath "/configmap-scripts.yaml") . | sha256sum }}
{{- end }}
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
Expand Down Expand Up @@ -71,6 +73,7 @@ spec:
{{- toYaml . | nindent 12 }}
{{- end }}
args:
- --workdir=/fluent-bit/etc
- --config=/fluent-bit/etc/conf/fluent-bit.conf
{{- if .Values.hotReload.enabled }}
- --enable-hot-reload
Expand Down Expand Up @@ -115,9 +118,12 @@ spec:
args:
- {{ printf "-webhook-url=http://localhost:%s/api/v2/reload" (toString .Values.service.httpPort) }}
- -volume-dir=/watch/config
- -volume-dir=/watch/scripts
volumeMounts:
- name: config
mountPath: /watch/config
- name: scripts
mountPath: /watch/scripts
{{- with .Values.hotReload.resources }}
resources:
{{- toYaml . | nindent 12 }}
Expand Down
4 changes: 2 additions & 2 deletions charts/fluent-bit-aggregator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ config:
# http_server: true - This can't be set
# http_Port: 2020 - This can't be set as it will use .Values.service.httpPort
# storage.path: /fluent-bit/data/ - This can't be set as it is controlled by .Values.config.storage
# parsers_file: parsers.conf - This can't be set as it will use the default file and customParsers
# parsers_file: /fluent-bit/etc/parsers.conf - This can't be set as it will use the default file and customParsers
log_level: info
http_listen: "0.0.0.0"
storage.metrics: true
Expand Down Expand Up @@ -282,7 +282,7 @@ config:
# host 127.0.0.1
# port 43000

# -- Lua scripts to configure.
# -- Lua scripts to configure, these will be created at /fluent-bit/scripts and need to be referenced by an absolute path.
luaScripts: {}
# test.lua: |-
# function append_tag(tag, timestamp, record)
Expand Down

0 comments on commit 153202a

Please sign in to comment.