v2 API Reference
Packages:
#
Resource Types: apisix.apache.org/v2#
ApisixGlobalRuleApisixGlobalRule is the Schema for the ApisixGlobalRule resource. An ApisixGlobalRule is used to support a group of plugin configs
Field | Description | ||
---|---|---|---|
apiVersion string | apisix.apache.org/v2 | ||
kind string | ApisixGlobalRule | ||
metadata Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of themetadata field. | ||
spec ApisixGlobalRuleSpec | Spec defines the desired state of ApisixGlobalRuleSpec.
| ||
status ApisixStatus |
#
ApisixPluginConfigApisixPluginConfig is the Schema for the ApisixPluginConfig resource. An ApisixPluginConfig is used to support a group of plugin configs
Field | Description | ||
---|---|---|---|
apiVersion string | apisix.apache.org/v2 | ||
kind string | ApisixPluginConfig | ||
metadata Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of themetadata field. | ||
spec ApisixPluginConfigSpec | Spec defines the desired state of ApisixPluginConfigSpec.
| ||
status ApisixStatus |
#
ActiveHealthCheck(Appears on:HealthCheck)
ActiveHealthCheck defines the active kind of upstream health check.
Field | Description |
---|---|
type string | |
timeout time.Duration | |
concurrency int | |
host string | |
port int32 | |
httpPath string | |
strictTLS bool | |
requestHeaders []string | |
healthy ActiveHealthCheckHealthy | |
unhealthy ActiveHealthCheckUnhealthy |
#
ActiveHealthCheckHealthy(Appears on:ActiveHealthCheck)
ActiveHealthCheckHealthy defines the conditions to judge whether an upstream node is healthy with the active manner.
Field | Description |
---|---|
PassiveHealthCheckHealthy PassiveHealthCheckHealthy | (Members of |
interval Kubernetes 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 |
---|---|
PassiveHealthCheckUnhealthy PassiveHealthCheckUnhealthy | (Members of |
interval Kubernetes meta/v1.Duration |
#
ApisixClusterAdminConfig(Appears on:ApisixClusterConfigSpec)
ApisixClusterAdminConfig is the admin config for the corresponding APISIX Cluster.
Field | Description |
---|---|
baseURL string | BaseURL is the base URL for the APISIX Admin API. It looks like “http://apisix-admin.default.svc.cluster.local:9080/apisix/admin” |
adminKey string | AdminKey is used to verify the admin API user. |
clientTimeout github.com/apache/apisix-ingress-controller/pkg/types.TimeDuration | ClientTimeout is request timeout for the APISIX Admin API client |
#
ApisixClusterConfigApisixClusterConfig 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 | ||||
---|---|---|---|---|---|
metadata Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of themetadata field. | ||||
spec ApisixClusterConfigSpec | Spec defines the desired state of ApisixClusterConfigSpec.
| ||||
status ApisixStatus |
#
ApisixClusterConfigSpec(Appears on:ApisixClusterConfig)
ApisixClusterConfigSpec defines the desired state of ApisixClusterConfigSpec.
Field | Description |
---|---|
monitoring ApisixClusterMonitoringConfig | (Optional) Monitoring categories all monitoring related features. |
admin ApisixClusterAdminConfig | (Optional) Admin contains the Admin API information about APISIX cluster. |
#
ApisixClusterMonitoringConfig(Appears on:ApisixClusterConfigSpec)
ApisixClusterMonitoringConfig categories all monitoring related features.
Field | Description |
---|---|
prometheus ApisixClusterPrometheusConfig | (Optional) Prometheus is the config for using Prometheus in APISIX Cluster. |
skywalking ApisixClusterSkywalkingConfig | (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 |
---|---|
enable bool | Enable means whether enable Prometheus or not. |
#
ApisixClusterSkywalkingConfig(Appears on:ApisixClusterMonitoringConfig)
ApisixClusterSkywalkingConfig is the config for using Skywalking in APISIX Cluster.
Field | Description |
---|---|
enable bool | Enable means whether enable Skywalking or not. |
sampleRatio float64 | SampleRatio means the ratio to collect |
#
ApisixConsumerApisixConsumer is the Schema for the ApisixConsumer resource. An ApisixConsumer is used to identify a consumer.
Field | Description | ||
---|---|---|---|
metadata Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of themetadata field. | ||
spec ApisixConsumerSpec |
| ||
status ApisixStatus |
#
ApisixConsumerAuthParameter(Appears on:ApisixConsumerSpec)
Field | Description |
---|---|
basicAuth ApisixConsumerBasicAuth | |
keyAuth ApisixConsumerKeyAuth | |
wolfRBAC ApisixConsumerWolfRBAC | |
jwtAuth ApisixConsumerJwtAuth | |
hmacAuth ApisixConsumerHMACAuth |
#
ApisixConsumerBasicAuth(Appears on:ApisixConsumerAuthParameter)
ApisixConsumerBasicAuth defines the configuration for basic auth.
Field | Description |
---|---|
secretRef Kubernetes core/v1.LocalObjectReference | |
value ApisixConsumerBasicAuthValue |
#
ApisixConsumerBasicAuthValue(Appears on:ApisixConsumerBasicAuth)
ApisixConsumerBasicAuthValue defines the in-place username and password configuration for basic auth.
Field | Description |
---|---|
username string | |
password string |
#
ApisixConsumerHMACAuth(Appears on:ApisixConsumerAuthParameter)
ApisixConsumerHMACAuth defines the configuration for the hmac auth.
Field | Description |
---|---|
secretRef Kubernetes core/v1.LocalObjectReference | |
value ApisixConsumerHMACAuthValue |
#
ApisixConsumerHMACAuthValue(Appears on:ApisixConsumerHMACAuth)
ApisixConsumerHMACAuthValue defines the in-place configuration for hmac auth.
Field | Description |
---|---|
access_key string | |
secret_key string | |
algorithm string | |
clock_skew int64 | |
signed_headers []string | |
keep_headers bool | |
encode_uri_params bool | |
validate_request_body bool | |
max_req_body int64 |
#
ApisixConsumerJwtAuth(Appears on:ApisixConsumerAuthParameter)
ApisixConsumerJwtAuth defines the configuration for the jwt auth.
Field | Description |
---|---|
secretRef Kubernetes core/v1.LocalObjectReference | |
value ApisixConsumerJwtAuthValue |
#
ApisixConsumerJwtAuthValue(Appears on:ApisixConsumerJwtAuth)
ApisixConsumerJwtAuthValue defines the in-place configuration for jwt auth.
Field | Description |
---|---|
key string | |
secret string | |
public_key string | |
private_key string | |
algorithm string | |
exp int64 | |
base64_secret bool |
#
ApisixConsumerKeyAuth(Appears on:ApisixConsumerAuthParameter)
ApisixConsumerKeyAuth defines the configuration for the key auth.
Field | Description |
---|---|
secretRef Kubernetes core/v1.LocalObjectReference | |
value ApisixConsumerKeyAuthValue |
#
ApisixConsumerKeyAuthValue(Appears on:ApisixConsumerKeyAuth)
ApisixConsumerKeyAuthValue defines the in-place configuration for basic auth.
Field | Description |
---|---|
key string |
#
ApisixConsumerSpec(Appears on:ApisixConsumer)
ApisixConsumerSpec defines the desired state of ApisixConsumer.
Field | Description |
---|---|
authParameter ApisixConsumerAuthParameter |
#
ApisixConsumerWolfRBAC(Appears on:ApisixConsumerAuthParameter)
ApisixConsumerWolfRBAC defines the configuration for the wolf-rbac auth.
Field | Description |
---|---|
secretRef Kubernetes core/v1.LocalObjectReference | |
value ApisixConsumerWolfRBACValue |
#
ApisixConsumerWolfRBACValue(Appears on:ApisixConsumerWolfRBAC)
ApisixConsumerWolfRBAC defines the in-place server and appid and header_prefix configuration for wolf-rbac auth.
Field | Description |
---|---|
server string | |
appid string | |
header_prefix string |
#
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 |
---|---|
caSecret ApisixSecret | |
depth int |
#
ApisixPluginConfigSpec(Appears on:ApisixPluginConfig)
ApisixPluginConfigSpec defines the desired state of ApisixPluginConfigSpec.
Field | Description |
---|---|
plugins []ApisixRoutePlugin | Plugins contains a list of ApisixRoutePlugin |
#
ApisixRouteApisixRoute is used to define the route rules and upstreams for Apache APISIX.
Field | Description | ||||
---|---|---|---|---|---|
metadata Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of themetadata field. | ||||
spec ApisixRouteSpec |
| ||||
status ApisixStatus |
#
ApisixRouteAuthentication(Appears on:ApisixRouteHTTP)
ApisixRouteAuthentication is the authentication-related configuration in ApisixRoute.
Field | Description |
---|---|
enable bool | |
type string | |
keyAuth ApisixRouteAuthenticationKeyAuth | |
jwtAuth ApisixRouteAuthenticationJwtAuth |
#
ApisixRouteAuthenticationJwtAuth(Appears on:ApisixRouteAuthentication)
ApisixRouteAuthenticationJwtAuth is the jwt auth related configuration in ApisixRouteAuthentication.
Field | Description |
---|---|
header string | |
query string | |
cookie string |
#
ApisixRouteAuthenticationKeyAuth(Appears on:ApisixRouteAuthentication)
ApisixRouteAuthenticationKeyAuth is the keyAuth-related configuration in ApisixRouteAuthentication.
Field | Description |
---|---|
header string |
#
ApisixRouteHTTP(Appears on:ApisixRouteSpec)
ApisixRouteHTTP represents a single route in for HTTP traffic.
Field | Description |
---|---|
name string | The rule name, cannot be empty. |
priority int | Route priority, when multiple routes contains same URI path (for path matching), route with higher priority will take effect. |
timeout UpstreamTimeout | |
match ApisixRouteHTTPMatch | |
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 |
websocket bool | |
plugin_config_name string | |
plugins []ApisixRoutePlugin | |
authentication ApisixRouteAuthentication |
#
ApisixRouteHTTPBackend(Appears on:ApisixRouteHTTP)
ApisixRouteHTTPBackend represents an HTTP backend (a Kubernetes Service).
Field | Description |
---|---|
serviceName string | The name (short) of the service, note cross namespace is forbidden, so be sure the ApisixRoute and Service are in the same namespace. |
servicePort k8s.io/apimachinery/pkg/util/intstr.IntOrString | The service port, could be the name or the port number. |
resolveGranularity string | 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. |
weight int | Weight of this backend. |
subset string | 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_func string | 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 |
---|---|
subject ApisixRouteHTTPMatchExprSubject | Subject is the expression subject, it can be any string composed by literals and nginx vars. |
op string | 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”; |
value string | 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 |
---|---|
scope string | The subject scope, can be: ScopeQuery, ScopeHeader, ScopePath when subject is ScopePath, Name field will be ignored. |
name string | The name of subject. |
#
ApisixRoutePlugin(Appears on:ApisixGlobalRuleSpec, ApisixPluginConfigSpec, ApisixRouteHTTP, ApisixRouteStream)
ApisixRoutePlugin represents an APISIX plugin.
Field | Description |
---|---|
name string | The plugin name. |
enable bool | Whether this plugin is in use, default is true. |
config ApisixRoutePluginConfig | Plugin configuration. |
secretRef string | Plugin configuration secretRef. |
map[string]interface
alias)#
ApisixRoutePluginConfig ((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 |
---|---|
name string | The rule name, cannot be empty. |
protocol string | |
match ApisixRouteStreamMatch | |
backend ApisixRouteStreamBackend | |
plugins []ApisixRoutePlugin |
#
ApisixRouteStreamBackend(Appears on:ApisixRouteStream)
ApisixRouteStreamBackend represents a TCP backend (a Kubernetes Service).
Field | Description |
---|---|
serviceName string | The name (short) of the service, note cross namespace is forbidden, so be sure the ApisixRoute and Service are in the same namespace. |
servicePort k8s.io/apimachinery/pkg/util/intstr.IntOrString | The service port, could be the name or the port number. |
resolveGranularity string | 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. |
subset string | 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 |
---|---|
ingressPort int32 | IngressPort represents the port listening on the Ingress proxy server. It should be pre-defined as APISIX doesn’t support dynamic listening. |
host string |
#
ApisixRouteUpstreamReference(Appears on:ApisixRouteHTTP)
ApisixRouteUpstreamReference contains a ApisixUpstream CRD reference
Field | Description |
---|---|
name string | |
weight int | (Optional) |
#
ApisixSecret(Appears on:ApisixMutualTlsClientConfig, ApisixTlsSpec, ApisixUpstreamConfig)
ApisixSecret describes the Kubernetes Secret name and namespace.
Field | Description |
---|---|
name string | |
namespace string |
#
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 |
#
ApisixTlsApisixTls defines SSL resource in APISIX.
Field | Description |
---|---|
metadata Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of themetadata field. |
spec ApisixTlsSpec | |
status ApisixStatus | (Optional) |
#
ApisixTlsSpec(Appears on:ApisixTls)
ApisixTlsSpec is the specification of ApisixSSL.
Field | Description |
---|---|
hosts []HostType | |
secret ApisixSecret | |
client ApisixMutualTlsClientConfig | (Optional) |
#
ApisixUpstreamApisixUpstream 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 |
---|---|
metadata Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of themetadata field. |
spec ApisixUpstreamSpec | |
status ApisixStatus |
#
ApisixUpstreamConfig(Appears on:ApisixUpstreamSpec, PortLevelSettings)
ApisixUpstreamConfig contains rich features on APISIX Upstream, for instance load balancer, health check, etc.
Field | Description |
---|---|
loadbalancer LoadBalancer | (Optional) LoadBalancer represents the load balancer configuration for Kubernetes Service. The default strategy is round robin. |
scheme string | (Optional) The scheme used to talk with the upstream. Now value can be http, grpc. |
retries int | (Optional) How many times that the proxy (Apache APISIX) should do when errors occur (error, timeout or bad http status codes like 500, 502). |
timeout UpstreamTimeout | (Optional) Timeout settings for the read, send and connect to the upstream. |
healthCheck HealthCheck | (Optional) The health check configurations for the upstream. |
tlsSecret ApisixSecret | (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. |
discovery Discovery | (Optional) Discovery is used to configure service discovery for upstream. |
#
ApisixUpstreamExternalNode(Appears on:ApisixUpstreamSpec)
ApisixUpstreamExternalNode is the external node conf
Field | Description |
---|---|
name string | |
type ApisixUpstreamExternalType | |
weight int | (Optional) |
port int | (Optional) Port defines the port of the external node |
string
alias)#
ApisixUpstreamExternalType ((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 |
ApisixUpstreamConfig ApisixUpstreamConfig | (Members of |
portLevelSettings []PortLevelSettings |
#
ApisixUpstreamSubset(Appears on:ApisixUpstreamConfig)
ApisixUpstreamSubset defines a single endpoints group of one Service.
Field | Description |
---|---|
name string | Name is the name of subset. |
labels map[string]string | Labels is the label set of this subset. |
map[string]interface
alias)#
Config ((Appears on:Plugin)
[]interface
alias)#
ConfigSet ((Appears on:Plugin)
#
Discovery(Appears on:ApisixUpstreamConfig)
Discovery defines Service discovery related configuration.
Field | Description |
---|---|
serviceName string | |
type string | |
args map[string]string |
#
HealthCheck(Appears on:ApisixUpstreamConfig)
HealthCheck describes the upstream health check parameters.
Field | Description |
---|---|
active ActiveHealthCheck | |
passive PassiveHealthCheck |
string
alias)#
HostType ((Appears on:ApisixTlsSpec)
#
LoadBalancer(Appears on:ApisixUpstreamConfig)
LoadBalancer describes the load balancing parameters.
Field | Description |
---|---|
type string | |
hashOn string | The HashOn and Key fields are required when Type is “chash”. HashOn represents the key fetching scope. |
key string | 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 |
---|---|
type string | |
healthy PassiveHealthCheckHealthy | |
unhealthy PassiveHealthCheckUnhealthy |
#
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 | |
successes int |
#
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 | |
httpFailures int | |
tcpFailures int | |
timeout int |
#
PluginField | Description |
---|---|
name string | |
enable bool | |
config Config | |
config_set ConfigSet |
#
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 |
---|---|
ApisixUpstreamConfig ApisixUpstreamConfig | (Members of |
port int32 | 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 |
---|---|
connect Kubernetes meta/v1.Duration | |
send Kubernetes meta/v1.Duration | |
read Kubernetes meta/v1.Duration |
Generated with gen-crd-api-reference-docs
on git commit fa57ff5
.