Kong · Schema

Forward to Virtual Cluster

Forwards requests to virtual clusters configured with port routing or SNI routing. While there can be multiple of these policies configured on a listener, there can only be one instance of `port_mapping`. When multiple policies are configured, the first one that matches the connection is used. If no policy matches, the connection is rejected. When using `port_mapping`, there must be a mapping port for each broker on the backend cluster see `ForwardToClusterBySNIConfig` for more details.

API GatewayAI GatewayAI ConnectivityAgent GatewayEvent GatewayMCP RegistryService MeshLLMKafkaKonnectOpen Source

Properties

Name Type Description
type string The type name of the policy.
name string A unique user-defined name of the policy.
description string A human-readable description of the policy.
enabled boolean Whether the policy is enabled.
labels object
config object The configuration of the policy.
View JSON Schema on GitHub

JSON Schema

kong-forwardtovirtualclusterpolicy-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/ForwardToVirtualClusterPolicy",
  "title": "Forward to Virtual Cluster",
  "description": "Forwards requests to virtual clusters configured with port routing or SNI routing.\nWhile there can be multiple of these policies configured on a listener, there can only be one instance of\n`port_mapping`.\nWhen multiple policies are configured, the first one that matches the connection is used.\nIf no policy matches, the connection is rejected.\n\nWhen using `port_mapping`, there must be a mapping port for each broker on the backend cluster see\n`ForwardToClusterBySNIConfig` for more details.\n",
  "type": "object",
  "properties": {
    "type": {
      "description": "The type name of the policy.",
      "type": "string",
      "const": "forward_to_virtual_cluster",
      "maxLength": 255,
      "minLength": 1
    },
    "name": {
      "description": "A unique user-defined name of the policy.",
      "type": "string",
      "maxLength": 255,
      "x-unicode-pattern": "^[\\p{L}\\p{N}][\\p{L}\\p{N} _\\-\\.:/+']*[\\p{L}\\p{N}]$"
    },
    "description": {
      "description": "A human-readable description of the policy.",
      "type": "string",
      "default": "",
      "maxLength": 512
    },
    "enabled": {
      "description": "Whether the policy is enabled.",
      "type": "boolean",
      "default": true
    },
    "labels": {
      "$ref": "#/components/schemas/Labels"
    },
    "config": {
      "description": "The configuration of the policy.",
      "type": "object",
      "discriminator": {
        "propertyName": "type",
        "mapping": {
          "port_mapping": "#/components/schemas/ForwardToClusterByPortMappingConfig",
          "sni": "#/components/schemas/ForwardToClusterBySNIConfig"
        }
      },
      "oneOf": [
        {
          "$ref": "#/components/schemas/ForwardToClusterBySNIConfig"
        },
        {
          "$ref": "#/components/schemas/ForwardToClusterByPortMappingConfig"
        }
      ]
    }
  },
  "required": [
    "type",
    "config"
  ]
}