3# DaemonSet, Deployment or StatefulSet
5# azureblob, cloudwatch, elasticsearch7, elasticsearch8, gcs, graylog , kafka, kafka2, kinesis, opensearch
7# version of the variant to use.
9# # Only applicable for Deployment or StatefulSet
13 repository: cgr.dev/chainguard-private/fluentd-kubernetes-daemonset-fips
14 pullPolicy: "IfNotPresent"
15 tag: latest@sha256:f7661fd537981ca63447f33057c75f0eddc2b8ffa98548819b846015f0250339
16## Optional array of imagePullSecrets containing private registry credentials
17## Ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
25# from Kubernetes 1.25, PSP is deprecated
26# See: https://kubernetes.io/blog/2022/08/23/kubernetes-v1-25-release/#pod-security-changes
27# We automatically disable PSP if Kubernetes version is 1.25 or higher
31## Security Context policies for controller pods
32## See https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/ for
33## notes on enabling and using sysctls
43# readOnlyRootFilesystem: true
47# Configure the livecycle
48# Ref: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/
52# command: ["/bin/sh", "-c", "sleep 20"]
54# Configure the livenessProbe
55# Ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
60 # initialDelaySeconds: 0
65# Configure the readinessProbe
66# Ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
71 # initialDelaySeconds: 0
83## only available if kind is Deployment
88 targetCPUUtilizationPercentage: 80
89 # targetMemoryUtilizationPercentage: 80
90 ## see https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/#autoscaling-on-multiple-metrics-and-custom-metrics
95 # name: packets-per-second
99 ## see https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/#support-for-configurable-scaling-behavior
109# priorityClassName: "system-node-critical"
111## Node tolerations for server scheduling to nodes with taints
112## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
117# effect: "NoSchedule"
119## Affinity and anti-affinity
120## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
123## Topology spread constraints, only applicable for Deployment or StatefulSet
124## Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/
126topologySpreadConstraints: []
128# topologyKey: topology.kubernetes.io/zone
129# whenUnsatisfiable: ScheduleAnyway
132# app.kubernetes.io/name: fluentd
134## Annotations to be added to fluentd DaemonSet/Deployment
137## Labels to be added to fluentd DaemonSet/Deployment
140## Annotations to be added to fluentd pods. Supports tpl evaluation.
143## Labels to be added to fluentd pods
146## How long (in seconds) a pods needs to be stable before progressing the deployment
149## How long (in seconds) a pod may take to exit (useful with lifecycle hooks to ensure lb deregistration is done)
151terminationGracePeriodSeconds:
152## Deployment strategy / DaemonSet updateStrategy
159## Additional environment variables to set for fluentd pods
161# - name: "FLUENTD_CONF"
162# value: "../../../etc/fluent/fluent.conf"
163# - name: FLUENT_ELASTICSEARCH_HOST
164# value: "elasticsearch-master"
165# - name: FLUENT_ELASTICSEARCH_PORT
170## Name of the configMap containing a custom fluentd.conf configuration file to use instead of the default.
171# mainConfigMapNameOverride: ""
173## Name of the configMap containing files to be placed under /etc/fluent/config.d/
174## NOTE: This will replace ALL default files in the aforementioned path!
175# extraFilesConfigMapNameOverride: ""
176mountVarLogDirectory: true
177mountDockerContainersDirectory: true
180## Only available if kind is StatefulSet
181## Fluentd persistence
186 accessMode: ReadWriteOnce
195 # externalTrafficPolicy: Local
197 # - name: "forwarder"
199 # containerPort: 24224
200## Prometheus Monitoring
206 release: prometheus-operator
208 namespaceSelector: {}
209 ## metric relabel configs to apply to samples before ingestion.
211 metricRelabelings: []
212 # - sourceLabels: [__name__]
214 # regex: ^fluentd_output_status_buffer_(oldest|newest)_.+
217 ## relabel configs to apply to samples after ingestion.
220 # - sourceLabels: [__meta_kubernetes_pod_node_name]
223 # targetLabel: nodename
226 ## Additional serviceMonitor config
229 # scrapeInterval: 30s
237 # - alert: FluentdDown
238 # expr: up{job="fluentd"} == 0
244 # summary: "Fluentd Down"
245 # description: "{{ $labels.pod }} on {{ $labels.nodename }} is down"
246 # - alert: FluentdScrapeMissing
247 # expr: absent(up{job="fluentd"} == 1)
253 # summary: "Fluentd Scrape Missing"
254 # description: "Fluentd instance has disappeared from Prometheus target discovery"
255## Grafana Monitoring Dashboard
261 grafana_dashboard: "\"1\""
262## Fluentd list of plugins to install
265# - fluent-plugin-out-http
267## Add fluentd config files from K8s configMaps
270# - fluentd-prometheus-conf
271# - fluentd-systemd-conf
273## Fluentd configurations:
280 @id in_tail_container_logs
282 path /var/log/containers/*.log
283 pos_file /var/log/fluentd-containers.log.pos
292 time_format "%Y-%m-%dT%H:%M:%S.%NZ"
297 expression /^(?<time>.+) (?<stream>stdout|stderr)( (.))? (?<log>.*)$/
298 time_format '%Y-%m-%dT%H:%M:%S.%NZ'
302 emit_unmatched_lines true
305 # expose metrics in prometheus format
310 metrics_path /metrics
314 <match kubernetes.var.log.containers.fluentd**>
319 # <match kubernetes.var.log.containers.**_kube-system_**>
321 # @id ignore_kube_system_logs
324 <filter kubernetes.**>
325 @type kubernetes_metadata
326 @id filter_kube_metadata
328 skip_container_metadata false
329 skip_namespace_metadata true
343 name fluentd_input_status_num_records_total
345 desc The total number of incoming records
362 host "elasticsearch-master"
367 # Don't wait for elastic to start up.
368 verify_es_version_at_startup false
374 # kubernetes.io/ingress.class: nginx
375 # kubernetes.io/tls-acme: "true"
377 # - host: fluentd.example.tld
380 # - secretName: fluentd-tls
382 # - fluentd.example.tld