1
0
Fork 0
mirror of https://github.com/kyverno/policy-reporter.git synced 2024-12-15 17:50:58 +00:00

Merge pull request #73 from kyverno/loki-target-fix

Fix Loki Labels
This commit is contained in:
Frank Jogeleit 2021-09-15 15:09:07 +02:00 committed by GitHub
commit 8bdb284db2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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, ",") + "}"