{
  "$defs": {
    "ResourceWhen": {
      "oneOf": [
        {
          "additionalProperties": false,
          "properties": {
            "state": {
              "additionalProperties": {
                "additionalProperties": false,
                "properties": {
                  "contains": {
                    "type": "string"
                  },
                  "equals": {
                    "type": "string"
                  },
                  "exists": {
                    "type": "boolean"
                  },
                  "for": {
                    "type": "string"
                  },
                  "in": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "maxAge": {
                    "type": "string"
                  },
                  "status": {
                    "enum": [
                      "set",
                      "unset",
                      "unknown"
                    ],
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "minProperties": 1,
              "type": "object"
            }
          },
          "required": [
            "state"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "all": {
              "items": {
                "$ref": "#/$defs/ResourceWhen"
              },
              "minItems": 1,
              "type": "array"
            }
          },
          "required": [
            "all"
          ],
          "type": "object"
        },
        {
          "additionalProperties": false,
          "properties": {
            "any": {
              "items": {
                "$ref": "#/$defs/ResourceWhen"
              },
              "minItems": 1,
              "type": "array"
            }
          },
          "required": [
            "any"
          ],
          "type": "object"
        }
      ]
    }
  },
  "$id": "https://routerd.net/schemas/routerd-config-v1alpha1.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "apiVersion": {
      "const": "routerd.net/v1alpha1",
      "type": "string"
    },
    "kind": {
      "const": "Router",
      "type": "string"
    },
    "metadata": {
      "additionalProperties": false,
      "properties": {
        "name": {
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "name"
      ],
      "type": "object"
    },
    "spec": {
      "additionalProperties": false,
      "properties": {
        "reconcile": {
          "additionalProperties": false,
          "properties": {
            "autoTuneConntrack": {
              "type": "boolean"
            },
            "mode": {
              "description": "Mode defaults to strict; progressive mode records recoverable apply errors and continues with later stages.",
              "enum": [
                "",
                "strict",
                "progressive"
              ],
              "type": "string"
            },
            "protectedInterfaces": {
              "description": "ProtectedInterfaces excludes interfaces from routerd-generated adoption and management-path disruption checks.",
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "protectedZones": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          "type": "object"
        },
        "resources": {
          "items": {
            "oneOf": [
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "plugin.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "Plugin",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "capabilities": {
                        "items": {
                          "enum": [
                            "observe.cloud",
                            "observe.providerPrivateIPs",
                            "propose.dynamicConfig",
                            "propose.providerAction",
                            "execute.providerAction"
                          ],
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "context": {
                        "additionalProperties": false,
                        "description": "Context is the least-privilege allowlist of config resources the plugin\nmay read on stdin. Empty/absent = the plugin receives no configuration\n(default-deny). Secrets are ALWAYS redacted from whatever is passed.",
                        "properties": {
                          "resources": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "apiVersion": {
                                  "type": "string"
                                },
                                "kind": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "apiVersion",
                                "kind",
                                "name"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          }
                        },
                        "type": "object"
                      },
                      "env": {
                        "additionalProperties": {
                          "type": "string"
                        },
                        "type": "object"
                      },
                      "executable": {
                        "type": "string"
                      },
                      "timeout": {
                        "type": "string"
                      },
                      "triggers": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "every": {
                              "type": "string"
                            },
                            "topic": {
                              "type": "string"
                            },
                            "type": {
                              "enum": [
                                "interval",
                                "event"
                              ],
                              "type": "string"
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      }
                    },
                    "required": [
                      "executable"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "plugin.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "DynamicConfigSource",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "mergePolicy": {
                        "additionalProperties": false,
                        "properties": {
                          "conflict": {
                            "enum": [
                              "",
                              "reject"
                            ],
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "pluginRef": {
                        "type": "string"
                      },
                      "triggers": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "every": {
                              "type": "string"
                            },
                            "topic": {
                              "type": "string"
                            },
                            "type": {
                              "enum": [
                                "interval",
                                "event"
                              ],
                              "type": "string"
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "ttl": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "pluginRef"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "config.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "DynamicOverridePolicy",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "description": "DynamicOverridePolicySpec is defined in api because DynamicOverridePolicy is authored in startup config.",
                    "properties": {
                      "allow": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "operations": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "source": {
                              "type": "string"
                            },
                            "targets": {
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "apiVersion": {
                                    "type": "string"
                                  },
                                  "kind": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "apiVersion",
                                  "kind",
                                  "name"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            }
                          },
                          "required": [
                            "source",
                            "operations",
                            "targets"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      }
                    },
                    "required": [
                      "allow"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "system.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "LogSink",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "enabled": {
                        "type": "boolean"
                      },
                      "file": {
                        "additionalProperties": false,
                        "properties": {
                          "name": {
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "journald": {
                        "additionalProperties": false,
                        "properties": {
                          "identifier": {
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "minLevel": {
                        "enum": [
                          "debug",
                          "info",
                          "warning",
                          "error"
                        ],
                        "type": "string"
                      },
                      "otlp": {
                        "additionalProperties": false,
                        "properties": {
                          "endpoint": {
                            "type": "string"
                          },
                          "telemetryRef": {
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "syslog": {
                        "additionalProperties": false,
                        "properties": {
                          "address": {
                            "type": "string"
                          },
                          "facility": {
                            "enum": [
                              "kern",
                              "user",
                              "mail",
                              "daemon",
                              "auth",
                              "syslog",
                              "lpr",
                              "news",
                              "uucp",
                              "cron",
                              "authpriv",
                              "ftp",
                              "local0",
                              "local1",
                              "local2",
                              "local3",
                              "local4",
                              "local5",
                              "local6",
                              "local7"
                            ],
                            "type": "string"
                          },
                          "network": {
                            "enum": [
                              "",
                              "unix",
                              "unixgram",
                              "tcp",
                              "udp"
                            ],
                            "type": "string"
                          },
                          "tag": {
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "type": {
                        "enum": [
                          "syslog",
                          "otlp",
                          "webhook",
                          "file",
                          "journald"
                        ],
                        "type": "string"
                      },
                      "webhook": {
                        "additionalProperties": false,
                        "properties": {
                          "headers": {
                            "additionalProperties": {
                              "type": "string"
                            },
                            "type": "object"
                          },
                          "timeout": {
                            "type": "string"
                          },
                          "url": {
                            "type": "string"
                          }
                        },
                        "type": "object"
                      }
                    },
                    "required": [
                      "type"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "observability.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "Telemetry",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "attributes": {
                        "additionalProperties": {
                          "type": "string"
                        },
                        "type": "object"
                      },
                      "otlp": {
                        "additionalProperties": false,
                        "properties": {
                          "endpoint": {
                            "type": "string"
                          },
                          "insecure": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "endpoint"
                        ],
                        "type": "object"
                      },
                      "serviceNamespace": {
                        "type": "string"
                      },
                      "signals": {
                        "items": {
                          "enum": [
                            "logs",
                            "metrics",
                            "traces"
                          ],
                          "type": "string"
                        },
                        "type": "array"
                      }
                    },
                    "required": [
                      "otlp"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "system.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "ObservabilityPipeline",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "attributes": {
                        "additionalProperties": {
                          "type": "string"
                        },
                        "type": "object"
                      },
                      "logs": {
                        "additionalProperties": false,
                        "properties": {
                          "enabled": {
                            "type": "boolean"
                          },
                          "sinks": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "enabled": {
                                  "type": "boolean"
                                },
                                "kafka": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "brokers": {
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "topic": {
                                      "type": "string"
                                    }
                                  },
                                  "type": "object"
                                },
                                "labels": {
                                  "additionalProperties": {
                                    "type": "string"
                                  },
                                  "type": "object"
                                },
                                "loki": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "headers": {
                                      "additionalProperties": {
                                        "type": "string"
                                      },
                                      "type": "object"
                                    },
                                    "tenant": {
                                      "type": "string"
                                    },
                                    "url": {
                                      "type": "string"
                                    }
                                  },
                                  "type": "object"
                                },
                                "minLevel": {
                                  "enum": [
                                    "debug",
                                    "info",
                                    "warning",
                                    "error"
                                  ],
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "syslog": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "address": {
                                      "type": "string"
                                    },
                                    "facility": {
                                      "enum": [
                                        "kern",
                                        "user",
                                        "mail",
                                        "daemon",
                                        "auth",
                                        "syslog",
                                        "lpr",
                                        "news",
                                        "uucp",
                                        "cron",
                                        "authpriv",
                                        "ftp",
                                        "local0",
                                        "local1",
                                        "local2",
                                        "local3",
                                        "local4",
                                        "local5",
                                        "local6",
                                        "local7"
                                      ],
                                      "type": "string"
                                    },
                                    "network": {
                                      "enum": [
                                        "",
                                        "unix",
                                        "unixgram",
                                        "tcp",
                                        "udp"
                                      ],
                                      "type": "string"
                                    },
                                    "tag": {
                                      "type": "string"
                                    }
                                  },
                                  "type": "object"
                                },
                                "type": {
                                  "enum": [
                                    "stdout",
                                    "syslog",
                                    "loki",
                                    "kafka"
                                  ],
                                  "type": "string"
                                }
                              },
                              "required": [
                                "type"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          }
                        },
                        "type": "object"
                      },
                      "otlp": {
                        "additionalProperties": false,
                        "properties": {
                          "endpoint": {
                            "type": "string"
                          },
                          "headers": {
                            "additionalProperties": {
                              "type": "string"
                            },
                            "type": "object"
                          },
                          "insecure": {
                            "type": "boolean"
                          },
                          "tls": {
                            "additionalProperties": false,
                            "properties": {
                              "caFile": {
                                "type": "string"
                              },
                              "certFile": {
                                "type": "string"
                              },
                              "insecureSkipVerify": {
                                "type": "boolean"
                              },
                              "keyFile": {
                                "type": "string"
                              }
                            },
                            "type": "object"
                          }
                        },
                        "type": "object"
                      },
                      "sampling": {
                        "additionalProperties": false,
                        "properties": {
                          "rate": {
                            "type": "number"
                          }
                        },
                        "type": "object"
                      },
                      "serviceNamespace": {
                        "type": "string"
                      },
                      "signals": {
                        "items": {
                          "enum": [
                            "logs",
                            "metrics",
                            "traces"
                          ],
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "when": {
                        "additionalProperties": false,
                        "properties": {
                          "state": {
                            "additionalProperties": {
                              "additionalProperties": false,
                              "properties": {
                                "contains": {
                                  "type": "string"
                                },
                                "equals": {
                                  "type": "string"
                                },
                                "exists": {
                                  "type": "boolean"
                                },
                                "for": {
                                  "type": "string"
                                },
                                "in": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "maxAge": {
                                  "type": "string"
                                },
                                "status": {
                                  "enum": [
                                    "set",
                                    "unset",
                                    "unknown"
                                  ],
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            },
                            "description": "State gates a resource on status fields from other resources.",
                            "type": "object"
                          }
                        },
                        "type": "object"
                      }
                    },
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "system.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "LogRetention",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "retention": {
                        "type": "string"
                      },
                      "schedule": {
                        "enum": [
                          "",
                          "daily"
                        ],
                        "type": "string"
                      },
                      "signals": {
                        "items": {
                          "enum": [
                            "events",
                            "accessLogs",
                            "pluginRuns",
                            "dnsQueries",
                            "trafficFlows",
                            "firewallEvents",
                            "dhcpFingerprints"
                          ],
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "sinks": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "vacuum": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "retention"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "system.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "Sysctl",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "compare": {
                        "enum": [
                          "",
                          "exact",
                          "atLeast"
                        ],
                        "type": "string"
                      },
                      "expectedValue": {
                        "type": "string"
                      },
                      "key": {
                        "title": "Key",
                        "type": "string"
                      },
                      "optional": {
                        "type": "boolean"
                      },
                      "persistent": {
                        "type": "boolean"
                      },
                      "runtime": {
                        "type": "boolean"
                      },
                      "value": {
                        "title": "Value",
                        "type": "string"
                      }
                    },
                    "required": [
                      "key",
                      "value"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "system.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "SysctlProfile",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "overrides": {
                        "additionalProperties": {
                          "type": "string"
                        },
                        "type": "object"
                      },
                      "persistent": {
                        "type": "boolean"
                      },
                      "profile": {
                        "enum": [
                          "router-linux",
                          "router-freebsd"
                        ],
                        "type": "string"
                      },
                      "runtime": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "profile"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "system.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "Package",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "packages": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "manager": {
                              "enum": [
                                "",
                                "apt",
                                "dnf",
                                "pkg"
                              ],
                              "type": "string"
                            },
                            "names": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "optional": {
                              "type": "boolean"
                            },
                            "os": {
                              "enum": [
                                "ubuntu",
                                "debian",
                                "fedora",
                                "rhel",
                                "rocky",
                                "almalinux",
                                "freebsd"
                              ],
                              "type": "string"
                            }
                          },
                          "required": [
                            "os",
                            "names"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "state": {
                        "enum": [
                          "",
                          "present"
                        ],
                        "type": "string"
                      }
                    },
                    "required": [
                      "packages"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "system.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "NTPClient",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "fallbackServers": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "interface": {
                        "type": "string"
                      },
                      "managed": {
                        "type": "boolean"
                      },
                      "provider": {
                        "enum": [
                          "systemd-timesyncd",
                          "chrony",
                          "ntpd"
                        ],
                        "type": "string"
                      },
                      "serverFrom": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "field": {
                              "description": "Field defaults to phase when omitted.",
                              "type": "string"
                            },
                            "optional": {
                              "type": "boolean"
                            },
                            "resource": {
                              "description": "Resource names the source resource as Kind/name and reads its status, or a router config field for supported resources.",
                              "type": "string"
                            }
                          },
                          "required": [
                            "resource"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "servers": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "source": {
                        "enum": [
                          "static",
                          "auto",
                          "dhcp",
                          "dhcpv6"
                        ],
                        "type": "string"
                      },
                      "when": {
                        "additionalProperties": false,
                        "properties": {
                          "state": {
                            "additionalProperties": {
                              "additionalProperties": false,
                              "properties": {
                                "contains": {
                                  "type": "string"
                                },
                                "equals": {
                                  "type": "string"
                                },
                                "exists": {
                                  "type": "boolean"
                                },
                                "for": {
                                  "type": "string"
                                },
                                "in": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "maxAge": {
                                  "type": "string"
                                },
                                "status": {
                                  "enum": [
                                    "set",
                                    "unset",
                                    "unknown"
                                  ],
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            },
                            "description": "State gates a resource on status fields from other resources.",
                            "type": "object"
                          }
                        },
                        "type": "object"
                      }
                    },
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "system.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "NTPServer",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "allowCIDRFrom": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "field": {
                              "description": "Field defaults to phase when omitted.",
                              "type": "string"
                            },
                            "optional": {
                              "type": "boolean"
                            },
                            "resource": {
                              "description": "Resource names the source resource as Kind/name and reads its status, or a router config field for supported resources.",
                              "type": "string"
                            }
                          },
                          "required": [
                            "resource"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "allowCIDRs": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "fallbackServers": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "listenAddressFrom": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "field": {
                              "description": "Field defaults to phase when omitted.",
                              "type": "string"
                            },
                            "optional": {
                              "type": "boolean"
                            },
                            "resource": {
                              "description": "Resource names the source resource as Kind/name and reads its status, or a router config field for supported resources.",
                              "type": "string"
                            }
                          },
                          "required": [
                            "resource"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "listenAddresses": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "managed": {
                        "type": "boolean"
                      },
                      "provider": {
                        "enum": [
                          "chrony",
                          "ntpd"
                        ],
                        "type": "string"
                      },
                      "serverFrom": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "field": {
                              "description": "Field defaults to phase when omitted.",
                              "type": "string"
                            },
                            "optional": {
                              "type": "boolean"
                            },
                            "resource": {
                              "description": "Resource names the source resource as Kind/name and reads its status, or a router config field for supported resources.",
                              "type": "string"
                            }
                          },
                          "required": [
                            "resource"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "servers": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "source": {
                        "enum": [
                          "static",
                          "auto",
                          "dhcp",
                          "dhcpv6"
                        ],
                        "type": "string"
                      },
                      "when": {
                        "additionalProperties": false,
                        "properties": {
                          "state": {
                            "additionalProperties": {
                              "additionalProperties": false,
                              "properties": {
                                "contains": {
                                  "type": "string"
                                },
                                "equals": {
                                  "type": "string"
                                },
                                "exists": {
                                  "type": "boolean"
                                },
                                "for": {
                                  "type": "string"
                                },
                                "in": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "maxAge": {
                                  "type": "string"
                                },
                                "status": {
                                  "enum": [
                                    "set",
                                    "unset",
                                    "unknown"
                                  ],
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            },
                            "description": "State gates a resource on status fields from other resources.",
                            "type": "object"
                          }
                        },
                        "type": "object"
                      }
                    },
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "system.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "WebConsole",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "basePath": {
                        "type": "string"
                      },
                      "enabled": {
                        "type": "boolean"
                      },
                      "links": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "description": {
                              "type": "string"
                            },
                            "label": {
                              "type": "string"
                            },
                            "url": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "label",
                            "url"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "listenAddress": {
                        "type": "string"
                      },
                      "listenAddressFrom": {
                        "additionalProperties": false,
                        "properties": {
                          "field": {
                            "description": "Field defaults to phase when omitted.",
                            "type": "string"
                          },
                          "optional": {
                            "type": "boolean"
                          },
                          "resource": {
                            "description": "Resource names the source resource as Kind/name and reads its status, or a router config field for supported resources.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "resource"
                        ],
                        "type": "object"
                      },
                      "port": {
                        "maximum": 65535,
                        "minimum": 1,
                        "type": "integer"
                      },
                      "title": {
                        "type": "string"
                      }
                    },
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "system.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "ControlAPI",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "allowCIDRs": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "enabled": {
                        "type": "boolean"
                      },
                      "listenAddress": {
                        "type": "string"
                      },
                      "port": {
                        "maximum": 65535,
                        "minimum": 1,
                        "type": "integer"
                      },
                      "tls": {
                        "additionalProperties": false,
                        "properties": {
                          "certFile": {
                            "type": "string"
                          },
                          "clientCAFile": {
                            "type": "string"
                          },
                          "keyFile": {
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "tokenFrom": {
                        "additionalProperties": false,
                        "properties": {
                          "base64": {
                            "type": "boolean"
                          },
                          "env": {
                            "type": "string"
                          },
                          "file": {
                            "type": "string"
                          }
                        },
                        "type": "object"
                      }
                    },
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "system.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "RouterdCluster",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "identity": {
                        "type": "string"
                      },
                      "leasePath": {
                        "type": "string"
                      },
                      "leaseTTL": {
                        "type": "string"
                      },
                      "peers": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "when": {
                        "additionalProperties": false,
                        "properties": {
                          "state": {
                            "additionalProperties": {
                              "additionalProperties": false,
                              "properties": {
                                "contains": {
                                  "type": "string"
                                },
                                "equals": {
                                  "type": "string"
                                },
                                "exists": {
                                  "type": "boolean"
                                },
                                "for": {
                                  "type": "string"
                                },
                                "in": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "maxAge": {
                                  "type": "string"
                                },
                                "status": {
                                  "enum": [
                                    "set",
                                    "unset",
                                    "unknown"
                                  ],
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            },
                            "description": "State gates a resource on status fields from other resources.",
                            "type": "object"
                          }
                        },
                        "type": "object"
                      }
                    },
                    "required": [
                      "peers"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "net.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "Interface",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "adminUp": {
                        "type": "boolean"
                      },
                      "ifname": {
                        "type": "string"
                      },
                      "managed": {
                        "type": "boolean"
                      },
                      "mtu": {
                        "maximum": 9216,
                        "minimum": 576,
                        "type": "integer"
                      },
                      "when": {
                        "additionalProperties": false,
                        "properties": {
                          "state": {
                            "additionalProperties": {
                              "additionalProperties": false,
                              "properties": {
                                "contains": {
                                  "type": "string"
                                },
                                "equals": {
                                  "type": "string"
                                },
                                "exists": {
                                  "type": "boolean"
                                },
                                "for": {
                                  "type": "string"
                                },
                                "in": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "maxAge": {
                                  "type": "string"
                                },
                                "status": {
                                  "enum": [
                                    "set",
                                    "unset",
                                    "unknown"
                                  ],
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            },
                            "description": "State gates a resource on status fields from other resources.",
                            "type": "object"
                          }
                        },
                        "type": "object"
                      }
                    },
                    "required": [
                      "ifname",
                      "managed"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "net.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "PPPoESession",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "acName": {
                        "type": "string"
                      },
                      "authMethod": {
                        "enum": [
                          "chap",
                          "pap",
                          "both"
                        ],
                        "type": "string"
                      },
                      "defaultRoute": {
                        "type": "boolean"
                      },
                      "enabled": {
                        "description": "Enabled defaults to true; set enabled: false to suppress session startup.",
                        "type": "boolean"
                      },
                      "ifname": {
                        "type": "string"
                      },
                      "interface": {
                        "type": "string"
                      },
                      "lcpEchoFailure": {
                        "minimum": 0,
                        "type": "integer"
                      },
                      "lcpEchoInterval": {
                        "minimum": 0,
                        "type": "integer"
                      },
                      "lcpFailure": {
                        "minimum": 0,
                        "type": "integer"
                      },
                      "lcpInterval": {
                        "minimum": 0,
                        "type": "integer"
                      },
                      "managed": {
                        "type": "boolean"
                      },
                      "mru": {
                        "maximum": 1500,
                        "minimum": 576,
                        "type": "integer"
                      },
                      "mtu": {
                        "maximum": 1500,
                        "minimum": 576,
                        "type": "integer"
                      },
                      "password": {
                        "type": "string"
                      },
                      "passwordFile": {
                        "type": "string"
                      },
                      "serviceName": {
                        "type": "string"
                      },
                      "usePeerDNS": {
                        "type": "boolean"
                      },
                      "username": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "interface",
                      "username"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "net.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "WireGuardInterface",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "ifname": {
                        "type": "string"
                      },
                      "listenPort": {
                        "maximum": 65535,
                        "minimum": 1,
                        "type": "integer"
                      },
                      "mtu": {
                        "maximum": 9216,
                        "minimum": 576,
                        "type": "integer"
                      },
                      "peersFrom": {
                        "description": "PeersFrom imports WireGuardPeer targets from shared SAMNodeSet resources.\nImported peers are added first; static WireGuardPeer resources with the\nsame metadata.name are overlaid after generated peers.",
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "optional": {
                              "type": "boolean"
                            },
                            "resource": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "resource"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "privateKey": {
                        "type": "string"
                      },
                      "privateKeyFile": {
                        "type": "string"
                      },
                      "selfNodeRef": {
                        "description": "SelfNodeRef is the local SAM node identity used to skip this node when\nimporting peersFrom. It defaults to Router.metadata.name.",
                        "type": "string"
                      }
                    },
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "net.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "WireGuardPeer",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "allowedIPs": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "endpoint": {
                        "type": "string"
                      },
                      "interface": {
                        "type": "string"
                      },
                      "persistentKeepalive": {
                        "maximum": 65535,
                        "minimum": 0,
                        "type": "integer"
                      },
                      "presharedKey": {
                        "type": "string"
                      },
                      "presharedKeyFile": {
                        "type": "string"
                      },
                      "publicKey": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "interface",
                      "publicKey",
                      "allowedIPs"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "net.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "TailscaleNode",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "acceptDNS": {
                        "type": "boolean"
                      },
                      "acceptRoutes": {
                        "type": "boolean"
                      },
                      "advertiseExitNode": {
                        "type": "boolean"
                      },
                      "advertiseRoutes": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "advertiseTags": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "authKey": {
                        "type": "string"
                      },
                      "authKeyEnv": {
                        "type": "string"
                      },
                      "authKeyFile": {
                        "type": "string"
                      },
                      "hostname": {
                        "type": "string"
                      },
                      "loginServer": {
                        "type": "string"
                      },
                      "shieldsUp": {
                        "type": "boolean"
                      },
                      "ssh": {
                        "type": "boolean"
                      },
                      "state": {
                        "enum": [
                          "",
                          "present",
                          "absent"
                        ],
                        "type": "string"
                      },
                      "when": {
                        "additionalProperties": false,
                        "properties": {
                          "state": {
                            "additionalProperties": {
                              "additionalProperties": false,
                              "properties": {
                                "contains": {
                                  "type": "string"
                                },
                                "equals": {
                                  "type": "string"
                                },
                                "exists": {
                                  "type": "boolean"
                                },
                                "for": {
                                  "type": "string"
                                },
                                "in": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "maxAge": {
                                  "type": "string"
                                },
                                "status": {
                                  "enum": [
                                    "set",
                                    "unset",
                                    "unknown"
                                  ],
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            },
                            "description": "State gates a resource on status fields from other resources.",
                            "type": "object"
                          }
                        },
                        "type": "object"
                      }
                    },
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "net.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "IPsecConnection",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "certificateRef": {
                        "type": "string"
                      },
                      "cloudProviderHint": {
                        "enum": [
                          "",
                          "aws",
                          "azure",
                          "gcp"
                        ],
                        "type": "string"
                      },
                      "leftSubnet": {
                        "type": "string"
                      },
                      "localAddress": {
                        "type": "string"
                      },
                      "phase1Proposals": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "phase2Proposals": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "preSharedKey": {
                        "type": "string"
                      },
                      "remoteAddress": {
                        "type": "string"
                      },
                      "rightSubnet": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "localAddress",
                      "remoteAddress",
                      "leftSubnet",
                      "rightSubnet"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "net.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "VRF",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "ifname": {
                        "type": "string"
                      },
                      "members": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "routeTable": {
                        "maximum": 4294967295,
                        "minimum": 1,
                        "type": "integer"
                      }
                    },
                    "required": [
                      "routeTable"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "net.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "VXLANTunnel",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "bridge": {
                        "type": "string"
                      },
                      "ifname": {
                        "type": "string"
                      },
                      "localAddress": {
                        "type": "string"
                      },
                      "mtu": {
                        "minimum": 0,
                        "type": "integer"
                      },
                      "outerDF": {
                        "enum": [
                          "",
                          "inherit",
                          "set",
                          "unset"
                        ],
                        "type": "string"
                      },
                      "peers": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "tcpMSSClamp": {
                        "description": "TCPMSSClamp enables routerd-owned bridge-family MSS clamping on paths\nbetween this VXLAN and the member ports of Bridge.",
                        "type": "boolean"
                      },
                      "udpPort": {
                        "maximum": 65535,
                        "minimum": 1,
                        "type": "integer"
                      },
                      "underlayInterface": {
                        "type": "string"
                      },
                      "vni": {
                        "maximum": 16777215,
                        "minimum": 1,
                        "type": "integer"
                      },
                      "when": {
                        "additionalProperties": false,
                        "description": "When gates the forwarding VXLAN. Unlike general-purpose resources, the\noperational controller treats an unresolved predicate as disabled so a\nstale or missing HA role can never leave the stretched L2 active.",
                        "properties": {
                          "state": {
                            "additionalProperties": {
                              "additionalProperties": false,
                              "properties": {
                                "contains": {
                                  "type": "string"
                                },
                                "equals": {
                                  "type": "string"
                                },
                                "exists": {
                                  "type": "boolean"
                                },
                                "for": {
                                  "type": "string"
                                },
                                "in": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "maxAge": {
                                  "type": "string"
                                },
                                "status": {
                                  "enum": [
                                    "set",
                                    "unset",
                                    "unknown"
                                  ],
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            },
                            "description": "State gates a resource on status fields from other resources.",
                            "type": "object"
                          }
                        },
                        "type": "object"
                      }
                    },
                    "required": [
                      "vni",
                      "localAddress",
                      "underlayInterface"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "net.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "IPv4StaticAddress",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "address": {
                        "type": "string"
                      },
                      "allowOverlap": {
                        "description": "AllowOverlap and AllowOverlapReason remain readable in existing configurations.",
                        "type": "boolean"
                      },
                      "allowOverlapReason": {
                        "type": "string"
                      },
                      "exclusive": {
                        "description": "Exclusive removes other IPv4 addresses from the target interface before adding this address.",
                        "type": "boolean"
                      },
                      "interface": {
                        "type": "string"
                      },
                      "when": {
                        "additionalProperties": false,
                        "properties": {
                          "state": {
                            "additionalProperties": {
                              "additionalProperties": false,
                              "properties": {
                                "contains": {
                                  "type": "string"
                                },
                                "equals": {
                                  "type": "string"
                                },
                                "exists": {
                                  "type": "boolean"
                                },
                                "for": {
                                  "type": "string"
                                },
                                "in": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "maxAge": {
                                  "type": "string"
                                },
                                "status": {
                                  "enum": [
                                    "set",
                                    "unset",
                                    "unknown"
                                  ],
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            },
                            "description": "State gates a resource on status fields from other resources.",
                            "type": "object"
                          }
                        },
                        "type": "object"
                      }
                    },
                    "required": [
                      "interface",
                      "address"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "net.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "VirtualAddress",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "address": {
                        "type": "string"
                      },
                      "addressFrom": {
                        "additionalProperties": false,
                        "properties": {
                          "field": {
                            "description": "Field defaults to phase when omitted.",
                            "type": "string"
                          },
                          "optional": {
                            "type": "boolean"
                          },
                          "resource": {
                            "description": "Resource names the source resource as Kind/name and reads its status, or a router config field for supported resources.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "resource"
                        ],
                        "type": "object"
                      },
                      "externalDNS": {
                        "type": "boolean"
                      },
                      "family": {
                        "enum": [
                          "ipv4",
                          "ipv6"
                        ],
                        "type": "string"
                      },
                      "gratuitousARP": {
                        "description": "GratuitousARP sends an unsolicited ARP announcement after Linux adds or restores a static IPv4 address.",
                        "type": "boolean"
                      },
                      "hostname": {
                        "type": "string"
                      },
                      "interface": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "",
                          "static",
                          "vrrp"
                        ],
                        "type": "string"
                      },
                      "track": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "confirmConsecutiveHealthy": {
                              "maximum": 255,
                              "minimum": 1,
                              "type": "integer"
                            },
                            "confirmConsecutiveUnhealthy": {
                              "maximum": 255,
                              "minimum": 1,
                              "type": "integer"
                            },
                            "resource": {
                              "type": "string"
                            },
                            "unhealthyPenalty": {
                              "maximum": 254,
                              "minimum": 0,
                              "type": "integer"
                            }
                          },
                          "required": [
                            "resource"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "vrrp": {
                        "additionalProperties": false,
                        "properties": {
                          "additionalFailoverVMACs": {
                            "description": "AdditionalFailoverVMACs are activated by the same authoritative VRRP\ntransition as FailoverVMAC. They are used for a LAN gateway identity\nwhose MAC and IPv6 link-local address must survive a MASTER change.",
                            "items": {
                              "additionalProperties": false,
                              "description": "VirtualAddressVRRPFailoverVMAC binds a WAN macvlan to this VRRP instance's own state transitions.",
                              "properties": {
                                "interface": {
                                  "type": "string"
                                },
                                "linkLocalAddress": {
                                  "type": "string"
                                },
                                "macAddress": {
                                  "type": "string"
                                },
                                "parentInterface": {
                                  "type": "string"
                                },
                                "withdrawRouterAdvertisement": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "parentInterface",
                                "interface",
                                "macAddress"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "authentication": {
                            "type": "string"
                          },
                          "authenticationFrom": {
                            "additionalProperties": false,
                            "properties": {
                              "base64": {
                                "type": "boolean"
                              },
                              "env": {
                                "type": "string"
                              },
                              "file": {
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "failoverVMAC": {
                            "additionalProperties": false,
                            "properties": {
                              "interface": {
                                "type": "string"
                              },
                              "linkLocalAddress": {
                                "type": "string"
                              },
                              "macAddress": {
                                "type": "string"
                              },
                              "parentInterface": {
                                "type": "string"
                              },
                              "withdrawRouterAdvertisement": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "parentInterface",
                              "interface",
                              "macAddress"
                            ],
                            "type": "object"
                          },
                          "gracefulActivation": {
                            "additionalProperties": false,
                            "description": "GracefulActivation separates VRRP election from VIP publication. On a\nnewly elected MASTER, routerd waits for ReadyWhen before adding the VIP.",
                            "properties": {
                              "readyWhen": {
                                "additionalProperties": false,
                                "properties": {
                                  "state": {
                                    "additionalProperties": {
                                      "additionalProperties": false,
                                      "properties": {
                                        "contains": {
                                          "type": "string"
                                        },
                                        "equals": {
                                          "type": "string"
                                        },
                                        "exists": {
                                          "type": "boolean"
                                        },
                                        "for": {
                                          "type": "string"
                                        },
                                        "in": {
                                          "items": {
                                            "type": "string"
                                          },
                                          "type": "array"
                                        },
                                        "maxAge": {
                                          "type": "string"
                                        },
                                        "status": {
                                          "enum": [
                                            "set",
                                            "unset",
                                            "unknown"
                                          ],
                                          "type": "string"
                                        }
                                      },
                                      "type": "object"
                                    },
                                    "description": "State gates a resource on status fields from other resources.",
                                    "type": "object"
                                  }
                                },
                                "type": "object"
                              },
                              "timeout": {
                                "description": "Timeout only changes the reported activation state. The VIP remains\nwithheld and routerd continues retrying when readiness later recovers.",
                                "type": "string"
                              }
                            },
                            "required": [
                              "readyWhen"
                            ],
                            "type": "object"
                          },
                          "peers": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "preempt": {
                            "type": "boolean"
                          },
                          "priority": {
                            "maximum": 254,
                            "minimum": 1,
                            "type": "integer"
                          },
                          "virtualRouterID": {
                            "maximum": 255,
                            "minimum": 1,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "virtualRouterID"
                        ],
                        "type": "object"
                      },
                      "when": {
                        "additionalProperties": false,
                        "properties": {
                          "state": {
                            "additionalProperties": {
                              "additionalProperties": false,
                              "properties": {
                                "contains": {
                                  "type": "string"
                                },
                                "equals": {
                                  "type": "string"
                                },
                                "exists": {
                                  "type": "boolean"
                                },
                                "for": {
                                  "type": "string"
                                },
                                "in": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "maxAge": {
                                  "type": "string"
                                },
                                "status": {
                                  "enum": [
                                    "set",
                                    "unset",
                                    "unknown"
                                  ],
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            },
                            "description": "State gates a resource on status fields from other resources.",
                            "type": "object"
                          }
                        },
                        "type": "object"
                      }
                    },
                    "required": [
                      "family",
                      "interface",
                      "address"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "net.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "BGPRouter",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "asn": {
                        "minimum": 1,
                        "type": "integer"
                      },
                      "backend": {
                        "enum": [
                          "",
                          "gobgp"
                        ],
                        "type": "string"
                      },
                      "communities": {
                        "additionalProperties": false,
                        "properties": {
                          "accept": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "send": {
                            "enum": [
                              "",
                              "standard",
                              "extended",
                              "both"
                            ],
                            "type": "string"
                          },
                          "set": {
                            "additionalProperties": false,
                            "properties": {
                              "in": {
                                "items": {
                                  "type": "string"
                                },
                                "type": "array"
                              },
                              "out": {
                                "items": {
                                  "type": "string"
                                },
                                "type": "array"
                              }
                            },
                            "type": "object"
                          }
                        },
                        "type": "object"
                      },
                      "convergenceProfile": {
                        "enum": [
                          "",
                          "default",
                          "fast",
                          "stable"
                        ],
                        "type": "string"
                      },
                      "exportPolicy": {
                        "additionalProperties": false,
                        "properties": {
                          "allowedPrefixes": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          }
                        },
                        "type": "object"
                      },
                      "gracefulRestart": {
                        "additionalProperties": false,
                        "properties": {
                          "enabled": {
                            "type": "boolean"
                          },
                          "restartTime": {
                            "type": "string"
                          },
                          "stalePathTime": {
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "importPolicy": {
                        "additionalProperties": false,
                        "properties": {
                          "allowedPrefixLengthMax": {
                            "maximum": 128,
                            "minimum": 0,
                            "type": "integer"
                          },
                          "allowedPrefixLengthMin": {
                            "maximum": 128,
                            "minimum": 0,
                            "type": "integer"
                          },
                          "allowedPrefixes": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "forbiddenCommunities": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "localPreference": {
                            "description": "LocalPreference is applied on accepted paths before best-path selection.\nA zero value leaves the BGP implementation default unchanged.",
                            "type": "integer"
                          },
                          "nextHopRewrite": {
                            "enum": [
                              "",
                              "peer-address",
                              "unchanged"
                            ],
                            "type": "string"
                          },
                          "requiredCommunities": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          }
                        },
                        "type": "object"
                      },
                      "listen": {
                        "additionalProperties": false,
                        "properties": {
                          "address": {
                            "type": "string"
                          },
                          "port": {
                            "maximum": 65535,
                            "minimum": 1,
                            "type": "integer"
                          }
                        },
                        "type": "object"
                      },
                      "redistribute": {
                        "additionalProperties": false,
                        "properties": {
                          "connected": {
                            "additionalProperties": false,
                            "properties": {
                              "allowedPrefixes": {
                                "items": {
                                  "type": "string"
                                },
                                "type": "array"
                              }
                            },
                            "type": "object"
                          },
                          "static": {
                            "additionalProperties": false,
                            "properties": {
                              "allowedPrefixes": {
                                "items": {
                                  "type": "string"
                                },
                                "type": "array"
                              }
                            },
                            "type": "object"
                          }
                        },
                        "type": "object"
                      },
                      "routerID": {
                        "type": "string"
                      },
                      "timers": {
                        "additionalProperties": false,
                        "properties": {
                          "profile": {
                            "enum": [
                              "",
                              "default",
                              "fast",
                              "slow"
                            ],
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "vrf": {
                        "type": "string"
                      },
                      "watcher": {
                        "additionalProperties": false,
                        "properties": {
                          "maxPrefixes": {
                            "maximum": 999999,
                            "minimum": 1,
                            "type": "integer"
                          },
                          "peerStateChangeThrottle": {
                            "type": "string"
                          },
                          "pollInterval": {
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "when": {
                        "additionalProperties": false,
                        "properties": {
                          "state": {
                            "additionalProperties": {
                              "additionalProperties": false,
                              "properties": {
                                "contains": {
                                  "type": "string"
                                },
                                "equals": {
                                  "type": "string"
                                },
                                "exists": {
                                  "type": "boolean"
                                },
                                "for": {
                                  "type": "string"
                                },
                                "in": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "maxAge": {
                                  "type": "string"
                                },
                                "status": {
                                  "enum": [
                                    "set",
                                    "unset",
                                    "unknown"
                                  ],
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            },
                            "description": "State gates a resource on status fields from other resources.",
                            "type": "object"
                          }
                        },
                        "type": "object"
                      }
                    },
                    "required": [
                      "asn",
                      "routerID"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "net.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "BGPPeer",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "bfd": {
                        "type": "string"
                      },
                      "communities": {
                        "additionalProperties": false,
                        "properties": {
                          "accept": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "send": {
                            "enum": [
                              "",
                              "standard",
                              "extended",
                              "both"
                            ],
                            "type": "string"
                          },
                          "set": {
                            "additionalProperties": false,
                            "properties": {
                              "in": {
                                "items": {
                                  "type": "string"
                                },
                                "type": "array"
                              },
                              "out": {
                                "items": {
                                  "type": "string"
                                },
                                "type": "array"
                              }
                            },
                            "type": "object"
                          }
                        },
                        "type": "object"
                      },
                      "convergenceProfile": {
                        "description": "ConvergenceProfile overrides the referenced BGPRouter's convergence default for this peer.",
                        "enum": [
                          "",
                          "default",
                          "fast",
                          "stable"
                        ],
                        "type": "string"
                      },
                      "ebgpMultihop": {
                        "maximum": 255,
                        "minimum": 0,
                        "type": "integer"
                      },
                      "exportPolicy": {
                        "additionalProperties": false,
                        "properties": {
                          "allowedPrefixes": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          }
                        },
                        "type": "object"
                      },
                      "importPolicy": {
                        "additionalProperties": false,
                        "properties": {
                          "allowedPrefixLengthMax": {
                            "maximum": 128,
                            "minimum": 0,
                            "type": "integer"
                          },
                          "allowedPrefixLengthMin": {
                            "maximum": 128,
                            "minimum": 0,
                            "type": "integer"
                          },
                          "allowedPrefixes": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "forbiddenCommunities": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "localPreference": {
                            "description": "LocalPreference is applied on accepted paths before best-path selection.\nA zero value leaves the BGP implementation default unchanged.",
                            "type": "integer"
                          },
                          "nextHopRewrite": {
                            "enum": [
                              "",
                              "peer-address",
                              "unchanged"
                            ],
                            "type": "string"
                          },
                          "requiredCommunities": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          }
                        },
                        "type": "object"
                      },
                      "passiveMode": {
                        "type": "boolean"
                      },
                      "password": {
                        "type": "string"
                      },
                      "passwordFrom": {
                        "additionalProperties": false,
                        "properties": {
                          "base64": {
                            "type": "boolean"
                          },
                          "env": {
                            "type": "string"
                          },
                          "file": {
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "peerASN": {
                        "minimum": 1,
                        "type": "integer"
                      },
                      "peers": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "routeReflectorClient": {
                        "type": "boolean"
                      },
                      "routeReflectorClusterID": {
                        "type": "string"
                      },
                      "routerRef": {
                        "type": "string"
                      },
                      "timers": {
                        "additionalProperties": false,
                        "properties": {
                          "profile": {
                            "enum": [
                              "",
                              "default",
                              "fast",
                              "slow"
                            ],
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "when": {
                        "additionalProperties": false,
                        "properties": {
                          "state": {
                            "additionalProperties": {
                              "additionalProperties": false,
                              "properties": {
                                "contains": {
                                  "type": "string"
                                },
                                "equals": {
                                  "type": "string"
                                },
                                "exists": {
                                  "type": "boolean"
                                },
                                "for": {
                                  "type": "string"
                                },
                                "in": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "maxAge": {
                                  "type": "string"
                                },
                                "status": {
                                  "enum": [
                                    "set",
                                    "unset",
                                    "unknown"
                                  ],
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            },
                            "description": "State gates a resource on status fields from other resources.",
                            "type": "object"
                          }
                        },
                        "type": "object"
                      }
                    },
                    "required": [
                      "routerRef",
                      "peerASN"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "net.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "BGPDynamicPeer",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "description": "BGPDynamicPeer represents an admission/listen rule for dynamic BGP neighbors.",
                    "properties": {
                      "ebgpMultihop": {
                        "maximum": 255,
                        "minimum": 0,
                        "type": "integer"
                      },
                      "exportPolicy": {
                        "additionalProperties": false,
                        "properties": {
                          "allowedPrefixes": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          }
                        },
                        "type": "object"
                      },
                      "importPolicy": {
                        "additionalProperties": false,
                        "properties": {
                          "allowedPrefixLengthMax": {
                            "maximum": 128,
                            "minimum": 0,
                            "type": "integer"
                          },
                          "allowedPrefixLengthMin": {
                            "maximum": 128,
                            "minimum": 0,
                            "type": "integer"
                          },
                          "allowedPrefixes": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "forbiddenCommunities": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "localPreference": {
                            "description": "LocalPreference is applied on accepted paths before best-path selection.\nA zero value leaves the BGP implementation default unchanged.",
                            "type": "integer"
                          },
                          "nextHopRewrite": {
                            "enum": [
                              "",
                              "peer-address",
                              "unchanged"
                            ],
                            "type": "string"
                          },
                          "requiredCommunities": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          }
                        },
                        "type": "object"
                      },
                      "listen": {
                        "additionalProperties": false,
                        "properties": {
                          "sourcePrefixes": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          }
                        },
                        "required": [
                          "sourcePrefixes"
                        ],
                        "type": "object"
                      },
                      "password": {
                        "type": "string"
                      },
                      "passwordFrom": {
                        "additionalProperties": false,
                        "properties": {
                          "base64": {
                            "type": "boolean"
                          },
                          "env": {
                            "type": "string"
                          },
                          "file": {
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "peerASN": {
                        "minimum": 1,
                        "type": "integer"
                      },
                      "routeReflectorClient": {
                        "type": "boolean"
                      },
                      "routeReflectorClusterID": {
                        "type": "string"
                      },
                      "routerRef": {
                        "type": "string"
                      },
                      "timers": {
                        "additionalProperties": false,
                        "properties": {
                          "profile": {
                            "enum": [
                              "",
                              "default",
                              "fast",
                              "slow"
                            ],
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "when": {
                        "additionalProperties": false,
                        "properties": {
                          "state": {
                            "additionalProperties": {
                              "additionalProperties": false,
                              "properties": {
                                "contains": {
                                  "type": "string"
                                },
                                "equals": {
                                  "type": "string"
                                },
                                "exists": {
                                  "type": "boolean"
                                },
                                "for": {
                                  "type": "string"
                                },
                                "in": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "maxAge": {
                                  "type": "string"
                                },
                                "status": {
                                  "enum": [
                                    "set",
                                    "unset",
                                    "unknown"
                                  ],
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            },
                            "description": "State gates a resource on status fields from other resources.",
                            "type": "object"
                          }
                        },
                        "type": "object"
                      }
                    },
                    "required": [
                      "routerRef",
                      "peerASN",
                      "listen"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "net.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "BFD",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "detectMultiplier": {
                        "maximum": 50,
                        "minimum": 1,
                        "type": "integer"
                      },
                      "interface": {
                        "type": "string"
                      },
                      "minRx": {
                        "type": "string"
                      },
                      "minTx": {
                        "type": "string"
                      },
                      "peer": {
                        "type": "string"
                      },
                      "profile": {
                        "enum": [
                          "",
                          "fast",
                          "normal",
                          "slow"
                        ],
                        "type": "string"
                      },
                      "when": {
                        "additionalProperties": false,
                        "properties": {
                          "state": {
                            "additionalProperties": {
                              "additionalProperties": false,
                              "properties": {
                                "contains": {
                                  "type": "string"
                                },
                                "equals": {
                                  "type": "string"
                                },
                                "exists": {
                                  "type": "boolean"
                                },
                                "for": {
                                  "type": "string"
                                },
                                "in": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "maxAge": {
                                  "type": "string"
                                },
                                "status": {
                                  "enum": [
                                    "set",
                                    "unset",
                                    "unknown"
                                  ],
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            },
                            "description": "State gates a resource on status fields from other resources.",
                            "type": "object"
                          }
                        },
                        "type": "object"
                      }
                    },
                    "required": [
                      "peer"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "net.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "DHCPv4Client",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "classID": {
                        "type": "string"
                      },
                      "clientID": {
                        "type": "string"
                      },
                      "hostname": {
                        "type": "string"
                      },
                      "interface": {
                        "type": "string"
                      },
                      "requestedAddress": {
                        "type": "string"
                      },
                      "routeMetric": {
                        "minimum": 0,
                        "type": "integer"
                      },
                      "useDNS": {
                        "type": "boolean"
                      },
                      "useRoutes": {
                        "type": "boolean"
                      },
                      "when": {
                        "additionalProperties": false,
                        "properties": {
                          "state": {
                            "additionalProperties": {
                              "additionalProperties": false,
                              "properties": {
                                "contains": {
                                  "type": "string"
                                },
                                "equals": {
                                  "type": "string"
                                },
                                "exists": {
                                  "type": "boolean"
                                },
                                "for": {
                                  "type": "string"
                                },
                                "in": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "maxAge": {
                                  "type": "string"
                                },
                                "status": {
                                  "enum": [
                                    "set",
                                    "unset",
                                    "unknown"
                                  ],
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            },
                            "description": "State gates a resource on status fields from other resources.",
                            "type": "object"
                          }
                        },
                        "type": "object"
                      }
                    },
                    "required": [
                      "interface"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "net.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "ClusterNetworkRoute",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "pods": {
                        "additionalProperties": false,
                        "properties": {
                          "cidrs": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          }
                        },
                        "type": "object"
                      },
                      "services": {
                        "additionalProperties": false,
                        "properties": {
                          "cidrs": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          }
                        },
                        "type": "object"
                      },
                      "via": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "interface": {
                              "type": "string"
                            },
                            "nextHop": {
                              "type": "string"
                            },
                            "weight": {
                              "maximum": 999,
                              "minimum": 0,
                              "type": "integer"
                            }
                          },
                          "required": [
                            "interface",
                            "nextHop"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "when": {
                        "additionalProperties": false,
                        "properties": {
                          "state": {
                            "additionalProperties": {
                              "additionalProperties": false,
                              "properties": {
                                "contains": {
                                  "type": "string"
                                },
                                "equals": {
                                  "type": "string"
                                },
                                "exists": {
                                  "type": "boolean"
                                },
                                "for": {
                                  "type": "string"
                                },
                                "in": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "maxAge": {
                                  "type": "string"
                                },
                                "status": {
                                  "enum": [
                                    "set",
                                    "unset",
                                    "unknown"
                                  ],
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            },
                            "description": "State gates a resource on status fields from other resources.",
                            "type": "object"
                          }
                        },
                        "type": "object"
                      }
                    },
                    "required": [
                      "via"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "net.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "DHCPv4Server",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "addressPool": {
                        "additionalProperties": false,
                        "properties": {
                          "end": {
                            "type": "string"
                          },
                          "leaseTime": {
                            "type": "string"
                          },
                          "start": {
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "authoritative": {
                        "type": "boolean"
                      },
                      "dnsInterface": {
                        "type": "string"
                      },
                      "dnsServerFrom": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "field": {
                              "description": "Field defaults to phase when omitted.",
                              "type": "string"
                            },
                            "optional": {
                              "type": "boolean"
                            },
                            "resource": {
                              "description": "Resource names the source resource as Kind/name and reads its status, or a router config field for supported resources.",
                              "type": "string"
                            }
                          },
                          "required": [
                            "resource"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "dnsServers": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "dnsSource": {
                        "description": "DNSSource defaults to self; dhcpv4 reuses DNS servers learned on dnsInterface, static uses dnsServers, and none omits DNS options.",
                        "enum": [
                          "dhcpv4",
                          "static",
                          "self",
                          "none"
                        ],
                        "type": "string"
                      },
                      "domain": {
                        "type": "string"
                      },
                      "domainFrom": {
                        "additionalProperties": false,
                        "properties": {
                          "field": {
                            "description": "Field defaults to phase when omitted.",
                            "type": "string"
                          },
                          "optional": {
                            "type": "boolean"
                          },
                          "resource": {
                            "description": "Resource names the source resource as Kind/name and reads its status, or a router config field for supported resources.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "resource"
                        ],
                        "type": "object"
                      },
                      "gateway": {
                        "type": "string"
                      },
                      "gatewayFrom": {
                        "additionalProperties": false,
                        "properties": {
                          "field": {
                            "description": "Field defaults to phase when omitted.",
                            "type": "string"
                          },
                          "optional": {
                            "type": "boolean"
                          },
                          "resource": {
                            "description": "Resource names the source resource as Kind/name and reads its status, or a router config field for supported resources.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "resource"
                        ],
                        "type": "object"
                      },
                      "interface": {
                        "type": "string"
                      },
                      "leaseFile": {
                        "type": "string"
                      },
                      "leaseTime": {
                        "type": "string"
                      },
                      "listenInterfaces": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "logDHCP": {
                        "type": "boolean"
                      },
                      "managed": {
                        "type": "boolean"
                      },
                      "ntpServerFrom": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "field": {
                              "description": "Field defaults to phase when omitted.",
                              "type": "string"
                            },
                            "optional": {
                              "type": "boolean"
                            },
                            "resource": {
                              "description": "Resource names the source resource as Kind/name and reads its status, or a router config field for supported resources.",
                              "type": "string"
                            }
                          },
                          "required": [
                            "resource"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "ntpServers": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "options": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "code": {
                              "maximum": 65535,
                              "minimum": 1,
                              "type": "integer"
                            },
                            "name": {
                              "type": "string"
                            },
                            "value": {
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "profiles": {
                        "items": {
                          "additionalProperties": false,
                          "description": "DHCPv4ServerProfileSpec defines DHCP options and an address pool that can be reused by multiple selector scopes on the same DHCPv4Server.",
                          "properties": {
                            "addressPool": {
                              "additionalProperties": false,
                              "properties": {
                                "end": {
                                  "type": "string"
                                },
                                "leaseTime": {
                                  "type": "string"
                                },
                                "start": {
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            },
                            "dnsServers": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "gateway": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "netmask": {
                              "type": "string"
                            },
                            "ntpServers": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "options": {
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "code": {
                                    "maximum": 65535,
                                    "minimum": 1,
                                    "type": "integer"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "value": {
                                    "type": "string"
                                  }
                                },
                                "type": "object"
                              },
                              "type": "array"
                            }
                          },
                          "required": [
                            "name",
                            "addressPool"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "rangeEnd": {
                        "type": "string"
                      },
                      "rangeStart": {
                        "type": "string"
                      },
                      "role": {
                        "enum": [
                          "server",
                          "transit"
                        ],
                        "type": "string"
                      },
                      "router": {
                        "type": "string"
                      },
                      "routerSource": {
                        "description": "RouterSource defaults to interfaceAddress; static uses router, and none omits DHCP option 3.",
                        "enum": [
                          "interfaceAddress",
                          "static",
                          "none"
                        ],
                        "type": "string"
                      },
                      "scopes": {
                        "items": {
                          "additionalProperties": false,
                          "description": "DHCPv4ServerScopeSpec allocates a separate tagged pool from the same DHCPv4 server.",
                          "properties": {
                            "addressPool": {
                              "additionalProperties": false,
                              "properties": {
                                "end": {
                                  "type": "string"
                                },
                                "leaseTime": {
                                  "type": "string"
                                },
                                "start": {
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            },
                            "dnsServers": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "gateway": {
                              "type": "string"
                            },
                            "match": {
                              "additionalProperties": false,
                              "properties": {
                                "macAddresses": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "ouiPrefixes": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                }
                              },
                              "type": "object"
                            },
                            "name": {
                              "type": "string"
                            },
                            "netmask": {
                              "type": "string"
                            },
                            "ntpServers": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "options": {
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "code": {
                                    "maximum": 65535,
                                    "minimum": 1,
                                    "type": "integer"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "value": {
                                    "type": "string"
                                  }
                                },
                                "type": "object"
                              },
                              "type": "array"
                            },
                            "profileRef": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "name",
                            "match",
                            "addressPool"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "server": {
                        "enum": [
                          "dnsmasq",
                          "kea",
                          "dhcpd"
                        ],
                        "type": "string"
                      },
                      "stickyHoldDays": {
                        "minimum": 0,
                        "type": "integer"
                      },
                      "when": {
                        "additionalProperties": false,
                        "properties": {
                          "state": {
                            "additionalProperties": {
                              "additionalProperties": false,
                              "properties": {
                                "contains": {
                                  "type": "string"
                                },
                                "equals": {
                                  "type": "string"
                                },
                                "exists": {
                                  "type": "boolean"
                                },
                                "for": {
                                  "type": "string"
                                },
                                "in": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "maxAge": {
                                  "type": "string"
                                },
                                "status": {
                                  "enum": [
                                    "set",
                                    "unset",
                                    "unknown"
                                  ],
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            },
                            "description": "State gates a resource on status fields from other resources.",
                            "type": "object"
                          }
                        },
                        "type": "object"
                      }
                    },
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "net.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "DHCPv4Reservation",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "hostname": {
                        "type": "string"
                      },
                      "ipAddress": {
                        "type": "string"
                      },
                      "leaseTime": {
                        "type": "string"
                      },
                      "macAddress": {
                        "type": "string"
                      },
                      "options": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "code": {
                              "maximum": 65535,
                              "minimum": 1,
                              "type": "integer"
                            },
                            "name": {
                              "type": "string"
                            },
                            "value": {
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "scope": {
                        "type": "string"
                      },
                      "server": {
                        "type": "string"
                      },
                      "when": {
                        "additionalProperties": false,
                        "properties": {
                          "state": {
                            "additionalProperties": {
                              "additionalProperties": false,
                              "properties": {
                                "contains": {
                                  "type": "string"
                                },
                                "equals": {
                                  "type": "string"
                                },
                                "exists": {
                                  "type": "boolean"
                                },
                                "for": {
                                  "type": "string"
                                },
                                "in": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "maxAge": {
                                  "type": "string"
                                },
                                "status": {
                                  "enum": [
                                    "set",
                                    "unset",
                                    "unknown"
                                  ],
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            },
                            "description": "State gates a resource on status fields from other resources.",
                            "type": "object"
                          }
                        },
                        "type": "object"
                      }
                    },
                    "required": [
                      "macAddress",
                      "ipAddress"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "net.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "DHCPv6Address",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "client": {
                        "type": "string"
                      },
                      "interface": {
                        "type": "string"
                      },
                      "required": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "interface"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "net.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "IPv6RAAddress",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "interface": {
                        "type": "string"
                      },
                      "managed": {
                        "type": "boolean"
                      },
                      "required": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "interface"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "net.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "DHCPv6PrefixDelegation",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "client": {
                        "type": "string"
                      },
                      "clientDUID": {
                        "type": "string"
                      },
                      "interface": {
                        "type": "string"
                      },
                      "prefixLength": {
                        "maximum": 128,
                        "minimum": 1,
                        "type": "integer"
                      },
                      "profile": {
                        "description": "Profile applies provider-specific defaults; NTT profiles default prefixLength to 60 and DUID type to link-layer.",
                        "enum": [
                          "default",
                          "ntt-ngn-direct-hikari-denwa",
                          "ntt-hgw-lan-pd"
                        ],
                        "type": "string"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "when": {
                        "additionalProperties": false,
                        "properties": {
                          "state": {
                            "additionalProperties": {
                              "additionalProperties": false,
                              "properties": {
                                "contains": {
                                  "type": "string"
                                },
                                "equals": {
                                  "type": "string"
                                },
                                "exists": {
                                  "type": "boolean"
                                },
                                "for": {
                                  "type": "string"
                                },
                                "in": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "maxAge": {
                                  "type": "string"
                                },
                                "status": {
                                  "enum": [
                                    "set",
                                    "unset",
                                    "unknown"
                                  ],
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            },
                            "description": "State gates a resource on status fields from other resources.",
                            "type": "object"
                          }
                        },
                        "type": "object"
                      }
                    },
                    "required": [
                      "interface"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "net.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "IPv6DelegatedAddress",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "addressSuffix": {
                        "description": "AddressSuffix is ORed into the selected /64 to derive the final IPv6 address.",
                        "type": "string"
                      },
                      "announce": {
                        "type": "boolean"
                      },
                      "dependsOn": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "equals": {
                              "type": "string"
                            },
                            "field": {
                              "description": "Field defaults to phase unless phase is set.",
                              "type": "string"
                            },
                            "notEmpty": {
                              "type": "boolean"
                            },
                            "optional": {
                              "type": "boolean"
                            },
                            "phase": {
                              "description": "Phase is shorthand for requiring the dependency phase field to equal this value.",
                              "type": "string"
                            },
                            "resource": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "resource"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "interface": {
                        "type": "string"
                      },
                      "prefixDelegation": {
                        "description": "PrefixDelegation references the DHCPv6PrefixDelegation resource that supplies the delegated prefix.",
                        "type": "string"
                      },
                      "prefixLength": {
                        "description": "PrefixLength controls the prefix installed for the derived address. It defaults to /64;\nuse /128 for an address that must not create an on-link route.",
                        "maximum": 128,
                        "minimum": 1,
                        "type": "integer"
                      },
                      "sendRA": {
                        "type": "boolean"
                      },
                      "subnetID": {
                        "description": "SubnetID selects the /64 inside the delegated prefix; it defaults to 0.",
                        "type": "string"
                      },
                      "when": {
                        "additionalProperties": false,
                        "properties": {
                          "state": {
                            "additionalProperties": {
                              "additionalProperties": false,
                              "properties": {
                                "contains": {
                                  "type": "string"
                                },
                                "equals": {
                                  "type": "string"
                                },
                                "exists": {
                                  "type": "boolean"
                                },
                                "for": {
                                  "type": "string"
                                },
                                "in": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "maxAge": {
                                  "type": "string"
                                },
                                "status": {
                                  "enum": [
                                    "set",
                                    "unset",
                                    "unknown"
                                  ],
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            },
                            "description": "State gates a resource on status fields from other resources.",
                            "type": "object"
                          }
                        },
                        "type": "object"
                      }
                    },
                    "required": [
                      "prefixDelegation",
                      "interface",
                      "addressSuffix"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "net.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "DHCPv6Information",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "dependsOn": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "equals": {
                              "type": "string"
                            },
                            "field": {
                              "description": "Field defaults to phase unless phase is set.",
                              "type": "string"
                            },
                            "notEmpty": {
                              "type": "boolean"
                            },
                            "optional": {
                              "type": "boolean"
                            },
                            "phase": {
                              "description": "Phase is shorthand for requiring the dependency phase field to equal this value.",
                              "type": "string"
                            },
                            "resource": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "resource"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "interface": {
                        "type": "string"
                      },
                      "request": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "when": {
                        "additionalProperties": false,
                        "properties": {
                          "state": {
                            "additionalProperties": {
                              "additionalProperties": false,
                              "properties": {
                                "contains": {
                                  "type": "string"
                                },
                                "equals": {
                                  "type": "string"
                                },
                                "exists": {
                                  "type": "boolean"
                                },
                                "for": {
                                  "type": "string"
                                },
                                "in": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "maxAge": {
                                  "type": "string"
                                },
                                "status": {
                                  "enum": [
                                    "set",
                                    "unset",
                                    "unknown"
                                  ],
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            },
                            "description": "State gates a resource on status fields from other resources.",
                            "type": "object"
                          }
                        },
                        "type": "object"
                      }
                    },
                    "required": [
                      "interface"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "net.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "IPv6RouterAdvertisement",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "configPath": {
                        "type": "string"
                      },
                      "dependsOn": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "equals": {
                              "type": "string"
                            },
                            "field": {
                              "description": "Field defaults to phase unless phase is set.",
                              "type": "string"
                            },
                            "notEmpty": {
                              "type": "boolean"
                            },
                            "optional": {
                              "type": "boolean"
                            },
                            "phase": {
                              "description": "Phase is shorthand for requiring the dependency phase field to equal this value.",
                              "type": "string"
                            },
                            "resource": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "resource"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "dnssl": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "dnsslFrom": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "field": {
                              "description": "Field defaults to phase when omitted.",
                              "type": "string"
                            },
                            "optional": {
                              "type": "boolean"
                            },
                            "resource": {
                              "description": "Resource names the source resource as Kind/name and reads its status, or a router config field for supported resources.",
                              "type": "string"
                            }
                          },
                          "required": [
                            "resource"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "interface": {
                        "type": "string"
                      },
                      "mFlag": {
                        "type": "boolean"
                      },
                      "mtu": {
                        "maximum": 65535,
                        "minimum": 1280,
                        "type": "integer"
                      },
                      "oFlag": {
                        "type": "boolean"
                      },
                      "pidFile": {
                        "type": "string"
                      },
                      "preferredLifetime": {
                        "type": "string"
                      },
                      "prefix": {
                        "type": "string"
                      },
                      "prefixFrom": {
                        "additionalProperties": false,
                        "properties": {
                          "field": {
                            "description": "Field defaults to phase when omitted.",
                            "type": "string"
                          },
                          "optional": {
                            "type": "boolean"
                          },
                          "resource": {
                            "description": "Resource names the source resource as Kind/name and reads its status, or a router config field for supported resources.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "resource"
                        ],
                        "type": "object"
                      },
                      "prfPreference": {
                        "enum": [
                          "",
                          "low",
                          "medium",
                          "high"
                        ],
                        "type": "string"
                      },
                      "rdnss": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "rdnssFrom": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "field": {
                              "description": "Field defaults to phase when omitted.",
                              "type": "string"
                            },
                            "optional": {
                              "type": "boolean"
                            },
                            "resource": {
                              "description": "Resource names the source resource as Kind/name and reads its status, or a router config field for supported resources.",
                              "type": "string"
                            }
                          },
                          "required": [
                            "resource"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "validLifetime": {
                        "type": "string"
                      },
                      "when": {
                        "additionalProperties": false,
                        "properties": {
                          "state": {
                            "additionalProperties": {
                              "additionalProperties": false,
                              "properties": {
                                "contains": {
                                  "type": "string"
                                },
                                "equals": {
                                  "type": "string"
                                },
                                "exists": {
                                  "type": "boolean"
                                },
                                "for": {
                                  "type": "string"
                                },
                                "in": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "maxAge": {
                                  "type": "string"
                                },
                                "status": {
                                  "enum": [
                                    "set",
                                    "unset",
                                    "unknown"
                                  ],
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            },
                            "description": "State gates a resource on status fields from other resources.",
                            "type": "object"
                          }
                        },
                        "type": "object"
                      }
                    },
                    "required": [
                      "interface"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "net.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "DHCPv6Server",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "addressPool": {
                        "additionalProperties": false,
                        "properties": {
                          "end": {
                            "type": "string"
                          },
                          "leaseTime": {
                            "type": "string"
                          },
                          "start": {
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "configPath": {
                        "type": "string"
                      },
                      "defaultRoute": {
                        "type": "boolean"
                      },
                      "delegatedAddress": {
                        "description": "DelegatedAddress references an IPv6DelegatedAddress used to derive self DNS and RA-adjacent settings.",
                        "type": "string"
                      },
                      "dependsOn": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "equals": {
                              "type": "string"
                            },
                            "field": {
                              "description": "Field defaults to phase unless phase is set.",
                              "type": "string"
                            },
                            "notEmpty": {
                              "type": "boolean"
                            },
                            "optional": {
                              "type": "boolean"
                            },
                            "phase": {
                              "description": "Phase is shorthand for requiring the dependency phase field to equal this value.",
                              "type": "string"
                            },
                            "resource": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "resource"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "dnsServerFrom": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "field": {
                              "description": "Field defaults to phase when omitted.",
                              "type": "string"
                            },
                            "optional": {
                              "type": "boolean"
                            },
                            "resource": {
                              "description": "Resource names the source resource as Kind/name and reads its status, or a router config field for supported resources.",
                              "type": "string"
                            }
                          },
                          "required": [
                            "resource"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "dnsServers": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "dnsSource": {
                        "description": "DNSSource defaults to self; static uses dnsServers, and none omits DNS options.",
                        "enum": [
                          "self",
                          "static",
                          "none"
                        ],
                        "type": "string"
                      },
                      "domainSearch": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "domainSearchFrom": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "field": {
                              "description": "Field defaults to phase when omitted.",
                              "type": "string"
                            },
                            "optional": {
                              "type": "boolean"
                            },
                            "resource": {
                              "description": "Resource names the source resource as Kind/name and reads its status, or a router config field for supported resources.",
                              "type": "string"
                            }
                          },
                          "required": [
                            "resource"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "interface": {
                        "type": "string"
                      },
                      "leaseFile": {
                        "type": "string"
                      },
                      "leaseTime": {
                        "type": "string"
                      },
                      "listenInterfaces": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "logDHCP": {
                        "type": "boolean"
                      },
                      "managed": {
                        "type": "boolean"
                      },
                      "mode": {
                        "description": "Mode defaults to stateless; ra-only emits router advertisements without DHCPv6 service.",
                        "enum": [
                          "stateless",
                          "stateful",
                          "both",
                          "ra-only"
                        ],
                        "type": "string"
                      },
                      "pidFile": {
                        "type": "string"
                      },
                      "rapidCommit": {
                        "type": "boolean"
                      },
                      "role": {
                        "enum": [
                          "server",
                          "transit"
                        ],
                        "type": "string"
                      },
                      "selfAddressPolicy": {
                        "description": "SelfAddressPolicy references a SelfAddressPolicy resource used when dnsSource is self.",
                        "type": "string"
                      },
                      "server": {
                        "enum": [
                          "dnsmasq"
                        ],
                        "type": "string"
                      },
                      "sntpServerFrom": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "field": {
                              "description": "Field defaults to phase when omitted.",
                              "type": "string"
                            },
                            "optional": {
                              "type": "boolean"
                            },
                            "resource": {
                              "description": "Resource names the source resource as Kind/name and reads its status, or a router config field for supported resources.",
                              "type": "string"
                            }
                          },
                          "required": [
                            "resource"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "sntpServers": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "stickyHoldDays": {
                        "minimum": 0,
                        "type": "integer"
                      },
                      "when": {
                        "additionalProperties": false,
                        "properties": {
                          "state": {
                            "additionalProperties": {
                              "additionalProperties": false,
                              "properties": {
                                "contains": {
                                  "type": "string"
                                },
                                "equals": {
                                  "type": "string"
                                },
                                "exists": {
                                  "type": "boolean"
                                },
                                "for": {
                                  "type": "string"
                                },
                                "in": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "maxAge": {
                                  "type": "string"
                                },
                                "status": {
                                  "enum": [
                                    "set",
                                    "unset",
                                    "unknown"
                                  ],
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            },
                            "description": "State gates a resource on status fields from other resources.",
                            "type": "object"
                          }
                        },
                        "type": "object"
                      }
                    },
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "net.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "DHCPv4ServerLeaseSync",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "command": {
                        "type": "string"
                      },
                      "interval": {
                        "type": "string"
                      },
                      "source": {
                        "additionalProperties": false,
                        "properties": {
                          "resource": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "resource"
                        ],
                        "type": "object"
                      },
                      "targets": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "host": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "options": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "sshOptions": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "user": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "host"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "when": {
                        "additionalProperties": false,
                        "properties": {
                          "state": {
                            "additionalProperties": {
                              "additionalProperties": false,
                              "properties": {
                                "contains": {
                                  "type": "string"
                                },
                                "equals": {
                                  "type": "string"
                                },
                                "exists": {
                                  "type": "boolean"
                                },
                                "for": {
                                  "type": "string"
                                },
                                "in": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "maxAge": {
                                  "type": "string"
                                },
                                "status": {
                                  "enum": [
                                    "set",
                                    "unset",
                                    "unknown"
                                  ],
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            },
                            "description": "State gates a resource on status fields from other resources.",
                            "type": "object"
                          }
                        },
                        "type": "object"
                      }
                    },
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "net.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "DHCPv6ServerLeaseSync",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "command": {
                        "type": "string"
                      },
                      "interval": {
                        "type": "string"
                      },
                      "source": {
                        "additionalProperties": false,
                        "properties": {
                          "resource": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "resource"
                        ],
                        "type": "object"
                      },
                      "targets": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "host": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "options": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "sshOptions": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "user": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "host"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "when": {
                        "additionalProperties": false,
                        "properties": {
                          "state": {
                            "additionalProperties": {
                              "additionalProperties": false,
                              "properties": {
                                "contains": {
                                  "type": "string"
                                },
                                "equals": {
                                  "type": "string"
                                },
                                "exists": {
                                  "type": "boolean"
                                },
                                "for": {
                                  "type": "string"
                                },
                                "in": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "maxAge": {
                                  "type": "string"
                                },
                                "status": {
                                  "enum": [
                                    "set",
                                    "unset",
                                    "unknown"
                                  ],
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            },
                            "description": "State gates a resource on status fields from other resources.",
                            "type": "object"
                          }
                        },
                        "type": "object"
                      }
                    },
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "net.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "DHCPv6PrefixDelegationLeaseSync",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "command": {
                        "type": "string"
                      },
                      "interval": {
                        "type": "string"
                      },
                      "source": {
                        "additionalProperties": false,
                        "properties": {
                          "resource": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "resource"
                        ],
                        "type": "object"
                      },
                      "targets": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "host": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "options": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "sshOptions": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "user": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "host"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "when": {
                        "additionalProperties": false,
                        "properties": {
                          "state": {
                            "additionalProperties": {
                              "additionalProperties": false,
                              "properties": {
                                "contains": {
                                  "type": "string"
                                },
                                "equals": {
                                  "type": "string"
                                },
                                "exists": {
                                  "type": "boolean"
                                },
                                "for": {
                                  "type": "string"
                                },
                                "in": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "maxAge": {
                                  "type": "string"
                                },
                                "status": {
                                  "enum": [
                                    "set",
                                    "unset",
                                    "unknown"
                                  ],
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            },
                            "description": "State gates a resource on status fields from other resources.",
                            "type": "object"
                          }
                        },
                        "type": "object"
                      }
                    },
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "net.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "DHCPv4Relay",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "interfaces": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "upstream": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "interfaces",
                      "upstream"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "net.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "SelfAddressPolicy",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "addressFamily": {
                        "enum": [
                          "ipv4",
                          "ipv6"
                        ],
                        "type": "string"
                      },
                      "candidates": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "address": {
                              "type": "string"
                            },
                            "addressSuffix": {
                              "description": "AddressSuffix defaults to the referenced delegated address suffix for delegatedAddress candidates.",
                              "type": "string"
                            },
                            "delegatedAddress": {
                              "type": "string"
                            },
                            "interface": {
                              "type": "string"
                            },
                            "matchSuffix": {
                              "type": "string"
                            },
                            "ordinal": {
                              "description": "Ordinal is one-based when selecting an address from an interface.",
                              "minimum": 1,
                              "type": "integer"
                            },
                            "source": {
                              "description": "Source selects how the candidate address is found: delegatedAddress derives from a delegated prefix, interfaceAddress scans live interface addresses, and static uses address.",
                              "enum": [
                                "delegatedAddress",
                                "interfaceAddress",
                                "static"
                              ],
                              "type": "string"
                            }
                          },
                          "required": [
                            "source"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      }
                    },
                    "required": [
                      "addressFamily",
                      "candidates"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "net.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "DNSZone",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "dhcpDerived": {
                        "additionalProperties": false,
                        "properties": {
                          "leaseFile": {
                            "type": "string"
                          },
                          "sources": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "ttl": {
                            "minimum": 0,
                            "type": "integer"
                          }
                        },
                        "type": "object"
                      },
                      "dnssec": {
                        "additionalProperties": false,
                        "properties": {
                          "enabled": {
                            "type": "boolean"
                          }
                        },
                        "type": "object"
                      },
                      "records": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "hostname": {
                              "type": "string"
                            },
                            "ipv4": {
                              "type": "string"
                            },
                            "ipv4From": {
                              "additionalProperties": false,
                              "properties": {
                                "field": {
                                  "description": "Field defaults to phase when omitted.",
                                  "type": "string"
                                },
                                "optional": {
                                  "type": "boolean"
                                },
                                "resource": {
                                  "description": "Resource names the source resource as Kind/name and reads its status, or a router config field for supported resources.",
                                  "type": "string"
                                }
                              },
                              "required": [
                                "resource"
                              ],
                              "type": "object"
                            },
                            "ipv6": {
                              "type": "string"
                            },
                            "ipv6From": {
                              "additionalProperties": false,
                              "properties": {
                                "field": {
                                  "description": "Field defaults to phase when omitted.",
                                  "type": "string"
                                },
                                "optional": {
                                  "type": "boolean"
                                },
                                "resource": {
                                  "description": "Resource names the source resource as Kind/name and reads its status, or a router config field for supported resources.",
                                  "type": "string"
                                }
                              },
                              "required": [
                                "resource"
                              ],
                              "type": "object"
                            },
                            "ttl": {
                              "minimum": 0,
                              "type": "integer"
                            }
                          },
                          "required": [
                            "hostname"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "ttl": {
                        "minimum": 0,
                        "type": "integer"
                      },
                      "zone": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "zone"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "net.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "DNSResolver",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "cache": {
                        "additionalProperties": false,
                        "properties": {
                          "enabled": {
                            "type": "boolean"
                          },
                          "maxEntries": {
                            "minimum": 0,
                            "type": "integer"
                          },
                          "maxTTL": {
                            "type": "string"
                          },
                          "minTTL": {
                            "type": "string"
                          },
                          "negativeTTL": {
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "listen": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "addressFrom": {
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "field": {
                                    "description": "Field defaults to phase when omitted.",
                                    "type": "string"
                                  },
                                  "optional": {
                                    "type": "boolean"
                                  },
                                  "resource": {
                                    "description": "Resource names the source resource as Kind/name and reads its status, or a router config field for supported resources.",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "resource"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            },
                            "addresses": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "name": {
                              "type": "string"
                            },
                            "port": {
                              "maximum": 65535,
                              "minimum": 1,
                              "type": "integer"
                            },
                            "sources": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "queryLog": {
                        "additionalProperties": false,
                        "properties": {
                          "enabled": {
                            "type": "boolean"
                          },
                          "path": {
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "when": {
                        "additionalProperties": false,
                        "properties": {
                          "state": {
                            "additionalProperties": {
                              "additionalProperties": false,
                              "properties": {
                                "contains": {
                                  "type": "string"
                                },
                                "equals": {
                                  "type": "string"
                                },
                                "exists": {
                                  "type": "boolean"
                                },
                                "for": {
                                  "type": "string"
                                },
                                "in": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "maxAge": {
                                  "type": "string"
                                },
                                "status": {
                                  "enum": [
                                    "set",
                                    "unset",
                                    "unknown"
                                  ],
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            },
                            "description": "State gates a resource on status fields from other resources.",
                            "type": "object"
                          }
                        },
                        "type": "object"
                      }
                    },
                    "required": [
                      "listen"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "net.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "DNSForwarder",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "dnssecValidate": {
                        "type": "boolean"
                      },
                      "healthcheck": {
                        "additionalProperties": false,
                        "properties": {
                          "failThreshold": {
                            "minimum": 1,
                            "type": "integer"
                          },
                          "interval": {
                            "type": "string"
                          },
                          "passThreshold": {
                            "minimum": 1,
                            "type": "integer"
                          },
                          "timeout": {
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "match": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "queryTimeout": {
                        "type": "string"
                      },
                      "resolver": {
                        "type": "string"
                      },
                      "upstreams": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "when": {
                        "additionalProperties": false,
                        "properties": {
                          "state": {
                            "additionalProperties": {
                              "additionalProperties": false,
                              "properties": {
                                "contains": {
                                  "type": "string"
                                },
                                "equals": {
                                  "type": "string"
                                },
                                "exists": {
                                  "type": "boolean"
                                },
                                "for": {
                                  "type": "string"
                                },
                                "in": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "maxAge": {
                                  "type": "string"
                                },
                                "status": {
                                  "enum": [
                                    "set",
                                    "unset",
                                    "unknown"
                                  ],
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            },
                            "description": "State gates a resource on status fields from other resources.",
                            "type": "object"
                          }
                        },
                        "type": "object"
                      },
                      "zoneRefs": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      }
                    },
                    "required": [
                      "resolver",
                      "match"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "net.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "DNSUpstream",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "address": {
                        "type": "string"
                      },
                      "addressFrom": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "field": {
                              "description": "Field defaults to phase when omitted.",
                              "type": "string"
                            },
                            "optional": {
                              "type": "boolean"
                            },
                            "resource": {
                              "description": "Resource names the source resource as Kind/name and reads its status, or a router config field for supported resources.",
                              "type": "string"
                            }
                          },
                          "required": [
                            "resource"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "bootstrap": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "bootstrapFrom": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "field": {
                              "type": "string"
                            },
                            "optional": {
                              "type": "boolean"
                            },
                            "resource": {
                              "description": "Resource names the source resource as Kind/name and reads its status, or a router config field for supported resources.",
                              "type": "string"
                            }
                          },
                          "required": [
                            "resource",
                            "field"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "path": {
                        "type": "string"
                      },
                      "port": {
                        "maximum": 65535,
                        "minimum": 1,
                        "type": "integer"
                      },
                      "protocol": {
                        "enum": [
                          "udp",
                          "tcp",
                          "dot",
                          "doh"
                        ],
                        "type": "string"
                      },
                      "sourceInterface": {
                        "type": "string"
                      },
                      "tlsName": {
                        "type": "string"
                      },
                      "when": {
                        "additionalProperties": false,
                        "properties": {
                          "state": {
                            "additionalProperties": {
                              "additionalProperties": false,
                              "properties": {
                                "contains": {
                                  "type": "string"
                                },
                                "equals": {
                                  "type": "string"
                                },
                                "exists": {
                                  "type": "boolean"
                                },
                                "for": {
                                  "type": "string"
                                },
                                "in": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "maxAge": {
                                  "type": "string"
                                },
                                "status": {
                                  "enum": [
                                    "set",
                                    "unset",
                                    "unknown"
                                  ],
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            },
                            "description": "State gates a resource on status fields from other resources.",
                            "type": "object"
                          }
                        },
                        "type": "object"
                      }
                    },
                    "required": [
                      "protocol"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "net.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "DSLiteTunnel",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "aftrAddressOrdinal": {
                        "minimum": 1,
                        "type": "integer"
                      },
                      "aftrAddressSelection": {
                        "description": "AFTRAddressSelection controls how multiple AAAA records are selected; ordinalModulo wraps the ordinal by the answer count.",
                        "enum": [
                          "ordinal",
                          "ordinalModulo"
                        ],
                        "type": "string"
                      },
                      "aftrDNSServers": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "aftrFQDN": {
                        "type": "string"
                      },
                      "aftrFrom": {
                        "additionalProperties": false,
                        "properties": {
                          "field": {
                            "description": "Field defaults to phase when omitted.",
                            "type": "string"
                          },
                          "optional": {
                            "type": "boolean"
                          },
                          "resource": {
                            "description": "Resource names the source resource as Kind/name and reads its status, or a router config field for supported resources.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "resource"
                        ],
                        "type": "object"
                      },
                      "aftrIPv6": {
                        "type": "string"
                      },
                      "defaultRoute": {
                        "type": "boolean"
                      },
                      "dependsOn": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "equals": {
                              "type": "string"
                            },
                            "field": {
                              "description": "Field defaults to phase unless phase is set.",
                              "type": "string"
                            },
                            "notEmpty": {
                              "type": "boolean"
                            },
                            "optional": {
                              "type": "boolean"
                            },
                            "phase": {
                              "description": "Phase is shorthand for requiring the dependency phase field to equal this value.",
                              "type": "string"
                            },
                            "resource": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "resource"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "enabled": {
                        "description": "Enabled defaults to true; set enabled: false to keep the tunnel disabled.",
                        "type": "boolean"
                      },
                      "encapsulationLimit": {
                        "type": "string"
                      },
                      "interface": {
                        "type": "string"
                      },
                      "localAddress": {
                        "type": "string"
                      },
                      "localAddressFrom": {
                        "additionalProperties": false,
                        "properties": {
                          "field": {
                            "description": "Field defaults to phase when omitted.",
                            "type": "string"
                          },
                          "optional": {
                            "type": "boolean"
                          },
                          "resource": {
                            "description": "Resource names the source resource as Kind/name and reads its status, or a router config field for supported resources.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "resource"
                        ],
                        "type": "object"
                      },
                      "localAddressSource": {
                        "description": "LocalAddressSource defaults to interface; delegatedAddress derives the tunnel source from localDelegatedAddress.",
                        "enum": [
                          "interface",
                          "static",
                          "delegatedAddress"
                        ],
                        "type": "string"
                      },
                      "localAddressSuffix": {
                        "type": "string"
                      },
                      "localDelegatedAddress": {
                        "type": "string"
                      },
                      "mtu": {
                        "maximum": 65535,
                        "minimum": 1280,
                        "type": "integer"
                      },
                      "remoteAddress": {
                        "type": "string"
                      },
                      "routeMetric": {
                        "minimum": 0,
                        "type": "integer"
                      },
                      "tunnelName": {
                        "type": "string"
                      },
                      "when": {
                        "additionalProperties": false,
                        "properties": {
                          "state": {
                            "additionalProperties": {
                              "additionalProperties": false,
                              "properties": {
                                "contains": {
                                  "type": "string"
                                },
                                "equals": {
                                  "type": "string"
                                },
                                "exists": {
                                  "type": "boolean"
                                },
                                "for": {
                                  "type": "string"
                                },
                                "in": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "maxAge": {
                                  "type": "string"
                                },
                                "status": {
                                  "enum": [
                                    "set",
                                    "unset",
                                    "unknown"
                                  ],
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            },
                            "description": "State gates a resource on status fields from other resources.",
                            "type": "object"
                          }
                        },
                        "type": "object"
                      }
                    },
                    "required": [
                      "interface"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "hybrid.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "TunnelInterface",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "address": {
                        "type": "string"
                      },
                      "encapDport": {
                        "maximum": 65535,
                        "minimum": 1,
                        "type": "integer"
                      },
                      "encapSport": {
                        "maximum": 65535,
                        "minimum": 1,
                        "type": "integer"
                      },
                      "key": {
                        "maximum": 4294967295,
                        "minimum": 0,
                        "type": "integer"
                      },
                      "local": {
                        "type": "string"
                      },
                      "localFrom": {
                        "additionalProperties": false,
                        "properties": {
                          "field": {
                            "description": "Field defaults to phase when omitted.",
                            "type": "string"
                          },
                          "optional": {
                            "type": "boolean"
                          },
                          "resource": {
                            "description": "Resource names the source resource as Kind/name and reads its status, or a router config field for supported resources.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "resource"
                        ],
                        "type": "object"
                      },
                      "mode": {
                        "enum": [
                          "ipip",
                          "gre",
                          "fou",
                          "gue"
                        ],
                        "type": "string"
                      },
                      "mtu": {
                        "maximum": 9216,
                        "minimum": 576,
                        "type": "integer"
                      },
                      "pathMTU": {
                        "additionalProperties": false,
                        "properties": {
                          "forceFragmentIPv4": {
                            "type": "boolean"
                          }
                        },
                        "type": "object"
                      },
                      "peerAddress": {
                        "description": "PeerAddress is the explicit IPv4 inner destination paired with Address on\nFreeBSD point-to-point IPIP/GRE interfaces. It is required with Address on\nFreeBSD and rejected on Linux; routerd never derives it from the CIDR.",
                        "type": "string"
                      },
                      "remote": {
                        "type": "string"
                      },
                      "remoteFrom": {
                        "additionalProperties": false,
                        "properties": {
                          "field": {
                            "description": "Field defaults to phase when omitted.",
                            "type": "string"
                          },
                          "optional": {
                            "type": "boolean"
                          },
                          "resource": {
                            "description": "Resource names the source resource as Kind/name and reads its status, or a router config field for supported resources.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "resource"
                        ],
                        "type": "object"
                      },
                      "trustedUnderlay": {
                        "type": "boolean"
                      },
                      "ttl": {
                        "maximum": 255,
                        "minimum": 1,
                        "type": "integer"
                      },
                      "underlayInterface": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "mode",
                      "trustedUnderlay"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "hybrid.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "OverlayPeer",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "nodeID": {
                        "type": "string"
                      },
                      "pathMTU": {
                        "additionalProperties": false,
                        "properties": {
                          "forceFragmentIPv4": {
                            "type": "boolean"
                          }
                        },
                        "type": "object"
                      },
                      "remote": {
                        "additionalProperties": false,
                        "properties": {
                          "address": {
                            "type": "string"
                          },
                          "nodeID": {
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "role": {
                        "enum": [
                          "onprem",
                          "cloud"
                        ],
                        "type": "string"
                      },
                      "underlay": {
                        "additionalProperties": false,
                        "properties": {
                          "address": {
                            "type": "string"
                          },
                          "interface": {
                            "type": "string"
                          },
                          "type": {
                            "enum": [
                              "wireguard",
                              "tailscale",
                              "ipsec",
                              "route",
                              "ipip",
                              "gre",
                              "fou",
                              "gue"
                            ],
                            "type": "string"
                          }
                        },
                        "required": [
                          "type"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "role",
                      "nodeID",
                      "underlay"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "hybrid.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "HybridRoute",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "destinationCIDRs": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "healthCheckRef": {
                        "type": "string"
                      },
                      "install": {
                        "additionalProperties": false,
                        "properties": {
                          "metric": {
                            "minimum": 0,
                            "type": "integer"
                          },
                          "table": {
                            "enum": [
                              "",
                              "main"
                            ],
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "peerRef": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "destinationCIDRs",
                      "peerRef"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "hybrid.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "CloudProviderProfile",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "auth": {
                        "additionalProperties": false,
                        "properties": {
                          "command": {
                            "type": "string"
                          },
                          "mode": {
                            "enum": [
                              "external-command"
                            ],
                            "type": "string"
                          }
                        },
                        "required": [
                          "mode"
                        ],
                        "type": "object"
                      },
                      "capabilities": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "provider": {
                        "enum": [
                          "azure",
                          "aws",
                          "oci",
                          "gcp"
                        ],
                        "type": "string"
                      },
                      "resourceGroup": {
                        "type": "string"
                      },
                      "subscriptionID": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "provider",
                      "capabilities",
                      "auth"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "hybrid.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "ProviderActionPolicy",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "description": "ProviderActionPolicySpec gates whether routerd may execute plugin-proposed provider actions (ADR 0007, Phase 5).",
                    "properties": {
                      "allowUndo": {
                        "description": "AllowUndo permits best-effort rollback. The zero value (false) disables it.",
                        "type": "boolean"
                      },
                      "allowedActions": {
                        "description": "AllowedActions restricts which canonical action verbs may be executed.\nEmpty = none.",
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "allowedCIDRs": {
                        "description": "AllowedCIDRs restricts execution to actions whose target.address falls\nwithin one of these CIDRs. Empty = no CIDR restriction.",
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "allowedProviderRefs": {
                        "description": "AllowedProviderRefs optionally restricts to specific CloudProviderProfile\nreferences. Empty = no provider-ref restriction.",
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "allowedProviders": {
                        "description": "AllowedProviders restricts which providers may be executed. Empty = none.",
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "dryRunOnly": {
                        "description": "DryRunOnly, when nil or true, permits only dry-run; live mutation is\nrejected. Set explicitly to false to allow live execution (still gated by\nEnabled, approval, and the allowlists).",
                        "type": "boolean"
                      },
                      "enabled": {
                        "description": "Enabled must be true before any execution is permitted. The bool zero\nvalue (false) keeps execution disabled by default.",
                        "type": "boolean"
                      },
                      "executionWindow": {
                        "description": "ExecutionWindow optionally restricts execution to a time window. It is\nvalidated leniently (free-form, cron-ish); empty = no window restriction.",
                        "type": "string"
                      },
                      "maxActionsPerRun": {
                        "description": "MaxActionsPerRun caps how many actions one execution run may perform. The\nzero value means 0 (no actions): the operator must set a positive bound.",
                        "type": "integer"
                      },
                      "requireApproval": {
                        "description": "RequireApproval, when nil or true, requires an operator approval before an\naction is executed. Set to false only to allow policy auto-approve.",
                        "type": "boolean"
                      }
                    },
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "federation.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "EventGroup",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "description": "EventGroupSpec declares a CloudEdge Event Federation bus identity (ADR 0006).",
                    "properties": {
                      "auth": {
                        "additionalProperties": false,
                        "description": "Auth is reserved for Phase 2 peer delivery (HMAC over the overlay). It is\naccepted but unused in Phase 1.",
                        "properties": {
                          "mode": {
                            "description": "Mode selects the integrity scheme; only \"hmac\" (or empty) is recognized.",
                            "enum": [
                              "",
                              "hmac"
                            ],
                            "type": "string"
                          },
                          "secretFile": {
                            "description": "SecretFile is a filesystem path to the shared HMAC key.",
                            "type": "string"
                          },
                          "secretRef": {
                            "description": "SecretRef references a secret resource carrying the shared HMAC key.",
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "listen": {
                        "additionalProperties": false,
                        "description": "Listen is the receiver bind for inbound peer pushes. Empty Address means\nthis node is push-only (no receiver).",
                        "properties": {
                          "address": {
                            "type": "string"
                          },
                          "port": {
                            "maximum": 65535,
                            "minimum": 0,
                            "type": "integer"
                          }
                        },
                        "type": "object"
                      },
                      "nodeName": {
                        "description": "NodeName is this node's identity within the group; it is stamped as the\nsourceNode on events emitted into this group.",
                        "type": "string"
                      },
                      "peersFrom": {
                        "description": "PeersFrom imports EventPeer delivery targets from a shared SAMNodeSet.\nNodes whose nodeRef equals nodeName are skipped; static EventPeer resources\nare overlaid after generated peers so they can act as bootstrap overrides.",
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "optional": {
                              "type": "boolean"
                            },
                            "resource": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "resource"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "replayWindow": {
                        "description": "ReplayWindow is a Go duration bounding the accepted message timestamp skew\nfor replay protection; empty is treated as \"5m\" downstream.",
                        "type": "string"
                      },
                      "retention": {
                        "additionalProperties": false,
                        "description": "Retention bounds how many federation events and for how long the local\nstore keeps them. Empty/zero values mean unlimited.",
                        "properties": {
                          "maxAge": {
                            "description": "MaxAge is a Go duration (e.g. \"30m\", \"24h\") bounding event age; \"\" means\nunlimited.",
                            "type": "string"
                          },
                          "maxEvents": {
                            "description": "MaxEvents caps the number of retained events for the group; 0 means\nunlimited.",
                            "minimum": 0,
                            "type": "integer"
                          }
                        },
                        "type": "object"
                      },
                      "when": {
                        "additionalProperties": false,
                        "properties": {
                          "state": {
                            "additionalProperties": {
                              "additionalProperties": false,
                              "properties": {
                                "contains": {
                                  "type": "string"
                                },
                                "equals": {
                                  "type": "string"
                                },
                                "exists": {
                                  "type": "boolean"
                                },
                                "for": {
                                  "type": "string"
                                },
                                "in": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "maxAge": {
                                  "type": "string"
                                },
                                "status": {
                                  "enum": [
                                    "set",
                                    "unset",
                                    "unknown"
                                  ],
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            },
                            "description": "State gates a resource on status fields from other resources.",
                            "type": "object"
                          }
                        },
                        "type": "object"
                      }
                    },
                    "required": [
                      "nodeName"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "federation.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "EventPeer",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "description": "EventPeerSpec declares a remote node a routerd node pushes federation events to within an EventGroup (ADR 0006, Phase 2).",
                    "properties": {
                      "direction": {
                        "description": "Direction selects delivery direction; only \"push\" is supported in Phase 2.\nEmpty defaults to \"push\".",
                        "enum": [
                          "push"
                        ],
                        "type": "string"
                      },
                      "endpoint": {
                        "description": "Endpoint is the base URL to push to, e.g. http://10.99.0.7:8787. Required\nfor push delivery.",
                        "type": "string"
                      },
                      "groupRef": {
                        "description": "GroupRef is the EventGroup this peer belongs to (required).",
                        "type": "string"
                      },
                      "nodeName": {
                        "description": "NodeName is the remote peer node identity (required).",
                        "type": "string"
                      },
                      "subjectPrefixes": {
                        "description": "SubjectPrefixes optionally filters delivery to subjects carrying one of\nthese prefixes; empty delivers all.",
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "types": {
                        "description": "Types optionally filters delivery to these event types; empty delivers all.",
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      }
                    },
                    "required": [
                      "groupRef",
                      "nodeName"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "federation.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "EventSubscription",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "description": "EventSubscriptionSpec declares that received federation events matching a predicate trigger a local Plugin (ADR 0006, Phase 3): the cloud-side rule that turns an observed fact into a DynamicConfigPart via a trusted local plugin.",
                    "properties": {
                      "groupRef": {
                        "description": "GroupRef is the EventGroup whose events this subscription watches.",
                        "type": "string"
                      },
                      "match": {
                        "additionalProperties": false,
                        "description": "Match selects which events fire the subscription. Types is required so a\nsubscription cannot blanket-trigger a plugin on every event in the group.",
                        "properties": {
                          "payload": {
                            "additionalProperties": {
                              "type": "string"
                            },
                            "description": "Payload requires each listed key to equal the given value in the event payload.",
                            "type": "object"
                          },
                          "sourceNodes": {
                            "description": "SourceNodes restricts to events whose sourceNode is one of these (loop/scope guard).",
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "subjectPrefixes": {
                            "description": "SubjectPrefixes restricts to subjects with one of these prefixes.",
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "types": {
                            "description": "Types restricts to these event types (required, at least one), e.g.\nrouterd.client.ipv4.observed.",
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          }
                        },
                        "required": [
                          "types"
                        ],
                        "type": "object"
                      },
                      "trigger": {
                        "additionalProperties": false,
                        "description": "Trigger names the plugin to invoke and optional batching.",
                        "properties": {
                          "batchWindow": {
                            "description": "BatchWindow optionally coalesces matched events into one invocation\n(Go duration), measured from the first matched event.",
                            "type": "string"
                          },
                          "debounce": {
                            "description": "Debounce optionally delays invocation after the last matched event\n(Go duration), bounded by BatchWindow or the default maximum wait.",
                            "type": "string"
                          },
                          "pluginRef": {
                            "description": "PluginRef names the Plugin resource invoked for matched events.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "pluginRef"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "groupRef",
                      "match",
                      "trigger"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "federation.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "FederationSLO",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "description": "FederationSLOSpec declares service-level objectives for an EventGroup.",
                    "properties": {
                      "delivery": {
                        "additionalProperties": false,
                        "description": "Delivery defines delivery-health SLO targets.",
                        "properties": {
                          "expiresSoonSeconds": {
                            "description": "ExpiresSoonSeconds is the remaining TTL (in seconds) below which pending\nevents are considered expiring-soon. 0 means use default (120).",
                            "minimum": 0,
                            "type": "integer"
                          },
                          "lagFailSeconds": {
                            "description": "LagFailSeconds is the delivery lag (in seconds) above which doctor fails.\n0 means use default (180).",
                            "minimum": 0,
                            "type": "integer"
                          },
                          "lagWarnSeconds": {
                            "description": "LagWarnSeconds is the delivery lag (in seconds) above which doctor warns.\n0 means use default (60).",
                            "minimum": 0,
                            "type": "integer"
                          }
                        },
                        "type": "object"
                      },
                      "groupRef": {
                        "description": "GroupRef is the EventGroup this SLO applies to (required).",
                        "type": "string"
                      },
                      "subscription": {
                        "additionalProperties": false,
                        "description": "Subscription defines subscription-processing SLO targets.",
                        "properties": {
                          "maxFailedRuns": {
                            "description": "MaxFailedRuns is the number of failed runs allowed before FAIL.\n0 = any failure triggers fail.",
                            "minimum": 0,
                            "type": "integer"
                          },
                          "maxPendingRuns": {
                            "description": "MaxPendingRuns is the number of pending runs allowed before WARN.\n0 = any pending triggers warn.",
                            "minimum": 0,
                            "type": "integer"
                          }
                        },
                        "type": "object"
                      }
                    },
                    "required": [
                      "groupRef"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "mobility.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "MobilityPool",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "description": "MobilityPoolSpec declares the per-node capture and ownership overlay for a selective-address mobility pool.",
                    "properties": {
                      "groupRef": {
                        "description": "GroupRef is the EventGroup whose observed/expired events can feed BGP\nmobility ownership for this pool (required).",
                        "type": "string"
                      },
                      "members": {
                        "description": "Members carries local capture/ownership overlays keyed by a nodeRef from\nMembersFrom. It cannot set site, role, placement, maintenance, or capacity.\nA router may overlay only its EventGroup local node.",
                        "items": {
                          "additionalProperties": false,
                          "description": "MobilityPoolMemberOverlay is the declared, local-only portion of a MobilityPool member.",
                          "properties": {
                            "capture": {
                              "additionalProperties": false,
                              "description": "Capture declares the local capture mechanism.",
                              "properties": {
                                "activeWhen": {
                                  "additionalProperties": false,
                                  "description": "ActiveWhen gates on-prem proxy-ARP capture only. Cloud\nprovider-secondary-ip capture rejects this field because a local VRRP\nrole cannot safely gate provider assignment.",
                                  "properties": {
                                    "type": {
                                      "enum": [
                                        "",
                                        "single-router",
                                        "vrrp-master"
                                      ],
                                      "type": "string"
                                    },
                                    "virtualAddressRef": {
                                      "type": "string"
                                    }
                                  },
                                  "type": "object"
                                },
                                "captureStrategy": {
                                  "description": "CaptureStrategy opts a provider-secondary-ip capture into route-table\ndelivery. Omit it for the type-derived secondary-IP or proxy-ARP paths.",
                                  "enum": [
                                    "",
                                    "route-table"
                                  ],
                                  "type": "string"
                                },
                                "excludeAddresses": {
                                  "description": "ExcludeAddresses prevents proxy-ARP capture for selected IPv4 addresses or\nCIDRs inside the mobility prefix. Use this for local-only infrastructure\naddresses such as a PVE Simple SDN gateway address that must not be\nanswered across the extended segment.",
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "gratuitousARP": {
                                  "type": "boolean"
                                },
                                "interface": {
                                  "type": "string"
                                },
                                "nicRef": {
                                  "type": "string"
                                },
                                "providerRef": {
                                  "type": "string"
                                },
                                "sourceAddress": {
                                  "description": "SourceAddress is an optional local IPv4 address used by proxy-ARP capture\nmembers as the capture-interface sender address. In BGP delivery mode,\nrouterd lowers it to a /32 IPv4StaticAddress and uses it as the capture\nprefix route preferred source so Linux ARP for local same-subnet clients\nstays inside the mobility prefix.",
                                  "type": "string"
                                },
                                "sourceAddressFrom": {
                                  "additionalProperties": false,
                                  "description": "SourceAddressFrom resolves the capture-interface sender address from a\nresource status field, for example DHCPv4Client/currentAddress. Unlike\nsourceAddress, routerd does not lower this to an IPv4StaticAddress because\nthe referenced resource owns the address lifecycle.",
                                  "properties": {
                                    "field": {
                                      "description": "Field defaults to phase when omitted.",
                                      "type": "string"
                                    },
                                    "optional": {
                                      "type": "boolean"
                                    },
                                    "resource": {
                                      "description": "Resource names the source resource as Kind/name and reads its status, or a router config field for supported resources.",
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "resource"
                                  ],
                                  "type": "object"
                                },
                                "target": {
                                  "additionalProperties": {
                                    "type": "string"
                                  },
                                  "description": "Target carries non-secret provider target hints such as region,\ncompartmentId, resourceGroup, nicName, or ipConfigName. It is copied to\nprovider ActionPlan.target; credentials and tokens do not belong here.",
                                  "type": "object"
                                },
                                "targetFrom": {
                                  "additionalProperties": {
                                    "type": "string"
                                  },
                                  "description": "TargetFrom resolves provider target hints from spec.values. Keys are\nprovider target keys and values are spec.values keys. Explicit target\nentries take precedence over targetFrom.",
                                  "type": "object"
                                },
                                "type": {
                                  "enum": [
                                    "provider-secondary-ip",
                                    "proxy-arp"
                                  ],
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            },
                            "nodeRef": {
                              "description": "NodeRef selects the local member imported from SAMNodeSet.",
                              "type": "string"
                            },
                            "ownershipDiscovery": {
                              "additionalProperties": false,
                              "description": "OwnershipDiscovery declares local provider or L2 observations.",
                              "properties": {
                                "allowEmptyAfter": {
                                  "description": "AllowEmptyAfter lets passive on-prem discovery declare an empty segment\ncomplete after the sources have been armed for this duration. Empty keeps\nzero-client passive discovery pending.",
                                  "type": "string"
                                },
                                "leaseTTL": {
                                  "description": "LeaseTTL controls the emitted observed event expiry. Empty defaults to the\ncontroller default.",
                                  "type": "string"
                                },
                                "mode": {
                                  "description": "Mode selects the discovery backend. Empty/disabled does nothing.",
                                  "enum": [
                                    "",
                                    "disabled",
                                    "provider-private-ip",
                                    "onprem-l2"
                                  ],
                                  "type": "string"
                                },
                                "pluginRef": {
                                  "description": "PluginRef optionally pins the inventory plugin. Empty resolves by\nprovider name or sole observe.providerPrivateIPs plugin.",
                                  "type": "string"
                                },
                                "providerRef": {
                                  "description": "ProviderRef defaults to the member capture.providerRef.",
                                  "type": "string"
                                },
                                "scanInterval": {
                                  "description": "ScanInterval bounds provider inventory calls. Empty defaults to 60s.",
                                  "type": "string"
                                },
                                "scope": {
                                  "additionalProperties": false,
                                  "description": "Scope narrows which provider private IPs become mobility ownership facts.\nEmpty keeps the historical broad scan behavior.",
                                  "properties": {
                                    "excludeAddresses": {
                                      "description": "ExcludeAddresses optionally denylists discovered addresses by IPv4 CIDR or\nbare IPv4 address.",
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "includeAddresses": {
                                      "description": "IncludeAddresses optionally allowlists discovered addresses by IPv4 CIDR or\nbare IPv4 address. Empty means all pool addresses are candidates.",
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    }
                                  },
                                  "type": "object"
                                },
                                "selector": {
                                  "additionalProperties": false,
                                  "description": "Selector optionally filters discovered IP records by provider tags/labels.",
                                  "properties": {
                                    "tags": {
                                      "additionalProperties": {
                                        "type": "string"
                                      },
                                      "type": "object"
                                    }
                                  },
                                  "type": "object"
                                },
                                "sources": {
                                  "description": "Sources enables one or more on-prem L2 ownership signals. The controller\nnormalizes DHCP lease hooks, ARP observers, on-demand ARP probes, and\nPVE svnet observations into the same observed-client federation fact.",
                                  "items": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "bridge": {
                                        "description": "Bridge optionally carries the local bridge name for PVE/svnet observers.",
                                        "type": "string"
                                      },
                                      "interface": {
                                        "description": "Interface narrows L2 observations to one capture interface. Empty defaults\nto the member capture.interface when applicable.",
                                        "type": "string"
                                      },
                                      "leaseTTL": {
                                        "description": "LeaseTTL overrides ownership event expiry for this source.",
                                        "type": "string"
                                      },
                                      "network": {
                                        "description": "Network optionally carries the logical svnet/network name, for example svnet1.",
                                        "type": "string"
                                      },
                                      "probeRetries": {
                                        "description": "ProbeRetries controls retry count for active ARP probes.",
                                        "maximum": 20,
                                        "minimum": 0,
                                        "type": "integer"
                                      },
                                      "probeTimeout": {
                                        "description": "ProbeTimeout bounds one active ARP probe attempt for on-demand-arp.",
                                        "type": "string"
                                      },
                                      "resource": {
                                        "description": "Resource optionally identifies the daemon/resource that emits the signal.",
                                        "type": "string"
                                      },
                                      "scanInterval": {
                                        "description": "ScanInterval bounds polling sources. Event-driven sources may ignore it.",
                                        "type": "string"
                                      },
                                      "sourceAddressFrom": {
                                        "additionalProperties": false,
                                        "description": "SourceAddressFrom resolves the sender address used by active probing\nsources when the capture source address is DHCP-managed.",
                                        "properties": {
                                          "field": {
                                            "description": "Field defaults to phase when omitted.",
                                            "type": "string"
                                          },
                                          "optional": {
                                            "type": "boolean"
                                          },
                                          "resource": {
                                            "description": "Resource names the source resource as Kind/name and reads its status, or a router config field for supported resources.",
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "resource"
                                        ],
                                        "type": "object"
                                      },
                                      "type": {
                                        "description": "Type selects the on-prem observation source.",
                                        "enum": [
                                          "dhcpv4-lease",
                                          "arp-observer",
                                          "on-demand-arp",
                                          "pve-svnet"
                                        ],
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "type"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                },
                                "stoppedInstancePolicy": {
                                  "description": "StoppedInstancePolicy controls whether a stopped provider instance remains\nan ownership fact. Empty and hold retain the fact; release expires it.",
                                  "enum": [
                                    "",
                                    "hold",
                                    "release"
                                  ],
                                  "type": "string"
                                },
                                "subnetRef": {
                                  "description": "SubnetRef optionally constrains the provider scan. Empty asks the plugin\nto infer it from the self NIC.",
                                  "type": "string"
                                },
                                "subnetRefFrom": {
                                  "description": "SubnetRefFrom resolves SubnetRef from spec.values when SubnetRef is not\nset explicitly.",
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            },
                            "profileRef": {
                              "description": "ProfileRef selects a profile from spec.profiles.cloudCaptures.",
                              "type": "string"
                            },
                            "staticOwnedAddresses": {
                              "description": "StaticOwnedAddresses declares local on-prem addresses that do not depend\non observed-client federation events.",
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            }
                          },
                          "required": [
                            "nodeRef"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "membersFrom": {
                        "description": "MembersFrom imports the required shared topology from SAMNodeSet resources.\nA MobilityPool never declares topology directly.",
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "optional": {
                              "type": "boolean"
                            },
                            "resource": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "resource"
                          ],
                          "type": "object"
                        },
                        "minItems": 1,
                        "type": "array"
                      },
                      "prefix": {
                        "description": "Prefix is the CIDR managed by this pool, e.g. 10.88.60.0/24 (required).",
                        "type": "string"
                      },
                      "profiles": {
                        "additionalProperties": false,
                        "description": "Profiles defines reusable capture/discovery fragments. Members opt in\nwith profileRef and can override any concrete field locally.",
                        "properties": {
                          "cloudCaptures": {
                            "additionalProperties": {
                              "additionalProperties": false,
                              "properties": {
                                "capture": {
                                  "additionalProperties": false,
                                  "description": "Capture defaults for provider-secondary-ip cloud capture.",
                                  "properties": {
                                    "activeWhen": {
                                      "additionalProperties": false,
                                      "description": "ActiveWhen gates on-prem proxy-ARP capture only. Cloud\nprovider-secondary-ip capture rejects this field because a local VRRP\nrole cannot safely gate provider assignment.",
                                      "properties": {
                                        "type": {
                                          "enum": [
                                            "",
                                            "single-router",
                                            "vrrp-master"
                                          ],
                                          "type": "string"
                                        },
                                        "virtualAddressRef": {
                                          "type": "string"
                                        }
                                      },
                                      "type": "object"
                                    },
                                    "captureStrategy": {
                                      "description": "CaptureStrategy opts a provider-secondary-ip capture into route-table\ndelivery. Omit it for the type-derived secondary-IP or proxy-ARP paths.",
                                      "enum": [
                                        "",
                                        "route-table"
                                      ],
                                      "type": "string"
                                    },
                                    "excludeAddresses": {
                                      "description": "ExcludeAddresses prevents proxy-ARP capture for selected IPv4 addresses or\nCIDRs inside the mobility prefix. Use this for local-only infrastructure\naddresses such as a PVE Simple SDN gateway address that must not be\nanswered across the extended segment.",
                                      "items": {
                                        "type": "string"
                                      },
                                      "type": "array"
                                    },
                                    "gratuitousARP": {
                                      "type": "boolean"
                                    },
                                    "interface": {
                                      "type": "string"
                                    },
                                    "nicRef": {
                                      "type": "string"
                                    },
                                    "providerRef": {
                                      "type": "string"
                                    },
                                    "sourceAddress": {
                                      "description": "SourceAddress is an optional local IPv4 address used by proxy-ARP capture\nmembers as the capture-interface sender address. In BGP delivery mode,\nrouterd lowers it to a /32 IPv4StaticAddress and uses it as the capture\nprefix route preferred source so Linux ARP for local same-subnet clients\nstays inside the mobility prefix.",
                                      "type": "string"
                                    },
                                    "sourceAddressFrom": {
                                      "additionalProperties": false,
                                      "description": "SourceAddressFrom resolves the capture-interface sender address from a\nresource status field, for example DHCPv4Client/currentAddress. Unlike\nsourceAddress, routerd does not lower this to an IPv4StaticAddress because\nthe referenced resource owns the address lifecycle.",
                                      "properties": {
                                        "field": {
                                          "description": "Field defaults to phase when omitted.",
                                          "type": "string"
                                        },
                                        "optional": {
                                          "type": "boolean"
                                        },
                                        "resource": {
                                          "description": "Resource names the source resource as Kind/name and reads its status, or a router config field for supported resources.",
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "resource"
                                      ],
                                      "type": "object"
                                    },
                                    "target": {
                                      "additionalProperties": {
                                        "type": "string"
                                      },
                                      "description": "Target carries non-secret provider target hints such as region,\ncompartmentId, resourceGroup, nicName, or ipConfigName. It is copied to\nprovider ActionPlan.target; credentials and tokens do not belong here.",
                                      "type": "object"
                                    },
                                    "targetFrom": {
                                      "additionalProperties": {
                                        "type": "string"
                                      },
                                      "description": "TargetFrom resolves provider target hints from spec.values. Keys are\nprovider target keys and values are spec.values keys. Explicit target\nentries take precedence over targetFrom.",
                                      "type": "object"
                                    },
                                    "type": {
                                      "enum": [
                                        "provider-secondary-ip",
                                        "proxy-arp"
                                      ],
                                      "type": "string"
                                    }
                                  },
                                  "type": "object"
                                },
                                "ownershipDiscovery": {
                                  "additionalProperties": false,
                                  "description": "OwnershipDiscovery defaults for provider private-IP observation.",
                                  "properties": {
                                    "allowEmptyAfter": {
                                      "description": "AllowEmptyAfter lets passive on-prem discovery declare an empty segment\ncomplete after the sources have been armed for this duration. Empty keeps\nzero-client passive discovery pending.",
                                      "type": "string"
                                    },
                                    "leaseTTL": {
                                      "description": "LeaseTTL controls the emitted observed event expiry. Empty defaults to the\ncontroller default.",
                                      "type": "string"
                                    },
                                    "mode": {
                                      "description": "Mode selects the discovery backend. Empty/disabled does nothing.",
                                      "enum": [
                                        "",
                                        "disabled",
                                        "provider-private-ip",
                                        "onprem-l2"
                                      ],
                                      "type": "string"
                                    },
                                    "pluginRef": {
                                      "description": "PluginRef optionally pins the inventory plugin. Empty resolves by\nprovider name or sole observe.providerPrivateIPs plugin.",
                                      "type": "string"
                                    },
                                    "providerRef": {
                                      "description": "ProviderRef defaults to the member capture.providerRef.",
                                      "type": "string"
                                    },
                                    "scanInterval": {
                                      "description": "ScanInterval bounds provider inventory calls. Empty defaults to 60s.",
                                      "type": "string"
                                    },
                                    "scope": {
                                      "additionalProperties": false,
                                      "description": "Scope narrows which provider private IPs become mobility ownership facts.\nEmpty keeps the historical broad scan behavior.",
                                      "properties": {
                                        "excludeAddresses": {
                                          "description": "ExcludeAddresses optionally denylists discovered addresses by IPv4 CIDR or\nbare IPv4 address.",
                                          "items": {
                                            "type": "string"
                                          },
                                          "type": "array"
                                        },
                                        "includeAddresses": {
                                          "description": "IncludeAddresses optionally allowlists discovered addresses by IPv4 CIDR or\nbare IPv4 address. Empty means all pool addresses are candidates.",
                                          "items": {
                                            "type": "string"
                                          },
                                          "type": "array"
                                        }
                                      },
                                      "type": "object"
                                    },
                                    "selector": {
                                      "additionalProperties": false,
                                      "description": "Selector optionally filters discovered IP records by provider tags/labels.",
                                      "properties": {
                                        "tags": {
                                          "additionalProperties": {
                                            "type": "string"
                                          },
                                          "type": "object"
                                        }
                                      },
                                      "type": "object"
                                    },
                                    "sources": {
                                      "description": "Sources enables one or more on-prem L2 ownership signals. The controller\nnormalizes DHCP lease hooks, ARP observers, on-demand ARP probes, and\nPVE svnet observations into the same observed-client federation fact.",
                                      "items": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "bridge": {
                                            "description": "Bridge optionally carries the local bridge name for PVE/svnet observers.",
                                            "type": "string"
                                          },
                                          "interface": {
                                            "description": "Interface narrows L2 observations to one capture interface. Empty defaults\nto the member capture.interface when applicable.",
                                            "type": "string"
                                          },
                                          "leaseTTL": {
                                            "description": "LeaseTTL overrides ownership event expiry for this source.",
                                            "type": "string"
                                          },
                                          "network": {
                                            "description": "Network optionally carries the logical svnet/network name, for example svnet1.",
                                            "type": "string"
                                          },
                                          "probeRetries": {
                                            "description": "ProbeRetries controls retry count for active ARP probes.",
                                            "maximum": 20,
                                            "minimum": 0,
                                            "type": "integer"
                                          },
                                          "probeTimeout": {
                                            "description": "ProbeTimeout bounds one active ARP probe attempt for on-demand-arp.",
                                            "type": "string"
                                          },
                                          "resource": {
                                            "description": "Resource optionally identifies the daemon/resource that emits the signal.",
                                            "type": "string"
                                          },
                                          "scanInterval": {
                                            "description": "ScanInterval bounds polling sources. Event-driven sources may ignore it.",
                                            "type": "string"
                                          },
                                          "sourceAddressFrom": {
                                            "additionalProperties": false,
                                            "description": "SourceAddressFrom resolves the sender address used by active probing\nsources when the capture source address is DHCP-managed.",
                                            "properties": {
                                              "field": {
                                                "description": "Field defaults to phase when omitted.",
                                                "type": "string"
                                              },
                                              "optional": {
                                                "type": "boolean"
                                              },
                                              "resource": {
                                                "description": "Resource names the source resource as Kind/name and reads its status, or a router config field for supported resources.",
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "resource"
                                            ],
                                            "type": "object"
                                          },
                                          "type": {
                                            "description": "Type selects the on-prem observation source.",
                                            "enum": [
                                              "dhcpv4-lease",
                                              "arp-observer",
                                              "on-demand-arp",
                                              "pve-svnet"
                                            ],
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "type"
                                        ],
                                        "type": "object"
                                      },
                                      "type": "array"
                                    },
                                    "stoppedInstancePolicy": {
                                      "description": "StoppedInstancePolicy controls whether a stopped provider instance remains\nan ownership fact. Empty and hold retain the fact; release expires it.",
                                      "enum": [
                                        "",
                                        "hold",
                                        "release"
                                      ],
                                      "type": "string"
                                    },
                                    "subnetRef": {
                                      "description": "SubnetRef optionally constrains the provider scan. Empty asks the plugin\nto infer it from the self NIC.",
                                      "type": "string"
                                    },
                                    "subnetRefFrom": {
                                      "description": "SubnetRefFrom resolves SubnetRef from spec.values when SubnetRef is not\nset explicitly.",
                                      "type": "string"
                                    }
                                  },
                                  "type": "object"
                                }
                              },
                              "type": "object"
                            },
                            "description": "CloudCaptures contains reusable cloud provider-secondary-ip capture\ndefaults. It deliberately models only cloud capture/discovery because\non-prem proxy-ARP authority must remain explicit and fail-closed.",
                            "type": "object"
                          }
                        },
                        "type": "object"
                      },
                      "staticHandovers": {
                        "description": "StaticHandovers declares planned static-owned address movement from an\non-prem member to another member. The controller releases the from member\nfirst and only projects the to member after observing the release event.",
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "address": {
                              "type": "string"
                            },
                            "fromNodeRef": {
                              "type": "string"
                            },
                            "toNodeRef": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "address",
                            "fromNodeRef",
                            "toNodeRef"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "values": {
                        "additionalProperties": {
                          "type": "string"
                        },
                        "description": "Values carries non-secret per-router constants referenced by profiles.\nIt is intended for provider identifiers such as NIC, subnet, region, or\nresource group names; credentials and tokens do not belong here.",
                        "type": "object"
                      }
                    },
                    "required": [
                      "prefix",
                      "groupRef",
                      "membersFrom"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "mobility.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "SAMNodeSet",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "description": "SAMNodeSetSpec is the shared node identity registry for write-once SAM fabrics.",
                    "properties": {
                      "nodes": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "eventEndpoint": {
                              "type": "string"
                            },
                            "macAddresses": {
                              "items": {
                                "pattern": "^([0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}$",
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "maintenance": {
                              "additionalProperties": false,
                              "properties": {
                                "drain": {
                                  "type": "boolean"
                                }
                              },
                              "type": "object"
                            },
                            "maxSecondaryIPs": {
                              "description": "MaxSecondaryIPs is the shared provider-capture capacity for this node.\nIt belongs with identity/topology because distributed capture must see the\nsame capacity for every member; provider-local capture details stay in a\nMobilityPool self overlay.",
                              "minimum": 0,
                              "type": "integer"
                            },
                            "nodeRef": {
                              "type": "string"
                            },
                            "placement": {
                              "additionalProperties": false,
                              "properties": {
                                "group": {
                                  "type": "string"
                                },
                                "priority": {
                                  "description": "Priority orders active/standby candidates. Empty/0 is auto-numbered\ndeterministically within the group as 10, 20, ... while preserving any\nexplicitly configured priorities.",
                                  "maximum": 1000000,
                                  "minimum": 0,
                                  "type": "integer"
                                }
                              },
                              "type": "object"
                            },
                            "role": {
                              "enum": [
                                "",
                                "onprem",
                                "cloud"
                              ],
                              "type": "string"
                            },
                            "routeReflector": {
                              "type": "boolean"
                            },
                            "samEndpoint": {
                              "type": "string"
                            },
                            "samEndpointFrom": {
                              "additionalProperties": false,
                              "properties": {
                                "field": {
                                  "description": "Field defaults to phase when omitted.",
                                  "type": "string"
                                },
                                "optional": {
                                  "type": "boolean"
                                },
                                "resource": {
                                  "description": "Resource names the source resource as Kind/name and reads its status, or a router config field for supported resources.",
                                  "type": "string"
                                }
                              },
                              "required": [
                                "resource"
                              ],
                              "type": "object"
                            },
                            "site": {
                              "type": "string"
                            },
                            "wireGuard": {
                              "additionalProperties": false,
                              "properties": {
                                "allowedIPs": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "endpoint": {
                                  "type": "string"
                                },
                                "persistentKeepalive": {
                                  "maximum": 65535,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "publicKey": {
                                  "type": "string"
                                },
                                "transportEndpoint": {
                                  "description": "TransportEndpoint is the inner endpoint that a WireGuard-protected SAM\ntunnel targets. It is distinct from Endpoint, which is the WireGuard UDP\nsocket, and from SAMEndpoint, which is used by unencrypted transports.",
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            }
                          },
                          "required": [
                            "nodeRef"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      }
                    },
                    "required": [
                      "nodes"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "mobility.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "SAMEnrollmentPolicy",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "description": "SAMEnrollmentPolicy authorizes leaf-side enrollment claims for SAM.",
                    "properties": {
                      "allowedLeafIDs": {
                        "additionalProperties": false,
                        "properties": {
                          "pattern": {
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "directMesh": {
                        "additionalProperties": false,
                        "description": "DirectMesh opts eligible leaves into an opportunistic direct data path.\nRR peers remain the control-plane and forwarding fallback.",
                        "properties": {
                          "peerGroupRef": {
                            "description": "PeerGroupRef names the policy-scoped, runtime-only SAMPeerGroup returned\nto direct-mesh-enabled admitted leaves.",
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "endpointPrefixes": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "joinAudience": {
                        "type": "string"
                      },
                      "joinTokenFrom": {
                        "additionalProperties": false,
                        "properties": {
                          "base64": {
                            "type": "boolean"
                          },
                          "env": {
                            "type": "string"
                          },
                          "file": {
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "mobilityPoolRefs": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "mobilityPrefixes": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "rrNodeSetRef": {
                        "description": "RRNodeSetRef is the sole static source for RR identity and topology.\nThe enrollment server selects route-reflector nodes from its local NodeSet\nand returns them as the runtime SAMRRSet named by RRSetRef. It belongs only\nto an enrollment-serving policy; a leaf sends a remote claim through\nSAMEnrollmentClient and does not author a local policy or NodeSet.",
                        "type": "string"
                      },
                      "rrSetRef": {
                        "type": "string"
                      },
                      "transportProfileRef": {
                        "type": "string"
                      },
                      "ttl": {
                        "type": "string"
                      },
                      "tunnelAddressPrefixes": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "wireGuard": {
                        "additionalProperties": false,
                        "properties": {
                          "allowedExtraIPPrefixes": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "endpointPrefixes": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "interface": {
                            "type": "string"
                          },
                          "persistentKeepalive": {
                            "maximum": 65535,
                            "minimum": 0,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "interface"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "transportProfileRef",
                      "tunnelAddressPrefixes"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "mobility.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "SAMEnrollmentClaim",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "description": "SAMEnrollmentClaim is the leaf identity and enrollment payload.",
                    "properties": {
                      "bgp": {
                        "additionalProperties": false,
                        "properties": {
                          "asn": {
                            "minimum": 1,
                            "type": "integer"
                          },
                          "routerID": {
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "directMesh": {
                        "description": "DirectMesh opts this claim into the policy's direct-leaf snapshot.\nA false value keeps this leaf on RR peers only.",
                        "type": "boolean"
                      },
                      "endpoint": {
                        "type": "string"
                      },
                      "expiresAt": {
                        "type": "string"
                      },
                      "joinAudience": {
                        "type": "string"
                      },
                      "joinHMAC": {
                        "type": "string"
                      },
                      "joinNonce": {
                        "type": "string"
                      },
                      "joinTimestamp": {
                        "type": "string"
                      },
                      "leafID": {
                        "type": "string"
                      },
                      "mobility": {
                        "additionalProperties": false,
                        "properties": {
                          "ownedAddresses": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          }
                        },
                        "type": "object"
                      },
                      "policyRef": {
                        "type": "string"
                      },
                      "revoked": {
                        "type": "boolean"
                      },
                      "rrSetRef": {
                        "type": "string"
                      },
                      "tunnelAddress": {
                        "type": "string"
                      },
                      "wireGuard": {
                        "additionalProperties": false,
                        "properties": {
                          "allowedIPs": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "endpoint": {
                            "type": "string"
                          },
                          "persistentKeepalive": {
                            "maximum": 65535,
                            "minimum": 0,
                            "type": "integer"
                          },
                          "publicKey": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "publicKey"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "policyRef",
                      "leafID",
                      "tunnelAddress"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "mobility.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "SAMEnrollmentClient",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "description": "SAMEnrollmentClient runs leaf-side enrollment bootstrap/refresh.",
                    "properties": {
                      "bootstrapEndpoints": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "claimRef": {
                        "type": "string"
                      },
                      "controlAPITLS": {
                        "additionalProperties": false,
                        "properties": {
                          "caFile": {
                            "type": "string"
                          },
                          "certFile": {
                            "type": "string"
                          },
                          "insecureSkipVerify": {
                            "type": "boolean"
                          },
                          "keyFile": {
                            "type": "string"
                          },
                          "serverName": {
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "controlAPITokenFrom": {
                        "additionalProperties": false,
                        "properties": {
                          "base64": {
                            "type": "boolean"
                          },
                          "env": {
                            "type": "string"
                          },
                          "file": {
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "retryBackoff": {
                        "additionalProperties": false,
                        "properties": {
                          "max": {
                            "type": "string"
                          },
                          "min": {
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "rrSocket": {
                        "type": "string"
                      },
                      "stateTTLRefreshBefore": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "claimRef"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "mobility.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "SAMTransportProfile",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "description": "SAMTransportProfile derives the underlay tunnels and BGP peer sessions used by selective-address mobility delivery.",
                    "properties": {
                      "addressingMode": {
                        "enum": [
                          "",
                          "edge-index",
                          "pair-stable"
                        ],
                        "type": "string"
                      },
                      "bgp": {
                        "additionalProperties": false,
                        "properties": {
                          "bfd": {
                            "additionalProperties": false,
                            "properties": {
                              "detectMultiplier": {
                                "maximum": 50,
                                "minimum": 1,
                                "type": "integer"
                              },
                              "enabled": {
                                "type": "boolean"
                              },
                              "interface": {
                                "type": "string"
                              },
                              "minRx": {
                                "type": "string"
                              },
                              "minTx": {
                                "type": "string"
                              },
                              "profile": {
                                "enum": [
                                  "",
                                  "fast",
                                  "normal",
                                  "slow"
                                ],
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "convergenceProfile": {
                            "description": "ConvergenceProfile overrides the referenced BGPRouter for generated peers. Omit it to inherit the router default.",
                            "enum": [
                              "",
                              "default",
                              "fast",
                              "stable"
                            ],
                            "type": "string"
                          },
                          "directLocalPreference": {
                            "description": "DirectLocalPreference is applied only to peers from a peersFrom entry\nmarked direct. Zero uses the safe direct-mesh default.",
                            "type": "integer"
                          },
                          "ebgpMultihop": {
                            "maximum": 255,
                            "minimum": 0,
                            "type": "integer"
                          },
                          "exportPolicy": {
                            "additionalProperties": false,
                            "properties": {
                              "allowedPrefixes": {
                                "items": {
                                  "type": "string"
                                },
                                "type": "array"
                              }
                            },
                            "type": "object"
                          },
                          "generatePeers": {
                            "type": "boolean"
                          },
                          "importPolicy": {
                            "additionalProperties": false,
                            "properties": {
                              "allowedPrefixLengthMax": {
                                "maximum": 128,
                                "minimum": 0,
                                "type": "integer"
                              },
                              "allowedPrefixLengthMin": {
                                "maximum": 128,
                                "minimum": 0,
                                "type": "integer"
                              },
                              "allowedPrefixes": {
                                "items": {
                                  "type": "string"
                                },
                                "type": "array"
                              },
                              "forbiddenCommunities": {
                                "items": {
                                  "type": "string"
                                },
                                "type": "array"
                              },
                              "localPreference": {
                                "description": "LocalPreference is applied on accepted paths before best-path selection.\nA zero value leaves the BGP implementation default unchanged.",
                                "type": "integer"
                              },
                              "nextHopRewrite": {
                                "enum": [
                                  "",
                                  "peer-address",
                                  "unchanged"
                                ],
                                "type": "string"
                              },
                              "requiredCommunities": {
                                "items": {
                                  "type": "string"
                                },
                                "type": "array"
                              }
                            },
                            "type": "object"
                          },
                          "peerASN": {
                            "minimum": 1,
                            "type": "integer"
                          },
                          "routeReflectorClient": {
                            "type": "boolean"
                          },
                          "routeReflectorClusterID": {
                            "type": "string"
                          },
                          "routerRef": {
                            "type": "string"
                          },
                          "timers": {
                            "additionalProperties": false,
                            "properties": {
                              "profile": {
                                "enum": [
                                  "",
                                  "default",
                                  "fast",
                                  "slow"
                                ],
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "timersPreset": {
                            "enum": [
                              "",
                              "default",
                              "fast",
                              "slow"
                            ],
                            "type": "string"
                          }
                        },
                        "required": [
                          "routerRef",
                          "peerASN"
                        ],
                        "type": "object"
                      },
                      "encapDport": {
                        "maximum": 65535,
                        "minimum": 1,
                        "type": "integer"
                      },
                      "encapSport": {
                        "maximum": 65535,
                        "minimum": 1,
                        "type": "integer"
                      },
                      "encryption": {
                        "enum": [
                          "",
                          "none",
                          "wireguard"
                        ],
                        "type": "string"
                      },
                      "innerPrefix": {
                        "type": "string"
                      },
                      "localEndpoint": {
                        "type": "string"
                      },
                      "localEndpointFrom": {
                        "additionalProperties": false,
                        "properties": {
                          "field": {
                            "description": "Field defaults to phase when omitted.",
                            "type": "string"
                          },
                          "optional": {
                            "type": "boolean"
                          },
                          "resource": {
                            "description": "Resource names the source resource as Kind/name and reads its status, or a router config field for supported resources.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "resource"
                        ],
                        "type": "object"
                      },
                      "mode": {
                        "enum": [
                          "ipip",
                          "gre",
                          "fou",
                          "gue"
                        ],
                        "type": "string"
                      },
                      "peersFrom": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "direct": {
                              "description": "Direct marks an enrollment-delivered SAMPeerGroup as an opportunistic\nleaf-to-leaf adjacency. A missing, expired, or incompatible direct group\nnever removes peers resolved from the other sources in this profile.\nDirect paths use the peer address as next hop and take deterministic\nprecedence over RR-reflected paths while their BGP session is established.",
                              "type": "boolean"
                            },
                            "nodeRefs": {
                              "description": "NodeRefs narrows a static SAMNodeSet (or an RR/enrollment source) to the\ntransport adjacencies this profile should create. The source remains the\nsole owner of endpoint identity and complete topology; this is only a\nlocal adjacency overlay.",
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "optional": {
                              "type": "boolean"
                            },
                            "resource": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "resource"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "publishPeerGroup": {
                        "type": "boolean"
                      },
                      "selfNodeRef": {
                        "type": "string"
                      },
                      "underlayInterface": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "selfNodeRef",
                      "mode",
                      "innerPrefix",
                      "underlayInterface",
                      "bgp"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "mobility.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "SAMSubnetPolicy",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "description": "SAMSubnetPolicySpec shards a large on-prem prefix across multiple cloud-edge node groups.",
                    "properties": {
                      "groupRef": {
                        "description": "GroupRef is the EventGroup used for shard assignment delivery.",
                        "type": "string"
                      },
                      "poolRef": {
                        "description": "PoolRef names the MobilityPool whose discovery scope is narrowed.",
                        "type": "string"
                      },
                      "shards": {
                        "description": "Shards maps sub-prefixes to assigned nodes. Each prefix must be within\nsourcePrefix and shards must not overlap.",
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "assignedNodes": {
                              "description": "AssignedNodes lists the nodeRefs responsible for this shard. Nodes in\nthe same shard form a redundancy group (#352 placement semantics apply).",
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "prefix": {
                              "description": "Prefix is the sub-prefix this shard covers (e.g. 10.0.1.0/25).",
                              "type": "string"
                            }
                          },
                          "required": [
                            "prefix",
                            "assignedNodes"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "sourcePrefix": {
                        "description": "SourcePrefix is the large prefix being sharded (e.g. 10.0.0.0/8).",
                        "type": "string"
                      }
                    },
                    "required": [
                      "sourcePrefix",
                      "poolRef",
                      "groupRef",
                      "shards"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "net.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "IPv4Route",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "dependsOn": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "equals": {
                              "type": "string"
                            },
                            "field": {
                              "description": "Field defaults to phase unless phase is set.",
                              "type": "string"
                            },
                            "notEmpty": {
                              "type": "boolean"
                            },
                            "optional": {
                              "type": "boolean"
                            },
                            "phase": {
                              "description": "Phase is shorthand for requiring the dependency phase field to equal this value.",
                              "type": "string"
                            },
                            "resource": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "resource"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "destination": {
                        "type": "string"
                      },
                      "device": {
                        "type": "string"
                      },
                      "deviceFrom": {
                        "additionalProperties": false,
                        "properties": {
                          "field": {
                            "description": "Field defaults to phase when omitted.",
                            "type": "string"
                          },
                          "optional": {
                            "type": "boolean"
                          },
                          "resource": {
                            "description": "Resource names the source resource as Kind/name and reads its status, or a router config field for supported resources.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "resource"
                        ],
                        "type": "object"
                      },
                      "gateway": {
                        "type": "string"
                      },
                      "gatewayFrom": {
                        "additionalProperties": false,
                        "properties": {
                          "field": {
                            "description": "Field defaults to phase when omitted.",
                            "type": "string"
                          },
                          "optional": {
                            "type": "boolean"
                          },
                          "resource": {
                            "description": "Resource names the source resource as Kind/name and reads its status, or a router config field for supported resources.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "resource"
                        ],
                        "type": "object"
                      },
                      "metric": {
                        "minimum": 0,
                        "type": "integer"
                      },
                      "preferredSource": {
                        "description": "PreferredSource programs the Linux route preferred source (RTA_PREFSRC).\nIt is useful for host-originated traffic that must use a stable logical\nsource address while still following an explicit delivery route.",
                        "type": "string"
                      },
                      "type": {
                        "enum": [
                          "unicast",
                          "blackhole"
                        ],
                        "type": "string"
                      }
                    },
                    "required": [
                      "destination"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "net.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "HealthCheck",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "addressFamily": {
                        "enum": [
                          "ipv4",
                          "ipv6"
                        ],
                        "type": "string"
                      },
                      "enabled": {
                        "description": "Enabled defaults to true; set enabled: false to keep the check disabled.",
                        "type": "boolean"
                      },
                      "healthyThreshold": {
                        "minimum": 1,
                        "type": "integer"
                      },
                      "interface": {
                        "type": "string"
                      },
                      "interval": {
                        "type": "string"
                      },
                      "port": {
                        "maximum": 65535,
                        "minimum": 0,
                        "type": "integer"
                      },
                      "protocol": {
                        "enum": [
                          "",
                          "icmp",
                          "tcp",
                          "dns",
                          "http"
                        ],
                        "type": "string"
                      },
                      "role": {
                        "enum": [
                          "link",
                          "next-hop",
                          "internet",
                          "service",
                          "policy"
                        ],
                        "type": "string"
                      },
                      "target": {
                        "type": "string"
                      },
                      "targetSource": {
                        "enum": [
                          "auto",
                          "static",
                          "defaultGateway",
                          "dsliteRemote"
                        ],
                        "type": "string"
                      },
                      "timeout": {
                        "type": "string"
                      },
                      "type": {
                        "enum": [
                          "ping"
                        ],
                        "type": "string"
                      },
                      "unhealthyThreshold": {
                        "minimum": 1,
                        "type": "integer"
                      },
                      "when": {
                        "additionalProperties": false,
                        "properties": {
                          "state": {
                            "additionalProperties": {
                              "additionalProperties": false,
                              "properties": {
                                "contains": {
                                  "type": "string"
                                },
                                "equals": {
                                  "type": "string"
                                },
                                "exists": {
                                  "type": "boolean"
                                },
                                "for": {
                                  "type": "string"
                                },
                                "in": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "maxAge": {
                                  "type": "string"
                                },
                                "status": {
                                  "enum": [
                                    "set",
                                    "unset",
                                    "unknown"
                                  ],
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            },
                            "description": "State gates a resource on status fields from other resources.",
                            "type": "object"
                          }
                        },
                        "type": "object"
                      }
                    },
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "net.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "EgressRoutePolicy",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "candidates": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "dependsOn": {
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "equals": {
                                    "type": "string"
                                  },
                                  "field": {
                                    "description": "Field defaults to phase unless phase is set.",
                                    "type": "string"
                                  },
                                  "notEmpty": {
                                    "type": "boolean"
                                  },
                                  "optional": {
                                    "type": "boolean"
                                  },
                                  "phase": {
                                    "description": "Phase is shorthand for requiring the dependency phase field to equal this value.",
                                    "type": "string"
                                  },
                                  "resource": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "resource"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            },
                            "device": {
                              "type": "string"
                            },
                            "deviceFrom": {
                              "additionalProperties": false,
                              "properties": {
                                "field": {
                                  "description": "Field defaults to phase when omitted.",
                                  "type": "string"
                                },
                                "optional": {
                                  "type": "boolean"
                                },
                                "resource": {
                                  "description": "Resource names the source resource as Kind/name and reads its status, or a router config field for supported resources.",
                                  "type": "string"
                                }
                              },
                              "required": [
                                "resource"
                              ],
                              "type": "object"
                            },
                            "enabled": {
                              "description": "Enabled defaults to true; set enabled: false to exclude the candidate from selection and rendering.",
                              "type": "boolean"
                            },
                            "gateway": {
                              "type": "string"
                            },
                            "gatewayFrom": {
                              "additionalProperties": false,
                              "properties": {
                                "field": {
                                  "description": "Field defaults to phase when omitted.",
                                  "type": "string"
                                },
                                "optional": {
                                  "type": "boolean"
                                },
                                "resource": {
                                  "description": "Resource names the source resource as Kind/name and reads its status, or a router config field for supported resources.",
                                  "type": "string"
                                }
                              },
                              "required": [
                                "resource"
                              ],
                              "type": "object"
                            },
                            "gatewaySource": {
                              "description": "GatewaySource declares whether gateway is static, learned from DHCP status, or intentionally absent.",
                              "enum": [
                                "",
                                "static",
                                "dhcpv4",
                                "dhcpv6",
                                "none"
                              ],
                              "type": "string"
                            },
                            "healthCheck": {
                              "type": "string"
                            },
                            "interface": {
                              "type": "string"
                            },
                            "mark": {
                              "maximum": 4294967295,
                              "minimum": 0,
                              "type": "integer"
                            },
                            "metric": {
                              "minimum": 0,
                              "type": "integer"
                            },
                            "name": {
                              "type": "string"
                            },
                            "preferredSource": {
                              "description": "PreferredSource=interface selects the current global IPv6 address of the\ncandidate interface for a host-only default route.",
                              "enum": [
                                "",
                                "interface"
                              ],
                              "type": "string"
                            },
                            "priority": {
                              "maximum": 32765,
                              "minimum": 0,
                              "type": "integer"
                            },
                            "routeMetric": {
                              "minimum": 0,
                              "type": "integer"
                            },
                            "routeTable": {
                              "maximum": 4294967295,
                              "minimum": 0,
                              "type": "integer"
                            },
                            "source": {
                              "type": "string"
                            },
                            "table": {
                              "maximum": 4294967295,
                              "minimum": 0,
                              "type": "integer"
                            },
                            "targets": {
                              "items": {
                                "additionalProperties": false,
                                "properties": {
                                  "gateway": {
                                    "description": "Gateway is a static next hop for Linux policy routing and FreeBSD pf\nroute-to rendering. Dynamic gateway sources remain unsupported by the\nFreeBSD renderer.",
                                    "type": "string"
                                  },
                                  "gatewayFrom": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "field": {
                                        "description": "Field defaults to phase when omitted.",
                                        "type": "string"
                                      },
                                      "optional": {
                                        "type": "boolean"
                                      },
                                      "resource": {
                                        "description": "Resource names the source resource as Kind/name and reads its status, or a router config field for supported resources.",
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "resource"
                                    ],
                                    "type": "object"
                                  },
                                  "gatewaySource": {
                                    "enum": [
                                      "",
                                      "static",
                                      "dhcpv4",
                                      "dhcpv6",
                                      "none"
                                    ],
                                    "type": "string"
                                  },
                                  "healthCheck": {
                                    "type": "string"
                                  },
                                  "interface": {
                                    "type": "string"
                                  },
                                  "mark": {
                                    "maximum": 4294967295,
                                    "minimum": 0,
                                    "type": "integer"
                                  },
                                  "metric": {
                                    "minimum": 0,
                                    "type": "integer"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "outboundInterface": {
                                    "type": "string"
                                  },
                                  "priority": {
                                    "maximum": 32765,
                                    "minimum": 0,
                                    "type": "integer"
                                  },
                                  "routeMetric": {
                                    "minimum": 0,
                                    "type": "integer"
                                  },
                                  "routeTable": {
                                    "maximum": 4294967295,
                                    "minimum": 0,
                                    "type": "integer"
                                  },
                                  "table": {
                                    "maximum": 4294967295,
                                    "minimum": 0,
                                    "type": "integer"
                                  }
                                },
                                "type": "object"
                              },
                              "type": "array"
                            },
                            "weight": {
                              "minimum": 0,
                              "type": "integer"
                            },
                            "when": {
                              "additionalProperties": false,
                              "properties": {
                                "state": {
                                  "additionalProperties": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "contains": {
                                        "type": "string"
                                      },
                                      "equals": {
                                        "type": "string"
                                      },
                                      "exists": {
                                        "type": "boolean"
                                      },
                                      "for": {
                                        "type": "string"
                                      },
                                      "in": {
                                        "items": {
                                          "type": "string"
                                        },
                                        "type": "array"
                                      },
                                      "maxAge": {
                                        "type": "string"
                                      },
                                      "status": {
                                        "enum": [
                                          "set",
                                          "unset",
                                          "unknown"
                                        ],
                                        "type": "string"
                                      }
                                    },
                                    "type": "object"
                                  },
                                  "description": "State gates a resource on status fields from other resources.",
                                  "type": "object"
                                }
                              },
                              "type": "object"
                            }
                          },
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "destinationCIDRs": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "destinationSetRefs": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "excludeDestinationCIDRs": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "excludeDestinationSetRefs": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "family": {
                        "enum": [
                          "ipv4",
                          "ipv6"
                        ],
                        "type": "string"
                      },
                      "hashFields": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "hostTraffic": {
                        "description": "HostTraffic selects locally-originated traffic with an iif lo rule rather\nthan a conntrack/nft mark.",
                        "type": "boolean"
                      },
                      "hysteresis": {
                        "type": "string"
                      },
                      "mode": {
                        "description": "Mode selects the route policy shape: priority chooses one candidate, mark installs marked tables, and hash spreads flows across targets.",
                        "enum": [
                          "priority",
                          "mark",
                          "hash"
                        ],
                        "type": "string"
                      },
                      "selection": {
                        "enum": [
                          "highest-weight-ready",
                          "weighted-ecmp"
                        ],
                        "type": "string"
                      },
                      "sourceCIDRs": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "when": {
                        "additionalProperties": false,
                        "properties": {
                          "state": {
                            "additionalProperties": {
                              "additionalProperties": false,
                              "properties": {
                                "contains": {
                                  "type": "string"
                                },
                                "equals": {
                                  "type": "string"
                                },
                                "exists": {
                                  "type": "boolean"
                                },
                                "for": {
                                  "type": "string"
                                },
                                "in": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "maxAge": {
                                  "type": "string"
                                },
                                "status": {
                                  "enum": [
                                    "set",
                                    "unset",
                                    "unknown"
                                  ],
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            },
                            "description": "State gates a resource on status fields from other resources.",
                            "type": "object"
                          }
                        },
                        "type": "object"
                      }
                    },
                    "required": [
                      "candidates"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "net.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "EventRule",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "emit": {
                        "additionalProperties": false,
                        "properties": {
                          "attributes": {
                            "additionalProperties": {
                              "type": "string"
                            },
                            "type": "object"
                          },
                          "topic": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "topic"
                        ],
                        "type": "object"
                      },
                      "pattern": {
                        "additionalProperties": false,
                        "properties": {
                          "allow_missing_correlation": {
                            "type": "boolean"
                          },
                          "correlate_by": {
                            "type": "string"
                          },
                          "duration": {
                            "type": "string"
                          },
                          "expected": {
                            "type": "string"
                          },
                          "interval": {
                            "type": "string"
                          },
                          "operator": {
                            "enum": [
                              "all_of",
                              "any_of",
                              "sequence",
                              "window",
                              "absence",
                              "throttle",
                              "debounce",
                              "count"
                            ],
                            "type": "string"
                          },
                          "quiet": {
                            "type": "string"
                          },
                          "rate": {
                            "minimum": 0,
                            "type": "integer"
                          },
                          "strict": {
                            "type": "boolean"
                          },
                          "threshold": {
                            "minimum": 0,
                            "type": "integer"
                          },
                          "topic": {
                            "type": "string"
                          },
                          "topics": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "trigger": {
                            "type": "string"
                          },
                          "window": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "operator"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "pattern",
                      "emit"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "net.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "DerivedEvent",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "emitInitial": {
                        "type": "boolean"
                      },
                      "emitWhen": {
                        "enum": [
                          "all_true",
                          "any_true"
                        ],
                        "type": "string"
                      },
                      "hysteresis": {
                        "type": "string"
                      },
                      "inputs": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "any_of": {
                              "items": {
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "equals": {
                                      "type": "string"
                                    },
                                    "field": {
                                      "type": "string"
                                    },
                                    "not_empty": {
                                      "type": "boolean"
                                    }
                                  },
                                  "type": "object"
                                },
                                "type": "array"
                              },
                              "type": "array"
                            },
                            "equals": {
                              "type": "string"
                            },
                            "field": {
                              "type": "string"
                            },
                            "not_empty": {
                              "type": "boolean"
                            }
                          },
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "retractWhen": {
                        "enum": [
                          "any_false",
                          "all_false"
                        ],
                        "type": "string"
                      },
                      "topic": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "topic",
                      "inputs"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "net.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "NAT44Rule",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "destinationCIDRs": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "destinationSetRefs": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "egressInterface": {
                        "type": "string"
                      },
                      "egressPolicyRef": {
                        "description": "EgressPolicyRef uses the selected device from an EgressRoutePolicy when egressInterface is omitted.",
                        "type": "string"
                      },
                      "excludeDestinationCIDRs": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "excludeDestinationSetRefs": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "outboundInterface": {
                        "type": "string"
                      },
                      "snatAddress": {
                        "type": "string"
                      },
                      "snatAddressFrom": {
                        "additionalProperties": false,
                        "description": "SNATAddressFrom reads the SNAT address from another resource status or supported router resource field.",
                        "properties": {
                          "field": {
                            "description": "Field defaults to phase when omitted.",
                            "type": "string"
                          },
                          "optional": {
                            "type": "boolean"
                          },
                          "resource": {
                            "description": "Resource names the source resource as Kind/name and reads its status, or a router config field for supported resources.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "resource"
                        ],
                        "type": "object"
                      },
                      "sourceCIDRs": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "sourceRanges": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "translation": {
                        "additionalProperties": false,
                        "properties": {
                          "address": {
                            "type": "string"
                          },
                          "addresses": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "portMapping": {
                            "additionalProperties": false,
                            "properties": {
                              "end": {
                                "maximum": 65535,
                                "minimum": 1,
                                "type": "integer"
                              },
                              "start": {
                                "maximum": 65535,
                                "minimum": 1,
                                "type": "integer"
                              },
                              "type": {
                                "enum": [
                                  "auto",
                                  "preserve",
                                  "range"
                                ],
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "type": {
                            "enum": [
                              "interfaceAddress",
                              "address",
                              "pool"
                            ],
                            "type": "string"
                          }
                        },
                        "required": [
                          "type"
                        ],
                        "type": "object"
                      },
                      "type": {
                        "enum": [
                          "masquerade",
                          "snat"
                        ],
                        "type": "string"
                      },
                      "when": {
                        "additionalProperties": false,
                        "properties": {
                          "state": {
                            "additionalProperties": {
                              "additionalProperties": false,
                              "properties": {
                                "contains": {
                                  "type": "string"
                                },
                                "equals": {
                                  "type": "string"
                                },
                                "exists": {
                                  "type": "boolean"
                                },
                                "for": {
                                  "type": "string"
                                },
                                "in": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "maxAge": {
                                  "type": "string"
                                },
                                "status": {
                                  "enum": [
                                    "set",
                                    "unset",
                                    "unknown"
                                  ],
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            },
                            "description": "State gates a resource on status fields from other resources.",
                            "type": "object"
                          }
                        },
                        "type": "object"
                      }
                    },
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "net.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "NAT44FlowDNATPinhole",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "correlation": {
                        "additionalProperties": false,
                        "properties": {
                          "key": {
                            "enum": [
                              "",
                              "localPort"
                            ],
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "fromInterfaceRefs": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "inbound": {
                        "additionalProperties": false,
                        "properties": {
                          "sourcePorts": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          }
                        },
                        "required": [
                          "sourcePorts"
                        ],
                        "type": "object"
                      },
                      "outbound": {
                        "additionalProperties": false,
                        "properties": {
                          "destinationCIDRs": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "destinationPorts": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "destinationSetRefs": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "protocol": {
                            "enum": [
                              "udp"
                            ],
                            "type": "string"
                          },
                          "sourceCIDRs": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "sourceSetRef": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "protocol",
                          "destinationPorts"
                        ],
                        "type": "object"
                      },
                      "timeout": {
                        "type": "string"
                      },
                      "when": {
                        "additionalProperties": false,
                        "properties": {
                          "state": {
                            "additionalProperties": {
                              "additionalProperties": false,
                              "properties": {
                                "contains": {
                                  "type": "string"
                                },
                                "equals": {
                                  "type": "string"
                                },
                                "exists": {
                                  "type": "boolean"
                                },
                                "for": {
                                  "type": "string"
                                },
                                "in": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "maxAge": {
                                  "type": "string"
                                },
                                "status": {
                                  "enum": [
                                    "set",
                                    "unset",
                                    "unknown"
                                  ],
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            },
                            "description": "State gates a resource on status fields from other resources.",
                            "type": "object"
                          }
                        },
                        "type": "object"
                      }
                    },
                    "required": [
                      "outbound",
                      "inbound"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "net.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "NAT44SessionSync",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "conntrackCommand": {
                        "type": "string"
                      },
                      "conntrackd": {
                        "additionalProperties": false,
                        "description": "Conntrackd configures a bidirectional, dedicated replication link.  It\ndeliberately has no SSH target: both peers run it continuously.",
                        "properties": {
                          "ignoreIPv4": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "interface": {
                            "type": "string"
                          },
                          "localAddress": {
                            "type": "string"
                          },
                          "peerAddress": {
                            "type": "string"
                          },
                          "port": {
                            "maximum": 65535,
                            "minimum": 1,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "interface",
                          "localAddress",
                          "peerAddress"
                        ],
                        "type": "object"
                      },
                      "excludeNatRules": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "interval": {
                        "type": "string"
                      },
                      "mode": {
                        "description": "Mode selects either the legacy event stream or conntrackd's complete\nstate replication. conntrackd is required when established TCP flows\nmust survive a VRRP transition.",
                        "enum": [
                          "event-stream",
                          "conntrackd"
                        ],
                        "type": "string"
                      },
                      "natRules": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "snatAddresses": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "targets": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "host": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "restoreCommand": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "sshOptions": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "user": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "host"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "when": {
                        "additionalProperties": false,
                        "properties": {
                          "state": {
                            "additionalProperties": {
                              "additionalProperties": false,
                              "properties": {
                                "contains": {
                                  "type": "string"
                                },
                                "equals": {
                                  "type": "string"
                                },
                                "exists": {
                                  "type": "boolean"
                                },
                                "for": {
                                  "type": "string"
                                },
                                "in": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "maxAge": {
                                  "type": "string"
                                },
                                "status": {
                                  "enum": [
                                    "set",
                                    "unset",
                                    "unknown"
                                  ],
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            },
                            "description": "State gates a resource on status fields from other resources.",
                            "type": "object"
                          }
                        },
                        "type": "object"
                      }
                    },
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "net.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "ManagementAccess",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "allowSourceCIDRs": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "interfaces": {
                        "items": {
                          "type": "string"
                        },
                        "title": "Management interfaces",
                        "type": "array"
                      },
                      "requireWebConsoleBound": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "interfaces"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "firewall.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "PortForward",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "hairpin": {
                        "additionalProperties": false,
                        "properties": {
                          "enabled": {
                            "type": "boolean"
                          },
                          "interfaces": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "mode": {
                            "enum": [
                              "",
                              "auto",
                              "manual",
                              "off"
                            ],
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "listen": {
                        "additionalProperties": false,
                        "properties": {
                          "address": {
                            "type": "string"
                          },
                          "addressFrom": {
                            "additionalProperties": false,
                            "properties": {
                              "field": {
                                "description": "Field defaults to phase when omitted.",
                                "type": "string"
                              },
                              "optional": {
                                "type": "boolean"
                              },
                              "resource": {
                                "description": "Resource names the source resource as Kind/name and reads its status, or a router config field for supported resources.",
                                "type": "string"
                              }
                            },
                            "required": [
                              "resource"
                            ],
                            "type": "object"
                          },
                          "interface": {
                            "type": "string"
                          },
                          "port": {
                            "maximum": 65535,
                            "minimum": 1,
                            "type": "integer"
                          },
                          "protocol": {
                            "enum": [
                              "tcp",
                              "udp"
                            ],
                            "type": "string"
                          }
                        },
                        "required": [
                          "interface",
                          "protocol",
                          "port"
                        ],
                        "type": "object"
                      },
                      "target": {
                        "additionalProperties": false,
                        "properties": {
                          "address": {
                            "type": "string"
                          },
                          "addressFrom": {
                            "additionalProperties": false,
                            "properties": {
                              "field": {
                                "description": "Field defaults to phase when omitted.",
                                "type": "string"
                              },
                              "optional": {
                                "type": "boolean"
                              },
                              "resource": {
                                "description": "Resource names the source resource as Kind/name and reads its status, or a router config field for supported resources.",
                                "type": "string"
                              }
                            },
                            "required": [
                              "resource"
                            ],
                            "type": "object"
                          },
                          "port": {
                            "maximum": 65535,
                            "minimum": 1,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "port"
                        ],
                        "type": "object"
                      },
                      "when": {
                        "additionalProperties": false,
                        "properties": {
                          "state": {
                            "additionalProperties": {
                              "additionalProperties": false,
                              "properties": {
                                "contains": {
                                  "type": "string"
                                },
                                "equals": {
                                  "type": "string"
                                },
                                "exists": {
                                  "type": "boolean"
                                },
                                "for": {
                                  "type": "string"
                                },
                                "in": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "maxAge": {
                                  "type": "string"
                                },
                                "status": {
                                  "enum": [
                                    "set",
                                    "unset",
                                    "unknown"
                                  ],
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            },
                            "description": "State gates a resource on status fields from other resources.",
                            "type": "object"
                          }
                        },
                        "type": "object"
                      }
                    },
                    "required": [
                      "listen",
                      "target"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "firewall.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "IngressService",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "backends": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "address": {
                              "type": "string"
                            },
                            "addressFrom": {
                              "additionalProperties": false,
                              "properties": {
                                "field": {
                                  "description": "Field defaults to phase when omitted.",
                                  "type": "string"
                                },
                                "optional": {
                                  "type": "boolean"
                                },
                                "resource": {
                                  "description": "Resource names the source resource as Kind/name and reads its status, or a router config field for supported resources.",
                                  "type": "string"
                                }
                              },
                              "required": [
                                "resource"
                              ],
                              "type": "object"
                            },
                            "name": {
                              "type": "string"
                            },
                            "port": {
                              "maximum": 65535,
                              "minimum": 1,
                              "type": "integer"
                            },
                            "weight": {
                              "minimum": 0,
                              "type": "integer"
                            }
                          },
                          "required": [
                            "port"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "externalDNS": {
                        "type": "boolean"
                      },
                      "hairpin": {
                        "additionalProperties": false,
                        "properties": {
                          "enabled": {
                            "type": "boolean"
                          },
                          "interfaces": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "mode": {
                            "enum": [
                              "",
                              "auto",
                              "manual",
                              "off"
                            ],
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "healthCheck": {
                        "additionalProperties": false,
                        "properties": {
                          "expectedBody": {
                            "type": "string"
                          },
                          "expectedStatus": {
                            "items": {
                              "type": "integer"
                            },
                            "type": "array"
                          },
                          "healthyThreshold": {
                            "minimum": 1,
                            "type": "integer"
                          },
                          "host": {
                            "type": "string"
                          },
                          "interval": {
                            "type": "string"
                          },
                          "path": {
                            "type": "string"
                          },
                          "protocol": {
                            "enum": [
                              "",
                              "tcp",
                              "http",
                              "https"
                            ],
                            "type": "string"
                          },
                          "timeout": {
                            "type": "string"
                          },
                          "tlsSkipVerify": {
                            "type": "boolean"
                          },
                          "unhealthyThreshold": {
                            "minimum": 1,
                            "type": "integer"
                          }
                        },
                        "type": "object"
                      },
                      "hostname": {
                        "type": "string"
                      },
                      "listen": {
                        "additionalProperties": false,
                        "properties": {
                          "address": {
                            "type": "string"
                          },
                          "addressFrom": {
                            "additionalProperties": false,
                            "properties": {
                              "field": {
                                "description": "Field defaults to phase when omitted.",
                                "type": "string"
                              },
                              "optional": {
                                "type": "boolean"
                              },
                              "resource": {
                                "description": "Resource names the source resource as Kind/name and reads its status, or a router config field for supported resources.",
                                "type": "string"
                              }
                            },
                            "required": [
                              "resource"
                            ],
                            "type": "object"
                          },
                          "interface": {
                            "type": "string"
                          },
                          "port": {
                            "maximum": 65535,
                            "minimum": 1,
                            "type": "integer"
                          },
                          "protocol": {
                            "enum": [
                              "tcp",
                              "udp"
                            ],
                            "type": "string"
                          }
                        },
                        "required": [
                          "interface",
                          "protocol",
                          "port"
                        ],
                        "type": "object"
                      },
                      "policy": {
                        "additionalProperties": false,
                        "properties": {
                          "onNoHealthyBackends": {
                            "enum": [
                              "",
                              "drop",
                              "reject"
                            ],
                            "type": "string"
                          },
                          "selection": {
                            "enum": [
                              "",
                              "failover",
                              "sourceHash",
                              "random"
                            ],
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "when": {
                        "additionalProperties": false,
                        "properties": {
                          "state": {
                            "additionalProperties": {
                              "additionalProperties": false,
                              "properties": {
                                "contains": {
                                  "type": "string"
                                },
                                "equals": {
                                  "type": "string"
                                },
                                "exists": {
                                  "type": "boolean"
                                },
                                "for": {
                                  "type": "string"
                                },
                                "in": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "maxAge": {
                                  "type": "string"
                                },
                                "status": {
                                  "enum": [
                                    "set",
                                    "unset",
                                    "unknown"
                                  ],
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            },
                            "description": "State gates a resource on status fields from other resources.",
                            "type": "object"
                          }
                        },
                        "type": "object"
                      }
                    },
                    "required": [
                      "listen",
                      "backends"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "net.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "IPAddressSet",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "addresses": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "names": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "refreshInterval": {
                        "type": "string"
                      },
                      "when": {
                        "additionalProperties": false,
                        "properties": {
                          "state": {
                            "additionalProperties": {
                              "additionalProperties": false,
                              "properties": {
                                "contains": {
                                  "type": "string"
                                },
                                "equals": {
                                  "type": "string"
                                },
                                "exists": {
                                  "type": "boolean"
                                },
                                "for": {
                                  "type": "string"
                                },
                                "in": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "maxAge": {
                                  "type": "string"
                                },
                                "status": {
                                  "enum": [
                                    "set",
                                    "unset",
                                    "unknown"
                                  ],
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            },
                            "description": "State gates a resource on status fields from other resources.",
                            "type": "object"
                          }
                        },
                        "type": "object"
                      }
                    },
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "firewall.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "LocalServiceRedirect",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "interface": {
                        "type": "string"
                      },
                      "rules": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "destinationPort": {
                              "maximum": 65535,
                              "minimum": 1,
                              "type": "integer"
                            },
                            "destinationSetRef": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "protocols": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "redirectPort": {
                              "maximum": 65535,
                              "minimum": 1,
                              "type": "integer"
                            }
                          },
                          "required": [
                            "protocols",
                            "destinationSetRef",
                            "destinationPort",
                            "redirectPort"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "when": {
                        "additionalProperties": false,
                        "properties": {
                          "state": {
                            "additionalProperties": {
                              "additionalProperties": false,
                              "properties": {
                                "contains": {
                                  "type": "string"
                                },
                                "equals": {
                                  "type": "string"
                                },
                                "exists": {
                                  "type": "boolean"
                                },
                                "for": {
                                  "type": "string"
                                },
                                "in": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "maxAge": {
                                  "type": "string"
                                },
                                "status": {
                                  "enum": [
                                    "set",
                                    "unset",
                                    "unknown"
                                  ],
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            },
                            "description": "State gates a resource on status fields from other resources.",
                            "type": "object"
                          }
                        },
                        "type": "object"
                      }
                    },
                    "required": [
                      "interface",
                      "rules"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "firewall.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "FirewallFlowPinhole",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "correlation": {
                        "additionalProperties": false,
                        "properties": {
                          "key": {
                            "enum": [
                              "",
                              "remoteAddress",
                              "localEndpoint"
                            ],
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "fromZone": {
                        "type": "string"
                      },
                      "inbound": {
                        "additionalProperties": false,
                        "properties": {
                          "sourcePorts": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          }
                        },
                        "required": [
                          "sourcePorts"
                        ],
                        "type": "object"
                      },
                      "outbound": {
                        "additionalProperties": false,
                        "properties": {
                          "destinationCIDRs": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "destinationPorts": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "destinationSetRefs": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "protocol": {
                            "enum": [
                              "udp"
                            ],
                            "type": "string"
                          },
                          "sourceCIDRs": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "sourceSetRef": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "protocol",
                          "destinationPorts"
                        ],
                        "type": "object"
                      },
                      "timeout": {
                        "type": "string"
                      },
                      "toZone": {
                        "type": "string"
                      },
                      "when": {
                        "additionalProperties": false,
                        "properties": {
                          "state": {
                            "additionalProperties": {
                              "additionalProperties": false,
                              "properties": {
                                "contains": {
                                  "type": "string"
                                },
                                "equals": {
                                  "type": "string"
                                },
                                "exists": {
                                  "type": "boolean"
                                },
                                "for": {
                                  "type": "string"
                                },
                                "in": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "maxAge": {
                                  "type": "string"
                                },
                                "status": {
                                  "enum": [
                                    "set",
                                    "unset",
                                    "unknown"
                                  ],
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            },
                            "description": "State gates a resource on status fields from other resources.",
                            "type": "object"
                          }
                        },
                        "type": "object"
                      }
                    },
                    "required": [
                      "fromZone",
                      "toZone",
                      "outbound",
                      "inbound"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "net.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "TrafficFlowLog",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "enabled": {
                        "type": "boolean"
                      },
                      "includeApplicationLayer": {
                        "type": "boolean"
                      },
                      "includeTLSSNI": {
                        "type": "boolean"
                      },
                      "path": {
                        "type": "string"
                      },
                      "source": {
                        "enum": [
                          "",
                          "conntrack"
                        ],
                        "type": "string"
                      }
                    },
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "firewall.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "FirewallZone",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "interfaces": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "role": {
                        "enum": [
                          "untrust",
                          "trust",
                          "mgmt"
                        ],
                        "type": "string"
                      }
                    },
                    "required": [
                      "role",
                      "interfaces"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "firewall.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "FirewallPolicy",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "logDeny": {
                        "type": "boolean"
                      },
                      "sameRoleAccept": {
                        "type": "boolean"
                      }
                    },
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "firewall.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "ClientPolicy",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "classification": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "ipv4Reservation": {
                              "type": "string"
                            },
                            "ipv6Addresses": {
                              "description": "IPv6Addresses are explicit IPv6 identities for FreeBSD pf ClientPolicy\nrendering. They are never inferred from IPv4 reservations or MAC selectors.",
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "match": {
                              "additionalProperties": false,
                              "properties": {
                                "dhcpFingerprints": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "hostnamePatterns": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "macs": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "ouiPrefixes": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                }
                              },
                              "type": "object"
                            },
                            "mode": {
                              "enum": [
                                "trusted",
                                "guest",
                                "isolated"
                              ],
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "mode",
                            "match"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "guestEgressAllow": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "guestEgressDeny": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "guestServices": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "interfaces": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "isolation": {
                        "additionalProperties": false,
                        "properties": {
                          "lanInternet": {
                            "enum": [
                              "",
                              "allow",
                              "deny"
                            ],
                            "type": "string"
                          },
                          "lanLAN": {
                            "enum": [
                              "",
                              "allow",
                              "deny"
                            ],
                            "type": "string"
                          },
                          "lanMgmt": {
                            "enum": [
                              "",
                              "allow",
                              "deny"
                            ],
                            "type": "string"
                          },
                          "mDNSBroadcast": {
                            "enum": [
                              "",
                              "allow",
                              "deny"
                            ],
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "macs": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "mode": {
                        "enum": [
                          "include",
                          "exclude"
                        ],
                        "type": "string"
                      }
                    },
                    "required": [
                      "mode"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "firewall.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "FirewallRule",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "action": {
                        "enum": [
                          "accept",
                          "drop",
                          "reject"
                        ],
                        "type": "string"
                      },
                      "connLimit": {
                        "additionalProperties": false,
                        "properties": {
                          "log": {
                            "type": "boolean"
                          },
                          "maxPerSource": {
                            "minimum": 0,
                            "type": "integer"
                          }
                        },
                        "type": "object"
                      },
                      "destinationCIDRs": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "destinationPorts": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "destinationSetRefs": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "excludeDestinationSetRefs": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "fromZone": {
                        "type": "string"
                      },
                      "icmpType": {
                        "type": "string"
                      },
                      "icmpv6Type": {
                        "type": "string"
                      },
                      "log": {
                        "type": "boolean"
                      },
                      "port": {
                        "maximum": 65535,
                        "minimum": 0,
                        "type": "integer"
                      },
                      "protocol": {
                        "enum": [
                          "",
                          "tcp",
                          "udp",
                          "icmp",
                          "icmpv6",
                          "ipv6-icmp",
                          "ipip"
                        ],
                        "type": "string"
                      },
                      "rateLimit": {
                        "additionalProperties": false,
                        "properties": {
                          "burst": {
                            "minimum": 0,
                            "type": "integer"
                          },
                          "log": {
                            "type": "boolean"
                          },
                          "packetsPerSecond": {
                            "minimum": 0,
                            "type": "integer"
                          },
                          "per": {
                            "enum": [
                              "",
                              "second",
                              "minute"
                            ],
                            "type": "string"
                          },
                          "rate": {
                            "minimum": 0,
                            "type": "integer"
                          },
                          "unit": {
                            "enum": [
                              "",
                              "packet",
                              "byte",
                              "kilobyte",
                              "megabyte"
                            ],
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "sourcePorts": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "srcCIDRs": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "toZone": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "fromZone",
                      "toZone",
                      "action"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "firewall.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "FirewallEventLog",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "enabled": {
                        "type": "boolean"
                      },
                      "log": {
                        "additionalProperties": false,
                        "properties": {
                          "acceptSampleRate": {
                            "minimum": 0,
                            "type": "integer"
                          },
                          "copyRange": {
                            "minimum": 0,
                            "type": "integer"
                          },
                          "dropSampleRate": {
                            "minimum": 0,
                            "type": "integer"
                          }
                        },
                        "type": "object"
                      },
                      "nflogGroup": {
                        "maximum": 65535,
                        "minimum": 0,
                        "type": "integer"
                      },
                      "path": {
                        "type": "string"
                      }
                    },
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              },
              {
                "additionalProperties": false,
                "properties": {
                  "apiVersion": {
                    "const": "net.routerd.net/v1alpha1",
                    "type": "string"
                  },
                  "kind": {
                    "const": "Hostname",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": false,
                    "properties": {
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "spec": {
                    "additionalProperties": false,
                    "properties": {
                      "hostname": {
                        "type": "string"
                      },
                      "managed": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "hostname"
                    ],
                    "type": "object"
                  },
                  "status": {
                    "additionalProperties": true,
                    "type": "object"
                  }
                },
                "required": [
                  "apiVersion",
                  "kind",
                  "metadata",
                  "spec"
                ],
                "type": "object"
              }
            ]
          },
          "type": "array"
        },
        "sshHostKeys": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "privateKey": {
                "type": "string"
              }
            },
            "required": [
              "privateKey"
            ],
            "type": "object"
          },
          "type": "array"
        }
      },
      "required": [
        "resources"
      ],
      "type": "object"
    }
  },
  "required": [
    "apiVersion",
    "kind",
    "metadata",
    "spec"
  ],
  "title": "routerd config v1alpha1",
  "type": "object"
}
