Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix root loggingref #5118

Open
wants to merge 2 commits into
base: dev-v2.11
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified assets/rancher-logging/rancher-logging-106.0.0-rc.1+up4.10.0.tgz
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{{- define "logging-operator.fluentbitagent.root" -}}
{{- $individualValues := .Values.additionalLoggingSources -}}
{{- $containerLogPath := printf "%s/containers/" (default "/var/lib/docker" .Values.global.dockerRootDirectory) }}
metadata:
name: "{{ .Release.Name }}-root"
spec:
{{- include "logging-operator.individualLoggingRef" (dict "loggingRef" .Values.additionalLoggingSources.loggingRef) | nindent 2 }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also take a look the fluentbitagent.yaml under kube-audit, from my test, without a loggingRef, the kube-audit log is also sent to root-fluend, thanks.

Harvester patches the pulled rancher-logging chart locally.

https://github.com/harvester/harvester-installer/pull/980/files#diff-262d20f5e1057034255c9c16590b8a3e94f4e059297f837c1b8d31f406f1ede0

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@w13915984028 You can set this thru below, and that's being set here: https://github.com/rancher/charts/blob/dev-v2.11/charts/rancher-logging/106.0.0-rc.1%2Bup4.10.0/templates/loggings/kube-audit/fluentbitagent.yaml#L2-L6

with the helper function https://github.com/rancher/charts/blob/dev-v2.11/charts/rancher-logging/106.0.0-rc.1%2Bup4.10.0/templates/_helpers.tpl#L220

additionalLoggingSources:
  kube-audit:
    enabled: true
    loggingRef: kubeauditlogging
    fluentbit:
      loggingRef: kubeauditlogging

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@skanakal That's great, thanks.

{{- if .Values.global.dockerRootDirectory }}
mountPath: {{ $containerLogPath }}
extraVolumeMounts:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{{- define "logging-operator.logging.root" -}}
{{- $individualValues := .Values.additionalLoggingSources -}}
metadata:
name: "{{ .Release.Name }}-root"
spec:
{{- include "logging-operator.individualLoggingRef" (dict "loggingRef" .Values.additionalLoggingSources.loggingRef) | nindent 2 }}
{{- if (include "windowsEnabled" .) }}
nodeAgents:
- name: win-agent
Expand Down
4 changes: 2 additions & 2 deletions index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14949,9 +14949,9 @@ entries:
catalog.cattle.io/upstream-version: 4.10.0
apiVersion: v2
appVersion: 4.10.0
created: "2025-01-31T19:23:27.399296+05:30"
created: "2025-02-10T19:58:26.11036989+05:30"
description: Logging operator for Kubernetes based on Fluentd and Fluentbit.
digest: 8e73d37d4854b3062bb0a2bd700180c6d47f2bfa7627f0b5d2bab6d6be225fd7
digest: 29637666599c585351e28d0583590c715fab9b950bed368fc4101a47e412df74
home: https://kube-logging.github.io
icon: file://assets/logos/rancher-logging.svg
keywords:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{{- define "logging-operator.fluentbitagent.root" -}}
{{- $individualValues := .Values.additionalLoggingSources -}}
{{- $containerLogPath := printf "%s/containers/" (default "/var/lib/docker" .Values.global.dockerRootDirectory) }}
metadata:
name: "{{ .Release.Name }}-root"
spec:
{{- include "logging-operator.individualLoggingRef" (dict "loggingRef" .Values.additionalLoggingSources.loggingRef) | nindent 2 }}
{{- if .Values.global.dockerRootDirectory }}
mountPath: {{ $containerLogPath }}
extraVolumeMounts:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{{- define "logging-operator.logging.root" -}}
{{- $individualValues := .Values.additionalLoggingSources -}}
metadata:
name: "{{ .Release.Name }}-root"
spec:
{{- include "logging-operator.individualLoggingRef" (dict "loggingRef" .Values.additionalLoggingSources.loggingRef) | nindent 2 }}
{{- if (include "windowsEnabled" .) }}
nodeAgents:
- name: win-agent
Expand Down
Loading