mirror of https://github.com/status-im/consul.git
api gw 1.16 updates (#18081)
* api gw 1.16 updates * Apply suggestions from code review Co-authored-by: Jeff Boruszak <104028618+boruszak@users.noreply.github.com> * update CodeBlockConfig filename * Apply suggestions from code review Co-authored-by: trujillo-adam <47586768+trujillo-adam@users.noreply.github.com> Co-authored-by: Jeff Boruszak <104028618+boruszak@users.noreply.github.com> * remove non-standard intentions page * Update website/content/docs/api-gateway/configuration/index.mdx Co-authored-by: trujillo-adam <47586768+trujillo-adam@users.noreply.github.com> --------- Co-authored-by: Jeff Boruszak <104028618+boruszak@users.noreply.github.com> Co-authored-by: trujillo-adam <47586768+trujillo-adam@users.noreply.github.com>
This commit is contained in:
parent
2f20c77e4d
commit
d1f5d9b905
|
@ -26,7 +26,6 @@ Specify the following parameters to declare a `Gateway`:
|
||||||
| `fields` | Specifies the configurations for the Gateway. The fields are listed in the [configuration model](#configuration-model). Details for each field are described in the [specification](#specification). | Required |
|
| `fields` | Specifies the configurations for the Gateway. The fields are listed in the [configuration model](#configuration-model). Details for each field are described in the [specification](#specification). | Required |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Configuration model
|
## Configuration model
|
||||||
|
|
||||||
The following outline shows how to format the configurations in the `Gateway` object. Click on a property name to view details about the configuration.
|
The following outline shows how to format the configurations in the `Gateway` object. Click on a property name to view details about the configuration.
|
||||||
|
@ -196,7 +195,7 @@ The following example creates a `Gateway` named `example-gateway` in namespace `
|
||||||
name: example-gateway
|
name: example-gateway
|
||||||
namespace: gateway-namespace
|
namespace: gateway-namespace
|
||||||
spec:
|
spec:
|
||||||
gatewayClassName: consul-api-gateway
|
gatewayClassName: consul
|
||||||
listeners:
|
listeners:
|
||||||
- protocol: HTTPS
|
- protocol: HTTPS
|
||||||
port: 443
|
port: 443
|
||||||
|
|
|
@ -13,8 +13,9 @@ This topic provides an overview of the configuration items that enable Consul AP
|
||||||
- [GatewayClass](/consul/docs/api-gateway/configuration/gatewayclass) defines a class of gateway resources that you can use as a template for creating gateways.
|
- [GatewayClass](/consul/docs/api-gateway/configuration/gatewayclass) defines a class of gateway resources that you can use as a template for creating gateways.
|
||||||
- [GatewayClassConfig](/consul/docs/api-gateway/configuration/gatewayclassconfig) describes additional Consul API Gateway-related configuration parameters for the GatewayClass resource.
|
- [GatewayClassConfig](/consul/docs/api-gateway/configuration/gatewayclassconfig) describes additional Consul API Gateway-related configuration parameters for the GatewayClass resource.
|
||||||
- [Routes](/consul/docs/api-gateway/configuration/routes) specifies the path from the gateway to the backend service(s) client to the listener.
|
- [Routes](/consul/docs/api-gateway/configuration/routes) specifies the path from the gateway to the backend service(s) client to the listener.
|
||||||
|
- [Intentions](/consul/docs/connect/config-entries/service-intentions) specify traffic communication rules between services in the mesh. Intentions also enforce rules for service-to-service traffic routed through a Consul API gateway.
|
||||||
|
|
||||||
You can create a basic Gateway object using the default [`gatewayClassName`](/consul/docs/api-gateway/configuration/gateway#gatewayclassname) (`consul-api-gateway`). If you want to create custom Gateways suitable for your environment, complete the following steps:
|
You can create a basic Gateway object using the default [`gatewayClassName`](/consul/docs/api-gateway/configuration/gateway#gatewayclassname) (`consul`). If you want to create custom Gateways suitable for your environment, complete the following steps:
|
||||||
|
|
||||||
1. Define a [GatewayClassConfig](/consul/docs/api-gateway/configuration/gatewayclassconfig) that contains your custom configurations.
|
1. Define a [GatewayClassConfig](/consul/docs/api-gateway/configuration/gatewayclassconfig) that contains your custom configurations.
|
||||||
1. Define a [GatewayClass](/consul/docs/api-gateway/configuration/gatewayclass) and configure the [`parametersRef.name`](/consul/docs/api-gateway/configuration/gatewayclass#parametersref-name) to reference the name of your [GatewayClassConfig](/consul/docs/api-gateway/configuration/gatewayclassconfig).
|
1. Define a [GatewayClass](/consul/docs/api-gateway/configuration/gatewayclass) and configure the [`parametersRef.name`](/consul/docs/api-gateway/configuration/gatewayclass#parametersref-name) to reference the name of your [GatewayClassConfig](/consul/docs/api-gateway/configuration/gatewayclassconfig).
|
||||||
|
|
|
@ -22,7 +22,7 @@ The following example creates a route named `example-route` associated with a li
|
||||||
<CodeBlockConfig filename="routes.yaml">
|
<CodeBlockConfig filename="routes.yaml">
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
apiVersion: gateway.networking.k8s.io/v1alpha2
|
apiVersion: gateway.networking.k8s.io/v1beta1
|
||||||
kind: HTTPRoute
|
kind: HTTPRoute
|
||||||
metadata:
|
metadata:
|
||||||
name: example-route
|
name: example-route
|
||||||
|
@ -132,7 +132,7 @@ The following example creates a route named `example-route` in namespace `gatewa
|
||||||
<CodeBlockConfig filename="route_with_referencegrant.yaml">
|
<CodeBlockConfig filename="route_with_referencegrant.yaml">
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
apiVersion: gateway.networking.k8s.io/v1alpha2
|
apiVersion: gateway.networking.k8s.io/v1beta1
|
||||||
kind: HTTPRoute
|
kind: HTTPRoute
|
||||||
metadata:
|
metadata:
|
||||||
name: example-route
|
name: example-route
|
||||||
|
|
|
@ -18,6 +18,8 @@ The Consul API gateway ships with Consul and is automatically installed when you
|
||||||
name: consul
|
name: consul
|
||||||
connectInject:
|
connectInject:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
apiGateway:
|
||||||
|
manageExternalCRDs: true
|
||||||
```
|
```
|
||||||
|
|
||||||
</CodeBlockConfig>
|
</CodeBlockConfig>
|
||||||
|
|
|
@ -14,28 +14,23 @@ This topic describes how to use Consul API Gateway.
|
||||||
Complete the following steps to use Consul API Gateway in your network.
|
Complete the following steps to use Consul API Gateway in your network.
|
||||||
|
|
||||||
1. Verify that the [requirements](/consul/docs/api-gateway/tech-specs) have been met.
|
1. Verify that the [requirements](/consul/docs/api-gateway/tech-specs) have been met.
|
||||||
1. Verify that the Consul API Gateway CRDs and controller have been installed and applied. Refer to [Installation](/consul/docs/api-gateway/install) for details.
|
1. Verify that the Consul API Gateway CRDs were applied. Refer to [Installation](/consul/docs/api-gateway/install) for details.
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
Configure your [`Gateway`](/consul/docs/api-gateway/configuration/gateway) and [`Routes`](/consul/docs/api-gateway/configuration/routes) as described in [Consul API Gateway Configuration](/consul/docs/api-gateway/configuration).
|
Configure the following resources for your environment as described in [Consul API Gateway Configuration](/consul/docs/api-gateway/configuration).
|
||||||
|
|
||||||
<CodeBlockConfig hideClipboard filename="values.yaml">
|
1. [`Gateway`](/consul/docs/api-gateway/configuration/gateway)
|
||||||
|
1. [`Routes`](/consul/docs/api-gateway/configuration/routes)
|
||||||
|
1. [`Intentions`](/consul/docs/connect/config-entries/service-intentions)
|
||||||
|
|
||||||
```yaml
|
|
||||||
apiGateway:
|
|
||||||
enabled: true
|
|
||||||
managedGatewayClass:
|
|
||||||
```
|
|
||||||
|
|
||||||
</CodeBlockConfig>
|
|
||||||
|
|
||||||
## Apply configurations
|
## Apply configurations
|
||||||
|
|
||||||
Issue the `kubectl apply` command to implement the configurations:
|
Issue the `kubectl apply` command to implement the configurations:
|
||||||
|
|
||||||
```shell-session
|
```shell-session
|
||||||
$ kubectl apply -f gateway.yaml routes.yaml
|
$ kubectl apply -f gateway.yaml routes.yaml intentions.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue