This commit is contained in:
Sarah Alsmiller 2022-07-14 11:07:27 -05:00
commit 1d88a1ea14
4 changed files with 30 additions and 32 deletions

View File

@ -53,7 +53,7 @@ Specify the following parameters to declare a Gateway:
## Specification ## Specification
This topic provides details about the configuration parameters This topic provides details about the configuration parameters.
### gatewayClassName ### gatewayClassName
Specifies the name of the `GatewayClass` resource used for the `Gateway` instance. Specifies the name of the `GatewayClass` resource used for the `Gateway` instance.
@ -82,18 +82,18 @@ This parameter has the following properties:
* Required: required * Required: required
You can specify one of the following strings: You can specify one of the following strings:
* All: Routes in all namespaces may be attached to the Gateway. * `All`: Routes in all namespaces may be attached to the `Gateway`.
* Same: Only routes in the same namespace as the Gateway may be attached. * `Same`: Only routes in the same namespace as the `Gateway` may be attached.
* Selector: Only routes in namespaces that match the selector configuration may be attached. * `Selector`: Only routes in namespaces that match the `selector` may be attached.
### listeners.allowedRoutes.namespaces.selector ### listeners.allowedRoutes.namespaces.selector
The `selector` configuration matches zero or more namespaces that determine which routes are allowed to attach to the listener. Specifies a method of matching namespaces from which routes are allowed to attach to the listener.
* Type: Object * Type: Object
* Required: Required when from is configured to selector. * Required: Required when `from` is configured to `Selector`.
The selector configuration contains one of the following objects: The selector configuration contains one of the following objects:
* matchExpressions * `matchExpressions`
* matchLabels * `matchLabels`
### listeners.allowedRoutes.namespaces.selector.matchExpressions ### listeners.allowedRoutes.namespaces.selector.matchExpressions
Specifies an array of requirements for matching namespaces. If a match is found, then routes from the matching namespace(s) are allowed to attach to the `Gateway`. The following table describes members of the `matchExpressions` array: Specifies an array of requirements for matching namespaces. If a match is found, then routes from the matching namespace(s) are allowed to attach to the `Gateway`. The following table describes members of the `matchExpressions` array:
@ -128,12 +128,12 @@ namespaceSelector:
For more on labels, see [Labels and Selectors](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) For more on labels, see [Labels and Selectors](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/)
### listeners.hostname ### listeners.hostname
Specifies the `listeners` hostname Specifies the `listener`'s hostname
* Type: string * Type: string
* Required: required * Required: required
### listeners.name ### listeners.name
Specifies the `listeners` name Specifies the `listener`'s name
* Type: string * Type: string
* Required: required * Required: required
@ -147,16 +147,16 @@ Specifies the protocol the `listener` will use
* Type: string * Type: string
* Required: required * Required: required
Allowed values `TCP`, `HTTP`, `HTTPS` Allowed values are `TCP`, `HTTP`, or `HTTPS`
### listeners.tls ### listeners.tls
* Type: Object * Type: Object
* Required: required if protocol is set to HTTPS * Required: required if `protocol` is set to `HTTPS`
### listeners.tls.certificateRefs ### listeners.tls.certificateRefs
`CertificateRefs` contains a series of references to Kubernetes objects that contains TLS certificates and private keys. These certificates are used to establish a TLS handshake for requests that match the hostname of the associated `listener`. Each reference must be a Kubernetes Secret, and, if using a Secret in a namespace other than the`Gateway`'s, must have a corresponding `ReferencePolicy` created. `CertificateRefs` contains a series of references to Kubernetes objects that contains TLS certificates and private keys. These certificates are used to establish a TLS handshake for requests that match the hostname of the associated `listener`. Each reference must be a Kubernetes Secret, and, if using a Secret in a namespace other than the`Gateway`'s, must have a corresponding `ReferencePolicy` created.
* Type: Object or Array * Type: Object or Array
* Required: required if tls is set * Required: required if `tls` is set
### listeners.tls.mode ### listeners.tls.mode
* Type: String * Type: String
@ -167,7 +167,7 @@ Allowed values `TCP`, `HTTP`, `HTTPS`
* Required: optional * Required: optional
## Complete configuration ## Complete configuration
The following example shows a fully configured Gateway. The following example shows a fully configured `Gateway`.
```yaml ```yaml
kind: Gateway kind: Gateway

View File

@ -22,14 +22,13 @@ The following example creates a gateway class called `test-gateway-class`:
apiVersion: gateway.networking.k8s.io/v1alpha2 apiVersion: gateway.networking.k8s.io/v1alpha2
kind: GatewayClass kind: GatewayClass
metadata: metadata:
name: test-gateway-class name: test-gateway-class
spec: spec:
controllerName: 'hashicorp.com/consul-api-gateway-controller' controllerName: 'hashicorp.com/consul-api-gateway-controller'
parametersRef: parametersRef:
group: api-gateway.consul.hashicorp.com group: api-gateway.consul.hashicorp.com
kind: GatewayClassConfig kind: GatewayClassConfig
name: test-gateway-class-config name: test-gateway-class-config
```
</CodeBlockConfig> </CodeBlockConfig>

View File

@ -18,16 +18,15 @@ The following example creates a gateway class configuration called `test-gateway
apiVersion: api-gateway.consul.hashicorp.com/v1alpha1 apiVersion: api-gateway.consul.hashicorp.com/v1alpha1
kind: GatewayClassConfig kind: GatewayClassConfig
metadata: metadata:
name: test-gateway-class-config name: test-gateway-class-config
spec: spec:
useHostPorts: true useHostPorts: true
logLevel: 'trace' logLevel: 'trace'
consul: consul:
scheme: 'https' scheme: 'https'
ports: ports:
http: 8501 http: 8501
grpc: 8502 grpc: 8502
```
</CodeBlockConfig> </CodeBlockConfig>

View File

@ -16,8 +16,8 @@ description: >-
```yaml ```yaml
apiGateway: apiGateway:
managedGatewayClass: enabled: true
enabled: true managedGatewayClass:
``` ```
</CodeBlockConfig> </CodeBlockConfig>