From 32bff8f81e19cc179e955460b698e1a668bde37e Mon Sep 17 00:00:00 2001 From: Frank Jogeleit Date: Sat, 12 Mar 2022 10:51:30 +0100 Subject: [PATCH] Add relabelings and bump Go Version of all components (#128) * Add relabelings and bump Go Version of all components * Update static manifests Signed-off-by: Frank Jogeleit --- CHANGELOG.md | 12 ++++++++++++ Makefile | 2 +- charts/policy-reporter/Chart.lock | 10 +++++----- charts/policy-reporter/Chart.yaml | 10 +++++----- .../policy-reporter/charts/kyvernoPlugin/Chart.yaml | 4 ++-- .../policy-reporter/charts/kyvernoPlugin/values.yaml | 2 +- charts/policy-reporter/charts/monitoring/Chart.yaml | 2 +- .../monitoring/templates/kyverno-servicemonitor.yaml | 8 ++++++++ .../charts/monitoring/templates/servicemonitor.yaml | 8 ++++++++ charts/policy-reporter/charts/monitoring/values.yaml | 11 +++++++++++ charts/policy-reporter/charts/ui/Chart.yaml | 4 ++-- charts/policy-reporter/charts/ui/values.yaml | 2 +- charts/policy-reporter/values.yaml | 2 +- manifest/default-policy-reporter-ui/install.yaml | 4 ++-- manifest/kyverno-policy-reporter-ui/install.yaml | 6 +++--- manifest/policy-reporter/install.yaml | 2 +- 16 files changed, 64 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a6889791..90d139f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +# 2.6.2 +* Policy Reporter + * Update Go to 1.17.8 + * Add `serviceMonitor.relabelings` and `serviceMonitor.metricRelabelings` for ServiceMonitor configuration in the `monitoring` Subchart. + * Add `kyverno.serviceMonitor.relabelings` and `kyverno.serviceMonitor.metricRelabelings` for the KyvernoPlugin ServiceMonitor configuration in the `monitoring` Subchart. + +* Policy Reporter UI + * Update Go to 1.17.8 + +* Policy Reporter KyvernoPlugin + * Update Go to 1.17.8 + # 2.6.1 * Update Policy Reporter UI to v1.3.2 * Support access over Subpaths, e.g. Rancher Reverse Proxy diff --git a/Makefile b/Makefile index 9e0622a0..4242e4b1 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ GO ?= go BUILD ?= build REPO ?= ghcr.io/kyverno/policy-reporter -IMAGE_TAG ?= 2.3.0 +IMAGE_TAG ?= 2.3.1 LD_FLAGS='-s -w -linkmode external -extldflags "-static"' all: build diff --git a/charts/policy-reporter/Chart.lock b/charts/policy-reporter/Chart.lock index 66dcfe01..6e4ed213 100644 --- a/charts/policy-reporter/Chart.lock +++ b/charts/policy-reporter/Chart.lock @@ -1,12 +1,12 @@ dependencies: - name: monitoring repository: "" - version: 2.1.0 + version: 2.2.0 - name: ui repository: "" - version: 2.3.2 + version: 2.3.3 - name: kyvernoPlugin repository: "" - version: 1.2.0 -digest: sha256:bb751835db85334bd7b379680227a488c80769646f916a1367e207e7909d557a -generated: "2022-03-10T12:33:30.918735+01:00" + version: 1.2.1 +digest: sha256:fd2e6ea2de442f9380f07431ac2fccbfe23ca542cb66cb89c0b1f509ae5aec11 +generated: "2022-03-12T10:44:00.187688+01:00" diff --git a/charts/policy-reporter/Chart.yaml b/charts/policy-reporter/Chart.yaml index 3822f7ec..ad673a2a 100644 --- a/charts/policy-reporter/Chart.yaml +++ b/charts/policy-reporter/Chart.yaml @@ -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: 2.6.1 -appVersion: 2.3.0 +version: 2.6.2 +appVersion: 2.3.1 icon: https://github.com/kyverno/kyverno/raw/main/img/logo.png home: https://kyverno.github.io/policy-reporter @@ -18,10 +18,10 @@ maintainers: dependencies: - name: monitoring condition: monitoring.enabled - version: "2.1.0" + version: "2.2.0" - name: ui condition: ui.enabled - version: "2.3.2" + version: "2.3.3" - name: kyvernoPlugin condition: kyvernoPlugin.enabled - version: "1.2.0" + version: "1.2.1" diff --git a/charts/policy-reporter/charts/kyvernoPlugin/Chart.yaml b/charts/policy-reporter/charts/kyvernoPlugin/Chart.yaml index 702990e0..9e694be0 100644 --- a/charts/policy-reporter/charts/kyvernoPlugin/Chart.yaml +++ b/charts/policy-reporter/charts/kyvernoPlugin/Chart.yaml @@ -3,5 +3,5 @@ name: kyvernoPlugin description: Policy Reporter Kyverno Plugin type: application -version: 1.2.0 -appVersion: 1.2.0 \ No newline at end of file +version: 1.2.1 +appVersion: 1.2.1 \ No newline at end of file diff --git a/charts/policy-reporter/charts/kyvernoPlugin/values.yaml b/charts/policy-reporter/charts/kyvernoPlugin/values.yaml index 112fc6fb..2b1c4b5c 100644 --- a/charts/policy-reporter/charts/kyvernoPlugin/values.yaml +++ b/charts/policy-reporter/charts/kyvernoPlugin/values.yaml @@ -2,7 +2,7 @@ image: registry: ghcr.io repository: kyverno/policy-reporter-kyverno-plugin pullPolicy: IfNotPresent - tag: 1.2.0 + tag: 1.2.1 imagePullSecrets: [] diff --git a/charts/policy-reporter/charts/monitoring/Chart.yaml b/charts/policy-reporter/charts/monitoring/Chart.yaml index d8c8343b..e6235296 100644 --- a/charts/policy-reporter/charts/monitoring/Chart.yaml +++ b/charts/policy-reporter/charts/monitoring/Chart.yaml @@ -3,5 +3,5 @@ name: monitoring description: Policy Reporter Monitoring with predefined ServiceMonitor and Grafana Dashboards type: application -version: 2.1.0 +version: 2.2.0 appVersion: 0.0.0 diff --git a/charts/policy-reporter/charts/monitoring/templates/kyverno-servicemonitor.yaml b/charts/policy-reporter/charts/monitoring/templates/kyverno-servicemonitor.yaml index eac19dcc..a962fed9 100644 --- a/charts/policy-reporter/charts/monitoring/templates/kyverno-servicemonitor.yaml +++ b/charts/policy-reporter/charts/monitoring/templates/kyverno-servicemonitor.yaml @@ -17,4 +17,12 @@ spec: {{- include "kyvernoplugin.selectorLabels" . | nindent 8 }} endpoints: - port: rest + {{- with .Values.kyverno.serviceMonitor.relabelings }} + relabelings: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.kyverno.serviceMonitor.metricRelabelings }} + metricRelabelings: + {{- toYaml . | nindent 4 }} + {{- end }} {{- end }} diff --git a/charts/policy-reporter/charts/monitoring/templates/servicemonitor.yaml b/charts/policy-reporter/charts/monitoring/templates/servicemonitor.yaml index 528123a2..5e5a0f25 100644 --- a/charts/policy-reporter/charts/monitoring/templates/servicemonitor.yaml +++ b/charts/policy-reporter/charts/monitoring/templates/servicemonitor.yaml @@ -16,3 +16,11 @@ spec: {{- include "policyreporter.selectorLabels" . | nindent 8 }} endpoints: - port: http + {{- with .Values.serviceMonitor.relabelings }} + relabelings: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.serviceMonitor.metricRelabelings }} + metricRelabelings: + {{- toYaml . | nindent 4 }} + {{- end }} diff --git a/charts/policy-reporter/charts/monitoring/values.yaml b/charts/policy-reporter/charts/monitoring/values.yaml index d2907aed..1695aec4 100644 --- a/charts/policy-reporter/charts/monitoring/values.yaml +++ b/charts/policy-reporter/charts/monitoring/values.yaml @@ -6,6 +6,17 @@ serviceMonitor: namespace: # labels to match the serviceMonitorSelector of the Prometheus Resource labels: {} + # https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#relabelconfig + relabelings: [] + # see serviceMonitor.relabelings + metricRelabelings: [] + +kyverno: + serviceMonitor: + # see serviceMonitor.relabelings + relabelings: [] + # see serviceMonitor.relabelings + metricRelabelings: [] grafana: # namespace for configMap of grafana dashboards diff --git a/charts/policy-reporter/charts/ui/Chart.yaml b/charts/policy-reporter/charts/ui/Chart.yaml index 05d23e0c..99cc4eec 100644 --- a/charts/policy-reporter/charts/ui/Chart.yaml +++ b/charts/policy-reporter/charts/ui/Chart.yaml @@ -3,5 +3,5 @@ name: ui description: Policy Reporter UI type: application -version: 2.3.2 -appVersion: 1.3.2 +version: 2.3.3 +appVersion: 1.3.3 diff --git a/charts/policy-reporter/charts/ui/values.yaml b/charts/policy-reporter/charts/ui/values.yaml index e65ca2aa..349e3d6a 100644 --- a/charts/policy-reporter/charts/ui/values.yaml +++ b/charts/policy-reporter/charts/ui/values.yaml @@ -14,7 +14,7 @@ image: registry: ghcr.io repository: kyverno/policy-reporter-ui pullPolicy: IfNotPresent - tag: 1.3.2 + tag: 1.3.3 imagePullSecrets: [] diff --git a/charts/policy-reporter/values.yaml b/charts/policy-reporter/values.yaml index 1e56ccac..c33dffd9 100644 --- a/charts/policy-reporter/values.yaml +++ b/charts/policy-reporter/values.yaml @@ -2,7 +2,7 @@ image: registry: ghcr.io repository: kyverno/policy-reporter pullPolicy: IfNotPresent - tag: 2.3.0 + tag: 2.3.1 imagePullSecrets: [] diff --git a/manifest/default-policy-reporter-ui/install.yaml b/manifest/default-policy-reporter-ui/install.yaml index 2590cf55..0464a33e 100644 --- a/manifest/default-policy-reporter-ui/install.yaml +++ b/manifest/default-policy-reporter-ui/install.yaml @@ -93,7 +93,7 @@ spec: automountServiceAccountToken: false containers: - name: ui - image: "ghcr.io/kyverno/policy-reporter-ui:1.3.2" + image: "ghcr.io/kyverno/policy-reporter-ui:1.3.3" imagePullPolicy: IfNotPresent securityContext: allowPrivilegeEscalation: false @@ -145,7 +145,7 @@ spec: fsGroup: 1234 containers: - name: policy-reporter - image: "ghcr.io/kyverno/policy-reporter:2.3.0" + image: "ghcr.io/kyverno/policy-reporter:2.3.1" imagePullPolicy: IfNotPresent securityContext: allowPrivilegeEscalation: false diff --git a/manifest/kyverno-policy-reporter-ui/install.yaml b/manifest/kyverno-policy-reporter-ui/install.yaml index e57b29fb..6d1be35b 100644 --- a/manifest/kyverno-policy-reporter-ui/install.yaml +++ b/manifest/kyverno-policy-reporter-ui/install.yaml @@ -157,7 +157,7 @@ spec: automountServiceAccountToken: true containers: - name: "kyverno-plugin" - image: "ghcr.io/kyverno/policy-reporter-kyverno-plugin:1.2.0" + image: "ghcr.io/kyverno/policy-reporter-kyverno-plugin:1.2.1" imagePullPolicy: IfNotPresent securityContext: allowPrivilegeEscalation: false @@ -204,7 +204,7 @@ spec: spec: containers: - name: ui - image: "ghcr.io/kyverno/policy-reporter-ui:1.3.2" + image: "ghcr.io/kyverno/policy-reporter-ui:1.3.3" imagePullPolicy: IfNotPresent securityContext: allowPrivilegeEscalation: false @@ -256,7 +256,7 @@ spec: fsGroup: 1234 containers: - name: policy-reporter - image: "ghcr.io/kyverno/policy-reporter:2.3.0" + image: "ghcr.io/kyverno/policy-reporter:2.3.1" imagePullPolicy: IfNotPresent securityContext: allowPrivilegeEscalation: false diff --git a/manifest/policy-reporter/install.yaml b/manifest/policy-reporter/install.yaml index 6a82c289..a1965085 100644 --- a/manifest/policy-reporter/install.yaml +++ b/manifest/policy-reporter/install.yaml @@ -84,7 +84,7 @@ spec: automountServiceAccountToken: true containers: - name: policy-reporter - image: "ghcr.io/kyverno/policy-reporter:2.3.0" + image: "ghcr.io/kyverno/policy-reporter:2.3.1" imagePullPolicy: IfNotPresent securityContext: allowPrivilegeEscalation: false