Skip to content

Commit

Permalink
Merge pull request dapr#4007 from hhunter-ms/issue_4005
Browse files Browse the repository at this point in the history
Update name resolution docs
  • Loading branch information
hhunter-ms authored Feb 6, 2024
2 parents 568a283 + 3f79553 commit e5c8721
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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" >}}
Original file line number Diff line number Diff line change
@@ -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
---
Expand Down
Original file line number Diff line number Diff line change
@@ -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
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
type: docs
title: "SQLite name resolution provider"
title: "SQLite"
linkTitle: "SQLite"
description: Detailed information on the SQLite name resolution component
---
Expand Down
Original file line number Diff line number Diff line change
@@ -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
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ spec:
handlers:
- name: <HANDLER-NAME>
type: <HANDLER-TYPE>
nameResolution:
component: <NAME-OF-NAME-RESOLUTION-COMPONENT>
version: <NAME-RESOLUTION-COMPONENT-VERSION>
configuration:
<NAME-RESOLUTION-COMPONENT-METADATA-CONFIGURATION>
secrets:
scopes:
- storeName: <NAME-OF-SCOPED-STORE>
Expand Down

0 comments on commit e5c8721

Please sign in to comment.