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

Adding per logging overrides #4478

Open
wants to merge 2 commits into
base: dev-v2.9
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
48 changes: 48 additions & 0 deletions index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17770,6 +17770,40 @@ entries:
- assets/rancher-kube-state-metrics/rancher-kube-state-metrics-2.13.101.tgz
version: 2.13.101
rancher-logging:
- annotations:
catalog.cattle.io/auto-install: rancher-logging-crd=match
catalog.cattle.io/certified: rancher
catalog.cattle.io/deploys-on-os: windows
catalog.cattle.io/display-name: Logging
catalog.cattle.io/kube-version: '>= 1.26.0-0 < 1.31.0-0'
catalog.cattle.io/namespace: cattle-logging-system
catalog.cattle.io/permits-os: linux,windows
catalog.cattle.io/provides-gvr: logging.banzaicloud.io.clusterflow/v1beta1
catalog.cattle.io/rancher-version: '>= 2.9.0-0 < 2.10.0-0'
catalog.cattle.io/release-name: rancher-logging
catalog.cattle.io/type: cluster-tool
catalog.cattle.io/ui-component: logging
catalog.cattle.io/upstream-version: 4.8.0
apiVersion: v2
appVersion: 4.8.0
created: "2024-09-23T19:17:19.504054719Z"
description: Logging operator for Kubernetes based on Fluentd and Fluentbit.
digest: 12a8e035b888871d942888c03d043aa533e9b392d91b4d7b0d6ecad1c4c38957
home: https://kube-logging.github.io
icon: file://assets/logos/rancher-logging.svg
keywords:
- logging
- fluentd
- fluentbit
kubeVersion: '>=1.26.0-0'
name: rancher-logging
sources:
- https://github.com/kube-logging/logging-operator
- https://github.com/kube-logging/helm-charts/tree/main/charts/logging-operator
type: application
urls:
- assets/rancher-logging/rancher-logging-104.1.2+up4.8.0.tgz
version: 104.1.2+up4.8.0
- annotations:
catalog.cattle.io/auto-install: rancher-logging-crd=match
catalog.cattle.io/certified: rancher
Expand Down Expand Up @@ -18552,6 +18586,20 @@ entries:
- assets/rancher-logging/rancher-logging-3.6.000.tgz
version: 3.6.000
rancher-logging-crd:
- annotations:
catalog.cattle.io/certified: rancher
catalog.cattle.io/hidden: "true"
catalog.cattle.io/namespace: cattle-logging-system
catalog.cattle.io/release-name: rancher-logging-crd
apiVersion: v1
created: "2024-09-23T18:43:19.231876312Z"
description: Installs the CRDs for rancher-logging.
digest: cba98e94e5448d966a19f0a188ac30fbbb2257d895fa947a341b3a1b0ec993f6
name: rancher-logging-crd
type: application
urls:
- assets/rancher-logging-crd/rancher-logging-crd-104.1.2+up4.8.0.tgz
version: 104.1.2+up4.8.0
- annotations:
catalog.cattle.io/certified: rancher
catalog.cattle.io/hidden: "true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,18 @@ spec:
{{/* values are from the values.yaml */}}
{{- $values := $top.Values.fluentbitAgentOverlay | default (dict ) -}}

{{/* figure out which logger we are working on */}}
{{- $logger := (index . 1) | replace "logging-operator.logging." "" -}}

{{/* ovalues are the logger specific overlay values */}}
{{- $ovalues := (dig $logger dict $top.Values.fluentbitAgentOverlays) -}}

####### {{$generic}}

{{/* the sources are merge right to left meaning tpl is the highest prcedence and values is the lowest */}}
{{- toYaml (merge $tpl $values $generic) -}}
{{- toYaml (merge $tpl $ovalues $values $generic) -}}
{{- end -}}

{{- define "logging-operator.fluentbitagent" -}}
{{- include "logging-operator.util.merge.fluentbitagent" (append . "logging-operator.fluentbitagent.tpl") -}}
{{- end -}}
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,18 @@ spec:
{{/* values are from the values.yaml */}}
{{- $values := $top.Values.loggingOverlay | default (dict ) -}}

{{/* figure out which logger we are working on */}}
{{- $logger := (index . 1) | replace "logging-operator.logging." "" -}}

{{/* ovalues are the logger specific overlay values */}}
{{- $ovalues := (dig $logger dict $top.Values.loggingOverlays) -}}

####### {{$generic}}

{{/* the sources are merge right to left meaning tpl is the highest prcedence and values is the lowest */}}
{{- toYaml (merge $tpl $values $generic) -}}
{{- toYaml (merge $tpl $ovalues $values $generic) -}}
{{- end -}}

{{- define "logging-operator.logging" -}}
{{- include "logging-operator.util.merge.logging" (append . "logging-operator.logging.tpl") -}}
{{- end -}}
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@

# -- Extra manifests to deploy as an array
extraManifests: []
@@ -324,3 +473,12 @@
@@ -324,3 +473,24 @@
# name: extra-manifest
# data:
# extra-data: "value"
Expand All @@ -215,3 +215,15 @@
+# this object will be merged with every logging CR created by this chart. Any fields that collide with fields from the
+# settings above will be overridden. Any fields that collide with fields set in the files in `templates/loggings` will
+# be ignored.
+
+# Just like loggingOverlay but allows per logging overrides
+loggingOverlays: {}
+## Syntax ##
+# <logging-name>:
+# <key>: <value>
+
+# Just like fluentbitAgentOverlay but allows per logging overrides
+fluentbitAgentOverlays: {}
+## Syntax ##
+# <logging-name>:
+# <key>: <value>
2 changes: 1 addition & 1 deletion packages/rancher-logging/package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
url: oci://ghcr.io/kube-logging/helm-charts/logging-operator:4.8.0
version: 104.1.1
version: 104.1.2
additionalCharts:
- workingDir: charts-crd
crdOptions:
Expand Down