From 0961baad4494a969e7867eb9e993775f938e56bd Mon Sep 17 00:00:00 2001 From: hc-github-team-consul-core Date: Thu, 21 Sep 2023 18:23:45 -0400 Subject: [PATCH] Backport of docs: Change heading to filename in CodeBlockConfig into release/1.16.x (#18969) backport of commit e13728feecb47a531650e67a67dd2f2033f4a967 Co-authored-by: Blake Covarrubias --- .../gateways/ingress-gateway/tls-external-service.mdx | 8 ++++---- .../content/docs/connect/gateways/mesh-gateway/index.mdx | 3 ++- .../docs/connect/intentions/create-manage-intentions.mdx | 2 +- website/content/docs/k8s/l7-traffic/failover-tproxy.mdx | 4 ++-- .../docs/k8s/l7-traffic/route-to-virtual-services.mdx | 4 ++-- .../docs/services/discovery/dns-dynamic-lookups.mdx | 4 ++++ website/content/docs/services/usage/define-services.mdx | 4 ++-- 7 files changed, 17 insertions(+), 12 deletions(-) diff --git a/website/content/docs/connect/gateways/ingress-gateway/tls-external-service.mdx b/website/content/docs/connect/gateways/ingress-gateway/tls-external-service.mdx index d1e480b44..c21461685 100644 --- a/website/content/docs/connect/gateways/ingress-gateway/tls-external-service.mdx +++ b/website/content/docs/connect/gateways/ingress-gateway/tls-external-service.mdx @@ -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: - + ```hcl Services { @@ -133,7 +133,7 @@ Store TLS client authentication files, certificate files, and keys on disk where The following example specifies certificate chain: - + ```json { @@ -158,7 +158,7 @@ The following example specifies certificate chain: The following example specifies the validation context: - + ```json { @@ -209,7 +209,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: - + ```hcl Kind = "ingress-gateway" diff --git a/website/content/docs/connect/gateways/mesh-gateway/index.mdx b/website/content/docs/connect/gateways/mesh-gateway/index.mdx index ca59854e3..488bf6372 100644 --- a/website/content/docs/connect/gateways/mesh-gateway/index.mdx +++ b/website/content/docs/connect/gateways/mesh-gateway/index.mdx @@ -299,4 +299,5 @@ service { } } ``` - + + diff --git a/website/content/docs/connect/intentions/create-manage-intentions.mdx b/website/content/docs/connect/intentions/create-manage-intentions.mdx index 7f224ed6f..46ec14682 100644 --- a/website/content/docs/connect/intentions/create-manage-intentions.mdx +++ b/website/content/docs/connect/intentions/create-manage-intentions.mdx @@ -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: - + ```json { diff --git a/website/content/docs/k8s/l7-traffic/failover-tproxy.mdx b/website/content/docs/k8s/l7-traffic/failover-tproxy.mdx index c08d8c3ac..dc0eb80f7 100644 --- a/website/content/docs/k8s/l7-traffic/failover-tproxy.mdx +++ b/website/content/docs/k8s/l7-traffic/failover-tproxy.mdx @@ -32,7 +32,7 @@ The default ACLs that the Consul Helm chart configures are suitable for most cas Specify the target failover in the [`spec.failover.targets`](/consul/docs/connect/config-entries/service-resolver#failover-targets-service) field in the service resolver configuration entry. In the following example, the `api-beta` service is configured to failover to the `api` service in any service subset: - + ```yaml apiversion: consul.hashicorp.com/v1alpha1 @@ -61,7 +61,7 @@ $ kubectl apply -f api-beta-failover.yaml If intentions are not already defined, create and apply intentions that allow the appropriate downstream to access the target service and the failover service. In the following examples, the `frontend` service is allowed to send messages to the `api` service, which is allowed to send messages to the `api-beta` failover service. - + ```yaml apiVersion: consul.hashicorp.com/v1alpha1 diff --git a/website/content/docs/k8s/l7-traffic/route-to-virtual-services.mdx b/website/content/docs/k8s/l7-traffic/route-to-virtual-services.mdx index 0852f8119..0a37462ed 100644 --- a/website/content/docs/k8s/l7-traffic/route-to-virtual-services.mdx +++ b/website/content/docs/k8s/l7-traffic/route-to-virtual-services.mdx @@ -34,7 +34,7 @@ The default ACLs that the Consul Helm chart configures are suitable for most cas Specify the target failover in the [`spec.redirect.service`](/consul/docs/connect/config-entries/service-resolver#spec-redirect-service) field in the service resolver configuration entry. In the following example, the `virtual-api` service is configured to redirect to the `real-api`: - + ```yaml apiversion: consul.hashicorp.com/v1alpha1 @@ -61,7 +61,7 @@ $ kubectl apply -f virtual-api-redirect.yaml If intentions are not already defined, create and apply intentions that allow the appropriate downstream to access the real service and the target redirect service. In the following examples, the `frontend` service is allowed to send messages to the `virtual-api` and `real-api` services: - + ```yaml apiversion: consul.hashicorp.com/v1alpha1 diff --git a/website/content/docs/services/discovery/dns-dynamic-lookups.mdx b/website/content/docs/services/discovery/dns-dynamic-lookups.mdx index d0fb8f14b..b56d3ce70 100644 --- a/website/content/docs/services/discovery/dns-dynamic-lookups.mdx +++ b/website/content/docs/services/discovery/dns-dynamic-lookups.mdx @@ -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`: + + ```json { "Name": "my-query", @@ -58,6 +60,8 @@ Refer to the [prepared query reference](/consul/api-docs/query#create-prepared-q } ``` + + 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. diff --git a/website/content/docs/services/usage/define-services.mdx b/website/content/docs/services/usage/define-services.mdx index fdd30fb15..323b87bc4 100644 --- a/website/content/docs/services/usage/define-services.mdx +++ b/website/content/docs/services/usage/define-services.mdx @@ -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. - + ```hcl service { @@ -72,7 +72,7 @@ service { ``` - + ```json {