Add regexes to filter out PII
Signed-off-by: Michel Hollands <michel.hollands@grafana.com>
This commit is contained in:
parent
a1cd5d36b0
commit
fa2b01708c
@ -17,6 +17,14 @@
|
|||||||
{{- join ", " $list }}
|
{{- join ", " $list }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
{{- define "agent.loki_process_targets" -}}
|
||||||
|
{{- if empty .Values.logs.piiregexes }}
|
||||||
|
{{- include "agent.loki_write_targets" . }}
|
||||||
|
{{- else }}
|
||||||
|
{{- printf "loki.process.PII.receiver" }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
{{- define "agent.prometheus_write_targets" -}}
|
{{- define "agent.prometheus_write_targets" -}}
|
||||||
{{- $list := list }}
|
{{- $list := list }}
|
||||||
{{- if .Values.local.metrics.enabled }}
|
{{- if .Values.local.metrics.enabled }}
|
||||||
|
@ -40,8 +40,22 @@ data:
|
|||||||
{{- if or .Values.local.logs.enabled .Values.cloud.logs.enabled }}
|
{{- if or .Values.local.logs.enabled .Values.cloud.logs.enabled }}
|
||||||
loki.source.kubernetes "pods" {
|
loki.source.kubernetes "pods" {
|
||||||
targets = discovery.relabel.rename_meta_labels.output
|
targets = discovery.relabel.rename_meta_labels.output
|
||||||
forward_to = [ {{ include "agent.loki_write_targets" . }} ]
|
forward_to = [ {{ include "agent.loki_process_targets" . }} ]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{{- if not (empty .Values.logs.piiregexes) }}
|
||||||
|
loki.process "PII" {
|
||||||
|
forward_to = [ {{ include "agent.loki_write_targets" . }} ]
|
||||||
|
|
||||||
|
{{- range .Values.logs.piiregexes }}
|
||||||
|
stage.replace {
|
||||||
|
expression = "{{ . }}"
|
||||||
|
replace = "*****"
|
||||||
|
}
|
||||||
|
{{- end }}
|
||||||
|
}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- if or .Values.local.metrics.enabled .Values.cloud.metrics.enabled }}
|
{{- if or .Values.local.metrics.enabled .Values.cloud.metrics.enabled }}
|
||||||
|
@ -32,6 +32,9 @@ cloud:
|
|||||||
username:
|
username:
|
||||||
password:
|
password:
|
||||||
|
|
||||||
|
logs:
|
||||||
|
PIIregexes:
|
||||||
|
|
||||||
global:
|
global:
|
||||||
minio:
|
minio:
|
||||||
rootUser: "rootuser"
|
rootUser: "rootuser"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user