From 5537e989267183f878d36bf3ba932cf67460d594 Mon Sep 17 00:00:00 2001 From: Jacob Payne Date: Tue, 8 Jun 2021 13:54:27 -0700 Subject: [PATCH] (dev-v2.6-archive) Fix/issue 33092 (#1254) * removed rke2 containers logging and added some extra settings to the fluentbit configmap * charts (partially cherry picked from commit ba4492b7d460e1a6fb9edc9ccd84fe43e8f11825) --- .../templates/loggings/rke2/configmap.yaml | 8 ++ .../rke2/logging-rke2-containers.yaml | 98 ------------------- 2 files changed, 8 insertions(+), 98 deletions(-) delete mode 100644 packages/rancher-logging/generated-changes/overlay/templates/loggings/rke2/logging-rke2-containers.yaml diff --git a/packages/rancher-logging/generated-changes/overlay/templates/loggings/rke2/configmap.yaml b/packages/rancher-logging/generated-changes/overlay/templates/loggings/rke2/configmap.yaml index f1ba032d5..c2323af92 100644 --- a/packages/rancher-logging/generated-changes/overlay/templates/loggings/rke2/configmap.yaml +++ b/packages/rancher-logging/generated-changes/overlay/templates/loggings/rke2/configmap.yaml @@ -7,11 +7,19 @@ metadata: {{ include "logging-operator.labels" . | indent 4 }} data: fluent-bit.conf: | + [SERVICE] + Flush 1 + Grace 5 + Daemon Off + Log_Level info + Coro_Stack_Size 24576 + [INPUT] Name systemd Tag rke2 Path {{ .Values.systemdLogPath | default "/var/log/journal" }} Systemd_Filter _SYSTEMD_UNIT=rke2-server.service + Systemd_Filter _SYSTEMD_UNIT=rke2-agent.service [OUTPUT] Name forward diff --git a/packages/rancher-logging/generated-changes/overlay/templates/loggings/rke2/logging-rke2-containers.yaml b/packages/rancher-logging/generated-changes/overlay/templates/loggings/rke2/logging-rke2-containers.yaml deleted file mode 100644 index d8c83513a..000000000 --- a/packages/rancher-logging/generated-changes/overlay/templates/loggings/rke2/logging-rke2-containers.yaml +++ /dev/null @@ -1,98 +0,0 @@ -{{- if .Values.additionalLoggingSources.rke2.enabled }} -apiVersion: logging.banzaicloud.io/v1beta1 -kind: Logging -metadata: - name: {{ .Release.Name }}-rke2-containers - namespace: {{ .Release.Namespace }} -spec: - controlNamespace: {{ .Release.Namespace }} - fluentbit: - image: - repository: {{ template "system_default_registry" . }}{{ .Values.images.fluentbit.repository }} - tag: {{ .Values.images.fluentbit.tag }} - inputTail: - Tag: "rke2" - Path: "/var/log/containers/*rke*.log" - {{- if .Values.fluentbit.inputTail.Buffer_Chunk_Size }} - Buffer_Chunk_Size: {{ .Values.fluentbit.inputTail.Buffer_Chunk_Size }} - {{- end }} - {{- if .Values.fluentbit.inputTail.Buffer_Max_Size }} - Buffer_Max_Size: {{ .Values.fluentbit.inputTail.Buffer_Max_Size }} - {{- end }} - {{- if .Values.fluentbit.inputTail.Mem_Buf_Limit }} - Mem_Buf_Limit: {{ .Values.fluentbit.inputTail.Mem_Buf_Limit }} - {{- end }} - {{- if .Values.fluentbit.inputTail.Multiline_Flush }} - Multiline_Flush: {{ .Values.fluentbit.inputTail.Multiline_Flush }} - {{- end }} - {{- if .Values.fluentbit.inputTail.Skip_Long_Lines }} - Skip_Long_Lines: {{ .Values.fluentbit.inputTail.Skip_Long_Lines }} - {{- end }} - extraVolumeMounts: - - source: "/var/log/containers/" - destination: "/var/log/containers/" - readOnly: true - {{- if not .Values.disablePvc }} - {{- with .Values.fluentbit.bufferStorage }} - bufferStorage: {{- toYaml . | nindent 6 }} - {{- end }} - {{- with .Values.fluentbit.bufferStorageVolume }} - bufferStorageVolume: {{- toYaml . | nindent 6 }} - {{- end }} - {{- end }} - {{- if or .Values.global.psp.enabled .Values.global.seLinux.enabled }} - security: - {{- end }} - {{- if or .Values.global.psp.enabled }} - podSecurityPolicyCreate: true - roleBasedAccessControlCreate: true - {{- end }} - {{- if .Values.global.seLinux.enabled }} - securityContext: - seLinuxOptions: - type: rke_logreader_t - {{- end }} - {{- with (concat (.Values.tolerations) (.Values.fluentbit.tolerations)) }} - tolerations: {{- toYaml . | nindent 6 }} - {{- end }} - {{- with .Values.nodeSelector }} - nodeSelector: {{- toYaml . | nindent 6 }} - {{- end }} - {{- with .Values.fluentbit.resources }} - resources: {{- toYaml . | nindent 6 }} - {{- end }} - fluentd: - image: - repository: {{ template "system_default_registry" . }}{{ .Values.images.fluentd.repository }} - tag: {{ .Values.images.fluentd.tag }} - configReloaderImage: - repository: {{ template "system_default_registry" . }}{{ .Values.images.config_reloader.repository }} - tag: {{ .Values.images.config_reloader.tag }} - {{- if not .Values.disablePvc }} - {{- with .Values.fluentd.bufferStorageVolume }} - bufferStorageVolume: {{- toYaml . | nindent 6 }} - {{- end }} - {{- end }} - disablePvc: {{ .Values.disablePvc }} - {{- if .Values.fluentd.replicas }} - scaling: - replicas: {{ .Values.fluentd.replicas }} - {{- end }} - {{- if .Values.global.psp.enabled }} - security: - podSecurityPolicyCreate: true - roleBasedAccessControlCreate: true - {{- end }} - {{- with (default .Values.tolerations .Values.fluentd.tolerations) }} - tolerations: {{- toYaml . | nindent 6 }} - {{- end }} - {{- with (default .Values.nodeSelector .Values.fluentd.nodeSelector) }} - nodeSelector: {{- toYaml . | nindent 6 }} - {{- end }} - {{- with .Values.fluentd.resources }} - resources: {{- toYaml . | nindent 6 }} - {{- end }} - {{- with .Values.fluentd.livenessProbe }} - livenessProbe: {{- toYaml . | nindent 6 }} - {{- end }} -{{- end }}