From a3147758e46238cb260718662408c6a4b874ed05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charles-Edouard=20Br=C3=A9t=C3=A9ch=C3=A9?= Date: Thu, 6 Apr 2023 15:38:28 +0200 Subject: [PATCH] feat: add policy reporter to the dev lab (#6799) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Charles-Edouard Brétéché --- Makefile | 9 ++++++++- scripts/config/dev/policy-reporter.yaml | 16 ++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 scripts/config/dev/policy-reporter.yaml diff --git a/Makefile b/Makefile index 1cecb48191..0a13a438d4 100644 --- a/Makefile +++ b/Makefile @@ -922,8 +922,15 @@ dev-lab-metrics-server: $(HELM) ## Deploy metrics-server helm chart --repo https://charts.bitnami.com/bitnami metrics-server \ --values ./scripts/config/dev/metrics-server.yaml +.PHONY: dev-lab-policy-reporter +dev-lab-policy-reporter: $(HELM) ## Deploy policy-reporter helm chart + @echo Install policy-reporter chart... >&2 + @$(HELM) upgrade --install policy-reporter --namespace policy-reporter --create-namespace --wait \ + --repo https://kyverno.github.io/policy-reporter policy-reporter \ + --values ./scripts/config/dev/policy-reporter.yaml + .PHONY: dev-lab-all -dev-lab-all: dev-lab-ingress-ngingx dev-lab-metrics-server dev-lab-prometheus dev-lab-loki dev-lab-tempo ## Deploy all dev lab components +dev-lab-all: dev-lab-ingress-ngingx dev-lab-metrics-server dev-lab-prometheus dev-lab-loki dev-lab-tempo dev-lab-policy-reporter ## Deploy all dev lab components ######## # HELP # diff --git a/scripts/config/dev/policy-reporter.yaml b/scripts/config/dev/policy-reporter.yaml new file mode 100644 index 0000000000..700508bbf7 --- /dev/null +++ b/scripts/config/dev/policy-reporter.yaml @@ -0,0 +1,16 @@ +ui: + enabled: true + ingress: + enabled: true + annotations: + nginx.ingress.kubernetes.io/rewrite-target: $1$2 + nginx.ingress.kubernetes.io/configuration-snippet: | + rewrite ^(/policy-reporter)$ $1/ redirect; + hosts: + - host: ~ + paths: + - path: /policy-reporter(/|$)(.*) + pathType: Prefix + +kyvernoPlugin: + enabled: true