Skip to content

Commit

Permalink
chore(grafana): add kyverno policy report overview (refs #55)
Browse files Browse the repository at this point in the history
  • Loading branch information
mborne committed May 17, 2024
1 parent bbb6176 commit 7f0ab5e
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 1 deletion.
6 changes: 6 additions & 0 deletions grafana/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ Loki :
* [15141 - Loki Kubernetes Logs](https://grafana.com/grafana/dashboards/15141-kubernetes-service-logs/)
* [All loki dashboards](https://grafana.com/grafana/dashboards/?search=loki)


Kyverno :

* [13995 - PolicyReport Details](https://grafana.com/grafana/dashboards/13995-policyreport-details/)


## Ressources

* [github.com/grafana/helm-charts - Grafana Helm Chart](https://github.com/grafana/helm-charts/blob/main/charts/grafana/README.md#grafana-helm-chart)
14 changes: 14 additions & 0 deletions grafana/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,32 @@ dashboardProviders:

dashboards:
default:
# https://grafana.com/grafana/dashboards/2-prometheus-stats/
prometheus-stats:
gnetId: 2
revision: 2
datasource: Prometheus
editable: true
# https://grafana.com/grafana/dashboards/15141-kubernetes-service-logs/
loki-logs:
gnetId: 15141
revision: 1
datasource: Loki
editable: true
# https://grafana.com/grafana/dashboards/7587-prometheus-blackbox-exporter/
blackbox-exporter:
gnetId: 7587
revision: 3
datasource: Prometheus
editable: true
# https://grafana.com/grafana/dashboards/13995-policyreport-details/
kyverno:
gnetId: 13995
revision: 5
datasource: Prometheus
editable: true

# downloadDashboards:
# env:
# HTTP_PROXY: http://proxy:3128
# HTTPS_PROXY: http://proxy:3128
6 changes: 6 additions & 0 deletions kyverno/helm/policy-reporter/values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
metrics:
enabled: true

service:
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "8080"
prometheus.io/path: "/metrics"

api:
enabled: true

Expand Down
2 changes: 1 addition & 1 deletion kyverno/k8s-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ helm repo update

# deploy in namespace kyverno-ui
helm -n kyverno upgrade --install policy-reporter policy-reporter/policy-reporter \
--set metrics.enabled=true --set api.enabled=true --set ui.enabled=true
-f ${SCRIPT_DIR}/helm/policy-reporter/values.yaml

# Create Ingress with dynamic hostname for policy-reporter-ui
cat <<EOF | kubectl -n kyverno apply -f -
Expand Down

0 comments on commit 7f0ab5e

Please sign in to comment.