diff --git a/website/content/docs/connect/config-entries/exported-services.mdx b/website/content/docs/connect/config-entries/exported-services.mdx index c7811d8d9b48..b9e89d9ad1c6 100644 --- a/website/content/docs/connect/config-entries/exported-services.mdx +++ b/website/content/docs/connect/config-entries/exported-services.mdx @@ -182,6 +182,60 @@ spec: ] ``` + + + + + + + +```hcl +Kind = "exported-services" +Partition = "" +Name = "" +Services = [ + { + Name = "" + Namespace = "" + Consumers = [ + { + SamenessGroup = "" + } + ] + } +] +``` + +```yaml +apiVersion: consul.hashicorp.com/v1alpha1 +kind: ExportedServices +metadata: + name: +spec: + services: + - name: + namespace: + consumers: + - samenessGroup: +``` + +```json +"Kind": "exported-services", +"Partition": "", +"Name": "", +"Services": [ + { + "Name": "", + "Namespace": "" + "Consumers": [ + { + "SamenessGroup": "" + } + ] + } +] +``` + @@ -456,6 +510,57 @@ spec: +### Exporting a service to a sameness group + +The following example configures Consul to export a service named `api` to a defined group of partitions that belong to a separately defined [sameness group](/consul/docs/connect/config-entries/sameness-group) named `monitoring`. + + + +```hcl +Kind = "exported-services" +Name = "default" + +Services = [ + { + Name = "api" + Consumers = [ + { + SamenessGroup = "monitoring" + } + ] + } +] +``` + +```yaml +apiVersion: consul.hashicorp.com/v1alpha1 +Kind: ExportedServices +metadata: + name: default +spec: + services: + - name: api + consumers: + - samenessGroup: monitoring +``` + +```json +"Kind": "exported-services", + "Name": "default", + "Services": [ + { + "Name": "api", + "Consumers": [ + { + "SamenessGroup": "monitoring" + } + ] + } + ] +``` + + + ### Exporting all services