CRDs

GatewayBackend

A GatewayBackend represents a generic HTTP backend, typically corresponding to an off-cluster resource.

  • Kind and version: gateway.linkerd.io/v1alpha1
  • Short name: gwbe

Example #

apiVersion: gateway.linkerd.io/v1alpha1
kind: GatewayBackend
metadata:
  name: databricks
  namespace: default
spec:
  baseURL: https://my-workspace.cloud.databricks.com/
  auth:
    type: ApiKey
    apiKey:
      secretRef:
        name: databricks-key
        key: api-key
      header: Authorization
      prefix: "Bearer "

Specification #

FieldTypeRequiredDefault
baseURLstring, ^https?://yes—
auth.typeNone | ApiKey | OAuth2yes, if auth set—

baseURL #

Base URL, without path prefix.

Authentication #

ApiKey #

FieldRequiredDefault
apiKey.secretRef.nameyes—
apiKey.secretRef.keyyes—
apiKey.secretRef.namespacenothis namespace; requires a ReferenceGrant
apiKey.headernoAuthorization
apiKey.prefixnoBearer (note the trailing space)

OAuth2 #

RFC 6749 §4.4 client-credentials grant.

FieldRequiredDefault
oauth2.tokenURLyes—
oauth2.clientIDyes—
oauth2.clientSecretRefyes—
oauth2.scopesno (≤32)—
oauth2.clientAuthMethodnoClientSecretBasic
oauth2.audienceno—
oauth2.extraParamsno—

tokenURL is stated explicitly and never derived from baseURL.

clientAuthMethod exists because RFC 6749 §2.3.1 says servers MUST accept Basic and MAY accept form-body credentials, and identity providers differ in practice.