| # | |
| # 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. | |
| # | |
| type: object | |
| properties: | |
| labels: | |
| anyOf: | |
| - type: object | |
| - type: "null" | |
| upstream: | |
| anyOf: | |
| - type: object | |
| properties: | |
| tls: | |
| anyOf: | |
| - type: object | |
| properties: | |
| client_key: | |
| anyOf: | |
| - $ref: ./PrivateKeyPem.yaml | |
| - type: "null" | |
| client_cert: | |
| anyOf: | |
| - $ref: ./CertificatePem.yaml | |
| - type: "null" | |
| client_cert_id: | |
| anyOf: | |
| - anyOf: | |
| - minLength: 1 | |
| pattern: ^[a-zA-Z0-9-_.]+$ | |
| maxLength: 64 | |
| type: string | |
| - type: "null" | |
| - anyOf: | |
| - minimum: 1 | |
| type: integer | |
| - type: "null" | |
| - type: "null" | |
| verify: | |
| anyOf: | |
| - type: boolean | |
| description: Enable or disable upstream certificate verification. When omitted, fall back to the NGINX verification setting. | |
| - type: "null" | |
| ca_certs: | |
| anyOf: | |
| - type: array | |
| minItems: 1 | |
| items: | |
| $ref: ./CertificatePem.yaml | |
| description: PEM-encoded CA certificates for upstream verification. | |
| - type: "null" | |
| - type: "null" | |
| update_time: | |
| anyOf: | |
| - type: integer | |
| - type: "null" | |
| retry_timeout: | |
| anyOf: | |
| - minimum: 0 | |
| type: number | |
| - type: "null" | |
| scheme: | |
| anyOf: | |
| - 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 | |
| - type: "null" | |
| retries: | |
| anyOf: | |
| - minimum: 0 | |
| type: integer | |
| - type: "null" | |
| hash_on: | |
| anyOf: | |
| - enum: | |
| - vars | |
| - header | |
| - cookie | |
| - consumer | |
| - vars_combinations | |
| type: string | |
| - type: "null" | |
| service_name: | |
| anyOf: | |
| - minLength: 1 | |
| maxLength: 256 | |
| type: string | |
| - type: "null" | |
| nodes: | |
| anyOf: | |
| - anyOf: | |
| - type: object | |
| - type: "null" | |
| - anyOf: | |
| - items: | |
| $ref: ./UpstreamNodeItem.yaml | |
| type: array | |
| - type: "null" | |
| - type: "null" | |
| discovery_type: | |
| anyOf: | |
| - type: string | |
| description: discovery type | |
| - type: "null" | |
| upstream_host: | |
| anyOf: | |
| - pattern: ^\*$|^\*?[0-9a-zA-Z-._\[\]:]+$ | |
| type: string | |
| - type: "null" | |
| timeout: | |
| anyOf: | |
| - type: object | |
| properties: | |
| connect: | |
| anyOf: | |
| - exclusiveMinimum: 0 | |
| type: number | |
| - type: "null" | |
| send: | |
| anyOf: | |
| - exclusiveMinimum: 0 | |
| type: number | |
| - type: "null" | |
| read: | |
| anyOf: | |
| - exclusiveMinimum: 0 | |
| type: number | |
| - type: "null" | |
| - type: "null" | |
| create_time: | |
| anyOf: | |
| - type: integer | |
| - type: "null" | |
| labels: | |
| anyOf: | |
| - type: object | |
| - type: "null" | |
| keepalive_pool: | |
| anyOf: | |
| - type: object | |
| properties: | |
| size: | |
| anyOf: | |
| - minimum: 1 | |
| type: integer | |
| - type: "null" | |
| requests: | |
| anyOf: | |
| - minimum: 1 | |
| type: integer | |
| - type: "null" | |
| idle_timeout: | |
| anyOf: | |
| - minimum: 0 | |
| type: number | |
| - type: "null" | |
| - type: "null" | |
| checks: | |
| anyOf: | |
| - type: object | |
| properties: | |
| passive: | |
| anyOf: | |
| - type: object | |
| properties: | |
| unhealthy: | |
| anyOf: | |
| - type: object | |
| properties: | |
| http_failures: | |
| anyOf: | |
| - maximum: 254 | |
| minimum: 0 | |
| type: integer | |
| - type: "null" | |
| http_statuses: | |
| anyOf: | |
| - items: | |
| maximum: 599 | |
| minimum: 200 | |
| type: integer | |
| minItems: 1 | |
| uniqueItems: true | |
| type: array | |
| - type: "null" | |
| tcp_failures: | |
| anyOf: | |
| - maximum: 254 | |
| minimum: 0 | |
| type: integer | |
| - type: "null" | |
| timeouts: | |
| anyOf: | |
| - maximum: 254 | |
| minimum: 0 | |
| type: integer | |
| - type: "null" | |
| - type: "null" | |
| healthy: | |
| anyOf: | |
| - type: object | |
| properties: | |
| successes: | |
| anyOf: | |
| - maximum: 254 | |
| minimum: 0 | |
| type: integer | |
| - type: "null" | |
| http_statuses: | |
| anyOf: | |
| - items: | |
| maximum: 599 | |
| minimum: 200 | |
| type: integer | |
| minItems: 1 | |
| uniqueItems: true | |
| type: array | |
| - type: "null" | |
| - type: "null" | |
| type: | |
| anyOf: | |
| - enum: | |
| - http | |
| - https | |
| - tcp | |
| type: string | |
| - type: "null" | |
| - type: "null" | |
| active: | |
| anyOf: | |
| - type: object | |
| properties: | |
| http_method: | |
| anyOf: | |
| - enum: | |
| - GET | |
| - POST | |
| - PUT | |
| - DELETE | |
| - PATCH | |
| - HEAD | |
| - OPTIONS | |
| - CONNECT | |
| - TRACE | |
| - PURGE | |
| type: string | |
| - type: "null" | |
| port: | |
| anyOf: | |
| - maximum: 65535 | |
| minimum: 1 | |
| type: integer | |
| - type: "null" | |
| host: | |
| anyOf: | |
| - pattern: ^\*$|^\*?[0-9a-zA-Z-._\[\]:]+$ | |
| type: string | |
| - type: "null" | |
| timeout: | |
| anyOf: | |
| - type: number | |
| - type: "null" | |
| unhealthy: | |
| anyOf: | |
| - type: object | |
| properties: | |
| interval: | |
| anyOf: | |
| - minimum: 1 | |
| type: integer | |
| - type: "null" | |
| http_statuses: | |
| anyOf: | |
| - items: | |
| maximum: 599 | |
| minimum: 200 | |
| type: integer | |
| minItems: 1 | |
| uniqueItems: true | |
| type: array | |
| - type: "null" | |
| timeouts: | |
| anyOf: | |
| - maximum: 254 | |
| minimum: 1 | |
| type: integer | |
| - type: "null" | |
| tcp_failures: | |
| anyOf: | |
| - maximum: 254 | |
| minimum: 1 | |
| type: integer | |
| - type: "null" | |
| http_failures: | |
| anyOf: | |
| - maximum: 254 | |
| minimum: 1 | |
| type: integer | |
| - type: "null" | |
| - type: "null" | |
| healthy: | |
| anyOf: | |
| - type: object | |
| properties: | |
| interval: | |
| anyOf: | |
| - minimum: 1 | |
| type: integer | |
| - type: "null" | |
| http_statuses: | |
| anyOf: | |
| - items: | |
| maximum: 599 | |
| minimum: 200 | |
| type: integer | |
| minItems: 1 | |
| uniqueItems: true | |
| type: array | |
| - type: "null" | |
| successes: | |
| anyOf: | |
| - maximum: 254 | |
| minimum: 1 | |
| type: integer | |
| - type: "null" | |
| - type: "null" | |
| https_verify_certificate: | |
| anyOf: | |
| - type: boolean | |
| - type: "null" | |
| req_headers: | |
| anyOf: | |
| - items: | |
| uniqueItems: true | |
| type: string | |
| minItems: 1 | |
| type: array | |
| - type: "null" | |
| http_path: | |
| anyOf: | |
| - type: string | |
| - type: "null" | |
| http_req_body: | |
| anyOf: | |
| - type: string | |
| - type: "null" | |
| concurrency: | |
| anyOf: | |
| - type: integer | |
| - type: "null" | |
| type: | |
| anyOf: | |
| - enum: | |
| - http | |
| - https | |
| - tcp | |
| type: string | |
| - type: "null" | |
| - type: "null" | |
| - type: "null" | |
| key: | |
| anyOf: | |
| - type: string | |
| description: the key of chash for dynamic load balancing | |
| - type: "null" | |
| discovery_args: | |
| anyOf: | |
| - type: object | |
| properties: | |
| group_name: | |
| anyOf: | |
| - type: string | |
| description: group name | |
| - type: "null" | |
| namespace_id: | |
| anyOf: | |
| - type: string | |
| description: namespace id | |
| - type: "null" | |
| cluster_ids: | |
| anyOf: | |
| - type: array | |
| minItems: 1 | |
| uniqueItems: true | |
| items: | |
| type: string | |
| description: Kubernetes service-discovery cluster IDs. | |
| - type: "null" | |
| - type: "null" | |
| name: | |
| anyOf: | |
| - minLength: 1 | |
| maxLength: 256 | |
| type: string | |
| - type: "null" | |
| pass_host: | |
| anyOf: | |
| - description: mod of host passing | |
| enum: | |
| - pass | |
| - node | |
| - rewrite | |
| type: string | |
| - type: "null" | |
| id: | |
| anyOf: | |
| - anyOf: | |
| - minLength: 1 | |
| pattern: ^[a-zA-Z0-9-_.]+$ | |
| maxLength: 64 | |
| type: string | |
| - type: "null" | |
| - anyOf: | |
| - minimum: 1 | |
| type: integer | |
| - type: "null" | |
| - type: "null" | |
| desc: | |
| anyOf: | |
| - maxLength: 256 | |
| type: string | |
| - type: "null" | |
| type: | |
| anyOf: | |
| - description: algorithms of load balancing | |
| type: string | |
| - type: "null" | |
| warm_up_conf: | |
| anyOf: | |
| - $ref: ./UpstreamWarmUpPatch.yaml | |
| - type: "null" | |
| additionalProperties: false | |
| - type: "null" | |
| upstream_id: | |
| anyOf: | |
| - anyOf: | |
| - minLength: 1 | |
| pattern: ^[a-zA-Z0-9-_.]+$ | |
| maxLength: 64 | |
| type: string | |
| - type: "null" | |
| - anyOf: | |
| - minimum: 1 | |
| type: integer | |
| - type: "null" | |
| - type: "null" | |
| plugins: | |
| anyOf: | |
| - type: object | |
| - type: "null" | |
| name: | |
| anyOf: | |
| - minLength: 1 | |
| maxLength: 256 | |
| type: string | |
| - type: "null" | |
| script: | |
| anyOf: | |
| - minLength: 10 | |
| maxLength: 102400 | |
| type: string | |
| - type: "null" | |
| hosts: | |
| anyOf: | |
| - items: | |
| pattern: ^\*$|^\*?[0-9a-zA-Z-._\[\]:]+$ | |
| type: string | |
| minItems: 1 | |
| uniqueItems: true | |
| type: array | |
| - type: "null" | |
| desc: | |
| anyOf: | |
| - maxLength: 256 | |
| type: string | |
| - type: "null" | |
| enable_websocket: | |
| anyOf: | |
| - type: boolean | |
| description: enable websocket for request | |
| - type: "null" | |
| id: | |
| $ref: ./ResourceId.yaml | |
| create_time: | |
| type: integer | |
| readOnly: true | |
| update_time: | |
| type: integer | |
| readOnly: true | |
| additionalProperties: false | |
| description: Recursive merge fragment. Null deletes object fields; arrays are replaced. APISIX validates the resulting resource, including plugin and reference checks. |