Skip to content

Commit

Permalink
described downtime and DT-less upgrades
Browse files Browse the repository at this point in the history
  • Loading branch information
trujillo-adam committed Jun 12, 2023
1 parent a581b4e commit 45fb074
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 7 deletions.
2 changes: 1 addition & 1 deletion website/content/docs/api-gateway/configuration/gateway.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ The following outline shows how to format the configurations in the `Gateway` ob
This topic provides details about the configuration parameters.

### gatewayClassName
Specifies the name of the [`GatewayClass`](/consul/docs/api-gateway/configuration/gatewayclass) resource used for the `Gateway` instance. Unless you are using a custom [GatewayClass](/consul/docs/api-gateway/configuration/gatewayclass), this value should be set to `consul-api-gateway`.
Specifies the name of the [`GatewayClass`](/consul/docs/api-gateway/configuration/gatewayclass) resource used for the `Gateway` instance. Unless you are using a custom [GatewayClass](/consul/docs/api-gateway/configuration/gatewayclass), this value should be set to `consul`.
* Type: string
* Required: required

Expand Down
4 changes: 2 additions & 2 deletions website/content/docs/api-gateway/install.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The Consul API gateway ships with Consul and is automatically installed when you
```
</CodeBlockConfig>
The Consul Helm chart deploys the API gateway using the configuration specified in the `values.yaml` file. Refer to [Helm Chart Configuration - `apiGateway`](/consul/docs/k8s/helm#apigateway) for information about the Helm chart configuration options.
The Consul Helm chart deploys the API gateway using the configuration specified in the `values.yaml` file. Refer to [Helm Chart Configuration - `connectInject.apiGateway`](/consul/docs/k8s/helm#apigateway) for information about the Helm chart configuration options.
1. Install Consul API Gateway using the standard Consul Helm chart or Consul K8s CLI specify the custom values file. Refer to the [Consul Helm chart](https://github.com/hashicorp/consul-k8s/releases) in GitHub releases for the available versions.
Expand Down Expand Up @@ -55,7 +55,7 @@ $ helm repo add hashicorp https://helm.releases.hashicorp.com
Install Consul with API Gateway on your Kubernetes cluster by specifying the `values.yaml` file.
```shell-session
$ helm install consul hashicorp/consul --version 1.0.2 --values values.yaml --create-namespace --namespace consul
$ helm install consul hashicorp/consul --version 1.2.0 --values values.yaml --create-namespace --namespace consul
```
</Tab>
</Tabs>
Expand Down
2 changes: 1 addition & 1 deletion website/content/docs/api-gateway/tech-specs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Verify that your environment meets the following requirements prior to using Con

Your datacenter must meet the following requirements prior to configuring the Consul API gateway:

- HashiCorp Consul Helm chart v1.20.0 and later
- HashiCorp Consul Helm chart v1.2.0 and later

### TCP port requirements

Expand Down
43 changes: 40 additions & 3 deletions website/content/docs/api-gateway/upgrades.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: >-

# Upgrade Consul API gateway for Kubernetes

Since Consul v1.16, the Consul API gateway is a native feature within the Consul binary and is installed during the normal Consul installation process. Consul v1.16 also includes the CRDs necessary for using the Consul API gateway for Kubernetes. You can install Consul v1.16 using the Consul Helm chart v1.2 and later. Refer to [Install API gateway for Kubernetes](/consul/docs/api-gateway/install) for additional information.
Since Consul v1.15, the Consul API gateway is a native feature within the Consul binary and is installed during the normal Consul installation process. Since Consul v1.16, the CRDs necessary for using the Consul API gateway for Kubernetes are also included. You can install Consul v1.16 using the Consul Helm chart v1.2 and later. Refer to [Install API gateway for Kubernetes](/consul/docs/api-gateway/install) for additional information.

## Introduction

Expand Down Expand Up @@ -47,9 +47,13 @@ To begin using the native API gateway, complete one of the following upgrade pat

## Upgrade to native Consul API gateway

You must begin the upgrade procedure with Consul API gateway v1.1 installed. If you are currently using a version of Consul API gateway older than v1.1, complete the necessary stages of the upgrade path to v1.1 before you begin upgrading to v1.2. Refer to the [Introduction](#introduction) for an overview of the upgrade paths.
You must begin the upgrade procedure with Consul API gateway v1.1 installed. If you are currently using a version of Consul API gateway older than v1.1, complete the necessary stages of the upgrade path to v1.1 before you begin upgrading to the native API gateway. Refer to the [Introduction](#introduction) for an overview of the upgrade paths.

1. To prevent collisions between previously installed CRDs and the CRDs installed with Consul, delete the existing CRDs. Note that deleting the CRDs will result in downtime.
### Consul-managed CRDs

If you are able to tolerate downtime for your applications, you should delete previously installed CRDs and allow Consul to install and manage them for future updates. The amount of downtime depends on how quickly you are able to install the new version of Consul. If you are unable to tolerate any downtime, refer to [Self-managed CRDs](#self-managed-crds) for instructions on how to upgrade without downtime.

1. Run the `kubectl delete` command and reference the kustomize directory to delete the existing CRDs. The following example deletes the CRDs that were installed with API gateway v0.5.1:

```shell-session
$ kubectl delete --kustomize="github.com/hashicorp/consul-api-gateway/config/crd?ref=v0.5.1"
Expand Down Expand Up @@ -91,6 +95,39 @@ You must begin the upgrade procedure with Consul API gateway v1.1 installed. If

1. Change any existing `Gateways` to reference the new `GatewayClass` `consul`. Refer to [gatewayClass](/consul/docs/api-gateway/configuration/gateway#gatewayclassname) for additional information.

### Self-managed CRDs

If you are unable to tolerate any downtime, you can complete the following steps to upgrade to the native Consul API gateway. If you choose this upgrade option, you must continue to manually install the CRDs necessary for operating the API gateway.

1. Create a values file that installs the version of Consul API gateway that ships with Consul and disables externally-managed CRDs:

<CodeBlock heading="apigw-installation.yaml">

```yaml
global:
image: hashicorp/consul:1.16
imageK8S: hashicorp/consul-k8s-control-plane
connectInject:
apiGateway:
manageExternalCRDs: false
apiGateway:
enabled: true
image: hashicorp/consul-api-gateway:0.5.4
managedGatewayClass:
enabled: true
```

</CodeBlock>

1. Issue the following command to apply the configuration and complete the installation:

```shell-session
$ kubectl apply -f apigw-installation.yaml
```

1. Change any existing `Gateways` to reference the new `GatewayClass` `consul`. Refer to [gatewayClass](/consul/docs/api-gateway/configuration/gateway#gatewayclassname) for additional information.


## Upgrade to v0.4.0

Consul API Gateway v0.4.0 adds support for [Gateway API v0.5.0](https://github.com/kubernetes-sigs/gateway-api/releases/tag/v0.5.0) and the following resources:
Expand Down

0 comments on commit 45fb074

Please sign in to comment.