Skip to content
Snippets Groups Projects

delete fluentd from cern-magnum to allow user define conf

Closed Diana Gaponcic requested to merge delete-fluentd-cms into master
4 files
+ 0
240
Compare changes
  • Side-by-side
  • Inline
Files
4
+ 0
57
{{ if .Values.fluentd.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
name: cern-fluentd-filters-conf
namespace: {{ .Release.namespace }}
data:
filters.conf: |-
<match kubernetes.var.log.containers.**fluentd**>
@type null
</match>
{{- if not .Values.fluentd.output.includeInternal }}
<match kubernetes.var.log.containers.**_kube-system_**>
@type null
</match>
{{- end }}
<filter kubernetes.**>
@type kubernetes_metadata
@id filter_kube_metadata
skip_labels false
skip_container_metadata false
skip_namespace_metadata true
skip_master_url true
@type kubernetes_metadata
@id filter_kube_metadata
</filter>
<filter **>
@type record_transformer
enable_ruby true
<record>
timestamp ${(time.to_f * 1000).to_i}
{{ if .Values.fluentd.clusterUUID -}}
cluster_uuid {{ .Values.fluentd.clusterUUID }}
{{ else }}
cluster_uuid {{ (index .Values "kube-prometheus-stack" "prometheus" "prometheusSpec" "externalLabels" "cluster_uuid") }}
{{ end -}}
</record>
</filter>
<match **>
# match for nginx/traefik ingress tag
@type route
# copy ingress records to security pipeline
<route kubernetes.**>
copy
@label @SECURITY
</route>
# copy records for default logs
<route **>
copy
@label @CENTRALMONIT
</route>
</match>
{{ end }}
Loading