Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update name resolution docs #4007

Merged
merged 6 commits into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading