{
  "apiVersion": "json.kyverno.io/v1alpha1",
  "kind": "ValidatingPolicy",
  "metadata": {
    "name": "cap-013-adapter-dedup",
    "annotations": {
      "nova.cloudinit.dev/severity": "medium",
      "title.policy.kyverno.io": "No duplicate adapter registrations (CAP-013 declarative mirror)"
    }
  },
  "spec": {
    "rules": [
      {
        "name": "no-duplicate-adapters",
        "assert": {
          "all": [
            {
              "check": {
                "(max(map(&length(@), values(group_by(adapters, &@)))) == `1`)": true
              }
            }
          ]
        }
      }
    ]
  }
}