rancher-charts/charts/rancher-logging/3.17.700+up3.17.7/templates/loggings/root/logging.yaml

83 lines
3.6 KiB
YAML

{{- define "logging-operator.logging.root" -}}
{{- $containerLogPath := printf "%s/containers/" (default "/var/lib/docker" .Values.global.dockerRootDirectory) }}
metadata:
name: "{{ .Release.Name }}-root"
spec:
{{- if (include "windowsEnabled" .) }}
nodeAgents:
- name: win-agent
profile: windows
nodeAgentFluentbit:
daemonSet:
spec:
template:
spec:
containers:
- image: {{ template "system_default_registry" . }}{{ .Values.images.nodeagent_fluentbit.repository }}:{{ .Values.images.nodeagent_fluentbit.tag }}
name: fluent-bit
tls:
enabled: {{ .Values.nodeAgents.tls.enabled | default false }}
{{- if .Values.additionalLoggingSources.rke.enabled }}
- name: win-agent-rke
profile: windows
nodeAgentFluentbit:
filterKubernetes:
Kube_Tag_Prefix: "{{ template "windowsKubernetesFilter" . }}.var.lib.rancher.rke.log."
inputTail:
Path: "{{ template "windowsPathPrefix" . }}/var/lib/rancher/rke/log"
{{- if .Values.fluentbit.inputTail.Buffer_Chunk_Size }}
Buffer_Chunk_Size: {{ .Values.fluentbit.inputTail.Buffer_Chunk_Size | toString }}
{{- end }}
{{- if .Values.fluentbit.inputTail.Buffer_Max_Size }}
Buffer_Max_Size: {{ .Values.fluentbit.inputTail.Buffer_Max_Size | toString }}
{{- end }}
{{- if .Values.fluentbit.inputTail.Mem_Buf_Limit }}
Mem_Buf_Limit: {{ .Values.fluentbit.inputTail.Mem_Buf_Limit | toString }}
{{- end }}
{{- if .Values.fluentbit.inputTail.Multiline_Flush }}
Multiline_Flush: {{ .Values.fluentbit.inputTail.Multiline_Flush | toString | quote }}
{{- end }}
{{- if .Values.fluentbit.inputTail.Skip_Long_Lines }}
Skip_Long_Lines: {{ .Values.fluentbit.inputTail.Skip_Long_Lines | toString | quote }}
{{- end }}
extraVolumeMounts:
- source: "{{ template "windowsInputTailMount" . }}/var/lib/rancher/rke/log"
destination: "{{ template "windowsInputTailMount" . }}/var/lib/rancher/rke/log"
readOnly: true
daemonSet:
spec:
template:
spec:
containers:
- image: "{{ template "system_default_registry" . }}{{ .Values.images.nodeagent_fluentbit.repository }}:{{ .Values.images.nodeagent_fluentbit.tag }}"
name: fluent-bit
tls:
enabled: {{ .Values.nodeAgents.tls.enabled | default false }}
{{- end }}
{{- end }}
fluentbit:
{{- if .Values.global.dockerRootDirectory }}
mountPath: {{ $containerLogPath }}
extraVolumeMounts:
- source: {{ $containerLogPath }}
destination: {{ $containerLogPath }}
readOnly: true
{{- end }}
{{- if (include "requireFilterKubernetes" .) }}
filterKubernetes:
{{- if .Values.fluentbit.filterKubernetes.Merge_Log }}
Merge_Log: "{{ .Values.fluentbit.filterKubernetes.Merge_Log }}"
{{- end }}
{{- if .Values.fluentbit.filterKubernetes.Merge_Log_Key }}
Merge_Log_Key: "{{ .Values.fluentbit.filterKubernetes.Merge_Log_Key }}"
{{- end }}
{{- if .Values.fluentbit.filterKubernetes.Merge_Log_Trim }}
Merge_Log_Trim: "{{ .Values.fluentbit.filterKubernetes.Merge_Log_Trim }}"
{{- end }}
{{- if .Values.fluentbit.filterKubernetes.Merge_Parser }}
Merge_Parser: "{{ .Values.fluentbit.filterKubernetes.Merge_Parser }}"
{{- end }}
{{- end }}
{{- end -}}
{{- include "logging-operator.logging" (list . "logging-operator.logging.root") -}}