58 lines
9.5 KiB
Plaintext
58 lines
9.5 KiB
Plaintext
|
---
|
||
|
layout: docs
|
||
|
page_title: Consul API Gateway GatewayClassConfig
|
||
|
description: >-
|
||
|
Consul API Gateway GatewayClassConfig
|
||
|
---
|
||
|
|
||
|
# GatewayClassConfig
|
||
|
|
||
|
The `GatewayClassConfig` object describes Consul API Gateway-related configuration parameters for the [`GatewayClass`](#gatewayclass).
|
||
|
|
||
|
Add the `kind: GatewayClassConfig` option to the gateway values file to declare a gateway class.
|
||
|
The following example creates a gateway class configuration called `test-gateway-class-config`:
|
||
|
|
||
|
<CodeBlockConfig filename="gateway.yaml">
|
||
|
|
||
|
```yaml
|
||
|
apiVersion: api-gateway.consul.hashicorp.com/v1alpha1
|
||
|
kind: GatewayClassConfig
|
||
|
metadata:
|
||
|
name: test-gateway-class-config
|
||
|
spec:
|
||
|
useHostPorts: true
|
||
|
logLevel: 'trace'
|
||
|
consul:
|
||
|
scheme: 'https'
|
||
|
ports:
|
||
|
http: 8501
|
||
|
grpc: 8502
|
||
|
```
|
||
|
|
||
|
</CodeBlockConfig>
|
||
|
|
||
|
The following table describes the allowed parameters for the `spec` array:
|
||
|
|
||
|
| Parameter | Description | Type | Default |
|
||
|
| --- | --- | ---- | ------- |
|
||
|
| `consul.address` | Specifies the address of the Consul server to communicate with in the gateway pod. If unspecified, the pod will attempt to use a local agent on the host on which the pod is running. | String | N/A |
|
||
|
| `consul.authentication.account` | Specifies the Kubernetes service account to use for authentication. | String | N/A |
|
||
|
| `consul.authentication.managed` | Set to `true` to enable deployments to run with managed service accounts created by the gateway controller. The `consul.authentication.account` field is ignored when this option is enabled. | Boolean | `false` |
|
||
|
| `consul.authentication.method` | Specifies the Consul auth method used for initial authentication by Consul API Gateway. | String | N/A |
|
||
|
| `consul.authentication.namespace` | Specifies the Consul namespace to use for authentication. | String | N/A |
|
||
|
| `consul.ports.grpc` | Specifies the gRPC port for Consul's xDS server. | Integer | `8502` |
|
||
|
| `consul.ports.http` | Specifies the port for Consul's HTTP server. | Integer | `8500` |
|
||
|
| `consul.scheme` | Specifies the scheme to use for connecting to Consul. The supported values are `"http"` and `"https"`. | String | `"http"` |
|
||
|
| `copyAnnotations.service` | List of annotations to copy to the gateway service. | Array | `["external-dns.alpha.kubernetes.io/hostname"]` |
|
||
|
| `deployment.defaultInstances` | Specifies the number of instances to deploy by default for each gateway. | Integer | 1 |
|
||
|
| `deployment.maxInstances` | Specifies the maximum allowed number of instances per gateway. | Integer | 8 |
|
||
|
| `deployment.minInstances` | Specifies the minimum allowed number of instances per gateway. | Integer | 1 |
|
||
|
| `image.consulAPIGateway` | The image to use for consul-api-gateway. View available image tags on [DockerHub](https://hub.docker.com/r/hashicorp/consul-api-gateway/tags). | String | `"hashicorp/consul-api-gateway:RELEASE_VERSION"` |
|
||
|
| `image.envoy` | Specifies the container image to use for Envoy. View available image tags on [DockerHub](https://hub.docker.com/r/envoyproxy/envoy/tags). | String | `"envoyproxy/envoy:RELEASE_VERSION"` |
|
||
|
| `logLevel` | Specifies the error reporting level for logs. You can specify the following values: `error`, `warning`, `info`, `debug`, `trace`. | String | `"info"` |
|
||
|
| `nodeSelector` | Specifies a set of parameters that constrain the nodes on which the pod can run. Defining nodes with the `nodeSelector` enables the pod to fit on a node. The selector must match a node's labels for the pod to be scheduled on that node. Refer to the [Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/) for additional information. | Object | N/A |
|
||
|
| `serviceType` | Specifies the ingress methods for a service. The following values are supported: <br/>`ClusterIP` <br/>`NodePort` <br/>`LoadBalancer`. | String | N/A |
|
||
|
| `useHostPorts` | If set to `true`, then the Envoy container ports are mapped to host ports. | Boolean | `false` |
|
||
|
|
||
|
Refer to the [Consul API Gateway repository](https://github.com/hashicorp/consul-api-gateway/blob/main/config/crd/bases/api-gateway.consul.hashicorp.com_gatewayclassconfigs.yaml) for the complete specification.
|