const std::string Json::Schema::CLUSTER_SCHEMA()

in source/common/json/config_schemas.cc [1411:1624]


const std::string Json::Schema::CLUSTER_SCHEMA(R"EOF(
  {
    "$schema": "http://json-schema.org/schema#",
    "definitions" : {
      "circuit_breakers" : {
        "type" : "object",
        "properties" : {
          "max_connections" : {"type" : "integer"},
          "max_pending_requests" : {"type" : "integer"},
          "max_requests" : {"type" : "integer"},
          "max_retries" : {"type" : "integer"}
        },
        "additionalProperties" : false
      },
      "ssl_context" : {
        "type" : "object",
        "properties" : {
          "alpn_protocols" : {"type" : "string"},
          "cert_chain_file" : {"type" : "string"},
          "private_key_file" : {"type" : "string"},
          "ca_cert_file" : {"type" : "string"},
          "verify_certificate_hash" : {"type" : "string"},
          "verify_subject_alt_name" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "cipher_suites" : {"type" : "string", "minLength" : 1},
          "ecdh_curves" : {"type" : "string", "minLength" : 1},
          "sni" : {"type" :"string"}
        },
        "additionalProperties" : false
      }
    },
    "type" : "object",
    "properties" : {
      "name" : {
        "type" : "string",
        "minLength" : 1
      },
      "type" : {
        "type" : "string",
        "enum" : ["static", "strict_dns", "logical_dns", "sds", "original_dst"]
      },
      "connect_timeout_ms" : {
        "type" : "integer",
        "minimum" : 0,
        "exclusiveMinimum" : true
      },
      "per_connection_buffer_limit_bytes" : {
        "type" : "integer",
        "minimum" : 0,
        "exclusiveMinimum" : true
      },
      "lb_type" : {
        "type" : "string",
        "enum" : ["round_robin", "least_request", "random", "ring_hash", "original_dst_lb"]
      },
      "ring_hash_lb_config" : {
        "type" : "object",
        "properties" : {
          "minimum_ring_size" : {
            "type" : "integer",
            "minimum" : 0
          },
          "use_std_hash" : {
            "type" : "boolean"
          }
        }
      },
      "hosts" : {
        "type" : "array",
        "minItems" : 1,
        "uniqueItems" : true,
        "items" : {
          "type" : "object",
          "properties" : {
            "url" : {"type" : "string"}
          },
          "required" : ["url"],
          "additionalProperties" : false
        }
      },
      "service_name" : {"type" : "string"},
      "health_check" : {"type" : "object"},
      "max_requests_per_connection" : {
        "type" : "integer",
        "minimum" : 0,
        "exclusiveMinimum" : true
      },
      "circuit_breakers" : {
        "type" : "object",
        "properties" : {
          "default" : {"$ref" : "#/definitions/circuit_breakers"},
          "high" : {"$ref" : "#/definitions/circuit_breakers"}
        },
        "additionalProperties" : false
      },
      "ssl_context" : {"$ref" : "#/definitions/ssl_context"},
      "features" : {
        "type" : "string",
        "enum" : ["http2"]
      },
      "http2_settings" : {
        "type" : "object",
        "properties" : {
          "hpack_table_size" : {
            "type": "integer",
            "minimum": 0,
            "maximum" : 4294967295
          },
          "max_concurrent_streams" : {
            "type": "integer",
            "minimum": 1,
            "maximum" : 2147483647
          },
          "initial_stream_window_size" : {
            "type": "integer",
            "minimum": 65535,
            "maximum" : 2147483647
          },
          "initial_connection_window_size" : {
            "type": "integer",
            "minimum": 65535,
            "maximum" : 2147483647
          }
        }
      },
      "dns_refresh_rate_ms" : {
        "type" : "integer",
        "minimum" : 0,
        "exclusiveMinimum" : true
      },
      "dns_resolvers": {
        "type" : "array",
        "items" : {"type" : "string"},
        "minItems" : 1,
        "uniqueItems" : true
      },
      "dns_lookup_family" : {
        "type" : "string",
        "enum" : ["v4_only", "v6_only", "auto"]
      },
      "cleanup_interval_ms" : {
        "type" : "integer",
        "minimum" : 0,
        "exclusiveMinimum" : true
      },
      "outlier_detection" : {
        "type" : "object",
        "properties" : {
          "consecutive_5xx" : {
            "type" : "integer",
            "minimum" : 0,
            "exclusiveMinimum" : true
          },
          "consecutive_gateway_failure" : {
            "type" : "integer",
            "minimum" : 0,
            "exclusiveMinimum" : true
          },
          "success_rate_minimum_hosts" : {
            "type" : "integer",
            "minimum" : 0,
            "exclusiveMinimum" : true
          },
          "success_rate_request_volume" : {
            "type" : "integer",
            "minimum" : 0,
            "exclusiveMinimum" : true
          },
          "success_rate_stdev_factor" : {
            "type" : "integer",
            "minimum" : 0,
            "exclusiveMinimum" : true
          },
          "interval_ms" : {
            "type" : "integer",
            "minimum" : 0,
            "exclusiveMinimum" : true
          },
          "base_ejection_time_ms" : {
            "type" : "integer",
            "minimum" : 0,
            "exclusiveMinimum" : true
          },
          "max_ejection_percent" : {
            "type" : "integer",
            "minimum" : 0,
            "maximum" : 100
          },
          "enforcing_consecutive_5xx" : {
            "type" : "integer",
            "minimum" : 0,
            "maximum" : 100
          },
          "enforcing_consecutive_gateway_failure" : {
            "type" : "integer",
            "minimum" : 0,
            "maximum" : 100
          },
          "enforcing_success_rate" : {
            "type" : "integer",
            "minimum" : 0,
            "maximum" : 100
          }
        },
        "additionalProperties" : false
     }
    },
    "required" : ["name", "type", "connect_timeout_ms", "lb_type"],
    "additionalProperties" : false
  }