fix: prepare for fluent-bit multiline support, still broken though, minor tuning

This commit is contained in:
Stefan Reimer 2021-07-20 13:28:37 +02:00
parent df22fb072d
commit 4cbdedc7eb
5 changed files with 33 additions and 27 deletions

View File

@ -2,7 +2,7 @@ apiVersion: v2
name: kubezero-logging name: kubezero-logging
description: KubeZero Umbrella Chart for complete EFK stack description: KubeZero Umbrella Chart for complete EFK stack
type: application type: application
version: 0.7.2 version: 0.7.3
appVersion: 1.6.0 appVersion: 1.6.0
home: https://kubezero.com home: https://kubezero.com
icon: https://cdn.zero-downtime.net/assets/kubezero/logo-small-64.png icon: https://cdn.zero-downtime.net/assets/kubezero/logo-small-64.png

View File

@ -21,8 +21,8 @@ hostAliases:
initContainers: initContainers:
{{- toYaml .Values.initContainers | nindent 2 }} {{- toYaml .Values.initContainers | nindent 2 }}
{{- end }} {{- end }}
#hostNetwork: true hostNetwork: true
#dnsPolicy: ClusterFirstWithHostNet dnsPolicy: ClusterFirstWithHostNet
containers: containers:
- name: {{ .Chart.Name }} - name: {{ .Chart.Name }}
securityContext: securityContext:

View File

@ -11,8 +11,8 @@ rules:
resources: resources:
- pods - pods
- namespaces - namespaces
#- nodes - nodes
#- nodes/proxy - nodes/proxy
verbs: verbs:
- get - get
- list - list

View File

@ -1,30 +1,30 @@
diff -tubrN charts/fluent-bit/templates/_pod.tpl charts/fluent-bit.zdt/templates/_pod.tpl diff -tubr charts/fluent-bit/templates/_pod.tpl charts/fluent-bit.zdt/templates/_pod.tpl
--- charts/fluent-bit/templates/_pod.tpl 2021-04-06 13:55:48.000000000 +0200 --- charts/fluent-bit/templates/_pod.tpl 2021-06-22 12:25:10.000000000 +0200
+++ charts/fluent-bit.zdt/templates/_pod.tpl 2021-04-07 11:53:45.609030378 +0200 +++ charts/fluent-bit.zdt/templates/_pod.tpl 2021-07-20 12:44:55.349873171 +0200
@@ -13,6 +13,8 @@ @@ -21,6 +21,8 @@
dnsConfig: initContainers:
{{- toYaml . | nindent 2 }} {{- toYaml .Values.initContainers | nindent 2 }}
{{- end }} {{- end }}
+#hostNetwork: true +hostNetwork: true
+#dnsPolicy: ClusterFirstWithHostNet +dnsPolicy: ClusterFirstWithHostNet
containers: containers:
- name: {{ .Chart.Name }} - name: {{ .Chart.Name }}
securityContext: securityContext:
diff -tubrN charts/fluent-bit/templates/clusterrole.yaml charts/fluent-bit.zdt/templates/clusterrole.yaml diff -tubr charts/fluent-bit/templates/clusterrole.yaml charts/fluent-bit.zdt/templates/clusterrole.yaml
--- charts/fluent-bit/templates/clusterrole.yaml 2021-04-06 13:55:48.000000000 +0200 --- charts/fluent-bit/templates/clusterrole.yaml 2021-06-22 12:25:10.000000000 +0200
+++ charts/fluent-bit.zdt/templates/clusterrole.yaml 2021-04-07 11:53:26.049029491 +0200 +++ charts/fluent-bit.zdt/templates/clusterrole.yaml 2021-07-20 12:44:29.936278716 +0200
@@ -11,6 +11,8 @@ @@ -11,6 +11,8 @@
resources: resources:
- pods - pods
- namespaces - namespaces
+ #- nodes + - nodes
+ #- nodes/proxy + - nodes/proxy
verbs: verbs:
- get - get
- list - list
diff -tubrN charts/fluent-bit/templates/tests/test-connection.yaml charts/fluent-bit.zdt/templates/tests/test-connection.yaml diff -tubr charts/fluent-bit/templates/tests/test-connection.yaml charts/fluent-bit.zdt/templates/tests/test-connection.yaml
--- charts/fluent-bit/templates/tests/test-connection.yaml 2021-04-06 13:55:48.000000000 +0200 --- charts/fluent-bit/templates/tests/test-connection.yaml 2021-06-22 12:25:10.000000000 +0200
+++ charts/fluent-bit.zdt/templates/tests/test-connection.yaml 2021-04-07 11:52:34.199027132 +0200 +++ charts/fluent-bit.zdt/templates/tests/test-connection.yaml 2021-05-17 12:09:02.724057438 +0200
@@ -1,3 +1,4 @@ @@ -1,3 +1,4 @@
+{{- if .Values.testFramework.enabled }} +{{- if .Values.testFramework.enabled }}
apiVersion: v1 apiVersion: v1
@ -35,9 +35,9 @@ diff -tubrN charts/fluent-bit/templates/tests/test-connection.yaml charts/fluent
{{- end }} {{- end }}
restartPolicy: Never restartPolicy: Never
+{{- end }} +{{- end }}
diff -tubrN charts/fluent-bit/values.yaml charts/fluent-bit.zdt/values.yaml diff -tubr charts/fluent-bit/values.yaml charts/fluent-bit.zdt/values.yaml
--- charts/fluent-bit/values.yaml 2021-04-06 13:55:48.000000000 +0200 --- charts/fluent-bit/values.yaml 2021-06-22 12:25:10.000000000 +0200
+++ charts/fluent-bit.zdt/values.yaml 2021-04-07 11:52:54.742361399 +0200 +++ charts/fluent-bit.zdt/values.yaml 2021-07-19 10:23:01.383398153 +0200
@@ -12,6 +12,7 @@ @@ -12,6 +12,7 @@
# tag: # tag:

View File

@ -216,6 +216,9 @@ fluentd:
fluent-bit: fluent-bit:
enabled: false enabled: false
image:
tag: 1.8.1
serviceMonitor: serviceMonitor:
enabled: false enabled: false
selector: selector:
@ -245,7 +248,7 @@ fluent-bit:
memBufLimit: 4MB memBufLimit: 4MB
refreshInterval: 10 refreshInterval: 10
logLevel: warn logLevel: info
flushInterval: 5 flushInterval: 5
#extraRecords: #extraRecords:
@ -266,10 +269,12 @@ fluent-bit:
Name tail Name tail
Path /var/log/containers/*.log Path /var/log/containers/*.log
Parser cri-log Parser cri-log
#multiline.parser cri
Tag cri.* Tag cri.*
Skip_Long_Lines On Skip_Long_Lines On
DB /var/log/flb_kube.db DB /var/log/flb_kube.db
DB.Sync Normal DB.Sync Normal
DB.locking true
{{- with .Values.config.input }} {{- with .Values.config.input }}
Mem_Buf_Limit {{ default "4MB" .memBufLimit }} Mem_Buf_Limit {{ default "4MB" .memBufLimit }}
Refresh_Interval {{ default 10 .refreshInterval }} Refresh_Interval {{ default 10 .refreshInterval }}
@ -291,8 +296,9 @@ fluent-bit:
Keep_Log Off Keep_Log Off
K8S-Logging.Parser Off K8S-Logging.Parser Off
K8S-Logging.Exclude Off K8S-Logging.Exclude Off
Kube_Meta_Cache_TTL 3600s
Buffer_Size 0
#Use_Kubelet true #Use_Kubelet true
#Kubelet_Port 10250
{{- if index .Values "config" "extraRecords" }} {{- if index .Values "config" "extraRecords" }}
@ -331,7 +337,7 @@ fluent-bit:
[PARSER] [PARSER]
Name cri-log Name cri-log
Format regex Format regex
Regex ^(?<time>[^ ]+) (?<stream>stdout|stderr) (?<logtag>[^ ]*) (?<log>.*)$ Regex ^(?<time>.+) (?<stream>stdout|stderr) (?<logtag>F|P) (?<log>.*)$
Time_Key time Time_Key time
Time_Format %Y-%m-%dT%H:%M:%S.%L%z Time_Format %Y-%m-%dT%H:%M:%S.%L%z