blob: b5d23edc3c545b857d340df241086d6423ba5442 [file]
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
additionalProperties: false
properties:
tls:
$ref: ./UpstreamTLS.yaml
update_time:
type: integer
readOnly: true
retry_timeout:
minimum: 0
type: number
scheme:
description: The scheme of the upstream. For L7 proxy, it can be one of grpc/grpcs/http/https/ws/wss. For L4 proxy, it can be one of tcp/tls/udp. For specific protocols, it can be kafka.
enum:
- grpc
- grpcs
- http
- https
- tcp
- tls
- udp
- kafka
- ws
- wss
default: http
retries:
minimum: 0
type: integer
hash_on:
default: vars
enum:
- vars
- header
- cookie
- consumer
- vars_combinations
type: string
service_name:
minLength: 1
maxLength: 256
type: string
nodes:
$ref: ./UpstreamNodes.yaml
discovery_type:
type: string
description: discovery type
upstream_host:
pattern: ^\*$|^\*?[0-9a-zA-Z-._\[\]:]+$
type: string
timeout:
$ref: ./Timeout.yaml
create_time:
type: integer
readOnly: true
labels:
$ref: ./Labels.yaml
keepalive_pool:
$ref: ./KeepalivePool.yaml
checks:
$ref: ./HealthCheck.yaml
key:
type: string
description: the key of chash for dynamic load balancing
discovery_args:
properties:
namespace_id:
type: string
description: namespace id
group_name:
type: string
description: group name
cluster_ids:
description: ids of the kubernetes discovery clusters to get nodes from
uniqueItems: true
items:
type: string
minItems: 1
type: array
type: object
name:
minLength: 1
maxLength: 256
type: string
pass_host:
default: pass
description: mod of host passing
enum:
- pass
- node
- rewrite
type: string
id:
$ref: ./ResourceId.yaml
desc:
maxLength: 256
type: string
type:
description: algorithms of load balancing
default: roundrobin
type: string
modifiedIndex:
type: integer
warm_up_conf:
$ref: ./UpstreamWarmUp.yaml
oneOf:
- required:
- nodes
- required:
- service_name
- discovery_type
type: object
x-source: apisix/schema_def.lua