{
  "apiVersion": "json.kyverno.io/v1alpha1",
  "kind": "ValidatingPolicy",
  "metadata": {
    "name": "cap-023-metrics-collector",
    "annotations": {
      "nova.cloudinit.dev/severity": "medium",
      "title.policy.kyverno.io": "Every metric has a grounded/derived/deferred status (CAP-023 declarative mirror)"
    }
  },
  "spec": {
    "rules": [
      {
        "name": "every-metric-has-status",
        "assert": {
          "all": [
            {
              "check": {
                "~.metrics": {
                  "(contains(['grounded','derived','deferred'], status))": true
                }
              }
            }
          ]
        }
      }
    ]
  }
}