Skip to content

Commit

Permalink
Reformat proxy docs refresh (#18623)
Browse files Browse the repository at this point in the history
* first commit; reformat PD conf entry

* updated proxies overview page

* added Deploy SM proxy usage and removed reg index

* moved sidecar proxy usage to main proxy folder

* recast sidecar reg page as Deploy sidecar services

* fix typos

* recast SM reg as conf reference- set the sidebar

* add redirects

* fix links

* add PD conf entry usage to appropro pages

* edits to proxy conf ref

* fix links on index page

* example command to write PD conf entry

* updated links to old SM proxy reg page

* updated links to sidecar service reg page

* tryna fix front matter issues

* Apply suggestions from code review

Co-authored-by: Ronald  <roncodingenthusiast@users.noreply.github.com>

* added paragraph about SM proxies to overivew

* Apply suggestions from code review

Co-authored-by: Jeff Boruszak <104028618+boruszak@users.noreply.github.com>

---------

Co-authored-by: Ronald <roncodingenthusiast@users.noreply.github.com>
Co-authored-by: Jeff Boruszak <104028618+boruszak@users.noreply.github.com>
  • Loading branch information
3 people authored Sep 6, 2023
1 parent 373c7dc commit a17f4a0
Show file tree
Hide file tree
Showing 32 changed files with 1,240 additions and 814 deletions.
6 changes: 3 additions & 3 deletions website/content/api-docs/agent/service.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ The `/agent/service/register` endpoint supports camel case and _snake case_ for

- `Proxy` `(Proxy: nil)` - From 1.2.3 on, specifies the configuration for a
service mesh proxy instance. This is only valid if `Kind` defines a proxy or gateway.
See the [Proxy documentation](/consul/docs/connect/registration/service-registration)
Refer to the [Service mesh proxy configuration reference](/consul/docs/connect/proxies/proxy-config-reference)
for full details.

- `Connect` `(Connect: nil)` - Specifies the
Expand Down Expand Up @@ -698,8 +698,8 @@ For the `Connect` field, the parameters are:
Managed proxies (which have been deprecated since Consul v1.3.0) have been
[removed](/consul/docs/connect/proxies) since v1.6.0.
- `SidecarService` `(ServiceDefinition: nil)` - Specifies an optional nested
service definition to register. For more information see
[Sidecar Service Registration](/consul/docs/connect/registration/sidecar-service).
service definition to register. Refer to
[Deploy sidecar services](/consul/docs/connect/proxies/deploy-sidecar-services) for additional information.

### Sample Payload

Expand Down
31 changes: 10 additions & 21 deletions website/content/api-docs/discovery-chain.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,8 @@ The table below shows this endpoint's support for
- `compile-dc` `(string: "")` - Specifies the datacenter to use as the basis of
compilation. This will default to the datacenter of the agent being queried.

This value comes from an [upstream
configuration](/consul/docs/connect/registration/service-registration#upstream-configuration-reference)
[`datacenter`](/consul/docs/connect/registration/service-registration#datacenter)
parameter.
This value comes from the `datacenter` parameter in an [upstream
configuration](/consul/docs/connect/proxies/proxy-config-reference#upstream-configuration-reference).

- `ns` `(string: "")` <EnterpriseAlert inline /> - Specifies the source namespace you use as the basis of compilation.
You can also [specify the namespace through other methods](#methods-to-specify-namespace).
Expand All @@ -71,11 +69,8 @@ The table below shows this endpoint's support for
timeout](/consul/docs/connect/config-entries/service-resolver#connecttimeout) for
any service resolved in the compiled chain.

This value comes from the `connect_timeout_ms` key in an [upstream
configuration](/consul/docs/connect/registration/service-registration#upstream-configuration-reference)
opaque
[`config`](/consul/docs/connect/registration/service-registration#config-1)
parameter.
This value comes from the `connect_timeout_ms` key in the opaque `config` field of the [upstream
configuration](/consul/docs/connect/proxies/proxy-config-reference#upstream-configuration-reference).

- `OverrideProtocol` `(string: "")` - Overrides the final
[protocol](/consul/docs/connect/config-entries/service-defaults#protocol) used in
Expand All @@ -86,23 +81,17 @@ The table below shows this endpoint's support for
would be L7 and TCP is passed here the chain will not include Routers or
Splitters.

This value comes from the `protocol` key in an [upstream
configuration](/consul/docs/connect/registration/service-registration#upstream-configuration-reference)
opaque
[`config`](/consul/docs/connect/registration/service-registration#config-1)
parameter.
This value comes from the `protocol` key in an opaque `config` field of the [upstream
configuration](/consul/docs/connect/proxies/proxy-config-reference#upstream-configuration-reference).

- `OverrideMeshGateway` `(MeshGatewayConfig: <optional>)` - Overrides the final
[mesh gateway configuration](/consul/docs/connect/gateways/mesh-gateway#connect-proxy-configuration)
for this any service resolved in the compiled chain.

This value comes from either the [proxy
configuration](/consul/docs/connect/registration/service-registration#complete-configuration-example)
[`mesh_gateway`](/consul/docs/connect/registration/service-registration#mesh_gateway)
parameter or an [upstream
configuration](/consul/docs/connect/registration/service-registration#upstream-configuration-reference)
[`mesh_gateway`](/consul/docs/connect/registration/service-registration#mesh_gateway-1)
parameter. If both are present the value defined on the upstream is used.
This value comes from the `mesh_gateway` parameter in either the [proxy
configuration](/consul/docs/connect/proxies/proxy-config-reference#proxy-parameters) or [upstream
configuration](/consul/docs/connect/proxies/proxy-config-reference#upstream-configuration-reference)
If both parameters are configured, Consul uses the value defined on the upstream.

- `Mode` `(string: "")` - One of `none`, `local`, or `remote`.

Expand Down
8 changes: 4 additions & 4 deletions website/content/commands/connect/envoy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Usage: `consul connect envoy [options] [-- pass-through options]`

#### Envoy Options for both Sidecars and Gateways

- `-proxy-id` - The [proxy service](/consul/docs/connect/registration/service-registration) ID.
- `-proxy-id` - The [proxy service](/consul/docs/connect/proxies/proxy-config-reference) ID.
This service ID must already be registered with the local agent unless a gateway is being
registered with the `-register` flag. As of Consul 1.8.0, this can also be
specified via the `CONNECT_PROXY_ID` environment variable.
Expand Down Expand Up @@ -133,7 +133,7 @@ compatibility with Envoy and prevent potential issues. Default is `false`.
- `-sidecar-for` - The _ID_ (not name if they differ) of the service instance
this proxy will represent. The target service doesn't need to exist on the
local agent yet but a [sidecar proxy
registration](/consul/docs/connect/registration/service-registration) with
registration](/consul/docs/proxies/deploy-sidecar-services) with
`proxy.destination_service_id` equal to the passed value must be present. If
multiple proxy registrations targeting the same local service instance are
present the command will error and `-proxy-id` should be used instead.
Expand Down Expand Up @@ -225,9 +225,9 @@ proxy configuration needed.

## Examples

Assume a local service instance is registered on the local agent with a
In the following examples, a local service instance is registered on the local agent with a
sidecar proxy (using the [sidecar service
registration](/consul/docs/connect/registration/service-registration) helper) as below.
registration](/consul/docs/connect/proxies/deploy-sidecar-services) helper):

```hcl
service {
Expand Down
4 changes: 2 additions & 2 deletions website/content/commands/connect/proxy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ Usage: `consul connect proxy [options]`
- `-sidecar-for` - The _ID_ (not name if they differ) of the service instance
this proxy will represent. The target service doesn't need to exist on the
local agent yet but a [sidecar proxy
registration](/consul/docs/connect/registration/service-registration) with
registration](/consul/docs/connect/proxies/deploy-sidecar-services) with
`proxy.destination_service_id` equal to the passed value must be present. If
multiple proxy registrations targeting the same local service instance are
present the command will error and `-proxy-id` should be used instead.
This can also be specified via the `CONNECT_SIDECAR_FOR` environment variable.

- `-proxy-id` - The [proxy
service](/consul/docs/connect/registration/service-registration) ID on the
service](/consul/docs/connect/proxies/proxy-config-reference) ID on the
local agent. This must already be present on the local agent. This option
can also be specified via the `CONNECT_PROXY_ID` environment variable.

Expand Down
2 changes: 1 addition & 1 deletion website/content/commands/connect/redirect-traffic.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Usage: `consul connect redirect-traffic [options]`

- `-consul-dns-port` - The port of the Consul DNS resolver. If provided, DNS queries will be redirected to the provided IP address for name resolution.

- `-proxy-id` - The [proxy service](/consul/docs/connect/registration/service-registration) ID.
- `-proxy-id` - The [proxy service](/consul/docs/connect/proxies/proxy-config-reference) ID.
This service ID must already be registered with the local agent.

- `-proxy-inbound-port` - The inbound port that the proxy is listening on.
Expand Down
8 changes: 4 additions & 4 deletions website/content/docs/agent/config/config-files.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -636,16 +636,16 @@ Refer to the [formatting specification](https://golang.org/pkg/time/#ParseDurati
- `server` ((#server_rpc_port)) - Server RPC address. Default 8300. TCP
only.
- `sidecar_min_port` ((#sidecar_min_port)) - Inclusive minimum port number
to use for automatically assigned [sidecar service registrations](/consul/docs/connect/registration/sidecar-service).
to use for automatically assigned [sidecar service registrations](/consul/docs/connect/proxies/deploy-sidecar-services).
Default 21000. Set to `0` to disable automatic port assignment.
- `sidecar_max_port` ((#sidecar_max_port)) - Inclusive maximum port number
to use for automatically assigned [sidecar service registrations](/consul/docs/connect/registration/sidecar-service).
to use for automatically assigned [sidecar service registrations](/consul/docs/connect/proxies/deploy-sidecar-services).
Default 21255. Set to `0` to disable automatic port assignment.
- `expose_min_port` ((#expose_min_port)) - Inclusive minimum port number
to use for automatically assigned [exposed check listeners](/consul/docs/connect/registration/service-registration#expose-paths-configuration-reference).
to use for automatically assigned [exposed check listeners](/consul/docs/connect/proxies/proxy-config-reference#expose-paths-configuration-reference).
Default 21500. Set to `0` to disable automatic port assignment.
- `expose_max_port` ((#expose_max_port)) - Inclusive maximum port number
to use for automatically assigned [exposed check listeners](/consul/docs/connect/registration/service-registration#expose-paths-configuration-reference).
to use for automatically assigned [exposed check listeners](/consul/docs/connect/proxies/proxy-config-reference#expose-paths-configuration-reference).
Default 21755. Set to `0` to disable automatic port assignment.

- `primary_datacenter` - This designates the datacenter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Refer to [mesh gateway modes](/consul/docs/connect/gateways/mesh-gateway#modes)

The Envoy proxies that function as sidecars in your service mesh require configuration in order to properly route traffic to peers. Sidecar proxies are defined in the [service definition](/consul/docs/services/usage/define-services).

- Configure the `proxy.upstreams` parameters to route traffic to the correct service, namespace, and peer. Refer to the [`upstreams`](/consul/docs/connect/registration/service-registration#upstream-configuration-reference) documentation for details.
- Configure the `proxy.upstreams` parameters to route traffic to the correct service, namespace, and peer. Refer to the [`upstreams`](/consul/docs/connect/proxies/proxy-config-reference#upstream-configuration-reference) documentation for details.
- The `proxy.upstreams.destination_name` parameter is always required.
- The `proxy.upstreams.destination_peer` parameter must be configured to enable cross-cluster traffic.
- The `proxy.upstream/destination_namespace` configuration is only necessary if the destination service is in a non-default namespace.
Expand Down
Loading

0 comments on commit a17f4a0

Please sign in to comment.