Skip to content

Commit

Permalink
Backport of docs: Change heading to filename in CodeBlockConfig into …
Browse files Browse the repository at this point in the history
…release/1.15.x (#18968)

Backport of docs: Change heading to filename in CodeBlockConfig to release/1.15.x

backport of commit 4e1e18f

Co-authored-by: Blake Covarrubias <blake@covarrubi.as>
  • Loading branch information
hc-github-team-consul-core and blake authored Sep 21, 2023
1 parent b3e99ed commit c0b41f8
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ You must manually register the ingress gateway with Consul proxy to define extra
In the following example, the `public-ingress` gateway includes a static cluster named `sds-cluster` that specifies paths to the SDS certificate and SDS certification validation files:


<CodeBlock heading="public-ingress-service.hcl">
<CodeBlockConfig filename="public-ingress-service.hcl">

```hcl
Services {
Expand Down Expand Up @@ -112,7 +112,7 @@ EOF
}
```

</CodeBlock>
</CodeBlockConfig>

Refer to the [Envoy documentation](https://www.envoyproxy.io/docs/envoy/v1.17.2/api-v3/config/bootstrap/v3/bootstrap.proto#envoy-v3-api-field-config-bootstrap-v3-bootstrap-staticresources-clusters) for details about configuration parameters for SDS clusters.

Expand All @@ -133,7 +133,7 @@ Store TLS client authentication files, certificate files, and keys on disk where
The following example specifies certificate chain:


<CodeBlock heading="certs/sds-auth-cert.json">
<CodeBlockConfig filename="certs/sds-auth-cert.json">

```json
{
Expand All @@ -154,10 +154,10 @@ The following example specifies certificate chain:
}
```

</CodeBlock>
</CodeBlockConfig>
The following example specifies the validation context:

<CodeBlock heading="/certs/sds-validation.json">
<CodeBlockConfig filename="/certs/sds-validation.json">

```json
{
Expand All @@ -175,7 +175,7 @@ The following example specifies the validation context:
}
```

</CodeBlock>
</CodeBlockConfig>

## Start Envoy

Expand Down Expand Up @@ -208,7 +208,7 @@ Refer to [Ingress gateway configuration entry reference](/consul/docs/connect/co

The following example directs Consul to retrieve `example.com-public-cert` certificates from an SDS cluster named `sds-cluster` and serve them to all listeners:

<CodeBlock heading="public-ingress-cfg.hcl">
<CodeBlockConfig filename="public-ingress-cfg.hcl">

```hcl
Kind = "ingress-gateway"
Expand All @@ -230,7 +230,7 @@ Listeners = [
]
```

</CodeBlock>
</CodeBlockConfig>

## Register the ingress gateway configuration entry

Expand All @@ -242,4 +242,4 @@ The following example registers an ingress gateway configuration entry named `pu
$ consul config write public-ingress-cfg.hcl
```

The Envoy instance starts a listener on the port specified in the configuration entry and fetches the TLS certificate named from the SDS server.
The Envoy instance starts a listener on the port specified in the configuration entry and fetches the TLS certificate named from the SDS server.
3 changes: 2 additions & 1 deletion website/content/docs/connect/gateways/mesh-gateway/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -299,4 +299,5 @@ service {
}
}
```
</CodeTabs>

</CodeTabs>
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Refer to the `/connect/intentions/exact` [HTTP API endpoint documentation](/cons

For L7 intentions, specify the `Permissions` in the request payload to configure attributes for dynamically enforcing intentions. In the following example payload, Consul allows HTTP GET requests if the request body is empty:

<CodeBlockConfig heading="payload.json">
<CodeBlockConfig filename="payload.json">

```json
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ Refer to the [prepared query reference](/consul/api-docs/query#create-prepared-q

1. Specify the prepared query options in JSON format. The following prepared query targets all instances of the `redis` service in `dc1` and `dc2`:

<CodeBlockConfig filename="payload.json">

```json
{
"Name": "my-query",
Expand Down Expand Up @@ -58,6 +60,8 @@ Refer to the [prepared query reference](/consul/api-docs/query#create-prepared-q
}
```

</CodeBlockConfig>

Refer to the [prepared query configuration reference](/consul/api-docs/query#create-prepared-query) for information about all available options.

1. Send the query in a POST request to the [`/query` API endpoint](/consul/api-docs/query). If the request is successful, Consul prints an ID for the prepared query.
Expand Down
4 changes: 2 additions & 2 deletions website/content/docs/services/usage/define-services.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ For Kubernetes environments, you can enable the [`connectInject`](/consul/docs/
The following example defines a service named `redis` that is available on port `80`. By default, the service has the IP address of the agent node.

<CodeTabs>
<CodeBlockConfig heading="service.hcl">
<CodeBlockConfig filename="service.hcl">

```hcl
service {
Expand Down Expand Up @@ -72,7 +72,7 @@ service {
```

</CodeBlockConfig>
<CodeBlockConfig heading="service.json">
<CodeBlockConfig filename="service.json">

```json
{
Expand Down

0 comments on commit c0b41f8

Please sign in to comment.