Skip to content

Commit 6c8a989

Browse files
authored
Merge pull request #442 from logzio/logzio-fluentd-0.29.1
Logzio fluentd 0.29.1
2 parents 75e2a78 + c3b4922 commit 6c8a989

12 files changed

+55
-10
lines changed

charts/fluentd/Chart.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@ description: A Helm chart for shipping Kubernetes logs via Fluentd.
44
keywords:
55
- logging
66
- fluentd
7-
version: 0.29.0
7+
version: 0.29.1
88
appVersion: 1.5.1
99
maintainers:
10-
- name: Miri Bar
11-
12-
- name: Tamir Michaeli
13-
10+
- name: Yotam loewenbach
11+

charts/fluentd/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ helm install -n monitoring \
9191
| `daemonset.auditLogFormat` | Match Fluentd's format for kube-apiserver audit logs. Set to `audit-json` if your audit logs are in json format. | `audit` |
9292
| `daemonset.containerdRuntime` | **Deprecated from chart version 0.1.0.** Determines whether to use a configuration for a Containerd runtime. Set to `false` if your cluster doesn't use Containerd as CRI. | `true` |
9393
| `daemonset.cri` | Container runtime interface of the cluster. Used to determine which configuration to use when concatenating partial logs. Valid options are: `docker`, `containerd`. | `containerd` |
94+
| `daemonset.LogFileRefreshInterval` | The interval of refreshing the list of watch file for log files.. | `60s` |
9495
| `daemonset.logzioBufferType` | Specifies which plugin to use as the backend. | `file` |
9596
| `daemonset.logzioBufferPath` | Path of the buffer. | `/var/log/fluentd-buffers/stackdriver.buffer` |
9697
| `daemonset.logzioOverflowAction` | Controls the behavior when the queue becomes full. | `block` |
@@ -120,6 +121,7 @@ helm install -n monitoring \
120121
| `windowsDaemonset.auditLogFormat` | Match Fluentd's format for kube-apiserver audit logs. Set to `audit-json` if your audit logs are in json format. (windows) | `audit` |
121122
| `windowsDaemonset.containerdRuntime` | **Deprecated from chart version 0.1.0.** Determines whether to use a configuration for a Containerd runtime. Set to `false` if your cluster doesn't use Containerd as CRI. (windows) | `true` |
122123
| `windowsDaemonset.cri` | Container runtime interface of the cluster. Used to determine which configuration to use when concatenating partial logs (windows). Valid options are: `docker`, `containerd`. | `containerd` |
124+
| `windowsDaemonset.LogFileRefreshInterval` | The interval of refreshing the list of watch file for log files.. | `60s` |
123125
| `windowsDaemonset.logzioBufferType` | Specifies which plugin to use as the backend. | `file` |
124126
| `windowsDaemonset.logzioBufferPath` | Path of the buffer. (windows) | `/var/log/fluentd-buffers/stackdriver.buffer` |
125127
| `windowsDaemonset.logzioOverflowAction` | Controls the behavior when the queue becomes full. (windows) | `block` |
@@ -301,6 +303,9 @@ If needed, the fluentd image can be changed to support windows server 2022 with
301303

302304

303305
## Change log
306+
- **0.29.1**:
307+
- Added `enabled` value, to conditianly control the deployment of this chart by a parent chart.
308+
- Added `daemonset.LogFileRefreshInterval` and `windowsDaemonset.LogFileRefreshInterval` values, to control list of watched log files refresh interval.
304309
- **0.29.0**:
305310
- EKS Fargate logging:
306311
- Send logs to port `8070` in logzio listener (instead of port `5050`)
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
{{ if .Values.enabled }}
12
{{- if .Values.fargateLogRouter.enabled }}
23
kind: Namespace
34
apiVersion: v1
45
metadata:
56
name: aws-observability
67
labels:
78
aws-observability: enabled
8-
{{- end }}
9+
{{- end }}
10+
{{ end }}
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
{{ if .Values.enabled }}
12
{{- if .Values.isRBAC }}
23
apiVersion: {{ .Values.apiVersions.clusterRole }}
34
kind: ClusterRole
45
metadata:
56
name: {{ include "fluentd.fullname" . }}
67
namespace: {{ .Release.Namespace }}
78
rules: {{ toYaml .Values.clusterRole.rules | nindent 2 -}}
8-
{{- end }}
9+
{{- end }}
10+
{{ end }}

charts/fluentd/templates/clusterrolebinding.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{ if .Values.enabled }}
12
{{- if .Values.isRBAC }}
23
apiVersion: {{ .Values.apiVersions.clusterRoleBinding }}
34
kind: ClusterRoleBinding
@@ -11,4 +12,5 @@ subjects:
1112
- kind: ServiceAccount
1213
name: {{ template "fluentd.serviceAccount" . }}
1314
namespace: {{ .Release.Namespace }}
14-
{{- end }}
15+
{{- end }}
16+
{{ end }}

charts/fluentd/templates/configmap-monitoring.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{ if .Values.enabled }}
12
{{- if or .Values.daemonset.fluentdPrometheusConf .Values.windowsDaemonset.fluentdPrometheusConf }}
23
apiVersion: {{ .Values.apiVersions.configmap }}
34
kind: ConfigMap
@@ -8,4 +9,5 @@ metadata:
89
k8s-app: {{ .Values.k8sApp }}
910
data:
1011
prometheus.conf : {{ toYaml .Values.configmap.prometheus | indent 2 }}
11-
{{- end }}
12+
{{- end }}
13+
{{ end }}

charts/fluentd/templates/configmap.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{ if .Values.enabled }}
12
apiVersion: {{ .Values.apiVersions.configmap }}
23
kind: ConfigMap
34
metadata:
@@ -43,3 +44,4 @@ data:
4344
{{ $value | indent 4 -}}
4445
{{- end -}}
4546
{{- end }}
47+
{{ end }}

charts/fluentd/templates/daemonset.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{ if .Values.enabled }}
12
apiVersion: {{ .Values.apiVersions.daemonset }}
23
kind: DaemonSet
34
metadata:
@@ -87,6 +88,8 @@ spec:
8788
secretKeyRef:
8889
name: {{ .Values.secretName }}
8990
key: logzio-log-listener
91+
- name: LOG_FILE_REFRESH_INTERVAL
92+
value: {{ .Values.daemonset.LogFileRefreshInterval | quote }}
9093
- name: LOGZIO_BUFFER_TYPE
9194
value: {{ .Values.daemonset.logzioBufferType | quote }}
9295
- name: LOGZIO_BUFFER_PATH
@@ -236,6 +239,8 @@ spec:
236239
secretKeyRef:
237240
name: {{ .Values.secretName }}
238241
key: logzio-log-listener
242+
- name: LOG_FILE_REFRESH_INTERVAL
243+
value: {{ .Values.windowsDaemonset.LogFileRefreshInterval | quote }}
239244
- name: LOGZIO_BUFFER_TYPE
240245
value: {{ .Values.windowsDaemonset.logzioBufferType | quote }}
241246
- name: LOGZIO_BUFFER_PATH
@@ -316,3 +321,4 @@ spec:
316321
updateStrategy: {{ toYaml .Values.windowsDaemonset.updateStrategy | nindent 4 }}
317322
{{- end }}
318323
{{- end }}
324+
{{ end }}

charts/fluentd/templates/fargate-logging-configmap.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{ if .Values.enabled }}
12
{{ if .Values.fargateLogRouter.enabled }}
23
kind: ConfigMap
34
apiVersion: v1
@@ -44,4 +45,5 @@ data:
4445
Port 8070
4546
Retry_Limit no_retries
4647
Index logzioCustomerIndex
48+
{{ end }}
4749
{{ end }}

charts/fluentd/templates/secret.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{ if .Values.enabled }}
12
{{- if .Values.secrets.enabled -}}
23
apiVersion: {{ .Values.apiVersions.secret }}
34
kind: Secret
@@ -9,3 +10,4 @@ stringData:
910
logzio-log-shipping-token: {{ required "Logzio shipping token is required!" .Values.secrets.logzioShippingToken }}
1011
logzio-log-listener: {{ template "logzio.listenerHost" . }}
1112
{{- end }}
13+
{{ end }}
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
{{ if .Values.enabled }}
12
{{- if .Values.isRBAC }}
23
apiVersion: {{ .Values.apiVersions.serviceAccount }}
34
kind: ServiceAccount
45
metadata:
56
name: {{ template "fluentd.serviceAccount" . }}
67
namespace: {{ .Release.Namespace }}
7-
{{- end }}
8+
{{- end }}
9+
{{ end }}

charts/fluentd/values.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
enabled: true
12
# Fluentd image in daemonset
23
image: logzio/logzio-fluentd
34
# Fluentd image tag
@@ -87,6 +88,8 @@ daemonset:
8788
# Container runtime interface of the cluster. Used to determine which configuration to use when concatenating partial logs.
8889
# Valid options are: docker, containerd
8990
cri: containerd
91+
# The interval of refreshing the list of watched log files.
92+
LogFileRefreshInterval: 60s
9093
# Specifies which plugin to use as the backend
9194
logzioBufferType: file
9295
# Path of the buffer
@@ -170,6 +173,8 @@ windowsDaemonset:
170173
# Container runtime interface of the cluster. Used to determine which configuration to use when concatenating partial logs.
171174
# Valid options are: docker, containerd
172175
cri: containerd
176+
# The interval of refreshing the list of watch file for log files.
177+
LogFileRefreshInterval: 60s
173178
# Specifies which plugin to use as the backend
174179
logzioBufferType: file
175180
# Path of the buffer
@@ -304,6 +309,7 @@ configmap:
304309
exclude_path "#{ENV['EXCLUDE_PATH'].split(',')}"
305310
tag logzio.kubernetes.*
306311
read_from_head true
312+
refresh_insterval "#{ENV['LOG_FILE_REFRESH_INTERVAL']}"
307313
<parse>
308314
@type multi_format
309315
<pattern>
@@ -329,6 +335,7 @@ configmap:
329335
path /var/log/salt/minion
330336
pos_file /var/log/fluentd-salt.pos
331337
tag logzio.salt
338+
refresh_insterval "#{ENV['LOG_FILE_REFRESH_INTERVAL']}"
332339
<parse>
333340
@type regexp
334341
expression /^(?<time>[^ ]* [^ ,]*)[^\[]*\[[^\]]*\]\[(?<severity>[^ \]]*) *\] (?<message>.*)$/
@@ -342,6 +349,7 @@ configmap:
342349
path /var/log/startupscript.log
343350
pos_file /var/log/fluentd-startupscript.log.pos
344351
tag logzio.startupscript
352+
refresh_insterval "#{ENV['LOG_FILE_REFRESH_INTERVAL']}"
345353
<parse>
346354
@type syslog
347355
</parse>
@@ -353,6 +361,7 @@ configmap:
353361
path /var/log/docker.log
354362
pos_file /var/log/fluentd-docker.log.pos
355363
tag logzio.docker
364+
refresh_insterval "#{ENV['LOG_FILE_REFRESH_INTERVAL']}"
356365
<parse>
357366
@type regexp
358367
expression /^time="(?<time>[^)]*)" level=(?<severity>[^ ]*) msg="(?<message>[^"]*)"( err="(?<error>[^"]*)")?( statusCode=($<status_code>\d+))?/
@@ -365,6 +374,7 @@ configmap:
365374
path /var/log/etcd.log
366375
pos_file /var/log/fluentd-etcd.log.pos
367376
tag logzio.etcd
377+
refresh_insterval "#{ENV['LOG_FILE_REFRESH_INTERVAL']}"
368378
<parse>
369379
@type none
370380
</parse>
@@ -377,6 +387,7 @@ configmap:
377387
path /var/log/kubelet.log
378388
pos_file /var/log/fluentd-kubelet.log.pos
379389
tag logzio.kubelet
390+
refresh_insterval "#{ENV['LOG_FILE_REFRESH_INTERVAL']}"
380391
<parse>
381392
@type kubernetes
382393
</parse>
@@ -389,6 +400,7 @@ configmap:
389400
path /var/log/kube-proxy.log
390401
pos_file /var/log/fluentd-kube-proxy.log.pos
391402
tag logzio.kube-proxy
403+
refresh_insterval "#{ENV['LOG_FILE_REFRESH_INTERVAL']}"
392404
<parse>
393405
@type kubernetes
394406
</parse>
@@ -401,6 +413,7 @@ configmap:
401413
path /var/log/kube-apiserver.log
402414
pos_file /var/log/fluentd-kube-apiserver.log.pos
403415
tag logzio.kube-apiserver
416+
refresh_insterval "#{ENV['LOG_FILE_REFRESH_INTERVAL']}"
404417
<parse>
405418
@type kubernetes
406419
</parse>
@@ -413,6 +426,7 @@ configmap:
413426
path /var/log/kube-controller-manager.log
414427
pos_file /var/log/fluentd-kube-controller-manager.log.pos
415428
tag logzio.kube-controller-manager
429+
refresh_insterval "#{ENV['LOG_FILE_REFRESH_INTERVAL']}"
416430
<parse>
417431
@type kubernetes
418432
</parse>
@@ -425,6 +439,7 @@ configmap:
425439
path /var/log/kube-scheduler.log
426440
pos_file /var/log/fluentd-kube-scheduler.log.pos
427441
tag logzio.kube-scheduler
442+
refresh_insterval "#{ENV['LOG_FILE_REFRESH_INTERVAL']}"
428443
<parse>
429444
@type kubernetes
430445
</parse>
@@ -437,6 +452,7 @@ configmap:
437452
path /var/log/rescheduler.log
438453
pos_file /var/log/fluentd-rescheduler.log.pos
439454
tag logzio.rescheduler
455+
refresh_insterval "#{ENV['LOG_FILE_REFRESH_INTERVAL']}"
440456
<parse>
441457
@type kubernetes
442458
</parse>
@@ -449,6 +465,7 @@ configmap:
449465
path /var/log/glbc.log
450466
pos_file /var/log/fluentd-glbc.log.pos
451467
tag logzio.glbc
468+
refresh_insterval "#{ENV['LOG_FILE_REFRESH_INTERVAL']}"
452469
<parse>
453470
@type kubernetes
454471
</parse>
@@ -461,6 +478,7 @@ configmap:
461478
path /var/log/cluster-autoscaler.log
462479
pos_file /var/log/fluentd-cluster-autoscaler.log.pos
463480
tag logzio.cluster-autoscaler
481+
refresh_insterval "#{ENV['LOG_FILE_REFRESH_INTERVAL']}"
464482
<parse>
465483
@type kubernetes
466484
</parse>
@@ -586,6 +604,7 @@ configmap:
586604
path /var/log/kubernetes/kube-apiserver-audit.log
587605
pos_file /var/log/kube-apiserver-audit.log.pos
588606
tag logzio.kube-apiserver-audit
607+
refresh_insterval "#{ENV['LOG_FILE_REFRESH_INTERVAL']}"
589608
<parse>
590609
@type multiline
591610
format_firstline /^\S+\s+AUDIT:/
@@ -609,6 +628,7 @@ configmap:
609628
path /var/log/kubernetes/kube-apiserver-audit.log
610629
pos_file /var/log/kube-apiserver-audit.log.pos
611630
tag logzio.kube-apiserver-audit
631+
refresh_insterval "#{ENV['LOG_FILE_REFRESH_INTERVAL']}"
612632
<parse>
613633
@type json
614634
keep_time_key true

0 commit comments

Comments
 (0)