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

UI update (#58)

* Update Helm Chart

Signed-off-by: Frank Jogeleit <fj@move-elevator.de>
This commit is contained in:
Frank Jogeleit 2021-08-20 10:50:46 +02:00 committed by GitHub
parent f29e86878d
commit de7e7c37b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 65 additions and 28 deletions

View file

@ -1,5 +1,13 @@
# Changelog
# 1.8.7
* Update Policy Reporter UI to 0.14.0
* Colored Diagrams
* Suppport SubPath Configuration
* Restart CRD Watches when no CRDs are found
* Fix Ingress Resource in the UI Subchart
* Allow to override namespace for serviceMonitor [[#57](https://github.com/kyverno/policy-reporter/pull/57) by [Issif](https://github.com/Issif)]
# 1.8.6
* Update Policy Reporter UI to 0.13.1
* Hide Rule Chips if rule name is empty
@ -9,7 +17,7 @@
* Improved LivenessProbe, checks now if any PolicyReport CRD is available
# 1.8.5
* Added trusted root CA's [#52](https://github.com/kyverno/policy-reporter/pull/52) by [frezbo](https://github.com/frezbo)
* Added trusted root CA's [[#52](https://github.com/kyverno/policy-reporter/pull/52) by [frezbo](https://github.com/frezbo)]
# 1.8.4
* Changed Organization
@ -26,7 +34,7 @@
* Update Policy Reporter UI to `0.12.0`
# 1.8.1
* Customize label and annotation for Grafana dashboards [#43](https://github.com/kyverno/policy-reporter/pull/43) by [nlamirault](https://github.com/nlamirault)
* Customize label and annotation for Grafana dashboards [[#43](https://github.com/kyverno/policy-reporter/pull/43) by [nlamirault](https://github.com/nlamirault)]
* ARM64 Support for all Components
# 1.7.3

View file

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

View file

@ -4,9 +4,9 @@ dependencies:
version: 1.4.1
- name: ui
repository: ""
version: 1.8.4
version: 1.8.5
- name: kyvernoPlugin
repository: ""
version: 0.5.2
digest: sha256:fa7e3ab9c7747b4d64dc2a42927e4f67ae8bf3d71e66a51700c6a7fff29bb644
generated: "2021-08-20T10:14:19.664564+02:00"
digest: sha256:c983f88a02589a028cf0b7acbe3bc0d65f580f42d31c11c91dab8c425616636d
generated: "2021-08-20T10:36:47.573977+02:00"

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.8.6
appVersion: 1.8.4
version: 1.8.7
appVersion: 1.8.5
dependencies:
- name: monitoring
@ -16,7 +16,7 @@ dependencies:
- name: ui
condition: ui.enabled
repository: ""
version: "1.8.4"
version: "1.8.5"
- name: kyvernoPlugin
condition: kyvernoPlugin.enabled
repository: ""

View file

@ -3,5 +3,5 @@ name: ui
description: Policy Reporter UI
type: application
version: 1.8.4
appVersion: 0.13.1
version: 1.8.5
appVersion: 0.14.0

View file

@ -38,6 +38,9 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- with .Values.global.labels }}
{{ toYaml . }}
{{- end -}}
{{- with .Values.ingress.labels }}
{{ toYaml . }}
{{- end -}}
{{- end }}
{{/*

View file

@ -1,24 +1,31 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "ui.fullname" . -}}
{{- $servicePort := .Values.service.port -}}
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
{{- $svcPort := .Values.service.port -}}
{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
{{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }}
{{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}}
{{- end }}
{{- end }}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress
metadata:
name: {{ include "ui.fullname" . }}
name: {{ $fullName }}
labels:
{{- include "ui.labels" . | nindent 4 }}
{{- with .Values.ingress.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}
ingressClassName: {{ .Values.ingress.className }}
{{- end }}
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
@ -35,10 +42,20 @@ spec:
http:
paths:
{{- range .paths }}
- path: {{ . }}
- path: {{ .path }}
{{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }}
pathType: {{ .pathType }}
{{- end }}
backend:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
service:
name: {{ $fullName }}
port:
number: {{ $svcPort }}
{{- else }}
serviceName: {{ $fullName }}
servicePort: {{ $servicePort }}
servicePort: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}

View file

@ -10,7 +10,7 @@ plugins:
image:
repository: fjogeleit/policy-reporter-ui
pullPolicy: IfNotPresent
tag: 0.13.1
tag: 0.14.0
imagePullSecrets: []
@ -74,6 +74,7 @@ service:
# ref to: https://kubernetes.io/docs/concepts/services-networking/ingress/
ingress:
enabled: false
className: ""
# key/value
labels: {}
# key/value

View file

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

View file

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

View file

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

View file

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

View file

@ -4,6 +4,7 @@ import (
"context"
"log"
"sync"
"time"
"github.com/kyverno/policy-reporter/pkg/report"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@ -75,13 +76,20 @@ func (k *k8sPolicyReportAdapter) WatchPolicyReports() (chan WatchEvent, error) {
for {
w, err := k.client.Resource(r).Watch(context.Background(), metav1.ListOptions{})
if err != nil {
log.Printf("[INFO] Resource not Found: %s\n", r.String())
k.mx.Lock()
delete(k.found, r.String())
k.mx.Unlock()
if len(k.found) < 2 {
time.Sleep(time.Second)
continue
}
return
}
log.Printf("[INFO] Resource Found: %s\n", r.String())
k.mx.Lock()
k.found[r.String()] = r.String()
k.mx.Unlock()