Skip to content

Commit 717b5a3

Browse files
committed
Merge branch 'improvement/ARTESCA-14986-bump-fluent-bit' into q/130.0
2 parents 34bc85a + 92c0e21 commit 717b5a3

File tree

12 files changed

+98
-35
lines changed

12 files changed

+98
-35
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
[v2.42.0](https://github.com/dexidp/dex/releases/tag/v2.42.0)
1818
(PR[#4558](https://github.com/scality/metalk8s/pull/4558))
1919

20+
- Bump Fluent Bit image version to [3.2.8](https://github.com/fluent/fluent-bit/releases/tag/v3.2.8)
21+
and Fluent Bit Helm chart version to [0.48.9](https://github.com/fluent/helm-charts/releases/tag/fluent-bit-0.48.9)
22+
(PR[#4559](https://github.com/scality/metalk8s/pull/4559))
23+
2024
## Release 129.0.1 (in development)
2125

2226
### Enhancements

buildchain/buildchain/versions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,8 @@ def _version_prefix(version: str, prefix: str = "v") -> str:
273273
),
274274
Image(
275275
name="fluent-bit",
276-
version="3.1.9",
277-
digest="sha256:4af3920cc2ff976200e0fc09f23e7ca4ee7d4477a6d592cb496fc39378181b02",
276+
version="3.2.8",
277+
digest="sha256:14da4a52ecdbb9bd9cb7a16ff6b4c7f391a4006cb13f84b5957e4608cc613e2c",
278278
),
279279
Image(
280280
name="cert-manager-controller",

charts/fluent-bit/Chart.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
annotations:
22
artifacthub.io/changes: |
33
- kind: changed
4-
description: "Updated Fluent Bit OCI image to v3.1.9"
4+
description: "Updated Fluent Bit OCI image to v3.2.8."
55
apiVersion: v1
6-
appVersion: 3.1.9
6+
appVersion: 3.2.8
77
description: Fast and lightweight log processor and forwarder or Linux, OSX and BSD
88
family operating systems.
99
home: https://fluentbit.io/
@@ -24,4 +24,4 @@ maintainers:
2424
name: fluent-bit
2525
sources:
2626
- https://github.com/fluent/fluent-bit/
27-
version: 0.47.10
27+
version: 0.48.9

charts/fluent-bit/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Fluent Bit allows us to build filter to modify the incoming records using custom
2727

2828
### How to use Lua scripts with this Chart
2929

30-
First, you should add your Lua scripts to `luaScripts` in values.yaml, for example:
30+
First, you should add your Lua scripts to `luaScripts` in values.yaml, templating is supported.
3131

3232
```yaml
3333
luaScripts:

charts/fluent-bit/ci/ci-values.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,41 @@ testFramework:
33

44
logLevel: debug
55

6+
extraVolumeMounts:
7+
- name: extra-volume
8+
mountPath: /extra-volume-path
9+
- name: another-extra-volume
10+
mountPath: /another-extra-volume-path
11+
12+
extraVolumes:
13+
- name: extra-volume
14+
emptyDir: {}
15+
- name: another-extra-volume
16+
emptyDir: {}
17+
618
dashboards:
719
enabled: true
820
deterministicUid: true
21+
22+
luaScripts:
23+
filter_example.lua: |
24+
function filter_name(tag, timestamp, record)
25+
-- put your lua code here.
26+
end
27+
filter_with_templating_example.lua: |
28+
local log_level = {{ .Values.logLevel | quote }}
29+
function filter_with_templating_name(tag, timestamp, record)
30+
-- put your lua code here.
31+
end
32+
33+
config:
34+
outputs: |
35+
[OUTPUT]
36+
name stdout
37+
match *
38+
39+
hotReload:
40+
enabled: true
41+
extraWatchVolumes:
42+
- extra-volume
43+
- another-extra-volume

charts/fluent-bit/templates/_pod.tpl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,18 @@ containers:
108108
- {{ printf "-webhook-url=http://localhost:%s/api/v2/reload" (toString .Values.metricsPort) }}
109109
- -volume-dir=/watch/config
110110
- -volume-dir=/watch/scripts
111+
{{- range $idx, $val := .Values.hotReload.extraWatchVolumes }}
112+
- {{ printf "-volume-dir=/watch/extra-%d" (int $idx) }}
113+
{{- end }}
111114
volumeMounts:
112115
- name: config
113116
mountPath: /watch/config
114117
- name: luascripts
115118
mountPath: /watch/scripts
119+
{{- range $idx, $val := .Values.hotReload.extraWatchVolumes }}
120+
- name: {{ $val }}
121+
mountPath: {{ printf "/watch/extra-%d" (int $idx) }}
122+
{{- end }}
116123
{{- with .Values.hotReload.resources }}
117124
resources:
118125
{{- toYaml . | nindent 12 }}
@@ -132,7 +139,7 @@ volumes:
132139
{{- if or .Values.luaScripts .Values.hotReload.enabled }}
133140
- name: luascripts
134141
configMap:
135-
name: {{ include "fluent-bit.fullname" . }}-luascripts
142+
name: {{ include "fluent-bit.fullname" . }}-luascripts
136143
{{- end }}
137144
{{- if eq .Values.kind "DaemonSet" }}
138145
{{- toYaml .Values.daemonSetVolumes | nindent 2 }}

charts/fluent-bit/templates/configmap-luascripts.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ metadata:
88
{{- include "fluent-bit.labels" . | nindent 4 }}
99
data:
1010
{{ range $key, $value := .Values.luaScripts }}
11-
{{ $key }}: {{ $value | quote }}
11+
{{ $key }}: {{ (tpl $value $) | quote }}
1212
{{ end }}
1313
{{- end -}}

charts/fluent-bit/templates/psp.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,15 @@ spec:
2020
hostNetwork: {{ .Values.hostNetwork }}
2121
hostIPC: false
2222
hostPID: false
23+
{{- with .Values.podSecurityPolicy.runAsUser }}
2324
runAsUser:
24-
# TODO: Require the container to run without root privileges.
25-
rule: 'RunAsAny'
25+
{{- toYaml . | nindent 4 }}
26+
{{- end }}
27+
{{- with .Values.podSecurityPolicy.seLinux }}
2628
seLinux:
27-
# This policy assumes the nodes are using AppArmor rather than SELinux.
28-
rule: 'RunAsAny'
29+
{{- toYaml . | nindent 4 }}
30+
{{- end }}
31+
2932
supplementalGroups:
3033
rule: 'MustRunAs'
3134
ranges:

charts/fluent-bit/templates/scc.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,14 @@ forbiddenSysctls:
2424
readOnlyRootFilesystem: false
2525
requiredDropCapabilities:
2626
- MKNOD
27+
{{- with .Values.openShift.securityContextConstraints.runAsUser }}
2728
runAsUser:
28-
type: RunAsAny
29+
{{- toYaml . | nindent 4 }}
30+
{{- end }}
31+
{{- with .Values.openShift.securityContextConstraints.seLinuxContext }}
2932
seLinuxContext:
30-
type: MustRunAs
33+
{{- toYaml . | nindent 4 }}
34+
{{- end }}
3135
supplementalGroups:
3236
type: RunAsAny
3337
volumes:

charts/fluent-bit/templates/tests/test-connection.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ spec:
1717
image: {{ include "fluent-bit.image" .Values.testFramework.image | quote }}
1818
imagePullPolicy: {{ .Values.testFramework.image.pullPolicy }}
1919
command: ["sh"]
20-
args: ["-c", "wget -O- {{ include "fluent-bit.fullname" . }}:{{ .Values.service.port }}"]
20+
args: ["-c", "sleep 5s && wget -O- {{ include "fluent-bit.fullname" . }}:{{ .Values.service.port }}"]
2121
{{- with .Values.imagePullSecrets }}
2222
imagePullSecrets:
2323
{{- toYaml . | nindent 4 }}

charts/fluent-bit/values.yaml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ rbac:
4545
podSecurityPolicy:
4646
create: false
4747
annotations: {}
48+
runAsUser:
49+
rule: RunAsAny
50+
seLinux:
51+
# This policy assumes the nodes are using AppArmor rather than SELinux.
52+
rule: RunAsAny
4853

4954
# OpenShift-specific configuration
5055
openShift:
@@ -54,6 +59,10 @@ openShift:
5459
create: true
5560
name: ""
5661
annotations: {}
62+
runAsUser:
63+
type: RunAsAny
64+
seLinuxContext:
65+
type: MustRunAs
5766
# Use existing SCC in cluster, rather then create new one
5867
existingName: ""
5968

@@ -98,14 +107,13 @@ service:
98107
# nodePort: 30020
99108
# clusterIP: 172.16.10.1
100109
annotations: {}
101-
# prometheus.io/path: "/api/v1/metrics/prometheus"
102-
# prometheus.io/port: "2020"
103-
# prometheus.io/scrape: "true"
110+
# prometheus.io/path: "/api/v1/metrics/prometheus"
111+
# prometheus.io/port: "2020"
112+
# prometheus.io/scrape: "true"
104113
externalIPs: []
105114
# externalIPs:
106115
# - 2.2.2.2
107116

108-
109117
serviceMonitor:
110118
enabled: false
111119
# namespace: monitoring
@@ -362,6 +370,7 @@ networkPolicy:
362370
# ingress:
363371
# from: []
364372

373+
# See Lua script configuration example in README.md
365374
luaScripts: {}
366375

367376
## https://docs.fluentbit.io/manual/administration/configuring-fluent-bit/classic-mode/configuration-file
@@ -506,7 +515,8 @@ hotReload:
506515
enabled: false
507516
image:
508517
repository: ghcr.io/jimmidyson/configmap-reload
509-
tag: v0.11.1
518+
tag: v0.14.0
510519
digest:
511520
pullPolicy: IfNotPresent
512521
resources: {}
522+
extraWatchVolumes: []

salt/metalk8s/addons/logging/fluent-bit/deployed/chart.sls

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ metadata:
1515
app.kubernetes.io/managed-by: salt
1616
app.kubernetes.io/name: fluent-bit
1717
app.kubernetes.io/part-of: metalk8s
18-
app.kubernetes.io/version: 3.1.9
19-
helm.sh/chart: fluent-bit-0.47.10
18+
app.kubernetes.io/version: 3.2.8
19+
helm.sh/chart: fluent-bit-0.48.9
2020
heritage: metalk8s
2121
name: fluent-bit
2222
namespace: metalk8s-logging
@@ -1596,9 +1596,9 @@ metadata:
15961596
app.kubernetes.io/managed-by: salt
15971597
app.kubernetes.io/name: fluent-bit
15981598
app.kubernetes.io/part-of: metalk8s
1599-
app.kubernetes.io/version: 3.1.9
1599+
app.kubernetes.io/version: 3.2.8
16001600
grafana_dashboard: '1'
1601-
helm.sh/chart: fluent-bit-0.47.10
1601+
helm.sh/chart: fluent-bit-0.48.9
16021602
heritage: metalk8s
16031603
name: fluent-bit-dashboard-fluent-bit
16041604
namespace: metalk8s-logging
@@ -1611,8 +1611,8 @@ metadata:
16111611
app.kubernetes.io/managed-by: salt
16121612
app.kubernetes.io/name: fluent-bit
16131613
app.kubernetes.io/part-of: metalk8s
1614-
app.kubernetes.io/version: 3.1.9
1615-
helm.sh/chart: fluent-bit-0.47.10
1614+
app.kubernetes.io/version: 3.2.8
1615+
helm.sh/chart: fluent-bit-0.48.9
16161616
heritage: metalk8s
16171617
name: fluent-bit
16181618
namespace: metalk8s-logging
@@ -1635,8 +1635,8 @@ metadata:
16351635
app.kubernetes.io/managed-by: salt
16361636
app.kubernetes.io/name: fluent-bit
16371637
app.kubernetes.io/part-of: metalk8s
1638-
app.kubernetes.io/version: 3.1.9
1639-
helm.sh/chart: fluent-bit-0.47.10
1638+
app.kubernetes.io/version: 3.2.8
1639+
helm.sh/chart: fluent-bit-0.48.9
16401640
heritage: metalk8s
16411641
name: fluent-bit
16421642
namespace: metalk8s-logging
@@ -1657,8 +1657,8 @@ metadata:
16571657
app.kubernetes.io/managed-by: salt
16581658
app.kubernetes.io/name: fluent-bit
16591659
app.kubernetes.io/part-of: metalk8s
1660-
app.kubernetes.io/version: 3.1.9
1661-
helm.sh/chart: fluent-bit-0.47.10
1660+
app.kubernetes.io/version: 3.2.8
1661+
helm.sh/chart: fluent-bit-0.48.9
16621662
heritage: metalk8s
16631663
name: fluent-bit
16641664
namespace: metalk8s-logging
@@ -1681,8 +1681,8 @@ metadata:
16811681
app.kubernetes.io/managed-by: salt
16821682
app.kubernetes.io/name: fluent-bit
16831683
app.kubernetes.io/part-of: metalk8s
1684-
app.kubernetes.io/version: 3.1.9
1685-
helm.sh/chart: fluent-bit-0.47.10
1684+
app.kubernetes.io/version: 3.2.8
1685+
helm.sh/chart: fluent-bit-0.48.9
16861686
heritage: metalk8s
16871687
name: fluent-bit
16881688
namespace: metalk8s-logging
@@ -1708,7 +1708,7 @@ spec:
17081708
- --config=/fluent-bit/etc/conf/fluent-bit.conf
17091709
command:
17101710
- /fluent-bit/bin/fluent-bit
1711-
image: {% endraw -%}{{ build_image_name("fluent-bit", False) }}{%- raw %}:3.1.9
1711+
image: {% endraw -%}{{ build_image_name("fluent-bit", False) }}{%- raw %}:3.2.8
17121712
imagePullPolicy: IfNotPresent
17131713
livenessProbe:
17141714
httpGet:
@@ -1773,8 +1773,8 @@ metadata:
17731773
app.kubernetes.io/managed-by: salt
17741774
app.kubernetes.io/name: fluent-bit
17751775
app.kubernetes.io/part-of: metalk8s
1776-
app.kubernetes.io/version: 3.1.9
1777-
helm.sh/chart: fluent-bit-0.47.10
1776+
app.kubernetes.io/version: 3.2.8
1777+
helm.sh/chart: fluent-bit-0.48.9
17781778
heritage: metalk8s
17791779
metalk8s.scality.com/monitor: ''
17801780
name: fluent-bit

0 commit comments

Comments
 (0)