From 756e65cbcbe2d77dc72d426770f30d266874326f Mon Sep 17 00:00:00 2001 From: trujillo-adam Date: Tue, 16 Nov 2021 10:44:21 -0800 Subject: [PATCH] applied freddy's feedback --- .../config-entries/partition-exports.mdx | 33 +++++++++++-------- .../registration/service-registration.mdx | 7 ++-- .../docs/enterprise/admin-partitions.mdx | 2 +- 3 files changed, 24 insertions(+), 18 deletions(-) diff --git a/website/content/docs/connect/config-entries/partition-exports.mdx b/website/content/docs/connect/config-entries/partition-exports.mdx index ecd76838ec..a816847cf2 100644 --- a/website/content/docs/connect/config-entries/partition-exports.mdx +++ b/website/content/docs/connect/config-entries/partition-exports.mdx @@ -3,8 +3,7 @@ layout: docs page_title: 'Configuration Entry Kind: Partition Exports' description: >- The partition-exports configuration entry enables you to export services from a single file. - Settings in this config entry apply across all namespaces and federated datacenters. - Write access to the mesh resource is required. + Settings in this configuration entry can apply to services in any namespace of the specified partition. Write access to the mesh resource is required. --- # Partition Exports @@ -15,23 +14,25 @@ This topic describes the `partition-exports` configuration entry type. The `part ## Introduction -You can configure Consul to export services contained in an admin partition to one or more additional partitions by declaring the `partition-exports` configuration entry in the `kind` field. This enables you to route traffic between services in different clusters when a single set of Consul servers running on each cluster are jonied using WAN federation. +You can configure Consul to export services contained in an admin partition to one or more additional partitions by declaring the `partition-exports` configuration entry in the `kind` field. This enables you to route traffic between services in different clusters that share a single set of Consul servers. -The settings defined in the `partition-exports` configuration entry apply to all namespaces and federated datacenters. - -TO DO: More background info and info about the use case(s). +You can configure the settings defined in the `partition-exports` configuration entry to apply to all namespaces and federated datacenters. ## Requirements -The consumer partition must have an `upstream` configuration that specifies the destination for the services. Refer to the [Upstream Configuration Reference](/docs/connect/registration/service-registration#upstream-configuration-reference) for information on how to configure the upstream. +* A Consul Enterprise binary +* A partition that corresponds to the configuration entry. As in, the partition exports config entry for partition "frontend" requires that the "frontend" partition exists + ## Usage 1. Verify that your datacenter meets the conditions specified in the [Requirements](#requirements). 1. Specify the `partition-exports` configuration in the agent configuration file as described in [Configuration](#configuration). 1. Deploy the configuration per your runtime: - * [VM](/docs/install) - * [Kubernetes](/docs/k8s/installation/install) + * [VM](docs/install) + * [Kubernetes](docs/k8s/installation/install) + * [HTTP API](api-docs/config#apply-configuration) + * [CLI](commands/config/write) ## Configuration @@ -46,7 +47,7 @@ Partition = "" Services = [ { Name = "" - Namespace = "" + Namespace = "" Consumers = [ { Partition = "" @@ -66,7 +67,7 @@ Services: - Consumers: - Partition: Name: - Namespace: + Namespace: ``` @@ -78,11 +79,11 @@ Services: { "Consumers": [ { - "Partition": "" + "Partition": "" } ], "Name": "", - "Namespace": "" + "Namespace": "" } ] ``` @@ -105,7 +106,7 @@ The following table describes the parameters associated with the `partition-expo The `Services` parameter contains one or more lists of parameters that specify which services to export, which namespaces the services reside, and the destination partition for the exported services. Each list in the `Services` block must contain the following parameters: * `Name`: Specifies the name of the service to export. You can use a asterisk wildcard (`*`) to include all services in the namespace. -* `Namespace`: Specifies the name space containing the services to export. You can use a asterisk wildcard (`*`) to include all namespaces in the partition. +* `Namespace`: Specifies the namespace containing the services to export. You can use a asterisk wildcard (`*`) to include all namespaces in the partition. * `Consumers`: Specifies one ore more objects that identify a destination partition for the exported services. ## Example @@ -204,4 +205,8 @@ When an exported service has been imported to another partition, you can use the $ curl 'localhost:8500/v1/health/connect/billing?partition=finance' ``` +An ACL token with `service:write` permissions is required for the partition from which the query is made. If the call in the previous example is made from a service named `web` in a partition named `frontend`, then the request will require a token with `write` permissions to `web` in the `frontend` partition. + +Exports are available to all services in the consumer partition. In the previous example, any service with `write` permissions for the `frontend` partition will be able to read exports. + See [Health HTTP Endpoing](/api-docs/health) for additional information. \ No newline at end of file diff --git a/website/content/docs/connect/registration/service-registration.mdx b/website/content/docs/connect/registration/service-registration.mdx index d59170db4a..dac1a1a2e5 100644 --- a/website/content/docs/connect/registration/service-registration.mdx +++ b/website/content/docs/connect/registration/service-registration.mdx @@ -9,7 +9,7 @@ description: >- # Proxy Service Registration -This topic describes how to declare a proxy as a `connect-proxy` in service definitions. The type must be declared and information about the service they represent must be provided to function as a Consul service mesh proxy. +This topic describes how to declare a proxy as a `connect-proxy` in service definitions. The `kind` must be declared and information about the service they represent must be provided to function as a Consul service mesh proxy. ## Configuration @@ -22,7 +22,7 @@ Configure a service mesh proxy using the following syntax: name = kind = "connect-proxy" proxy = { - destination_service_name = "" + destination_service_name = "" = "" } port = @@ -36,7 +36,8 @@ port = "name": "", "kind": "connect-proxy", "proxy": { - "destination_service_name": "","" : "" + "destination_service_name": "", + "" : "" }, "port": } diff --git a/website/content/docs/enterprise/admin-partitions.mdx b/website/content/docs/enterprise/admin-partitions.mdx index 6d0217db1e..c066c1f822 100644 --- a/website/content/docs/enterprise/admin-partitions.mdx +++ b/website/content/docs/enterprise/admin-partitions.mdx @@ -55,7 +55,7 @@ Values specified for [`proxy-defaults`](docs/connect/config-entries/proxy-defaul ### Cross-partition Networking -You can configure services to be discoverable and accessible by upstream services in any partition within the datacenter. Specify upstream services contained in other partitions by configuring the `partition-exports` configuration entry for the agent in the source partition. Refer to the [`partition-exports` documentation](docs/connect/config-entries/partition-exports) for details. +You can configure services to be discoverable and accessible by downstream services in any partition within the datacenter. Specify the upstream services that you want to be available for discovery by configuring the `partition-exports` configuration entry in the partition where the services are registered. Refer to the [`partition-exports` documentation](docs/connect/config-entries/partition-exports) for details. Additionally, the `upstreams` configuration for proxies in the source partition must specify the name of the destination partition so that listeners can be created. Refer to the [Upstreamd Configuration Reference](docs/connect/registration/service-registration#upstream-configuration-reference) for additional information.