diff --git a/daprdocs/content/en/developing-applications/building-blocks/service-invocation/service-invocation-overview.md b/daprdocs/content/en/developing-applications/building-blocks/service-invocation/service-invocation-overview.md index 42d6b304d2f..a8c4ff0394b 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/service-invocation/service-invocation-overview.md +++ b/daprdocs/content/en/developing-applications/building-blocks/service-invocation/service-invocation-overview.md @@ -90,9 +90,13 @@ The diagram below shows an example of how this works. If you have 1 instance of **Note**: App ID is unique per _application_, not application instance. Regardless how many instances of that application exist (due to scaling), all of them will share the same app ID. -### Pluggable service discovery +### Swappable service discovery -Dapr can run on a variety of [hosting platforms]({{< ref hosting >}}). To enable service discovery and service invocation, Dapr uses pluggable [name resolution components]({{< ref supported-name-resolution >}}). For example, the Kubernetes name resolution component uses the Kubernetes DNS service to resolve the location of other applications running in the cluster. Self-hosted machines can use the mDNS name resolution component. The Consul name resolution component can be used in any hosting environment, including Kubernetes or self-hosted. +Dapr can run on a variety of [hosting platforms]({{< ref hosting >}}). To enable swappable service discovery with service invocation, Dapr uses [name resolution components]({{< ref supported-name-resolution >}}). For example, the Kubernetes name resolution component uses the Kubernetes DNS service to resolve the location of other applications running in the cluster. + +Self-hosted machines can use the mDNS name resolution component. As an alternative, you can use the SQLite name resolution component to run Dapr on single-node environments and for local development scenarios. Dapr sidecars that are part of the cluster store their information in a SQLite database on the local machine. + +The Consul name resolution component is particularly suited to multi-machine deployments and can be used in any hosting environment, including Kubernetes, multiple VMs, or self-hosted. ### Streaming for HTTP service invocation diff --git a/daprdocs/content/en/operations/configuration/configuration-overview.md b/daprdocs/content/en/operations/configuration/configuration-overview.md index ca9601671f4..601f178ee0f 100644 --- a/daprdocs/content/en/operations/configuration/configuration-overview.md +++ b/daprdocs/content/en/operations/configuration/configuration-overview.md @@ -50,6 +50,7 @@ The following configuration settings can be applied to Dapr application sidecars - [Metrics](#metrics) - [Logging](#logging) - [Middleware](#middleware) +- [Name resolution](#name-resolution) - [Scope secret store access](#scope-secret-store-access) - [Access Control allow lists for building block APIs](#access-control-allow-lists-for-building-block-apis) - [Access Control allow lists for service invocation API](#access-control-allow-lists-for-service-invocation-api) @@ -189,6 +190,29 @@ The following table lists the properties for HTTP handlers: See [Middleware pipelines]({{< ref "middleware.md" >}}) for more information +#### Name resolution component + +You can set name resolution component to use within the configuration YAML. For example, to set the `spec.nameResolution.component` property to `"sqlite"`, pass configuration options in the `spec.nameResolution.configuration` dictionary as shown below. + +This is the basic example of a configuration resource: + +```yaml +apiVersion: dapr.io/v1alpha1 +kind: Configuration +metadata: + name: appconfig +spec: + nameResolution: + component: "sqlite" + version: "v1" + configuration: + connectionString: "/home/user/.dapr/nr.db" +``` + +For more information, see: +- [The name resolution component documentation]({{< ref supported-name-resolution >}}) for more examples. +- - [The Configuration YAML documentation]({{< ref configuration-schema.md >}}) to learn more about how to configure name resolution per component. + #### Scope secret store access See the [Scoping secrets]({{< ref "secret-scope.md" >}}) guide for information and examples on how to scope secrets to an application. diff --git a/daprdocs/content/en/reference/components-reference/supported-name-resolution/_index.md b/daprdocs/content/en/reference/components-reference/supported-name-resolution/_index.md index 59a956ce5b1..7ebd05eb9af 100644 --- a/daprdocs/content/en/reference/components-reference/supported-name-resolution/_index.md +++ b/daprdocs/content/en/reference/components-reference/supported-name-resolution/_index.md @@ -9,6 +9,8 @@ no_list: true The following components provide name resolution for the service invocation building block. +Name resolution components are configured via the [configuration]({{< ref configuration-overview.md >}}). + {{< partial "components/description.html" >}} {{< partial "components/name-resolution.html" >}} diff --git a/daprdocs/content/en/reference/components-reference/supported-name-resolution/nr-kubernetes.md b/daprdocs/content/en/reference/components-reference/supported-name-resolution/nr-kubernetes.md index 0f36aaacf2a..f370464bb1c 100644 --- a/daprdocs/content/en/reference/components-reference/supported-name-resolution/nr-kubernetes.md +++ b/daprdocs/content/en/reference/components-reference/supported-name-resolution/nr-kubernetes.md @@ -1,6 +1,6 @@ --- type: docs -title: "Kubernetes DNS name resolution provider spec" +title: "Kubernetes DNS" linkTitle: "Kubernetes DNS" description: Detailed information on the Kubernetes DNS name resolution component --- diff --git a/daprdocs/content/en/reference/components-reference/supported-name-resolution/nr-mdns.md b/daprdocs/content/en/reference/components-reference/supported-name-resolution/nr-mdns.md index 2c9d0ea6484..1c2e1c9a3f5 100644 --- a/daprdocs/content/en/reference/components-reference/supported-name-resolution/nr-mdns.md +++ b/daprdocs/content/en/reference/components-reference/supported-name-resolution/nr-mdns.md @@ -1,6 +1,6 @@ --- type: docs -title: "mDNS name resolution provider spec" +title: "mDNS" linkTitle: "mDNS" description: Detailed information on the mDNS name resolution component --- diff --git a/daprdocs/content/en/reference/components-reference/supported-name-resolution/nr-sqlite.md b/daprdocs/content/en/reference/components-reference/supported-name-resolution/nr-sqlite.md index 0be4e186036..b596a5b1467 100644 --- a/daprdocs/content/en/reference/components-reference/supported-name-resolution/nr-sqlite.md +++ b/daprdocs/content/en/reference/components-reference/supported-name-resolution/nr-sqlite.md @@ -1,6 +1,6 @@ --- type: docs -title: "SQLite name resolution provider" +title: "SQLite" linkTitle: "SQLite" description: Detailed information on the SQLite name resolution component --- diff --git a/daprdocs/content/en/reference/components-reference/supported-name-resolution/setup-nr-consul.md b/daprdocs/content/en/reference/components-reference/supported-name-resolution/setup-nr-consul.md index b5c8140e75a..fb7945572bf 100644 --- a/daprdocs/content/en/reference/components-reference/supported-name-resolution/setup-nr-consul.md +++ b/daprdocs/content/en/reference/components-reference/supported-name-resolution/setup-nr-consul.md @@ -1,6 +1,6 @@ --- type: docs -title: "HashiCorp Consul name resolution provider spec" +title: "HashiCorp Consul" linkTitle: "HashiCorp Consul" description: Detailed information on the HashiCorp Consul name resolution component --- diff --git a/daprdocs/content/en/reference/resource-specs/configuration-schema.md b/daprdocs/content/en/reference/resource-specs/configuration-schema.md index 14a8bb2b864..746d4b5c390 100644 --- a/daprdocs/content/en/reference/resource-specs/configuration-schema.md +++ b/daprdocs/content/en/reference/resource-specs/configuration-schema.md @@ -46,6 +46,11 @@ spec: handlers: - name: type: + nameResolution: + component: + version: + configuration: + secrets: scopes: - storeName: