Skip to content

Backend

Package v1alpha1 contains the API Schema definitions for WSO2 APK.

Backend

Backend is the Schema for the backends API

Field Description
apiVersion
string
dp.wso2.com/v1alpha1
kind
string
Backend
metadata
Kubernetes meta/v1.ObjectMeta
Refer to the Kubernetes API documentation for the fields of the metadata field.
spec
BackendSpec


services
[]Service

Services holds hosts and ports

protocol
BackendProtocolType
(Optional)

Protocol defines the backend protocol

basePath
string
(Optional)

BasePath defines the base path of the backend

tls
TLSConfig

TLS defines the TLS configurations of the backend

security
SecurityConfig

Security defines the security configurations of the backend

circuitBreaker
CircuitBreaker

CircuitBreaker defines the circuit breaker configurations

timeout
Timeout

Timeout configuration for the backend

retry
RetryConfig

Retry configuration for the backend

healthCheck
HealthCheck

HealthCheck configuration for the backend tcp health check

status
BackendStatus

BackendProtocolType (string alias)

(Appears on: BackendSpec)

BackendProtocolType defines the backend protocol type.

Value Description

"http"

HTTPProtocol is the http protocol

"https"

HTTPSProtocol is the https protocol

"ws"

WSProtocol is the ws protocol

"wss"

WSSProtocol is the wss protocol

BackendSpec

(Appears on: Backend)

BackendSpec defines the desired state of Backend

Field Description
services
[]Service

Services holds hosts and ports

protocol
BackendProtocolType
(Optional)

Protocol defines the backend protocol

basePath
string
(Optional)

BasePath defines the base path of the backend

tls
TLSConfig

TLS defines the TLS configurations of the backend

security
SecurityConfig

Security defines the security configurations of the backend

circuitBreaker
CircuitBreaker

CircuitBreaker defines the circuit breaker configurations

timeout
Timeout

Timeout configuration for the backend

retry
RetryConfig

Retry configuration for the backend

healthCheck
HealthCheck

HealthCheck configuration for the backend tcp health check

BackendStatus

(Appears on: Backend)

BackendStatus defines the observed state of Backend

BasicSecurityConfig

(Appears on: SecurityConfig)

BasicSecurityConfig defines basic security configurations

Field Description
secretRef
SecretRef

SecretRef to credentials

CircuitBreaker

(Appears on: BackendSpec)

CircuitBreaker defines the circuit breaker configurations

Field Description
maxConnections
uint32
(Optional)

MaxConnections is the maximum number of connections that will make to the upstream cluster.

maxPendingRequests
uint32
(Optional)

MaxPendingRequests is the maximum number of pending requests that will allow to the upstream cluster.

maxRequests
uint32
(Optional)

MaxRequests is the maximum number of parallel requests that will make to the upstream cluster.

maxRetries
uint32
(Optional)

MaxRetries is the maximum number of parallel retries that will allow to the upstream cluster.

maxConnectionPools
uint32
(Optional)

MaxConnectionPools is the maximum number of parallel connection pools that will allow to the upstream cluster. If not specified, the default is unlimited.

HealthCheck

(Appears on: BackendSpec)

HealthCheck defines the health check configurations

Field Description
timeout
uint32
(Optional)

Timeout is the time to wait for a health check response. If the timeout is reached the health check attempt will be considered a failure.

interval
uint32
(Optional)

Interval is the time between health check attempts in seconds.

unhealthyThreshold
uint32
(Optional)

UnhealthyThreshold is the number of consecutive health check failures required before a backend is marked unhealthy.

healthyThreshold
uint32
(Optional)

HealthyThreshold is the number of healthy health checks required before a host is marked healthy. Note that during startup, only a single successful health check is required to mark a host healthy.

RefConfig

(Appears on: TLSConfig)

RefConfig holds a config for a secret or a configmap

Field Description
name
string

Name of the secret or configmap

key
string

Key of the secret or configmap

RetryConfig

(Appears on: BackendSpec)

RetryConfig defines retry configurations

Field Description
count
uint32

Count defines the number of retries. If exceeded, TooEarly(425 response code) response will be sent to the client.

baseIntervalMillis
uint32
(Optional)

BaseIntervalMillis is exponential retry back off and it defines the base interval between retries in milliseconds. maximum interval is 10 times of the BaseIntervalMillis

statusCodes
[]uint32
(Optional)

StatusCodes defines the list of status codes to retry

SecretRef

(Appears on: BasicSecurityConfig)

SecretRef to credentials

Field Description
name
string

Name of the secret

usernameKey
string

Namespace of the secret

passwordKey
string

Key of the secret

SecurityConfig

(Appears on: BackendSpec)

SecurityConfig defines enpoint security configurations

Field Description
basic
BasicSecurityConfig

Basic security configuration

Service

(Appears on: BackendSpec)

Service holds host and port information for the service

Field Description
host
string

Host is the hostname of the service

port
uint32

Port of the service

TLSConfig

(Appears on: BackendSpec)

TLSConfig defines enpoint TLS configurations

Field Description
certificateInline
string

CertificateInline is the Inline Certificate entry

secretRef
RefConfig

SecretRef denotes the reference to the Secret that contains the Certificate

configMapRef
RefConfig

ConfigMapRef denotes the reference to the ConfigMap that contains the Certificate

allowedSANs
[]string
(Optional)

AllowedCNs is the list of allowed Subject Alternative Names (SANs)

Timeout

(Appears on: BackendSpec)

Timeout defines the timeout configurations

Field Description
upstreamResponseTimeout
uint32

UpstreamResponseTimeout spans between the point at which the entire downstream request (i.e. end-of-stream) has been processed and when the upstream response has been completely processed. A value of 0 will disable the route’s timeout.

downstreamRequestIdleTimeout
uint32
(Optional)

DownstreamRequestIdleTimeout bounds the amount of time the request’s stream may be idle. A value of 0 will completely disable the route’s idle timeout.


Generated with gen-crd-api-reference-docs.

Backend Sample

The following is a sample CR for creating a Backend.

apiVersion: dp.wso2.com/v1alpha1
kind: Backend
metadata:
  name: http-bin-backend
spec:
  services:
  - host: httpbin.org
    port: 80

Refer Manage Service Endpoint for more information on how to configure backend services.