1
0
Fork 0
mirror of https://github.com/kyverno/policy-reporter.git synced 2024-12-14 11:57:32 +00:00

fix loki labels with dots

Signed-off-by: fjogeleit <frank.jogeleit@web.de>
This commit is contained in:
fjogeleit 2021-09-15 15:04:39 +02:00
parent e4e55897ed
commit c32589b65e
8 changed files with 11 additions and 8 deletions

View file

@ -1,5 +1,8 @@
# Changelog
# 1.9.3
* Fix loki target messages for labels with dots
# 1.9.2
* Add additional egress rules to kyvernoPlugin and UI subchart with `networkPolicy.egress`

View file

@ -1,7 +1,7 @@
GO ?= go
BUILD ?= build
REPO ?= fjogeleit/policy-reporter
IMAGE_TAG ?= 1.8.5
IMAGE_TAG ?= 1.8.6
LD_FLAGS="-s -w"
all: build

View file

@ -5,8 +5,8 @@ description: |
It creates Prometheus Metrics and can send rule validation events to different targets like Loki, Elasticsearch, Slack or Discord
type: application
version: 1.9.2
appVersion: 1.8.5
version: 1.9.3
appVersion: 1.8.6
dependencies:
- name: monitoring

View file

@ -1,7 +1,7 @@
image:
repository: fjogeleit/policy-reporter
pullPolicy: IfNotPresent
tag: 1.8.5
tag: 1.8.6
imagePullSecrets: []

View file

@ -148,7 +148,7 @@ spec:
automountServiceAccountToken: true
containers:
- name: policy-reporter
image: "fjogeleit/policy-reporter:1.8.5"
image: "fjogeleit/policy-reporter:1.8.6"
imagePullPolicy: IfNotPresent
securityContext:
allowPrivilegeEscalation: false

View file

@ -266,7 +266,7 @@ spec:
automountServiceAccountToken: true
containers:
- name: policy-reporter
image: "fjogeleit/policy-reporter:1.8.5"
image: "fjogeleit/policy-reporter:1.8.6"
imagePullPolicy: IfNotPresent
securityContext:
allowPrivilegeEscalation: false

View file

@ -84,7 +84,7 @@ spec:
automountServiceAccountToken: true
containers:
- name: policy-reporter
image: "fjogeleit/policy-reporter:1.8.5"
image: "fjogeleit/policy-reporter:1.8.6"
imagePullPolicy: IfNotPresent
securityContext:
allowPrivilegeEscalation: false

View file

@ -65,7 +65,7 @@ func newLokiPayload(result report.Result) payload {
}
for property, value := range result.Properties {
labels = append(labels, property+"=\""+strings.ReplaceAll(value, "\"", "")+"\"")
labels = append(labels, strings.ReplaceAll(property, ".", "_")+"=\""+strings.ReplaceAll(value, "\"", "")+"\"")
}
ls.Labels = "{" + strings.Join(labels, ",") + "}"