Skip to content

Commit

Permalink
PACKAGE=rancher-logging make charts
Browse files Browse the repository at this point in the history
  • Loading branch information
jbiers committed Jan 8, 2025
1 parent f5a87bc commit 0c9c19b
Show file tree
Hide file tree
Showing 16 changed files with 79 additions and 2 deletions.
Binary file modified assets/rancher-logging/rancher-logging-105.2.0-rc.1+up4.10.0.tgz
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -195,3 +195,37 @@ Formats the cluster domain as a suffix, e.g.:
{{- printf ".%s" .Values.clusterDomain -}}
{{- end -}}
{{- end -}}

{{/* Implements logic to add the loggingRef field to custom loggings based on the cluster type */}}
{{- define "logging-operator.individualLoggingRef" -}}
{{- with .loggingRef -}}
loggingRef: {{ . }}
{{- end -}}
{{- end -}}

{{/* Implements logic to add fluentd spec fields to custom loggings based on the cluster type */}}
{{- define "logging-operator.individualFluentd" -}}
{{- if .fluentd -}}
{{- with .fluentd.scaling.replicas -}}
scaling:
replicas: {{ . }}
{{- end }}
{{- with .fluentd.resources }}
resources: {{ toYaml . | nindent 2 }}
{{- end -}}
{{- end -}}
{{- end -}}

{{/* Implements logic to add fluentbit loggingRef field to custom loggings based on the cluster type */}}
{{- define "logging-operator.individualFluentbitLoggingRef" -}}
{{- with .loggingRef -}}
loggingRef: {{ . }}
{{- end -}}
{{- end -}}

{{/* Implements logic to add fluentbit spec fields to custom fluentBitAgents based on the cluster type */}}
{{- define "logging-operator.individualFluentbit" -}}
{{- with .resources }}
resources: {{ toYaml . | nindent 2 }}
{{- end -}}
{{- end -}}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{{- define "logging-operator.fluentbitagent.aks" -}}
{{- $logPath := "/var/log/azure/kubelet-status.log" -}}
{{- $individualValues := .Values.additionalLoggingSources.aks.fluentbit -}}
metadata:
name: {{ .Release.Name }}-aks
spec:
Expand All @@ -11,6 +12,8 @@ spec:
inputTail:
Tag: "aks"
Path: {{ $logPath }}
{{- include "logging-operator.individualFluentbitLoggingRef" $individualValues | nindent 2 }}
{{- include "logging-operator.individualFluentbit" $individualValues | nindent 2 }}
{{- end -}}
{{- if .Values.additionalLoggingSources.aks.enabled }}
{{- include "logging-operator.fluentbitagent" (list . "logging-operator.fluentbitagent.aks") -}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{{- define "logging-operator.logging.aks" -}}
{{- $individualValues := .Values.additionalLoggingSources.aks -}}
metadata:
name: {{ .Release.Name }}-aks
spec:
{{- include "logging-operator.individualLoggingRef" $individualValues | nindent 2 }}
fluentd:
{{- include "logging-operator.individualFluentd" $individualValues | nindent 4 }}
{{- end -}}
{{- if .Values.additionalLoggingSources.aks.enabled }}
{{- include "logging-operator.logging" (list . "logging-operator.logging.aks") -}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{{- define "logging-operator.fluentbitagent.eks" -}}
{{- $logPath := "/var/log/messages" -}}
{{- $individualValues := .Values.additionalLoggingSources.eks.fluentbit -}}
metadata:
name: {{ .Release.Name }}-eks
spec:
{{- include "logging-operator.individualFluentbitLoggingRef" $individualValues | nindent 2 }}
disableKubernetesFilter: true
extraVolumeMounts:
- source: {{ $logPath }}
Expand All @@ -12,6 +14,7 @@ spec:
Tag: "eks"
Path: {{ $logPath }}
Parser: "syslog"
{{- include "logging-operator.individualFluentbit" $individualValues | nindent 2 }}
{{- end -}}
{{- if .Values.additionalLoggingSources.eks.enabled }}
{{- include "logging-operator.fluentbitagent" (list . "logging-operator.fluentbitagent.eks") -}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{{- define "logging-operator.logging.eks" -}}
{{- $individualValues := .Values.additionalLoggingSources.eks -}}
metadata:
name: {{ .Release.Name }}-eks
spec:
{{- include "logging-operator.individualLoggingRef" $individualValues | nindent 2 }}
fluentd:
{{- include "logging-operator.individualFluentd" $individualValues | nindent 4 }}
{{- if .Values.loggingServiceAccountAnnotations.eks -}}
serviceAccount:
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{{- define "logging-operator.fluentbitagent.gke" -}}
{{- $logPath := "/var/log/kube-proxy.log" -}}
{{- $individualValues := .Values.additionalLoggingSources.gke.fluentbit -}}
metadata:
name: {{ .Release.Name }}-gke
spec:
{{- include "logging-operator.individualFluentbitLoggingRef" $individualValues | nindent 2 }}
disableKubernetesFilter: true
extraVolumeMounts:
- source: {{ $logPath }}
Expand All @@ -11,6 +13,7 @@ spec:
inputTail:
Tag: "gke"
Path: {{ $logPath }}
{{- include "logging-operator.individualFluentbit" $individualValues | nindent 2 }}
{{- end -}}
{{- if .Values.additionalLoggingSources.gke.enabled }}
{{- include "logging-operator.fluentbitagent" (list . "logging-operator.fluentbitagent.gke") -}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{{- define "logging-operator.logging.gke" -}}
{{- $individualValues := .Values.additionalLoggingSources.gke -}}
metadata:
name: {{ .Release.Name }}-gke
spec:
{{- include "logging-operator.individualLoggingRef" $individualValues | nindent 2 }}
fluentd:
{{- include "logging-operator.individualFluentd" $individualValues | nindent 4 }}
{{- end -}}
{{- if .Values.additionalLoggingSources.gke.enabled }}
{{- include "logging-operator.logging" (list . "logging-operator.logging.gke") -}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{- if and .Values.additionalLoggingSources.k3s.enabled (eq .Values.additionalLoggingSources.k3s.container_engine "systemd") }}
{{- $individualValues := .Values.additionalLoggingSources.k3s.fluentbit -}}
apiVersion: apps/v1
kind: DaemonSet
metadata:
Expand All @@ -20,6 +21,7 @@ spec:
containers:
- name: fluentbit
image: "{{ template "logging-operator.fluentbitImage" . }}"
{{- include "logging-operator.individualFluentbit" $individualValues | nindent 10 }}
{{- if .Values.global.seLinux.enabled }}
securityContext:
seLinuxOptions:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{{- define "logging-operator.fluentbitagent.k3s-openrc" -}}
{{- $logPath := "/var/log/k3s.log" -}}
{{- $individualValues := .Values.additionalLoggingSources.kes.fluentbit -}}
metadata:
name: {{ .Release.Name }}-k3s
spec:
{{- include "logging-operator.individualFluentbitLoggingRef" $individualValues | nindent 2 }}
disableKubernetesFilter: true
extraVolumeMounts:
- source: {{ $logPath }}
Expand All @@ -12,6 +14,7 @@ spec:
Tag: "k3s"
Path: {{ $logPath }}
Path_Key: filename
{{- include "logging-operator.individualFluentbit" $individualValues | nindent 2 }}
{{- end -}}
{{- if and .Values.additionalLoggingSources.k3s.enabled (eq .Values.additionalLoggingSources.k3s.container_engine "openrc")}}
{{- include "logging-operator.fluentbitagent" (list . "logging-operator.fluentbitagent.k3s-openrc") -}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{{- define "logging-operator.logging.k3s-openrc" -}}
{{- $individualValues := .Values.additionalLoggingSources.k3s -}}
metadata:
name: {{ .Release.Name }}-k3s
spec:
{{- include "logging-operator.individualLoggingRef" $individualValues | nindent 2 }}
fluentd:
{{- include "logging-operator.individualFluentd" $individualValues | nindent 4 }}
{{- end -}}
{{- if and .Values.additionalLoggingSources.k3s.enabled (eq .Values.additionalLoggingSources.k3s.container_engine "openrc")}}
{{- include "logging-operator.logging" (list . "logging-operator.logging.k3s-openrc") -}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{{- define "logging-operator.fluentbitagent.kube-audit" -}}
{{- $individualValues := .Values.additionalLoggingSources.kubeAudit.fluentbit -}}
metadata:
name: {{ .Release.Name }}-kube-audit
spec:
{{- include "logging-operator.individualFluentbitLoggingRef" $individualValues | nindent 2 }}
disableKubernetesFilter: true
extraVolumeMounts:
- source: {{ template "kubeAuditPathPrefix" . }}
Expand All @@ -15,6 +17,7 @@ spec:
tolerations: {{- toYaml . | nindent 6 }}
{{- end }}
nodeSelector: {{ include "controlplaneSelector" . | nindent 6 }}
{{- include "logging-operator.individualFluentbit" $individualValues | nindent 2 }}
{{- end -}}
{{- if .Values.additionalLoggingSources.kubeAudit.enabled }}
{{- include "logging-operator.fluentbitagent" (list . "logging-operator.fluentbitagent.kube-audit") -}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
{{- define "logging-operator.logging.kube-audit" -}}
{{- $individualValues := .Values.additionalLoggingSources.kubeAudit -}}
metadata:
name: {{ .Release.Name }}-kube-audit
spec:
{{- include "logging-operator.individualLoggingRef" $individualValues | nindent 2 }}
{{- if .Values.additionalLoggingSources.kubeAudit.loggingRef }}
loggingRef: {{ .Values.additionalLoggingSources.kubeAudit.loggingRef }}
{{- end }}
fluentd:
{{- include "logging-operator.individualFluentd" $individualValues | nindent 4 }}
{{- end -}}
{{- if .Values.additionalLoggingSources.kubeAudit.enabled }}
{{- include "logging-operator.logging" (list . "logging-operator.logging.kube-audit") -}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{{- if .Values.additionalLoggingSources.rke.enabled }}
{{- $containers := printf "%s/containers/" (default "/var/lib/docker" .Values.global.dockerRootDirectory) }}
{{- $individualValues := .Values.additionalLoggingSources.rke.fluentbit -}}
apiVersion: apps/v1
kind: DaemonSet
metadata:
Expand All @@ -19,6 +20,7 @@ spec:
containers:
- name: fluentbit
image: "{{ template "logging-operator.fluentbitImage" . }}"
{{- include "logging-operator.individualFluentbit" $individualValues | nindent 10 }}
volumeMounts:
- mountPath: /var/lib/rancher/rke/log/
name: indir
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{- if .Values.additionalLoggingSources.rke2.enabled }}
{{- $individualValues := .Values.additionalLoggingSources.rke2.fluentbit -}}
apiVersion: apps/v1
kind: DaemonSet
metadata:
Expand All @@ -20,6 +21,7 @@ spec:
containers:
- name: fluentbit
image: "{{ template "logging-operator.fluentbitImage" . }}"
{{- include "logging-operator.individualFluentbit" $individualValues | nindent 10 }}
{{- if .Values.global.seLinux.enabled }}
securityContext:
seLinuxOptions:
Expand Down
4 changes: 2 additions & 2 deletions index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15650,9 +15650,9 @@ entries:
catalog.cattle.io/upstream-version: 4.10.0
apiVersion: v2
appVersion: 4.10.0
created: "2025-01-07T17:21:37.836562953-04:00"
created: "2025-01-08T15:24:41.899898524-04:00"
description: Logging operator for Kubernetes based on Fluentd and Fluentbit.
digest: 916b87c9ab72e07440aca6f47caaea540b88dbd8ae39ffee314328c5a1dc7ca5
digest: 8aed8372df62cb1939b0c2240081362291c1f2bba74d68aa1e6921fbc4b14f50
home: https://kube-logging.github.io
icon: file://assets/logos/rancher-logging.svg
keywords:
Expand Down

0 comments on commit 0c9c19b

Please sign in to comment.