From ac747888fd7008827afc1dbcbba9768eceafebd4 Mon Sep 17 00:00:00 2001 From: Mike Morris Date: Wed, 1 Jun 2022 13:56:22 -0400 Subject: [PATCH 1/8] docs(consul-api-gateway): add GatewayClassConfig deployment.defaultInstances --- website/content/docs/api-gateway/consul-api-gateway-install.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/website/content/docs/api-gateway/consul-api-gateway-install.mdx b/website/content/docs/api-gateway/consul-api-gateway-install.mdx index 087c0e70e..2f8b1ac33 100644 --- a/website/content/docs/api-gateway/consul-api-gateway-install.mdx +++ b/website/content/docs/api-gateway/consul-api-gateway-install.mdx @@ -168,6 +168,7 @@ The following table describes the allowed parameters for the `spec` array: | `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 gateway instances that should be deployed by default. | 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"` | From df1666765a466fde750f11561432e42414102ad1 Mon Sep 17 00:00:00 2001 From: Mike Morris Date: Wed, 1 Jun 2022 13:59:50 -0400 Subject: [PATCH 2/8] docs(consul-api-gateway): add GatewayClassConfig deployment.maxInstances and deployment.minInstances --- website/content/docs/api-gateway/consul-api-gateway-install.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/website/content/docs/api-gateway/consul-api-gateway-install.mdx b/website/content/docs/api-gateway/consul-api-gateway-install.mdx index 2f8b1ac33..405c917ee 100644 --- a/website/content/docs/api-gateway/consul-api-gateway-install.mdx +++ b/website/content/docs/api-gateway/consul-api-gateway-install.mdx @@ -169,6 +169,8 @@ The following table describes the allowed parameters for the `spec` array: | `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 gateway instances that should be deployed by default. | Integer | 1 | +| `deployment.maxInstances` | Specifies the maximum allowed number of gateway instances. | Integer | 8 | +| `deployment.minInstances` | Specifies the minimum allowed number of gateway instances. | 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"` | From 601c13eefec8ca37fefab4a1c33fe8abf31f4425 Mon Sep 17 00:00:00 2001 From: Mike Morris Date: Wed, 1 Jun 2022 14:06:18 -0400 Subject: [PATCH 3/8] docs(consul-api-gateway): gateway instances -> instances per gateway --- .../content/docs/api-gateway/consul-api-gateway-install.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/content/docs/api-gateway/consul-api-gateway-install.mdx b/website/content/docs/api-gateway/consul-api-gateway-install.mdx index 405c917ee..c231083ab 100644 --- a/website/content/docs/api-gateway/consul-api-gateway-install.mdx +++ b/website/content/docs/api-gateway/consul-api-gateway-install.mdx @@ -168,9 +168,9 @@ The following table describes the allowed parameters for the `spec` array: | `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 gateway instances that should be deployed by default. | Integer | 1 | -| `deployment.maxInstances` | Specifies the maximum allowed number of gateway instances. | Integer | 8 | -| `deployment.minInstances` | Specifies the minimum allowed number of gateway instances. | Integer | 1 | +| `deployment.defaultInstances` | Specifies the number of instances per gateway that should be deployed by default. | 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"` | From 2601a7d5633eaf8033bd74e1bef872f5f1cb1535 Mon Sep 17 00:00:00 2001 From: Mike Morris Date: Wed, 1 Jun 2022 14:42:08 -0400 Subject: [PATCH 4/8] docs(consul-api-gateway): add Gateway scaling section --- .../consul-api-gateway-install.mdx | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/website/content/docs/api-gateway/consul-api-gateway-install.mdx b/website/content/docs/api-gateway/consul-api-gateway-install.mdx index c231083ab..3e2e6be97 100644 --- a/website/content/docs/api-gateway/consul-api-gateway-install.mdx +++ b/website/content/docs/api-gateway/consul-api-gateway-install.mdx @@ -266,6 +266,25 @@ Add the `listener` object to the `gateway` configuration and specify the followi Refer to the [Kubernetes Gateway API documentation](https://gateway-api.sigs.k8s.io/v1alpha2/references/spec/#gateway.networking.k8s.io/v1alpha2.Listener) for details about configuring listeners. +#### Scaling + +A logical gateway object can be scaled to multiple instances within the bounds set in its associated GatewayClassConfig by using the [`kubectl scale`](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#scaling-a-deployment) command. + +``` +> kubectl get deployment --selector api-gateway.consul.hashicorp.com/name=example-gateway +NAME READY UP-TO-DATE AVAILABLE +example-gateway 1/1 1 1 +``` +``` +> kubectl scale deployment/example-gateway --replicas=3 +deployment.apps/api-gateway scaled +``` +``` +> k get deployment -n consul --selector api-gateway.consul.hashicorp.com/name=api-gateway +NAME READY UP-TO-DATE AVAILABLE +api-gateway 3/3 3 3 +``` + ### Route Routes are independent configuration objects that are associated with specific listeners. From 75166b6fbd88502ffb7bcf1b3c4f121b7b529b30 Mon Sep 17 00:00:00 2001 From: Mike Morris Date: Wed, 1 Jun 2022 15:00:06 -0400 Subject: [PATCH 5/8] docs(consul-api-gateway): fixup CLI prompt to match convention --- .../content/docs/api-gateway/consul-api-gateway-install.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/content/docs/api-gateway/consul-api-gateway-install.mdx b/website/content/docs/api-gateway/consul-api-gateway-install.mdx index 3e2e6be97..99b1ea676 100644 --- a/website/content/docs/api-gateway/consul-api-gateway-install.mdx +++ b/website/content/docs/api-gateway/consul-api-gateway-install.mdx @@ -271,16 +271,16 @@ Refer to the [Kubernetes Gateway API documentation](https://gateway-api.sigs.k8s A logical gateway object can be scaled to multiple instances within the bounds set in its associated GatewayClassConfig by using the [`kubectl scale`](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#scaling-a-deployment) command. ``` -> kubectl get deployment --selector api-gateway.consul.hashicorp.com/name=example-gateway +$ kubectl get deployment --selector api-gateway.consul.hashicorp.com/name=example-gateway NAME READY UP-TO-DATE AVAILABLE example-gateway 1/1 1 1 ``` ``` -> kubectl scale deployment/example-gateway --replicas=3 +$ kubectl scale deployment/example-gateway --replicas=3 deployment.apps/api-gateway scaled ``` ``` -> k get deployment -n consul --selector api-gateway.consul.hashicorp.com/name=api-gateway +$ k get deployment -n consul --selector api-gateway.consul.hashicorp.com/name=api-gateway NAME READY UP-TO-DATE AVAILABLE api-gateway 3/3 3 3 ``` From 39a450bb75f2fbdc5f083c658afa234872db44bf Mon Sep 17 00:00:00 2001 From: Mike Morris Date: Wed, 1 Jun 2022 15:01:17 -0400 Subject: [PATCH 6/8] docs(consul-api-gateway): fixup code snippets in gateway scaling section --- .../docs/api-gateway/consul-api-gateway-install.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/website/content/docs/api-gateway/consul-api-gateway-install.mdx b/website/content/docs/api-gateway/consul-api-gateway-install.mdx index 99b1ea676..6aed5da1d 100644 --- a/website/content/docs/api-gateway/consul-api-gateway-install.mdx +++ b/website/content/docs/api-gateway/consul-api-gateway-install.mdx @@ -277,12 +277,12 @@ example-gateway 1/1 1 1 ``` ``` $ kubectl scale deployment/example-gateway --replicas=3 -deployment.apps/api-gateway scaled +deployment.apps/example-gateway scaled ``` ``` -$ k get deployment -n consul --selector api-gateway.consul.hashicorp.com/name=api-gateway -NAME READY UP-TO-DATE AVAILABLE -api-gateway 3/3 3 3 +$ kubectl get deployment --selector api-gateway.consul.hashicorp.com/name=example-gateway +NAME READY UP-TO-DATE AVAILABLE +example-gateway 3/3 3 3 ``` ### Route From 00cdae18d513ec16b1f1cd0d47d7884faf5aa5d6 Mon Sep 17 00:00:00 2001 From: Mike Morris Date: Tue, 7 Jun 2022 16:17:45 -0400 Subject: [PATCH 7/8] Update website/content/docs/api-gateway/consul-api-gateway-install.mdx Co-authored-by: Jeff Boruszak <104028618+boruszak@users.noreply.github.com> --- website/content/docs/api-gateway/consul-api-gateway-install.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/content/docs/api-gateway/consul-api-gateway-install.mdx b/website/content/docs/api-gateway/consul-api-gateway-install.mdx index 6aed5da1d..00938dff2 100644 --- a/website/content/docs/api-gateway/consul-api-gateway-install.mdx +++ b/website/content/docs/api-gateway/consul-api-gateway-install.mdx @@ -268,7 +268,7 @@ Refer to the [Kubernetes Gateway API documentation](https://gateway-api.sigs.k8s #### Scaling -A logical gateway object can be scaled to multiple instances within the bounds set in its associated GatewayClassConfig by using the [`kubectl scale`](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#scaling-a-deployment) command. +You can scale a logical gateway object to multiple instances with the [`kubectl scale`](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#scaling-a-deployment) command. The object scales according to the bounds set in GatewayClassConfig. ``` $ kubectl get deployment --selector api-gateway.consul.hashicorp.com/name=example-gateway From 24ca62ef1c0bdc7795904aefb98e7772b7a559d9 Mon Sep 17 00:00:00 2001 From: Mike Morris Date: Tue, 7 Jun 2022 16:24:35 -0400 Subject: [PATCH 8/8] Update website/content/docs/api-gateway/consul-api-gateway-install.mdx Co-authored-by: Jeff Boruszak <104028618+boruszak@users.noreply.github.com> --- website/content/docs/api-gateway/consul-api-gateway-install.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/content/docs/api-gateway/consul-api-gateway-install.mdx b/website/content/docs/api-gateway/consul-api-gateway-install.mdx index 00938dff2..74fd062b0 100644 --- a/website/content/docs/api-gateway/consul-api-gateway-install.mdx +++ b/website/content/docs/api-gateway/consul-api-gateway-install.mdx @@ -168,7 +168,7 @@ The following table describes the allowed parameters for the `spec` array: | `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 per gateway that should be deployed by default. | Integer | 1 | +| `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"` |