50 lines
1.9 KiB
YAML
50 lines
1.9 KiB
YAML
# =============================================================================
|
|
# L2 BEHAVIORAL — IdP health is visible on a dashboard (R-OBS-03) [RUNNABLE]
|
|
# Spec: docs/10 observability. Impl: platform/keycloak/grafana-dashboard.yaml (a grafana_dashboard
|
|
# ConfigMap auto-provisioned into Grafana by the sidecar).
|
|
#
|
|
# GIVEN a Keycloak health dashboard is declared as a grafana_dashboard ConfigMap,
|
|
# WHEN Grafana's sidecar discovers it (searchNamespace: ALL)
|
|
# -> THEN the dashboard is provisioned and Grafana is up — Keycloak health is visible on a dashboard
|
|
# (R-OBS-03). The presence of the labelled ConfigMap + a ready Grafana is the reconciliation proof.
|
|
# =============================================================================
|
|
apiVersion: chainsaw.kyverno.io/v1alpha1
|
|
kind: Test
|
|
metadata:
|
|
name: keycloak-dashboard
|
|
labels:
|
|
conformance.home.k3s/R-OBS-03: "true"
|
|
annotations:
|
|
conformance.home.k3s/requirements: "R-OBS-03"
|
|
conformance.home.k3s/layer: "L2"
|
|
conformance.home.k3s/safety-critical: "false"
|
|
conformance.home.k3s/executable: "true"
|
|
conformance.home.k3s/intent: >-
|
|
A grafana_dashboard ConfigMap for Keycloak health exists and Grafana is up to render it.
|
|
spec:
|
|
timeouts:
|
|
assert: 3m
|
|
steps:
|
|
- name: keycloak-dashboard-configmap-provisioned
|
|
try:
|
|
- assert:
|
|
resource:
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: keycloak-dashboard
|
|
namespace: keycloak
|
|
labels:
|
|
grafana_dashboard: "1"
|
|
- name: grafana-is-up-to-render-it
|
|
try:
|
|
- assert:
|
|
resource:
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: kube-prometheus-stack-grafana
|
|
namespace: monitoring
|
|
status:
|
|
availableReplicas: 1
|