Skip to content

Commit

Permalink
backport of commit e4c346f
Browse files Browse the repository at this point in the history
  • Loading branch information
boruszak committed Jun 30, 2023
1 parent 84fb710 commit e548eb4
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions website/content/docs/connect/config-entries/exported-services.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,57 @@ spec:
</Tab>
</Tabs>

### 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`.

<CodeTabs tabs={[ "HCL", "Kubernetes YAML", "JSON" ]}>

```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"
}
]
}
]
```

</CodeTabs>

### Exporting all services

<Tabs>
Expand Down

0 comments on commit e548eb4

Please sign in to comment.