| --- |
| apiVersion: apiextensions.k8s.io/v1 |
| kind: CustomResourceDefinition |
| metadata: |
| annotations: |
| controller-gen.kubebuilder.io/version: v0.17.2 |
| name: apisixroutes.apisix.apache.org |
| spec: |
| group: apisix.apache.org |
| names: |
| kind: ApisixRoute |
| listKind: ApisixRouteList |
| plural: apisixroutes |
| shortNames: |
| - ar |
| singular: apisixroute |
| scope: Namespaced |
| versions: |
| - additionalPrinterColumns: |
| - description: HTTP Hosts |
| jsonPath: .spec.http[].match.hosts |
| name: Hosts |
| type: string |
| - description: HTTP Paths |
| jsonPath: .spec.http[].match.paths |
| name: URIs |
| type: string |
| - description: Backend Service for HTTP |
| jsonPath: .spec.http[].backends[].serviceName |
| name: Target Service (HTTP) |
| priority: 1 |
| type: string |
| - description: TCP Ingress Port |
| jsonPath: .spec.tcp[].match.ingressPort |
| name: Ingress Port (TCP) |
| priority: 1 |
| type: integer |
| - description: Backend Service for TCP |
| jsonPath: .spec.tcp[].match.backend.serviceName |
| name: Target Service (TCP) |
| priority: 1 |
| type: string |
| - description: Creation time |
| jsonPath: .metadata.creationTimestamp |
| name: Age |
| type: date |
| name: v2 |
| schema: |
| openAPIV3Schema: |
| description: ApisixRoute is defines configuration for HTTP and stream routes. |
| properties: |
| apiVersion: |
| description: |- |
| APIVersion defines the versioned schema of this representation of an object. |
| Servers should convert recognized schemas to the latest internal value, and |
| may reject unrecognized values. |
| More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources |
| type: string |
| kind: |
| description: |- |
| Kind is a string value representing the REST resource this object represents. |
| Servers may infer this from the endpoint the client submits requests to. |
| Cannot be updated. |
| In CamelCase. |
| More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
| type: string |
| metadata: |
| type: object |
| spec: |
| description: ApisixRouteSpec defines HTTP and stream route configuration. |
| properties: |
| http: |
| description: |- |
| HTTP defines a list of HTTP route rules. |
| Each rule specifies conditions to match HTTP requests and how to forward them. |
| items: |
| description: ApisixRouteHTTP represents a single HTTP route configuration. |
| properties: |
| authentication: |
| description: Authentication holds authentication-related configuration |
| for this route. |
| properties: |
| enable: |
| description: Enable toggles authentication on or off. |
| type: boolean |
| jwtAuth: |
| description: JwtAuth defines configuration for JWT authentication. |
| properties: |
| cookie: |
| description: Cookie specifies the cookie name to look |
| for the JWT token. |
| type: string |
| header: |
| description: Header specifies the HTTP header name to |
| look for the JWT token. |
| type: string |
| query: |
| description: Query specifies the URL query parameter |
| name to look for the JWT token. |
| type: string |
| type: object |
| keyAuth: |
| description: KeyAuth defines configuration for key authentication. |
| properties: |
| header: |
| description: Header specifies the HTTP header name to |
| look for the key authentication token. |
| type: string |
| type: object |
| ldapAuth: |
| description: LDAPAuth defines configuration for LDAP authentication. |
| properties: |
| base_dn: |
| description: BaseDN is the base distinguished name (DN) |
| for LDAP searches. |
| type: string |
| ldap_uri: |
| description: LDAPURI is the URI of the LDAP server. |
| type: string |
| uid: |
| description: UID is the user identifier attribute in |
| LDAP. |
| type: string |
| use_tls: |
| description: UseTLS indicates whether to use TLS for |
| the LDAP connection. |
| type: boolean |
| type: object |
| type: |
| description: Type specifies the authentication type. |
| type: string |
| required: |
| - enable |
| - type |
| type: object |
| backends: |
| description: |- |
| Backends lists potential backend services to proxy requests to. |
| If more than one backend is specified, the `traffic-split` plugin is used |
| to distribute traffic according to backend weights. |
| items: |
| description: ApisixRouteHTTPBackend represents an HTTP backend |
| (Kubernetes Service). |
| properties: |
| resolveGranularity: |
| description: |- |
| ResolveGranularity determines how the backend service is resolved. |
| Valid values are `endpoints` and `service`. When set to `endpoints`, |
| individual pod IPs will be used; otherwise, the Service's ClusterIP or ExternalIP is used. |
| The default is `endpoints`. |
| type: string |
| serviceName: |
| description: |- |
| ServiceName is the name of the Kubernetes Service. |
| Cross-namespace references are not supported—ensure the ApisixRoute |
| and the Service are in the same namespace. |
| type: string |
| servicePort: |
| anyOf: |
| - type: integer |
| - type: string |
| description: |- |
| ServicePort is the port of the Kubernetes Service. |
| This can be either the port name or port number. |
| x-kubernetes-int-or-string: true |
| subset: |
| description: |- |
| Subset specifies a named subset of the target Service. |
| The subset must be pre-defined in the corresponding ApisixUpstream resource. |
| type: string |
| weight: |
| description: Weight specifies the relative traffic weight |
| for this backend. |
| type: integer |
| required: |
| - serviceName |
| - servicePort |
| type: object |
| type: array |
| match: |
| description: Match defines the HTTP request matching criteria. |
| properties: |
| exprs: |
| description: NginxVars defines match conditions based on |
| Nginx variables. |
| items: |
| description: ApisixRouteHTTPMatchExpr represents a binary |
| expression used to match requests based on Nginx variables. |
| properties: |
| op: |
| description: |- |
| Op specifies the operator used in the expression. |
| Can be `Equal`, `NotEqual`, `GreaterThan`, `GreaterThanEqual`, `LessThan`, `LessThanEqual`, `RegexMatch`, |
| `RegexNotMatch`, `RegexMatchCaseInsensitive`, `RegexNotMatchCaseInsensitive`, `In`, or `NotIn`. |
| type: string |
| set: |
| description: |- |
| Set provides a list of acceptable values for the expression. |
| This should be used when Op is `In` or `NotIn`. |
| items: |
| type: string |
| type: array |
| subject: |
| description: |- |
| Subject defines the left-hand side of the expression. |
| It can be any [APISIX variable](https://apisix.apache.org/docs/apisix/apisix-variable) or string literal. |
| properties: |
| name: |
| description: Name is the name of the header or |
| query parameter. |
| type: string |
| scope: |
| description: |- |
| Scope specifies the subject scope and can be `Header`, `Query`, or `Path`. |
| When Scope is `Path`, Name will be ignored. |
| type: string |
| required: |
| - name |
| - scope |
| type: object |
| value: |
| description: |- |
| Value defines a single value to compare against the subject. |
| This should be used when Op is not `In` or `NotIn`. |
| Set and Value are mutually exclusive—only one should be set at a time. |
| type: string |
| required: |
| - op |
| - subject |
| type: object |
| type: array |
| filter_func: |
| description: |- |
| FilterFunc is a user-defined function for advanced request filtering. |
| The function can use Nginx variables through the `vars` parameter. |
| type: string |
| hosts: |
| description: |- |
| Hosts specifies Host header values to match. |
| Supports exact and wildcard domains. |
| Only one level of wildcard is allowed (e.g., `*.example.com` is valid, |
| but `*.*.example.com` is not). |
| items: |
| type: string |
| type: array |
| methods: |
| description: Methods specifies the HTTP methods to match. |
| items: |
| type: string |
| type: array |
| paths: |
| description: |- |
| Paths is a list of URI path patterns to match. |
| At least one path must be specified. |
| Supports exact matches and prefix matches. |
| For prefix matches, append `*` to the path, such as `/foo*`. |
| items: |
| type: string |
| type: array |
| remoteAddrs: |
| description: |- |
| RemoteAddrs is a list of source IP addresses or CIDR ranges to match. |
| Supports both IPv4 and IPv6 formats. |
| items: |
| type: string |
| type: array |
| required: |
| - paths |
| type: object |
| name: |
| description: Name is the unique rule name and cannot be empty. |
| type: string |
| plugin_config_name: |
| description: PluginConfigName specifies the name of the plugin |
| config to apply. |
| type: string |
| plugin_config_namespace: |
| description: |- |
| PluginConfigNamespace specifies the namespace of the plugin config. |
| Defaults to the namespace of the ApisixRoute if not set. |
| type: string |
| plugins: |
| description: Plugins lists additional plugins applied to this |
| route. |
| items: |
| description: ApisixRoutePlugin represents an APISIX plugin. |
| properties: |
| config: |
| description: Plugin configuration. |
| x-kubernetes-preserve-unknown-fields: true |
| enable: |
| default: true |
| description: Whether this plugin is in use, default is |
| true. |
| type: boolean |
| name: |
| description: The plugin name. |
| type: string |
| secretRef: |
| description: Plugin configuration secretRef. |
| type: string |
| required: |
| - enable |
| - name |
| type: object |
| type: array |
| priority: |
| description: |- |
| Priority defines the route priority when multiple routes share the same URI path. |
| Higher values mean higher priority in route matching. |
| type: integer |
| timeout: |
| description: Timeout specifies upstream timeout settings. |
| properties: |
| connect: |
| description: Connect timeout for establishing a connection |
| to the upstream. |
| type: string |
| read: |
| description: Read timeout for reading data from the upstream. |
| type: string |
| send: |
| description: Send timeout for sending data to the upstream. |
| type: string |
| type: object |
| upstreams: |
| description: Upstreams references ApisixUpstream CRDs. |
| items: |
| description: |- |
| ApisixRouteUpstreamReference references an ApisixUpstream CRD to be used as a backend. |
| It can be used in traffic-splitting scenarios or to select a specific upstream configuration. |
| properties: |
| name: |
| description: Name is the name of the ApisixUpstream resource. |
| type: string |
| weight: |
| description: Weight is the weight assigned to this upstream. |
| type: integer |
| type: object |
| type: array |
| websocket: |
| description: Websocket enables or disables websocket support |
| for this route. |
| type: boolean |
| required: |
| - name |
| type: object |
| type: array |
| x-kubernetes-list-map-keys: |
| - name |
| x-kubernetes-list-type: map |
| ingressClassName: |
| description: |- |
| IngressClassName is the name of the IngressClass this route belongs to. |
| It allows multiple controllers to watch and reconcile different routes. |
| type: string |
| stream: |
| description: |- |
| Stream defines a list of stream route rules. |
| Each rule specifies conditions to match TCP/UDP traffic and how to forward them. |
| items: |
| description: ApisixRouteStream defines the configuration for a Layer |
| 4 (TCP/UDP) route. Currently not supported. |
| properties: |
| backend: |
| description: Backend specifies the destination service to which |
| traffic should be forwarded. |
| properties: |
| resolveGranularity: |
| default: endpoint |
| description: |- |
| ResolveGranularity determines how the backend service is resolved. |
| Valid values are `endpoint` and `service`. When set to `endpoint`, |
| individual pod IPs will be used; otherwise, the Service's ClusterIP or ExternalIP is used. |
| The default is `endpoint`. |
| enum: |
| - endpoint |
| - service |
| type: string |
| serviceName: |
| description: |- |
| ServiceName is the name of the Kubernetes Service. |
| Cross-namespace references are not supported—ensure the ApisixRoute |
| and the Service are in the same namespace. |
| type: string |
| servicePort: |
| anyOf: |
| - type: integer |
| - type: string |
| description: |- |
| ServicePort is the port of the Kubernetes Service. |
| This can be either the port name or port number. |
| x-kubernetes-int-or-string: true |
| subset: |
| description: |- |
| Subset specifies a named subset of the target Service. |
| The subset must be pre-defined in the corresponding ApisixUpstream resource. |
| type: string |
| required: |
| - serviceName |
| - servicePort |
| type: object |
| match: |
| description: Match defines the criteria used to match incoming |
| TCP or UDP connections. |
| properties: |
| host: |
| description: Host is the destination host address used to |
| match the incoming TCP/UDP traffic. |
| type: string |
| ingressPort: |
| description: |- |
| IngressPort is the port on which the APISIX Ingress proxy server listens. |
| This must be a statically configured port, as APISIX does not support dynamic port binding. |
| format: int32 |
| maximum: 65535 |
| minimum: 0 |
| type: integer |
| required: |
| - ingressPort |
| type: object |
| name: |
| description: Name is a unique identifier for the route. This |
| field must not be empty. |
| type: string |
| plugins: |
| description: Plugins defines a list of plugins to apply to this |
| route. |
| items: |
| description: ApisixRoutePlugin represents an APISIX plugin. |
| properties: |
| config: |
| description: Plugin configuration. |
| x-kubernetes-preserve-unknown-fields: true |
| enable: |
| default: true |
| description: Whether this plugin is in use, default is |
| true. |
| type: boolean |
| name: |
| description: The plugin name. |
| type: string |
| secretRef: |
| description: Plugin configuration secretRef. |
| type: string |
| required: |
| - enable |
| - name |
| type: object |
| type: array |
| protocol: |
| description: Protocol specifies the L4 protocol to match. Can |
| be `TCP` or `UDP`. |
| enum: |
| - TCP |
| - UDP |
| type: string |
| required: |
| - backend |
| - match |
| - name |
| - protocol |
| type: object |
| type: array |
| x-kubernetes-list-map-keys: |
| - name |
| x-kubernetes-list-type: map |
| type: object |
| status: |
| description: ApisixStatus is the status report for Apisix ingress Resources |
| properties: |
| conditions: |
| items: |
| description: Condition contains details for one aspect of the current |
| state of this API Resource. |
| properties: |
| lastTransitionTime: |
| description: |- |
| lastTransitionTime is the last time the condition transitioned from one status to another. |
| This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. |
| format: date-time |
| type: string |
| message: |
| description: |- |
| message is a human readable message indicating details about the transition. |
| This may be an empty string. |
| maxLength: 32768 |
| type: string |
| observedGeneration: |
| description: |- |
| observedGeneration represents the .metadata.generation that the condition was set based upon. |
| For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date |
| with respect to the current state of the instance. |
| format: int64 |
| minimum: 0 |
| type: integer |
| reason: |
| description: |- |
| reason contains a programmatic identifier indicating the reason for the condition's last transition. |
| Producers of specific condition types may define expected values and meanings for this field, |
| and whether the values are considered a guaranteed API. |
| The value should be a CamelCase string. |
| This field may not be empty. |
| maxLength: 1024 |
| minLength: 1 |
| pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ |
| type: string |
| status: |
| description: status of the condition, one of True, False, Unknown. |
| enum: |
| - "True" |
| - "False" |
| - Unknown |
| type: string |
| type: |
| description: type of condition in CamelCase or in foo.example.com/CamelCase. |
| maxLength: 316 |
| pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ |
| type: string |
| required: |
| - lastTransitionTime |
| - message |
| - reason |
| - status |
| - type |
| type: object |
| type: array |
| type: object |
| type: object |
| served: true |
| storage: true |
| subresources: |
| status: {} |