More logging tuning

This commit is contained in:
Stefan Reimer 2020-12-10 06:36:26 -08:00
parent f1a6e7a3e8
commit c2fb56a0d8
6 changed files with 20 additions and 15 deletions

View File

@ -19,7 +19,7 @@ dependencies:
version: ">= 0.1.3"
repository: https://zero-down-time.github.io/kubezero/
- name: eck-operator
version: 1.3.0
version: 1.3.1
repository: https://helm.elastic.co
condition: eck-operator.enabled
- name: fluentd

View File

@ -18,7 +18,7 @@ Kubernetes: `>= 1.16.0`
| Repository | Name | Version |
|------------|------|---------|
| https://helm.elastic.co | eck-operator | 1.3.0 |
| https://helm.elastic.co | eck-operator | 1.3.1 |
| https://kubernetes-charts.storage.googleapis.com/ | fluentd | 2.5.1 |
| https://zero-down-time.github.io/kubezero/ | kubezero-lib | >= 0.1.3 |
@ -73,7 +73,6 @@ Kubernetes: `>= 1.16.0`
| fluent-bit.config.output.host | string | `"logging-fluentd"` | |
| fluent-bit.config.output.sharedKey | string | `"cloudbender"` | |
| fluent-bit.config.output.tls | bool | `false` | |
| fluent-bit.config.outputs | object | `{}` | |
| fluent-bit.enabled | bool | `false` | |
| fluent-bit.serviceMonitor.enabled | bool | `true` | |
| fluent-bit.serviceMonitor.selector.release | string | `"metrics"` | |

View File

@ -13,11 +13,13 @@
Path /var/log/containers/*.log
Parser cri-log
Tag cri.*
Mem_Buf_Limit {{ .Values.config.input.memBufLimit }}
Skip_Long_Lines On
Refresh_Interval {{ .Values.config.input.refreshInterval }}
DB /var/log/flb_kube.db
DB.Sync Normal
{{- with .Values.config.input }}
Mem_Buf_Limit {{ default "16MB" .memBufLimit }}
Refresh_Interval {{ default 10 .refreshInterval }}
{{- end }}
[FILTER]
Name lua
@ -57,16 +59,18 @@
script /fluent-bit/etc/functions.lua
call nest_k8s_ns
{{- if .Values.config.outputs }}
{{ tpl .Values.config.outputs . }}
{{- else }}
{{- if not .Values.config.output }}
{{ .Values.config.outputs }}
{{- end }}
{{- with .Values.config.output }}
[OUTPUT]
Match *
Name forward
Host {{ .Values.config.output.host }}
Host {{ .host }}
Port 24224
Shared_Key {{ .Values.config.output.sharedKey }}
tls {{ ternary "on" "off" .Values.config.output.tls }}
Shared_Key {{ .sharedKey }}
tls {{ ternary "on" "off" .tls }}
Send_options true
Require_ack_response true
{{- end }}

View File

@ -193,7 +193,6 @@ fluent-bit:
enabled: false
config:
outputs: {}
output:
host: logging-fluentd
sharedKey: cloudbender

View File

@ -197,8 +197,8 @@ function kiam-post() {
###########
# eck operator still doesnt support helm v3 so we have to toggle settings in the eck subchart
function logging-crds() {
helm template $(chart_location $chart) --namespace $namespace --name-template $release --skip-crds --set eck-operator.installCRDs=false > $TMPDIR/helm-no-crds.yaml
helm template $(chart_location $chart) --namespace $namespace --name-template $release --include-crds --set eck-operator.installCRDs=true > $TMPDIR/helm-crds.yaml
helm template $(chart_location $chart) --namespace $namespace --name-template $release --skip-crds -f $TMPDIR/values.yaml --set eck-operator.installCRDs=false > $TMPDIR/helm-no-crds.yaml
helm template $(chart_location $chart) --namespace $namespace --name-template $release --include-crds -f $TMPDIR/values.yaml --set eck-operator.installCRDs=true > $TMPDIR/helm-crds.yaml
diff -e $TMPDIR/helm-no-crds.yaml $TMPDIR/helm-crds.yaml | head -n-1 | tail -n+2 > $TMPDIR/crds.yaml
[ -s $TMPDIR/crds.yaml ] && kubectl apply -f $TMPDIR/crds.yaml
}

View File

@ -93,7 +93,10 @@ https://sysdig.com/blog/whats-new-kubernetes-1-18/
- set priorty class of ingress components to cluster essential
### Logging
- ES/Kibana version bump, new ECK operator
- ES/Kibana version bump to 7.10
- ECK operator is now installed on demand in logging ns
- Custom event fields configurable via new fluent-bit chart
e.g. clustername could be added to each event allowing easy filtering in case multiple clusters stream events into a single central ES cluster
### ArgoCD
- version bump, new app of app architecure