-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Native API Gateway Docs #16365
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Native API Gateway Docs #16365
Changes from all commits
Commits
Show all changes
83 commits
Select commit
Hold shift + click to select a range
9db9b37
Create empty files
b5ad45f
Copy over content for overview
9dad7c2
Copy over content for usage
b7103a5
Copy over content for api-gateway config
c6f9c82
Copy over content for http-route config
f382d9a
Copy over content for tcp-route config
5d6fe67
Copy over content for inline-certificate config
d0c0794
Add docs to the sidebar
d146e87
Clean up overview. Start cleaning up usage
4f42ecd
Add BETA badge to API Gateways portion of nav
nathancoleman c7a5f11
Fix header
09f2183
Fix up usage
c85c52e
Fix up API Gateway config
db5c662
Update paths to be consistent w/ other gateway docs
nathancoleman 5a484ec
Fix up http-route
12aa5f7
Fix up inline-certificate
b506423
rename path
ee47464
Fix up tcp-route
5013c4f
Add CodeTabs
05bbf1a
Add headers to config pages
423c9c8
Fix configuration model for http route and inline certificate
a148716
Add version callout to API gateway overview page
nathancoleman 9327034
Fix values for inline certificate
11d5e1f
Fix values for api gateway configuration
8153958
Fix values for TCP Route config
7113e54
Fix values for HTTP Route config
f151ac5
Adds link from k8s gateway to vm gateway page
missylbytes 86054d6
Remove versioning warning
nathancoleman f7f9ed9
Serve overview page at ../api-gateway, consistent w/ mesh-gateway
nathancoleman 1038883
Remove weight field from tcp-route docs
nathancoleman b737955
Linking to usage instead of overview from k8s api-gateway to vm api-g…
missylbytes 81ab048
Fix issues in usage page
2e6acc2
Fix links in usage
7df0765
Capitalize Kubernetes
1eb52c3
Apply suggestions from code review
im2nguyen 1c962d0
remove optional callout
im2nguyen f1ba393
remove optional callout
im2nguyen a7359ac
Merge branch 'main' into native-api-gateway-docs
im2nguyen fbc7dc5
Apply suggestions from code review
ff30734
Apply suggestions from code review
ac9fdb4
Apply suggestions from code review
nathancoleman a4499b0
Update website/content/docs/connect/gateways/api-gateway/configuratio…
nathancoleman 7729071
Fix formatting of Hostnames
7b36804
Update website/content/docs/api-gateway/index.mdx
nathancoleman 94c0d63
Merge branch 'main' into native-api-gateway-docs
nathancoleman 004de22
Update website/content/docs/connect/gateways/api-gateway/configuratio…
missylbytes cd4d18e
Add cross-linking of config entries
16fabc9
Fix rendering error on new operator usage docs
nathancoleman 8429ace
Update website/content/docs/connect/gateways/api-gateway/configuratio…
02bed7b
Update website/content/docs/connect/gateways/api-gateway/configuratio…
48588a6
Apply suggestions from code review
nathancoleman 23b5fea
Apply suggestions from code review
nathancoleman 6b111e0
Add BETA badges to config entry links
4fc0a6c
http route updates
missylbytes e31d747
Add Enterprise keys
2876d0f
Use map instead of list for meta field, use consistent formatting
nathancoleman cd082e5
Convert spaces to tabs
nathancoleman 1562a4a
Add all Enterprise info to TCP Route
f0f0dbd
Use pascal case for JSON api-gateway example
nathancoleman 0488f20
Add enterprise to HCL api-gw cfg
d846b90
Use pascal case for missed JSON config fields
nathancoleman c2d2244
Add enterprise to JSON api-gw cfg
213b90f
Add enterprise to api-gw values
6a4d480
adds enterprise to http route
missylbytes bea3e9b
Update website/content/docs/connect/gateways/api-gateway/index.mdx
nathancoleman e65f5bd
Add enterprise to api-gw spec
d89286f
Add missing namespace, partition + meta to specification
nathancoleman 4073662
fixes for http route
missylbytes 1382987
Fix ordering of API Gatetway cfg spec items
87b3016
whitespace
missylbytes 76305ec
Add linking of values to tcp
851f5ae
Apply suggestions from code review
nathancoleman c6d452a
Fix comma in wrong place
d22e524
Apply suggestions from code review
nathancoleman 9f53a94
Move Certificates down
5346eba
Apply suggestions from code review
nathancoleman 4e5a69c
Tabs to spaces in httproute
0b609cb
Use configuration entry instead of config entry
nathancoleman b6bbc5c
Fix indentations on api-gateway and tcp-route
57fd24c
Add whitespace between code block and prose
nathancoleman 3e945c2
Apply suggestions from code review
nathancoleman 04d920e
adds <> to http route
missylbytes b2ad64f
Merge branch 'native-api-gateway-docs' of github.com:hashicorp/consul…
missylbytes File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
331 changes: 331 additions & 0 deletions
331
website/content/docs/connect/gateways/api-gateway/configuration/api-gateway.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,331 @@ | ||
| --- | ||
| layout: docs | ||
| page_title: API Gateway Configuration Entry Reference | ||
| description: Learn how to configure a Consul API Gateway on VMs. | ||
| --- | ||
|
|
||
| # API gateway configuration entry reference | ||
|
|
||
| This topic provides reference information for the API gateway configuration entry that you can deploy to networks in virtual machine (VM) environments. For reference information about configuring Consul API gateways on Kubernetes, refer to [Gateway Resource Configuration](/consul/docs/api-gateway/configuration/gateway). | ||
|
|
||
| ## Introduction | ||
|
|
||
| A gateway is a type of network infrastructure that determines how service traffic should be handled. Gateways contain one or more listeners that bind to a set of hosts and ports. An HTTP Route or TCP Route can then attach to a gateway listener to direct traffic from the gateway to a service. | ||
|
|
||
| ## Configuration model | ||
|
|
||
| The following list outlines field hierarchy, language-specific data types, and requirements in an `api-gateway` configuration entry. Click on a property name to view additional details, including default values. | ||
|
|
||
| - [`Kind`](#kind): string | must be `"api-gateway"` | ||
| - [`Name`](#name): string | no default | ||
| - [`Namespace`](#namespace): string | no default <EnterpriseAlert inline /> | ||
| - [`Partition`](#partition): string | no default <EnterpriseAlert inline /> | ||
| - [`Meta`](#meta): map | no default | ||
| - [`Listeners`](#listeners): list of objects | no default | ||
| - [`Name`](#listeners-name): string | no default | ||
| - [`Port`](#listeners-port): number | no default | ||
| - [`Hostname`](#listeners-hostname): string | `"*"` | ||
| - [`Protocol`](#listeners-protocol): string | `"tcp"` | ||
| - [`TLS`](#listeners-tls): map | none | ||
| - [`MinVersion`](#listeners-tls-minversion): string | no default | ||
| - [`MaxVersion`](#listeners-tls-maxversion): string | no default | ||
| - [`CipherSuites`](#listeners-tls-ciphersuites): list of strings | Envoy default cipher suites | ||
| - [`Certificates`](#listeners-tls-certificates): list of objects | no default | ||
| - [`Kind`](#listeners-tls-certificates-kind): string | must be `"inline-certificate"` | ||
| - [`Name`](#listeners-tls-certificates-name): string | no default | ||
| - [`Namespace`](#listeners-tls-certificates-namespace): string | no default <EnterpriseAlert inline /> | ||
| - [`Partition`](#listeners-tls-certificates-partition): string | no default <EnterpriseAlert inline /> | ||
|
|
||
| ## Complete configuration | ||
|
|
||
| When every field is defined, an `api-gateway` configuration entry has the following form: | ||
|
|
||
| <CodeTabs> | ||
|
|
||
| ```hcl | ||
| Kind = "api-gateway" | ||
| Name = "<name of api gateway>" | ||
| Namespace = "<enterprise: namespace of the gateway>" | ||
| Partition = "<enterprise: partition of the gateway>" | ||
|
|
||
| Meta = { | ||
| <any key> = "<any value>" | ||
| } | ||
|
|
||
| Listeners = [ | ||
| { | ||
| Port = <external service port> | ||
| Name = "<unique name for this listener>" | ||
| Protocol = "<protocol used by external service>" | ||
| TLS = { | ||
| MaxVersion = "<version of TLS>" | ||
| MinVersion = "<version of TLS>" | ||
| CipherSuites = [ | ||
| "<cipher suite>" | ||
| ] | ||
| Certificates = [ | ||
| { | ||
| Kind = "inline-certificate" | ||
| Name = "<name of inline-certificate>" | ||
| Namespace = "<enterprise: namespace of the certificate>" | ||
| Partition = "<enterprise: partition of the certificate>" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| ] | ||
| ``` | ||
|
|
||
| ```json | ||
| { | ||
| "Kind": "api-gateway", | ||
| "Name": "<name of api gateway>", | ||
| "Namespace": "<enterprise: namespace of the gateway>", | ||
| "Partition": "<enterprise: partition of the gateway>", | ||
| "Meta": { | ||
| "<any key>": "<any value>" | ||
| }, | ||
| "Listeners": [ | ||
| { | ||
| "Name": "<unique name for this listener>", | ||
| "Port": <external service port>, | ||
| "Protocol": "<protocol used by external service>", | ||
| "TLS": { | ||
| "MaxVersion": "<version of TLS>", | ||
| "MinVersion": "<version of TLS>", | ||
| "CipherSuites": [ | ||
| "<cipher suite>" | ||
| ], | ||
| "Certificates": [ | ||
| { | ||
| "Kind": "inline-certificate", | ||
| "Name": "<name of inline-certificate>", | ||
| "Namespace": "<enterprise: namespace of the certificate>", | ||
| "Partition": "<enterprise: partition of the certificate>" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| ``` | ||
|
|
||
| </CodeTabs> | ||
|
|
||
| ## Specification | ||
|
|
||
| This section provides details about the fields you can configure in the | ||
| `api-gateway` configuration entry. | ||
|
|
||
| ### `Kind` | ||
|
|
||
| Specifies the type of configuration entry to implement. This must be | ||
| `api-gateway`. | ||
|
|
||
| #### Values | ||
|
|
||
| - Default: none | ||
| - This field is required. | ||
| - Data type: string value that must be set to `"api-gateway"`. | ||
|
|
||
| ### `Name` | ||
|
|
||
| Specifies a name for the configuration entry. The name is metadata that you can | ||
| use to reference the configuration entry when performing Consul operations, | ||
| such as applying a configuration entry to a specific cluster. | ||
|
|
||
| #### Values | ||
|
|
||
| - Default: none | ||
| - This field is required. | ||
| - Data type: string | ||
|
|
||
| ### `Namespace` <EnterpriseAlert inline /> | ||
|
|
||
| Specifies the Enterprise [namespace](/consul/docs/enterprise/namespaces) to apply to the configuration entry. | ||
|
|
||
| #### Values | ||
|
|
||
| - Default: `"default"` in Enterprise | ||
| - Data type: string | ||
|
|
||
| ### `Partition` <EnterpriseAlert inline /> | ||
|
|
||
| Specifies the Enterprise [admin partition](/consul/docs/enterprise/admin-partitions) to apply to the configuration entry. | ||
|
|
||
| #### Values | ||
|
|
||
| - Default: `"default"` in Enterprise | ||
| - Data type: string | ||
|
|
||
| ### `Meta` | ||
|
|
||
| Specifies an arbitrary set of key-value pairs to associate with the gateway. | ||
|
|
||
| #### Values | ||
|
|
||
| - Default: none | ||
| - Data type: map containing one or more keys and string values. | ||
|
|
||
| ### `Listeners[]` | ||
|
|
||
| Specifies a list of listeners that gateway should set up. Listeners are | ||
| uniquely identified by their port number. | ||
|
|
||
| #### Values | ||
|
|
||
| - Default: none | ||
| - This field is required. | ||
| - Data type: List of maps. Each member of the list contains the following fields: | ||
| - [`Name`](#listeners-name) | ||
| - [`Port`](#listeners-port) | ||
| - [`Hostname`](#listeners-hostname) | ||
| - [`Protocol`](#listeners-protocol) | ||
| - [`TLS`](#listeners-tls) | ||
|
|
||
| ### `Listeners[].Name` | ||
|
|
||
| Specifies the unique name for the listener. This field accepts letters, numbers, and hyphens. | ||
|
|
||
| #### Values | ||
|
|
||
| - Default: none | ||
| - This field is required. | ||
| - Data type: string | ||
|
|
||
| ### `Listeners[].Port` | ||
|
|
||
| Specifies the port number that the listener receives traffic on. | ||
|
|
||
| #### Values | ||
|
|
||
| - Default: `0` | ||
| - This field is required. | ||
| - Data type: integer | ||
|
|
||
| ### `Listeners[].Hostname` | ||
|
|
||
| Specifies the hostname that the listener receives traffic on. | ||
|
|
||
| #### Values | ||
|
|
||
| - Default: `"*"` | ||
| - This field is optional. | ||
| - Data type: string | ||
|
|
||
| ### `Listeners[].Protocol` | ||
|
|
||
| Specifies the protocol associated with the listener. | ||
|
|
||
| #### Values | ||
|
|
||
| - Default: none | ||
| - This field is required. | ||
| - The data type is one of the following string values: `"tcp"` or `"http"`. | ||
|
|
||
| ### `Listeners[].TLS` | ||
|
|
||
| Specifies the TLS configurations for the listener. | ||
|
|
||
| #### Values | ||
|
|
||
| - Default: none | ||
| - Map that contains the following fields: | ||
| - [`MaxVersion`](#listeners-tls-maxversion) | ||
| - [`MinVersion`](#listeners-tls-minversion) | ||
| - [`CipherSuites`](#listeners-tls-ciphersuites) | ||
| - [`Certificates`](#listeners-tls-certificates) | ||
|
|
||
| ### `Listeners[].TLS.MaxVersion` | ||
|
|
||
| Specifies the maximum TLS version supported for the listener. | ||
|
|
||
| #### Values | ||
|
|
||
| - Default depends on the version of Envoy: | ||
| - Envoy 1.22.0 and later default to `TLSv1_2` | ||
| - Older versions of Envoy default to `TLSv1_0` | ||
| - Data type is one of the following string values: | ||
| - `TLS_AUTO` | ||
| - `TLSv1_0` | ||
| - `TLSv1_1` | ||
| - `TLSv1_2` | ||
| - `TLSv1_3` | ||
|
|
||
| ### `Listeners[].TLS.MinVersion` | ||
|
|
||
| Specifies the minimum TLS version supported for the listener. | ||
|
|
||
| #### Values | ||
|
|
||
| - Default: none | ||
| - Data type is one of the following string values: | ||
| - `TLS_AUTO` | ||
| - `TLSv1_0` | ||
| - `TLSv1_1` | ||
| - `TLSv1_2` | ||
| - `TLSv1_3` | ||
|
|
||
| ### `Listeners[].TLS.CipherSuites[]` | ||
|
|
||
| Specifies a list of cipher suites that the listener supports when negotiating connections using TLS 1.2 or older. | ||
|
|
||
| #### Values | ||
|
|
||
| - Defaults to the ciphers supported by the version of Envoy in use. Refer to the | ||
| [Envoy documentation](https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/transport_sockets/tls/v3/common.proto#envoy-v3-api-field-extensions-transport-sockets-tls-v3-tlsparameters-cipher-suites) | ||
| for details. | ||
| - Data type: List of string values. Refer to the | ||
| [Consul repository](https://github.com/hashicorp/consul/blob/v1.11.2/types/tls.go#L154-L169) | ||
| for a list of supported ciphers. | ||
|
|
||
| ### `Listeners[].TLS.Certificates[]` | ||
|
|
||
| The list of references to inline certificates that the listener uses for TLS termination. | ||
|
|
||
| #### Values | ||
|
|
||
| - Default: None | ||
| - Data type: List of maps. Each member of the list has the following fields: | ||
| - [`Kind`](#listeners-tls-certificates-kind) | ||
| - [`Name`](#listeners-tls-certificates-name) | ||
| - [`Namespace`](#listeners-tls-certificates-namespace) <EnterpriseAlert inline /> | ||
| - [`Partition`](#listeners-tls-certificates-partition) <EnterpriseAlert inline /> | ||
|
|
||
| ### `Listeners[].TLS.Certificates[].Kind` | ||
|
|
||
| The list of references to inline-certificates that the listener uses for TLS termination. | ||
|
|
||
| #### Values | ||
|
|
||
| - Default: None | ||
| - This field is required and must be set to `"inline-certificate"`. | ||
| - Data type: string | ||
|
|
||
| ### `Listeners[].TLS.Certificates[].Name` | ||
|
|
||
| The list of references to inline certificates that the listener uses for TLS termination. | ||
|
|
||
| #### Values | ||
|
|
||
| - Default: None | ||
| - This field is required. | ||
| - Data type: string | ||
|
|
||
| ### `Listeners[].TLS.Certificates[].Namespace` <EnterpriseAlert inline /> | ||
|
|
||
| Specifies the Enterprise [namespace](/consul/docs/enterprise/namespaces) where the certificate can be found. | ||
|
|
||
| #### Values | ||
|
|
||
| - Default: `"default"` in Enterprise | ||
| - Data type: string | ||
|
|
||
| ### `Listeners[].TLS.Certificates[].Partition` <EnterpriseAlert inline /> | ||
|
|
||
| Specifies the Enterprise [admin partition](/consul/docs/enterprise/admin-partitions) where the certificate can be found. | ||
|
|
||
| #### Values | ||
|
|
||
| - Default: `"default"` in Enterprise | ||
| - Data type: string | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.