diff --git a/website/content/docs/connect/config-entries/service-resolver.mdx b/website/content/docs/connect/config-entries/service-resolver.mdx index dcea59805499..61779178abc9 100644 --- a/website/content/docs/connect/config-entries/service-resolver.mdx +++ b/website/content/docs/connect/config-entries/service-resolver.mdx @@ -1,7 +1,7 @@ --- layout: docs page_title: Service Resolver Configuration Entry Reference -description: >- +description: >- Service resolver configuration entries are L7 traffic management tools for defining sets of service instances that resolve upstream requests and Consul’s behavior when resolving them. Learn how to write `service-resolver` config entries in HCL or YAML with a specification reference, configuration model, a complete example, and example code by use case. --- @@ -35,7 +35,7 @@ The following list outlines field hierarchy, language-specific data types, and r - [`ServiceSubset`](#redirect-servicesubset): string - [`Namespace`](#redirect-namespace): string - [`Partition`](#redirect-partition): string | `default` - - [`Datacenter`](#redirect-datacenter): list + - [`Datacenter`](#redirect-datacenter): string - [`Peer`](#redirect-peer): string - [`Failover`](#failover): map - [`Service`](#failover-service): string @@ -132,8 +132,8 @@ When every field is defined, a service resolver configuration entry has the foll ```hcl Kind = "service-resolver" ## required Name = "" -Namespace = "" -Partition = "" +Namespace = "" +Partition = "" Meta = { = "" } @@ -215,7 +215,7 @@ LoadBalancer = { "Kind":"service-resolver", // required "Name":"", "Namespace":"", - "Partition":"parition-configuration-applies-to>", + "Partition":"parition-configuration-applies-to>", "Meta":{ "":"" }, @@ -282,7 +282,7 @@ LoadBalancer = { }, "SourceIP":false, // cannot specify with Field or FieldValue "Terminal":false - } + } ] } } @@ -294,7 +294,7 @@ LoadBalancer = { ```yaml apiVersion: consul.hashicorp.com/v1alpha1 # required -kind: ServiceResolver # required +kind: ServiceResolver # required metadata: name: namespace: @@ -309,14 +309,14 @@ spec: filter: onlyPassing: false defaultSubset: - redirect: + redirect: service: servicesubset: namespace: partition: peer: failover: # requires at least one of the following: service, serviceSubset, namespace, targets, datacenters - : + : targets: - service: - serviceSubset: @@ -438,7 +438,7 @@ For additional guidance, refer to the [filter on service version configuration e - Data type: Map containing a key-value pair. - ``: String that names the subset. The string must be valid as a DNS subdomain element. - ``: Map that can contain the following parameters: - + | Parameter | Description | Data type | Default | | :------------ | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | ------- | | `Filter` | Specifies an expression that filters the DNS elements of service instances that belong to the subset. If empty, all healthy instances of a service are returned. This expression can filter on the same DNS selectors as the [Health API endpoint](/consul/api-docs/health#filtering-2). For more information about creating and using expressions to filter, refer to [filtering](/consul/api-docs/features/filtering). | String | None | @@ -540,7 +540,7 @@ This parameter is a map, and its key is the name of the local service subset tha - [`Namespace`](#failover-namespace) - [`Datacenters`](#failover-datacenters) - [`Targets`](#failover-targets) - + ### `Failover{}.Service` Specifies the name of the service to resolve at the failover location during a failover scenario. @@ -680,10 +680,10 @@ Specifies the type of load balancing policy for selecting a host. Supported load - Data type: String containing one of the following values: - `random` - - `round_robin` + - `round_robin` - `least_request` - - `ring_hash` - - `maglev` + - `ring_hash` + - `maglev` ### `LoadBalancer{}.LeastRequestConfig` @@ -693,7 +693,7 @@ Specifies configuration for the `least_request` policy type. - Default: None - Data type: Map containing the following parameter: - + | Parameter | Description | Data type | Default | | :------------ | :------------------------------------------------------------------------------------------------- | --------- | ------- | | `ChoiceCount` | Specifies the number of random healthy hosts from which to select the one with the least requests. | Integer | `2` | @@ -706,7 +706,7 @@ Specifies configuration for the `ring_hash` policy type. - Default: None - Data type: List that can contain the following parameters: - + | Parameter | Description | Data type | Default | | :------------ | :------------------------------------------------------------- | --------- | ------- | | `MinimumRingSize` | Determines the minimum number of entries in the hash ring. | Integer | `1024` | @@ -763,7 +763,7 @@ Specifies additional configuration options for the `cookie` hash policy type. Th - Default: None - Data type: Map that can contain the following parameters: - + | Parameter | Description | Data type | Default | | :------------- | :-------------------------------------------------------------------------------- | --------- | ------- | | `Session` | Directs Consul to generate a session cookie with no expiration. | Boolean | `false` | @@ -778,7 +778,7 @@ Determines if the hash type should besource IP address. You cannot specify `Sour - Default: `false` - Data type: Boolean - + ### `LoadBalancer{}.HashPolicies[].Terminal` Determines if Consul should stop computing the hash when multiple hash policies are present. If a hash is computed when a terminal policy is evaluated, then that hash is used and subsequent hash policies are ignored. @@ -787,14 +787,14 @@ Determines if the hash type should besource IP address. You cannot specify `Sour - Default: `false` - Data type: Boolean - + ### `apiVersion` -Specifies the version of the Consul API for integrating with Kubernetes. The value must be `consul.hashicorp.com/v1alpha1`. +Specifies the version of the Consul API for integrating with Kubernetes. The value must be `consul.hashicorp.com/v1alpha1`. #### Values @@ -814,7 +814,7 @@ Specifies the type of configuration entry to implement. Must be set to `ServiceR ## `metadata` -Map that contains an arbitrary name for the configuration entry and the namespace it applies to. +Map that contains an arbitrary name for the configuration entry and the namespace it applies to. #### Values @@ -982,7 +982,7 @@ This parameter is a map, and its key is the name of the local service subset tha - [`namespace`](#spec-failover-namespace) - [`datacenters`](#spec-failover-datacenters) - [`targets`](#spec-failover-targets) - + ### `spec.failover.service` Specifies the name of the service to resolve at the failover location during a failover scenario. @@ -1121,9 +1121,9 @@ Specifies the type of load balancing policy for selecting a host. Supported load - Data type: String containing one of the following values: - `random` - - `round_robin` + - `round_robin` - `least_request` - - `ring_hash` + - `ring_hash` - `maglev` ### `spec.loadBalancer.leastRequestConfig` @@ -1134,7 +1134,7 @@ Specifies configuration for the `least_request` policy type. - Default: None - Data type: Map containing the following parameter: - + | Parameter | Description | Data type | Default | | :------------ | :------------------------------------------------------------------------------------------------- | --------- | ------- | | `choiceCount` | Specifies the number of random healthy hosts from which to select the one with the least requests. | Integer | `2` | @@ -1147,7 +1147,7 @@ Specifies configuration for the `ring_hash` policy type. - Default: None - Data type: List that can contain the following parameters: - + | Parameter | Description | Data type | Default | | :------------ | :------------------------------------------------------------- | --------- | ------- | | `minimumRingSize` | Determines the minimum number of entries in the hash ring. | Integer | `1024` | @@ -1171,7 +1171,7 @@ Specifies a list of hash policies to use for hashing load balancing algorithms. Specifies the attribute type to hash on. You cannot specify the `field` parameter if `sourceIP` is also configured. -Supported attribute types include the following: +Supported attribute types include the following: | Attribute | Description | | :--------- | :-------------------------------------------------------------- | @@ -1204,7 +1204,7 @@ Specifies additional configuration options for the `cookie` hash policy type. Th - Default: None - Data type: Map that can contain the following parameters: - + | Parameter | Description | Data type | Default | | :------------- | :-------------------------------------------------------------------------------- | --------- | ------- | | `session` | Directs Consul to generate a session cookie with no expiration. | Boolean | `false` |