v2 API Reference
Packages:
apisix.apache.org/v2#
Resource Types:ApisixGlobalRule#
ApisixGlobalRule is the Schema for the ApisixGlobalRule resource. An ApisixGlobalRule is used to support a group of plugin configs
| Field | Description | ||
|---|---|---|---|
apiVersionstring | apisix.apache.org/v2 | ||
kindstring | ApisixGlobalRule | ||
metadataKubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of themetadata field. | ||
specApisixGlobalRuleSpec | Spec defines the desired state of ApisixGlobalRuleSpec.
| ||
statusApisixStatus |
ApisixPluginConfig#
ApisixPluginConfig is the Schema for the ApisixPluginConfig resource. An ApisixPluginConfig is used to support a group of plugin configs
| Field | Description | ||
|---|---|---|---|
apiVersionstring | apisix.apache.org/v2 | ||
kindstring | ApisixPluginConfig | ||
metadataKubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of themetadata field. | ||
specApisixPluginConfigSpec | Spec defines the desired state of ApisixPluginConfigSpec.
| ||
statusApisixStatus |
ActiveHealthCheck#
(Appears on:HealthCheck)
ActiveHealthCheck defines the active kind of upstream health check.
| Field | Description |
|---|---|
typestring | |
timeouttime.Duration | |
concurrencyint | |
hoststring | |
portint32 | |
httpPathstring | |
strictTLSbool | |
requestHeaders[]string | |
healthyActiveHealthCheckHealthy | |
unhealthyActiveHealthCheckUnhealthy |
ActiveHealthCheckHealthy#
(Appears on:ActiveHealthCheck)
ActiveHealthCheckHealthy defines the conditions to judge whether an upstream node is healthy with the active manner.
| Field | Description |
|---|---|
PassiveHealthCheckHealthyPassiveHealthCheckHealthy | (Members of |
intervalKubernetes meta/v1.Duration |
ActiveHealthCheckUnhealthy#
(Appears on:ActiveHealthCheck)
ActiveHealthCheckUnhealthy defines the conditions to judge whether an upstream node is unhealthy with the active manager.
| Field | Description |
|---|---|
PassiveHealthCheckUnhealthyPassiveHealthCheckUnhealthy | (Members of |
intervalKubernetes meta/v1.Duration |
ApisixClusterAdminConfig#
(Appears on:ApisixClusterConfigSpec)
ApisixClusterAdminConfig is the admin config for the corresponding APISIX Cluster.
| Field | Description |
|---|---|
baseURLstring | BaseURL is the base URL for the APISIX Admin API. It looks like “http://apisix-admin.default.svc.cluster.local:9080/apisix/admin” |
adminKeystring | AdminKey is used to verify the admin API user. |
clientTimeoutgithub.com/apache/apisix-ingress-controller/pkg/types.TimeDuration | ClientTimeout is request timeout for the APISIX Admin API client |
ApisixClusterConfig#
ApisixClusterConfig is the Schema for the ApisixClusterConfig resource. An ApisixClusterConfig is used to identify an APISIX cluster, it’s a ClusterScoped resource so the name is unique. It also contains some cluster-level configurations like monitoring.
| Field | Description | ||||
|---|---|---|---|---|---|
metadataKubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of themetadata field. | ||||
specApisixClusterConfigSpec | Spec defines the desired state of ApisixClusterConfigSpec.
| ||||
statusApisixStatus |
ApisixClusterConfigSpec#
(Appears on:ApisixClusterConfig)
ApisixClusterConfigSpec defines the desired state of ApisixClusterConfigSpec.
| Field | Description |
|---|---|
monitoringApisixClusterMonitoringConfig | (Optional) Monitoring categories all monitoring related features. |
adminApisixClusterAdminConfig | (Optional) Admin contains the Admin API information about APISIX cluster. |
ApisixClusterMonitoringConfig#
(Appears on:ApisixClusterConfigSpec)
ApisixClusterMonitoringConfig categories all monitoring related features.
| Field | Description |
|---|---|
prometheusApisixClusterPrometheusConfig | (Optional) Prometheus is the config for using Prometheus in APISIX Cluster. |
skywalkingApisixClusterSkywalkingConfig | (Optional) Skywalking is the config for using Skywalking in APISIX Cluster. |
ApisixClusterPrometheusConfig#
(Appears on:ApisixClusterMonitoringConfig)
ApisixClusterPrometheusConfig is the config for using Prometheus in APISIX Cluster.
| Field | Description |
|---|---|
enablebool | Enable means whether enable Prometheus or not. |
ApisixClusterSkywalkingConfig#
(Appears on:ApisixClusterMonitoringConfig)
ApisixClusterSkywalkingConfig is the config for using Skywalking in APISIX Cluster.
| Field | Description |
|---|---|
enablebool | Enable means whether enable Skywalking or not. |
sampleRatiofloat64 | SampleRatio means the ratio to collect |
ApisixConsumer#
ApisixConsumer is the Schema for the ApisixConsumer resource. An ApisixConsumer is used to identify a consumer.
| Field | Description | ||
|---|---|---|---|
metadataKubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of themetadata field. | ||
specApisixConsumerSpec |
| ||
statusApisixStatus |
ApisixConsumerAuthParameter#
(Appears on:ApisixConsumerSpec)
| Field | Description |
|---|---|
basicAuthApisixConsumerBasicAuth | |
keyAuthApisixConsumerKeyAuth | |
wolfRBACApisixConsumerWolfRBAC | |
jwtAuthApisixConsumerJwtAuth | |
hmacAuthApisixConsumerHMACAuth |
ApisixConsumerBasicAuth#
(Appears on:ApisixConsumerAuthParameter)
ApisixConsumerBasicAuth defines the configuration for basic auth.
| Field | Description |
|---|---|
secretRefKubernetes core/v1.LocalObjectReference | |
valueApisixConsumerBasicAuthValue |
ApisixConsumerBasicAuthValue#
(Appears on:ApisixConsumerBasicAuth)
ApisixConsumerBasicAuthValue defines the in-place username and password configuration for basic auth.
| Field | Description |
|---|---|
usernamestring | |
passwordstring |
ApisixConsumerHMACAuth#
(Appears on:ApisixConsumerAuthParameter)
ApisixConsumerHMACAuth defines the configuration for the hmac auth.
| Field | Description |
|---|---|
secretRefKubernetes core/v1.LocalObjectReference | |
valueApisixConsumerHMACAuthValue |
ApisixConsumerHMACAuthValue#
(Appears on:ApisixConsumerHMACAuth)
ApisixConsumerHMACAuthValue defines the in-place configuration for hmac auth.
| Field | Description |
|---|---|
access_keystring | |
secret_keystring | |
algorithmstring | |
clock_skewint64 | |
signed_headers[]string | |
keep_headersbool | |
encode_uri_paramsbool | |
validate_request_bodybool | |
max_req_bodyint64 |
ApisixConsumerJwtAuth#
(Appears on:ApisixConsumerAuthParameter)
ApisixConsumerJwtAuth defines the configuration for the jwt auth.
| Field | Description |
|---|---|
secretRefKubernetes core/v1.LocalObjectReference | |
valueApisixConsumerJwtAuthValue |
ApisixConsumerJwtAuthValue#
(Appears on:ApisixConsumerJwtAuth)
ApisixConsumerJwtAuthValue defines the in-place configuration for jwt auth.
| Field | Description |
|---|---|
keystring | |
secretstring | |
public_keystring | |
private_keystring | |
algorithmstring | |
expint64 | |
base64_secretbool |
ApisixConsumerKeyAuth#
(Appears on:ApisixConsumerAuthParameter)
ApisixConsumerKeyAuth defines the configuration for the key auth.
| Field | Description |
|---|---|
secretRefKubernetes core/v1.LocalObjectReference | |
valueApisixConsumerKeyAuthValue |
ApisixConsumerKeyAuthValue#
(Appears on:ApisixConsumerKeyAuth)
ApisixConsumerKeyAuthValue defines the in-place configuration for basic auth.
| Field | Description |
|---|---|
keystring |
ApisixConsumerSpec#
(Appears on:ApisixConsumer)
ApisixConsumerSpec defines the desired state of ApisixConsumer.
| Field | Description |
|---|---|
authParameterApisixConsumerAuthParameter |
ApisixConsumerWolfRBAC#
(Appears on:ApisixConsumerAuthParameter)
ApisixConsumerWolfRBAC defines the configuration for the wolf-rbac auth.
| Field | Description |
|---|---|
secretRefKubernetes core/v1.LocalObjectReference | |
valueApisixConsumerWolfRBACValue |
ApisixConsumerWolfRBACValue#
(Appears on:ApisixConsumerWolfRBAC)
ApisixConsumerWolfRBAC defines the in-place server and appid and header_prefix configuration for wolf-rbac auth.
| Field | Description |
|---|---|
serverstring | |
appidstring | |
header_prefixstring |
ApisixGlobalRuleSpec#
(Appears on:ApisixGlobalRule)
ApisixGlobalRuleSpec defines the desired state of ApisixGlobalRuleSpec.
| Field | Description |
|---|---|
plugins[]ApisixRoutePlugin | Plugins contains a list of ApisixRoutePlugin |
ApisixMutualTlsClientConfig#
(Appears on:ApisixTlsSpec)
ApisixMutualTlsClientConfig describes the mutual TLS CA and verify depth
| Field | Description |
|---|---|
caSecretApisixSecret | |
depthint |
ApisixPluginConfigSpec#
(Appears on:ApisixPluginConfig)
ApisixPluginConfigSpec defines the desired state of ApisixPluginConfigSpec.
| Field | Description |
|---|---|
plugins[]ApisixRoutePlugin | Plugins contains a list of ApisixRoutePlugin |
ApisixRoute#
ApisixRoute is used to define the route rules and upstreams for Apache APISIX.
| Field | Description | ||||
|---|---|---|---|---|---|
metadataKubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of themetadata field. | ||||
specApisixRouteSpec |
| ||||
statusApisixStatus |
ApisixRouteAuthentication#
(Appears on:ApisixRouteHTTP)
ApisixRouteAuthentication is the authentication-related configuration in ApisixRoute.
| Field | Description |
|---|---|
enablebool | |
typestring | |
keyAuthApisixRouteAuthenticationKeyAuth | |
jwtAuthApisixRouteAuthenticationJwtAuth |
ApisixRouteAuthenticationJwtAuth#
(Appears on:ApisixRouteAuthentication)
ApisixRouteAuthenticationJwtAuth is the jwt auth related configuration in ApisixRouteAuthentication.
| Field | Description |
|---|---|
headerstring | |
querystring | |
cookiestring |
ApisixRouteAuthenticationKeyAuth#
(Appears on:ApisixRouteAuthentication)
ApisixRouteAuthenticationKeyAuth is the keyAuth-related configuration in ApisixRouteAuthentication.
| Field | Description |
|---|---|
headerstring |
ApisixRouteHTTP#
(Appears on:ApisixRouteSpec)
ApisixRouteHTTP represents a single route in for HTTP traffic.
| Field | Description |
|---|---|
namestring | The rule name, cannot be empty. |
priorityint | Route priority, when multiple routes contains same URI path (for path matching), route with higher priority will take effect. |
timeoutUpstreamTimeout | |
matchApisixRouteHTTPMatch | |
backends[]ApisixRouteHTTPBackend | Backends represents potential backends to proxy after the route rule matched. When number of backends are more than one, traffic-split plugin in APISIX will be used to split traffic based on the backend weight. |
upstreams[]ApisixRouteUpstreamReference | Upstreams refer to ApisixUpstream CRD |
websocketbool | |
plugin_config_namestring | |
plugins[]ApisixRoutePlugin | |
authenticationApisixRouteAuthentication |
ApisixRouteHTTPBackend#
(Appears on:ApisixRouteHTTP)
ApisixRouteHTTPBackend represents an HTTP backend (a Kubernetes Service).
| Field | Description |
|---|---|
serviceNamestring | The name (short) of the service, note cross namespace is forbidden, so be sure the ApisixRoute and Service are in the same namespace. |
servicePortk8s.io/apimachinery/pkg/util/intstr.IntOrString | The service port, could be the name or the port number. |
resolveGranularitystring | The resolve granularity, can be “endpoints” or “service”, when set to “endpoints”, the pod ips will be used; other wise, the service ClusterIP or ExternalIP will be used, default is endpoints. |
weightint | Weight of this backend. |
subsetstring | Subset specifies a subset for the target Service. The subset should be pre-defined in ApisixUpstream about this service. |
ApisixRouteHTTPMatch#
(Appears on:ApisixRouteHTTP)
ApisixRouteHTTPMatch represents the match condition for hitting this route.
| Field | Description |
|---|---|
paths[]string | URI path predicates, at least one path should be configured, path could be exact or prefix, for prefix path, append “” after it, for instance, “/foo”. |
methods[]string | HTTP request method predicates. |
hosts[]string | HTTP Host predicates, host can be a wildcard domain or an exact domain. For wildcard domain, only one generic level is allowed, for instance, “.foo.com” is valid but “.*.foo.com” is not. |
remoteAddrs[]string | Remote address predicates, items can be valid IPv4 address or IPv6 address or CIDR. |
exprs[]ApisixRouteHTTPMatchExpr | NginxVars represents generic match predicates, it uses Nginx variable systems, so any predicate like headers, querystring and etc can be leveraged here to match the route. For instance, it can be: nginxVars: - subject: “$remote_addr” op: in value: - “127.0.0.1” - “10.0.5.11” |
filter_funcstring | Matches based on a user-defined filtering function. These functions can accept an input parameter |
ApisixRouteHTTPMatchExpr#
(Appears on:ApisixRouteHTTPMatch)
ApisixRouteHTTPMatchExpr represents a binary route match expression .
| Field | Description |
|---|---|
subjectApisixRouteHTTPMatchExprSubject | Subject is the expression subject, it can be any string composed by literals and nginx vars. |
opstring | Op is the operator. |
set[]string | Set is an array type object of the expression. It should be used when the Op is “in” or “not_in”; |
valuestring | Value is the normal type object for the expression, it should be used when the Op is not “in” and “not_in”. Set and Value are exclusive so only of them can be set in the same time. |
ApisixRouteHTTPMatchExprSubject#
(Appears on:ApisixRouteHTTPMatchExpr)
ApisixRouteHTTPMatchExprSubject describes the route match expression subject.
| Field | Description |
|---|---|
scopestring | The subject scope, can be: ScopeQuery, ScopeHeader, ScopePath when subject is ScopePath, Name field will be ignored. |
namestring | The name of subject. |
ApisixRoutePlugin#
(Appears on:ApisixGlobalRuleSpec, ApisixPluginConfigSpec, ApisixRouteHTTP, ApisixRouteStream)
ApisixRoutePlugin represents an APISIX plugin.
| Field | Description |
|---|---|
namestring | The plugin name. |
enablebool | Whether this plugin is in use, default is true. |
configApisixRoutePluginConfig | Plugin configuration. |
secretRefstring | Plugin configuration secretRef. |
ApisixRoutePluginConfig (map[string]interface alias)#
(Appears on:ApisixRoutePlugin)
ApisixRoutePluginConfig is the configuration for any plugins.
ApisixRouteSpec#
(Appears on:ApisixRoute)
ApisixRouteSpec is the spec definition for ApisixRouteSpec.
| Field | Description |
|---|---|
http[]ApisixRouteHTTP | |
stream[]ApisixRouteStream |
ApisixRouteStream#
(Appears on:ApisixRouteSpec)
ApisixRouteStream is the configuration for level 4 route
| Field | Description |
|---|---|
namestring | The rule name, cannot be empty. |
protocolstring | |
matchApisixRouteStreamMatch | |
backendApisixRouteStreamBackend | |
plugins[]ApisixRoutePlugin |
ApisixRouteStreamBackend#
(Appears on:ApisixRouteStream)
ApisixRouteStreamBackend represents a TCP backend (a Kubernetes Service).
| Field | Description |
|---|---|
serviceNamestring | The name (short) of the service, note cross namespace is forbidden, so be sure the ApisixRoute and Service are in the same namespace. |
servicePortk8s.io/apimachinery/pkg/util/intstr.IntOrString | The service port, could be the name or the port number. |
resolveGranularitystring | The resolve granularity, can be “endpoints” or “service”, when set to “endpoints”, the pod ips will be used; other wise, the service ClusterIP or ExternalIP will be used, default is endpoints. |
subsetstring | Subset specifies a subset for the target Service. The subset should be pre-defined in ApisixUpstream about this service. |
ApisixRouteStreamMatch#
(Appears on:ApisixRouteStream)
ApisixRouteStreamMatch represents the match conditions of stream route.
| Field | Description |
|---|---|
ingressPortint32 | IngressPort represents the port listening on the Ingress proxy server. It should be pre-defined as APISIX doesn’t support dynamic listening. |
hoststring |
ApisixRouteUpstreamReference#
(Appears on:ApisixRouteHTTP)
ApisixRouteUpstreamReference contains a ApisixUpstream CRD reference
| Field | Description |
|---|---|
namestring | |
weightint | (Optional) |
ApisixSecret#
(Appears on:ApisixMutualTlsClientConfig, ApisixTlsSpec, ApisixUpstreamConfig)
ApisixSecret describes the Kubernetes Secret name and namespace.
| Field | Description |
|---|---|
namestring | |
namespacestring |
ApisixStatus#
(Appears on:ApisixGlobalRule, ApisixPluginConfig, ApisixClusterConfig, ApisixConsumer, ApisixRoute, ApisixTls, ApisixUpstream)
ApisixStatus is the status report for Apisix ingress Resources
| Field | Description |
|---|---|
conditions[]Kubernetes meta/v1.Condition |
ApisixTls#
ApisixTls defines SSL resource in APISIX.
| Field | Description |
|---|---|
metadataKubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of themetadata field. |
specApisixTlsSpec | |
statusApisixStatus | (Optional) |
ApisixTlsSpec#
(Appears on:ApisixTls)
ApisixTlsSpec is the specification of ApisixSSL.
| Field | Description |
|---|---|
hosts[]HostType | |
secretApisixSecret | |
clientApisixMutualTlsClientConfig | (Optional) |
ApisixUpstream#
ApisixUpstream is a decorator for Kubernetes Service, it arms the Service with rich features like health check, retry policies, load balancer and others. It’s designed to have same name with the Kubernetes Service and can be customized for individual port.
| Field | Description |
|---|---|
metadataKubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of themetadata field. |
specApisixUpstreamSpec | |
statusApisixStatus |
ApisixUpstreamConfig#
(Appears on:ApisixUpstreamSpec, PortLevelSettings)
ApisixUpstreamConfig contains rich features on APISIX Upstream, for instance load balancer, health check, etc.
| Field | Description |
|---|---|
loadbalancerLoadBalancer | (Optional) LoadBalancer represents the load balancer configuration for Kubernetes Service. The default strategy is round robin. |
schemestring | (Optional) The scheme used to talk with the upstream. Now value can be http, grpc. |
retriesint | (Optional) How many times that the proxy (Apache APISIX) should do when errors occur (error, timeout or bad http status codes like 500, 502). |
timeoutUpstreamTimeout | (Optional) Timeout settings for the read, send and connect to the upstream. |
healthCheckHealthCheck | (Optional) The health check configurations for the upstream. |
tlsSecretApisixSecret | (Optional) Set the client certificate when connecting to TLS upstream. |
subsets[]ApisixUpstreamSubset | (Optional) Subsets groups the service endpoints by their labels. Usually used to differentiate service versions. |
discoveryDiscovery | (Optional) Discovery is used to configure service discovery for upstream. |
ApisixUpstreamExternalNode#
(Appears on:ApisixUpstreamSpec)
ApisixUpstreamExternalNode is the external node conf
| Field | Description |
|---|---|
namestring | |
typeApisixUpstreamExternalType | |
weightint | (Optional) |
portint | (Optional) Port defines the port of the external node |
ApisixUpstreamExternalType (string alias)#
(Appears on:ApisixUpstreamExternalNode)
ApisixUpstreamExternalType is the external service type
| Value | Description |
|---|---|
"Domain" | ExternalTypeDomain type is a domain |
"Service" | ExternalTypeService type is a K8s ExternalName service |
ApisixUpstreamSpec#
(Appears on:ApisixUpstream)
ApisixUpstreamSpec describes the specification of ApisixUpstream.
| Field | Description |
|---|---|
externalNodes[]ApisixUpstreamExternalNode | (Optional) ExternalNodes contains external nodes the Upstream should use If this field is set, the upstream will use these nodes directly without any further resolves |
ApisixUpstreamConfigApisixUpstreamConfig | (Members of |
portLevelSettings[]PortLevelSettings |
ApisixUpstreamSubset#
(Appears on:ApisixUpstreamConfig)
ApisixUpstreamSubset defines a single endpoints group of one Service.
| Field | Description |
|---|---|
namestring | Name is the name of subset. |
labelsmap[string]string | Labels is the label set of this subset. |
Config (map[string]interface alias)#
(Appears on:Plugin)
ConfigSet ([]interface alias)#
(Appears on:Plugin)
Discovery#
(Appears on:ApisixUpstreamConfig)
Discovery defines Service discovery related configuration.
| Field | Description |
|---|---|
serviceNamestring | |
typestring | |
argsmap[string]string |
HealthCheck#
(Appears on:ApisixUpstreamConfig)
HealthCheck describes the upstream health check parameters.
| Field | Description |
|---|---|
activeActiveHealthCheck | |
passivePassiveHealthCheck |
HostType (string alias)#
(Appears on:ApisixTlsSpec)
LoadBalancer#
(Appears on:ApisixUpstreamConfig)
LoadBalancer describes the load balancing parameters.
| Field | Description |
|---|---|
typestring | |
hashOnstring | The HashOn and Key fields are required when Type is “chash”. HashOn represents the key fetching scope. |
keystring | Key represents the hash key. |
PassiveHealthCheck#
(Appears on:HealthCheck)
PassiveHealthCheck defines the conditions to judge whether an upstream node is healthy with the passive manager.
| Field | Description |
|---|---|
typestring | |
healthyPassiveHealthCheckHealthy | |
unhealthyPassiveHealthCheckUnhealthy |
PassiveHealthCheckHealthy#
(Appears on:ActiveHealthCheckHealthy, PassiveHealthCheck)
PassiveHealthCheckHealthy defines the conditions to judge whether an upstream node is healthy with the passive manner.
| Field | Description |
|---|---|
httpCodes[]int | |
successesint |
PassiveHealthCheckUnhealthy#
(Appears on:ActiveHealthCheckUnhealthy, PassiveHealthCheck)
PassiveHealthCheckUnhealthy defines the conditions to judge whether an upstream node is unhealthy with the passive manager.
| Field | Description |
|---|---|
httpCodes[]int | |
httpFailuresint | |
tcpFailuresint | |
timeoutint |
Plugin#
| Field | Description |
|---|---|
namestring | |
enablebool | |
configConfig | |
config_setConfigSet |
PortLevelSettings#
(Appears on:ApisixUpstreamSpec)
PortLevelSettings configures the ApisixUpstreamConfig for each individual port. It inherits configurations from the outer level (the whole Kubernetes Service) and overrides some of them if they are set on the port level.
| Field | Description |
|---|---|
ApisixUpstreamConfigApisixUpstreamConfig | (Members of |
portint32 | Port is a Kubernetes Service port, it should be already defined. |
UpstreamTimeout#
(Appears on:ApisixRouteHTTP, ApisixUpstreamConfig)
UpstreamTimeout is settings for the read, send and connect to the upstream.
| Field | Description |
|---|---|
connectKubernetes meta/v1.Duration | |
sendKubernetes meta/v1.Duration | |
readKubernetes meta/v1.Duration |
Generated with gen-crd-api-reference-docson git commit fa57ff5.