Skip to content

Commit

Permalink
Merge pull request #571 from uselagoon/fluentbit-metrics
Browse files Browse the repository at this point in the history
Expose the metrics configuration of the Logging Operator subchart
  • Loading branch information
smlx authored May 30, 2023
2 parents bbb4864 + 71f17ab commit e3fd18b
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
4 changes: 2 additions & 2 deletions charts/lagoon-logging/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type: application
# time you make changes to the chart and its templates, including the app
# version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.76.0
version: 0.77.0

dependencies:
- name: logging-operator
Expand All @@ -33,4 +33,4 @@ dependencies:
annotations:
artifacthub.io/changes: |
- kind: added
description: added chart option to inject a configuration snippet for post-processing router logs
description: add chart option to configure logging-operator subchart metrics, and enable the fluentbit ServiceMonitor by default
8 changes: 8 additions & 0 deletions charts/lagoon-logging/templates/logging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ spec:
fsGroup: 0
scaling:
replicas: {{ .Values.fluentdReplicaCount }}
{{- with .Values.fluentdMetrics }}
metrics:
{{- toYaml . | nindent 6 }}
{{- end }}
fluentbit:
# Enable a default liveness check to avoid stuck pods.
# At the time of writing this just hits the metrics endpoint.
Expand All @@ -26,4 +30,8 @@ spec:
tolerations:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.fluentbitMetrics }}
metrics:
{{- toYaml . | nindent 6 }}
{{- end }}
controlNamespace: {{ .Release.Namespace | quote }}
12 changes: 12 additions & 0 deletions charts/lagoon-logging/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,18 @@ fluentbitTolerations:
key: lagoon.sh/spot
operator: Exists

# Expose metrics of the Logging Operator's fluentbit daemonset and fluentd
# statefulset via a Prometheus Operator compatible ServiceMonitor object.
#
# The fluentd serviceMonitor is disabled by default until a use-case is found.
#
# See here for full documentation of this field:
# https://kube-logging.dev/docs/operation/logging-operator-monitoring/#metrics-variables
fluentbitMetrics:
serviceMonitor: true
# fluentdMetrics:
# serviceMonitor: true

# This chart assumes the container runtime is containerd, which puts the log
# message in the `message` field of the log record.
#
Expand Down

0 comments on commit e3fd18b

Please sign in to comment.