http | array | ApisixRoute's HTTP route rules. |
http[].name | string (required) | The route rule name. |
http[].priority | integer | The route priority, it's used to determine which route will be hitted when multile routes contains the same URI. Large number means higher priority. |
http[].match | object | Route match conditions. |
http[].match.paths | array | A series of URI that should be matched (oneof) to use this route rule. |
http[].match.hosts | array | A series of hosts that should be matched (oneof) to use this route rule. |
http[].match.methods | array | A series of HTTP methods(GET , POST , PUT , DELETE , PATCH , HEAD , OPTIONS , CONNECT , TRACE ) that should be matched (oneof) to use this route rule. |
http[].match.remoteAddrs | array | A series of IP address (CIDR format) that should be matched (oneof) to use this route rule. |
http[].match.exprs | array | A series expressions that the results should be matched (oneof) to use this route rule. |
http[].match.exprs[].subject | object | Expression subject. |
http[].match.exprs[].subject.scope | string | Specify where to find the subject, values can be Header , Query , Cookie and Path . |
http[].match.exprs[].subject.name | string | Specify subject name, when scope is Path , this field can be absent. |
http[].match.exprs[].op | string | Expression operator, see Expression Operators for the detail of enumerations. |
http[].match.exprs[].value | string | Expected expression result, it's exclusive with http[].match.exprs[].set . |
http[].match.exprs[].set | array | Expected expression result set, only used when the operator is In or NotIn , it's exclusive with http[].match.exprs[].value . |
http[].backends | object | The backend services. When the number of backends more than one, weight based traffic split policy will be applied to shifting traffic between these backends. |
http[].backends[].serviceName | string | The backend service name, note the service and ApisixRoute should be created in the same namespace. Cross namespace referencing is not allowed. |
http[].backends[].servicePort | integer or string | The backend service port, can be the port number or the name defined in the service object. |
http[].backends[].resolveGranularity | string | See Service Resolve Granularity for the details. |
http[].backends[].weight | int | The backend weight, which is critical when shifting traffic between multiple backends, default is 100 . Weight is ignored when there is only one backend. |
http[].backends[].subnet | string | Subset specifies a subset for the target Service. The subset should be pre-definedin ApisixUpstream about this service. |
http[].plugins | array | A series of APISIX plugins that will be executed once this route rule is matched |
http[].plugins[].name | string | The plugin name, see docs for learning the available plugins. |
http[].plugins[].enable | boolean | Whether the plugin is in use |
http[].plugins[].config | object | The plugin configuration, fields should be same as in APISIX. |
http[].websocket | boolean | Whether enable websocket proxy. |
stream | array | ApisixRoutes' stream route rules, which contains TCP or UDP rules. |
stream[].protocol | string (required) | The protocol of rule. Support TCP or UDP |
stream[].name | string (required) | The Route rule name. |
stream[].match | object (required) | The Route match conditions. |
stream[].match.ingressPort | integer (required) | the Ingress proxy server listening port, note since APISIX doesn't support dynamic listening, this port should be defined in apisix configuration. |
stream[].backend | object | The backend service. Deprecated: use http[].backends instead. |
stream[].backend.serviceName | string | The backend service name, note the service and ApisixRoute should be created in the same namespace. Cross namespace referencing is not allowed. |
stream[].backend.servicePort | integer or string | The backend service port, can be the port number or the name defined in the service object. |
stream[].backend.resolveGranularity | string | See Service Resolve Granularity for the details. |
stream[].backend.subset | string | Subset specifies a subset for the target Service. The subset should be pre-definedin ApisixUpstream about this service. |