Skip to content

Commit

Permalink
feat: add configuration for logging-operator metrics ServiceMonitor
Browse files Browse the repository at this point in the history
Enable the fluentbit ServiceMonitor by default.
  • Loading branch information
smlx committed May 29, 2023
1 parent bbb4864 commit b2641e5
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
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 b2641e5

Please sign in to comment.