Skip to content

Commit

Permalink
Merge pull request #73 from kyverno/loki-target-fix
Browse files Browse the repository at this point in the history
Fix Loki Labels
  • Loading branch information
fjogeleit authored Sep 15, 2021
2 parents e4e5589 + c32589b commit 8bdb284
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 8 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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`

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions charts/policy-reporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion charts/policy-reporter/values.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
image:
repository: fjogeleit/policy-reporter
pullPolicy: IfNotPresent
tag: 1.8.5
tag: 1.8.6

imagePullSecrets: []

Expand Down
2 changes: 1 addition & 1 deletion manifest/default-policy-reporter-ui/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion manifest/kyverno-policy-reporter-ui/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion manifest/policy-reporter/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pkg/target/loki/loki.go
Original file line number Diff line number Diff line change
Expand Up @@ -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, ",") + "}"
Expand Down

0 comments on commit 8bdb284

Please sign in to comment.