From b69c3fb410770b59d5ef0f36febe6bfe517981f4 Mon Sep 17 00:00:00 2001 From: Sarah Alsmiller Date: Tue, 26 Jul 2022 10:10:17 -0500 Subject: [PATCH] restructure allowed values to be consistent --- .../api-gateway/configuration/gateway.mdx | 3 +-- .../configuration/gatewayclass.mdx | 14 ++++++++---- .../configuration/gatewayclassconfig.mdx | 22 +++++++++++++++++-- .../docs/api-gateway/configuration/index.mdx | 6 +++++ 4 files changed, 37 insertions(+), 8 deletions(-) diff --git a/website/content/docs/api-gateway/configuration/gateway.mdx b/website/content/docs/api-gateway/configuration/gateway.mdx index b340d3c329..d30123e09c 100644 --- a/website/content/docs/api-gateway/configuration/gateway.mdx +++ b/website/content/docs/api-gateway/configuration/gateway.mdx @@ -56,13 +56,12 @@ Specify the following parameters to declare a Gateway: This topic provides details about the configuration parameters. ### gatewayClassName -Specifies the name of the [`GatewayClass`](/docs/api-gateway/configuration/gatewayclass) resource used for the `Gateway` instance. +Specifies the name of the [`GatewayClass`](/docs/api-gateway/configuration/gatewayclass) resource used for the `Gateway` instance. Unless a custom [GatewayClass](/docs/api-gateway/configuration/gatewayclass) is being used, value should be set to `consul-api-gateway` * Type: string * Required: required ### listeners Specifies the `listeners` associated with the `Gateway`. At least one `listener` must be specified. Each `listener` within a `Gateway` must have a unique combination of `hostname`, `port`, and `protocol`. - * Type: array of objects * Required: required diff --git a/website/content/docs/api-gateway/configuration/gatewayclass.mdx b/website/content/docs/api-gateway/configuration/gatewayclass.mdx index 2a5104f518..8f25467598 100644 --- a/website/content/docs/api-gateway/configuration/gatewayclass.mdx +++ b/website/content/docs/api-gateway/configuration/gatewayclass.mdx @@ -43,17 +43,23 @@ An object that defines additional configuration required by the gateway controll * Required: required ### parametersRef.group -When using Consul API Gateway, this value should be equal to `api-gateway.consul.hashicorp.com` +The Kubernetes group of the `parametersRef`. This value will always be the same across all deployments of Consul API Gateway. * Type: Group * Required: required +You must specify the following value: +* `api-gateway.consul.hashicorp.com` + ### parametersRef.kind -When using Consul API Gateway, this value should be equal to `GatewayClassConfig` -* Type: object +The Kubernetes kind of the `parametersRef`. This value will always be the same across all deployments of Consul API Gateway. +* Type: Kind * Required: required +You must specify the following value: +* `GatewayClassConfig` + ### parametersRef.name -The name of the `GatewayClass` +The name of the `GatewayClassConfig` object * Type: object * Required: required diff --git a/website/content/docs/api-gateway/configuration/gatewayclassconfig.mdx b/website/content/docs/api-gateway/configuration/gatewayclassconfig.mdx index 8a321be388..0eef0d15a6 100644 --- a/website/content/docs/api-gateway/configuration/gatewayclassconfig.mdx +++ b/website/content/docs/api-gateway/configuration/gatewayclassconfig.mdx @@ -93,6 +93,10 @@ Specifies the scheme to use for connecting to Consul. The supported values are ` * Required: optional * Default: `http` +You can specify the following strings: +* `http` +* `https` + ### copyAnnotations.service List of kubernetes (annotations)[https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/] to copy to the gateway service. * Type: Array of Strings @@ -133,20 +137,34 @@ Most deployments will use the default value unless a specific version of Envoy i * Default: `"envoyproxy/envoy:RELEASE_VERSION"` ### logLevel -Specifies the error reporting level for logs. You can specify the following values: `error`, `warning`, `info`, `debug`, `trace`. +Specifies the error reporting level for logs. * Type: string * Required: optional * Default: `info` +You can specify the following strings: +* `error` +* `warning` +* `info` +* `debug` +* `trace` + ### 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.* Type: string * Required: optional ### serviceType -Specifies the ingress methods for a service. The following values are supported:
`ClusterIP`
`NodePort`
`LoadBalancer`. +Specifies the ingress methods for a service. * Type: string * Required: optional +You can specify the following strings: +* `ClusterIP`: Gateway will only be accessible from inside the cluster +* `NodePort`: Gateway will be exposed on each Kubernetes node at a static port +* `LoadBalancer`: Gateway will be exposed to external traffic by a load balancer + +For more on Kubernetes services, see [Publishing Services](https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) + ### useHostPorts If set to `true`, then the Envoy container ports are mapped to host ports. * Type: boolean diff --git a/website/content/docs/api-gateway/configuration/index.mdx b/website/content/docs/api-gateway/configuration/index.mdx index 8952a0dc4a..32343b079d 100644 --- a/website/content/docs/api-gateway/configuration/index.mdx +++ b/website/content/docs/api-gateway/configuration/index.mdx @@ -14,4 +14,10 @@ This topic provides an overview of the configuration items that enable Consul AP - [GatewayClass](/docs/api-gateway/configuration/gatewayclass): Defines a class of gateway resources that you can use as a template for creating gateways. - [Routes](/docs/api-gateway/configuration/routes): Specifies the path from the gateway to the backend service(s)client to the listener. +A basic Gateway object can simply use the default [`gatewayClassName`](/docs/api-gateway/configuration/gateway###gatewayClassName) `consul-api-gateway`. For additional configruation options follow the following steps. + +1. Define a [GatewayClassConfig](/docs/api-gateway/configuration/gatewayclassconfig) containing your desired configurations. +1. Define a [GatewayClass](/docs/api-gateway/configuration/gatewayclass) with [`parametersRef.name`](/docs/api-gateway/configuration/gatewayclass###parametersRef.name) set to the name of the newly defined [GatewayClassConfig](/docs/api-gateway/configuration/gatewayclassconfig) +1. Define a [Gateway](/docs/api-gateway/configuration/gateway) with [`gatewayClassName`](/docs/api-gateway/configuration/gateway###gatewayClassName) set to the name of the newly defined [GatewayClass](/docs/api-gateway/configuration/gatewayclass) +