Skip to content
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
13 changes: 9 additions & 4 deletions charts/fluent-operator/templates/fluentbit-servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,24 @@ apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: fluent-bit
namespace: {{ template "fluent-operator.namespace" . }}
labels:
app.kubernetes.io/name: fluent-bit
namespace: {{ template "fluent-operator.namespace" . }}
{{- with .Values.fluentbit.serviceMonitor.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
endpoints:
- port: metrics
path: {{ .Values.fluentbit.serviceMonitor.path }}
interval: {{ .Values.fluentbit.serviceMonitor.interval }}
path: {{ .Values.fluentbit.serviceMonitor.path }}
{{- if .Values.fluentbit.serviceMonitor.secure }}
scheme: https
{{- if .Values.fluentbit.serviceMonitor.tlsConfig }}
tlsConfig:
{{- toYaml .Values.fluentbit.serviceMonitor.tlsConfig }}
{{- end }}
{{- end }}
interval: {{ .Values.fluentbit.serviceMonitor.interval }}
scrapeTimeout: {{ .Values.fluentbit.serviceMonitor.scrapeTimeout }}
{{- with .Values.fluentbit.serviceMonitor.relabelings }}
relabelings:
Expand All @@ -35,7 +40,7 @@ spec:
{{- end }}
namespaceSelector:
matchNames:
- {{ template "fluent-operator.namespace" . }}
- {{ template "fluent-operator.namespace" . }}
{{- end }}
{{- end }}
{{- end }}
135 changes: 76 additions & 59 deletions charts/fluent-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ operator:
initcontainer:
repository: "docker"
tag: "20.10"

resources:
limits:
cpu: 100m
Expand Down Expand Up @@ -77,15 +76,34 @@ fluentbit:
# Installs a sub chart carrying the CRDs for the fluent-bit controller. The sub chart is enabled by default.
crdsEnable: true
enable: true

serviceMonitor:
enable: false
interval: 30s
## Labels that the Prometheus Operator looks for to act on this ServiceMonitor
# labels:
# release: prometheus-stack
path: /api/v2/metrics/prometheus
scrapeTimeout: 10s
## Applies "scheme: https" and tlsConfig if true
secure: false
tlsConfig: {}
relabelings: []
metricRelabelings: []
# tlsConfig: {}
interval: 30s
scrapeTimeout: 10s
## Relabel configs to apply to samples after ingestion
# relabelings:
# - sourceLabels: [__meta_kubernetes_pod_node_name]
# separator: ;
# regex: ^(.*)$
# targetLabel: nodename
# replacement: $1
# action: replace
## Metric relabel configs to apply to samples before ingestion
# metricRelabelings:
# - sourceLabels: [__meta_kubernetes_service_label_cluster]
# targetLabel: cluster
# regex: (.*)
# replacement: ${1}
# action: replace

livenessProbe:
enabled: true
initialDelaySeconds: 10
Expand All @@ -107,12 +125,11 @@ fluentbit:
cpu: 10m
memory: 25Mi
# Specify custom annotations to be added to each FluentBit pod.
annotations:
{}
## Request to Fluent Bit to exclude or not the logs generated by the Pod.
# fluentbit.io/exclude: "true"
## Prometheus can use this tag to automatically discover the Pod and collect monitoring data
# prometheus.io/scrape: "true"
annotations: {}
## Request to Fluent Bit to exclude or not the logs generated by the Pod.
# fluentbit.io/exclude: "true"
## Prometheus can use this tag to automatically discover the Pod and collect monitoring data
# prometheus.io/scrape: "true"
# Specify additional custom labels for fluentbit-pods
labels: {}

Expand Down Expand Up @@ -230,18 +247,18 @@ fluentbit:
pauseOnChunksOverlimit: "off"
nodeExporterMetrics: {}
# uncomment below nodeExporterMetrics section if you want to collect node exporter metrics
# nodeExporterMetrics:
# tag: node_metrics
# scrapeInterval: 15s
# path:
# procfs: /host/proc
# sysfs: /host/sys
# nodeExporterMetrics:
# tag: node_metrics
# scrapeInterval: 15s
# path:
# procfs: /host/proc
# sysfs: /host/sys
fluentBitMetrics: {}
# uncomment below fluentBitMetrics section if you want to collect fluentBit metrics
# fluentBitMetrics:
# scrapeInterval: "2"
# scrapeOnStart: true
# tag: "fb.metrics"
# fluentBitMetrics:
# scrapeInterval: "2"
# scrapeOnStart: true
# tag: "fb.metrics"

# Configure the output plugin parameter in FluentBit.
# You can set enable to true to output logs to the specified location.
Expand All @@ -254,26 +271,26 @@ fluentbit:
logstashPrefix: ks-logstash-log
bufferSize: 20MB
traceError: true
# logstashPrefixKey: ks-logstash-log
# suppressTypeName: "On"
# path: ""
# bufferSize: "4KB"
# index: "fluent-bit"
# httpUser:
# httpPassword:
# logstashFormat: true
# replaceDots: false
# enableTLS: false
# writeOperation: upsert
# tls:
# verify: On
# debug: 1
# caFile: "<Absolute path to CA certificate file>"
# caPath: "<Absolute path to scan for certificate files>"
# crtFile: "<Absolute path to private Key file>"
# keyFile: "<Absolute path to private Key file>"
# keyPassword:
# vhost: "<Hostname to be used for TLS SNI extension>"
# logstashPrefixKey: ks-logstash-log
# suppressTypeName: "On"
# path: ""
# bufferSize: "4KB"
# index: "fluent-bit"
# httpUser:
# httpPassword:
# logstashFormat: true
# replaceDots: false
# enableTLS: false
# writeOperation: upsert
# tls:
# verify: On
# debug: 1
# caFile: "<Absolute path to CA certificate file>"
# caPath: "<Absolute path to scan for certificate files>"
# crtFile: "<Absolute path to private Key file>"
# keyFile: "<Absolute path to private Key file>"
# keyPassword:
# vhost: "<Hostname to be used for TLS SNI extension>"
kafka:
enable: false
brokers: "<kafka broker list like xxx.xxx.xxx.xxx:9092,yyy.yyy.yyy.yyy:9092>"
Expand All @@ -284,15 +301,15 @@ fluentbit:
# You can configure the opensearch-related configuration here
stdout:
enable: false
# Uncomment the following section to enable Prometheus metrics exporter.
prometheusMetricsExporter: {}
# prometheusMetricsExporter:
# match: "fb.metrics"
# metricsExporter:
# host: "0.0.0.0"
# port: 2020
# addLabels:
# app: "fluentbit"
# uncomment the following section to enable Prometheus metrics exporter
# prometheusMetricsExporter:
# match: "fb.metrics"
# metricsExporter:
# host: "0.0.0.0"
# port: 2020
# addLabels:
# app: "fluentbit"

# Loki fluentbit ClusterOutput, to be encapsulated in fluentbit config
# See https://github.com/fluent/fluent-operator/blob/master/docs/plugins/fluentbit/output/loki.md
Expand Down Expand Up @@ -349,15 +366,15 @@ fluentbit:

service:
storage: {}
# Remove the above storage section and uncomment below section if you want to configure file-system as storage for buffer
# storage:
# path: "/host/fluent-bit-buffer/"
# backlogMemLimit: "50MB"
# checksum: "off"
# deleteIrrecoverableChunks: "on"
# maxChunksUp: 128
# metrics: "on"
# sync: normal
# uncomment below section if you want to configure file-system as storage for buffer
# storage:
# path: "/host/fluent-bit-buffer/"
# backlogMemLimit: "50MB"
# checksum: "off"
# deleteIrrecoverableChunks: "on"
# maxChunksUp: 128
# metrics: "on"
# sync: normal

# Configure the default filters in FluentBit.
# The `filter` will filter and parse the collected log information and output the logs into a uniform format. You can choose whether to turn this on or not.
Expand Down
Loading