KubernetesGatewayResource
Handle
interface KubernetesGatewayResource extends IResource, IResourceWithParent, KubernetesEnvironmentResource]] { withGatewayAnnotation( key: string, value: string): KubernetesGatewayResource; withGatewayAnnotationParam( key: string, value: ParameterResource): KubernetesGatewayResource; withGatewayClass(className: string): KubernetesGatewayResource; withGatewayClassParam(className: ParameterResource): KubernetesGatewayResource; withGatewayHostnameParam(hostname: ParameterResource): KubernetesGatewayResource; withGatewayHostRoute( host: string, path: string, endpoint: EndpointReference, pathType?: GatewayPathMatchType): KubernetesGatewayResource; withGatewayPathRoute( path: string, endpoint: EndpointReference, pathType?: GatewayPathMatchType): KubernetesGatewayResource; withGatewayTlsAuto(): KubernetesGatewayResource; withGatewayTlsIssuer(issuer: CertManagerIssuerResource): KubernetesGatewayResource; withGatewayTlsParam(secretName: ParameterResource): KubernetesGatewayResource; withHostname(hostname: string): KubernetesGatewayResource; withTls(secretName: string): KubernetesGatewayResource;} 12 members
Methods
Adds a Kubernetes metadata annotation to the generated Gateway resource.
withGatewayAnnotation( key: string, value: string): KubernetesGatewayResourceParameters
key string value string Returns
KubernetesGatewayResource Adds a Kubernetes metadata annotation with a parameter value that will be resolved at deploy time.
withGatewayAnnotationParam( key: string, value: ParameterResource): KubernetesGatewayResourceParameters
key string value ParameterResource Returns
KubernetesGatewayResource Sets the GatewayClass name that selects which controller implementation handles this gateway.
withGatewayClass(className: string): KubernetesGatewayResourceParameters
className string Returns
KubernetesGatewayResource Sets the GatewayClass name using a parameter that will be resolved at deploy time.
withGatewayClassParam(className: ParameterResource): KubernetesGatewayResourceParameters
className ParameterResource Returns
KubernetesGatewayResource Adds a hostname using a parameter that will be resolved at deploy time.
withGatewayHostnameParam(hostname: ParameterResource): KubernetesGatewayResourceParameters
hostname ParameterResource Returns
KubernetesGatewayResource Adds a host-and-path-based routing rule to the gateway. The rule matches traffic for the specified host and path, routing it to the given endpoint's backing Kubernetes service. This generates an `HTTPRoute` resource with a `hostnames` filter.
withGatewayHostRoute( host: string, path: string, endpoint: EndpointReference, pathType?: GatewayPathMatchType): KubernetesGatewayResourceParameters
host string path string endpoint EndpointReference pathType GatewayPathMatchType optional = PathPrefix Returns
KubernetesGatewayResource Adds a path-based routing rule to the gateway. The rule matches all hosts and routes traffic matching the specified path to the given endpoint's backing Kubernetes service. This generates an `HTTPRoute` resource attached to the Gateway.
withGatewayPathRoute( path: string, endpoint: EndpointReference, pathType?: GatewayPathMatchType): KubernetesGatewayResourceParameters
path string endpoint EndpointReference pathType GatewayPathMatchType optional = PathPrefix Returns
KubernetesGatewayResource Configures TLS termination with an auto-generated secret name derived from the gateway name.
withGatewayTlsAuto(): KubernetesGatewayResourceReturns
KubernetesGatewayResource Adds an HTTPS listener to the gateway and wires it to the supplied cert-manager `ClusterIssuer`. This adds the `cert-manager.io/cluster-issuer` annotation to the generated Gateway resource, causing cert-manager to provision and renew a certificate for each gateway listener hostname.
withGatewayTlsIssuer(issuer: CertManagerIssuerResource): KubernetesGatewayResourceParameters
issuer CertManagerIssuerResource Returns
KubernetesGatewayResource Configures TLS termination using a parameter for the secret name.
withGatewayTlsParam(secretName: ParameterResource): KubernetesGatewayResourceParameters
secretName ParameterResource Returns
KubernetesGatewayResource Adds a hostname that this gateway's routes match. Multiple hostnames can be added by calling this method repeatedly. Hostnames are used as `hostnames` in generated `HTTPRoute` resources and as HTTPS listener hostnames when TLS is configured.
withHostname(hostname: string): KubernetesGatewayResourceParameters
hostname string Returns
KubernetesGatewayResource Configures TLS on a Kubernetes Gateway listener
withTls(secretName: string): KubernetesGatewayResourceParameters
secretName string Returns
KubernetesGatewayResource