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 2 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 @@ -92,7 +92,11 @@ The diagram below shows an example of how this works. If you have 1 instance of

### Pluggable service discovery
hhunter-ms marked this conversation as resolved.
Show resolved Hide resolved

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 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.
hhunter-ms marked this conversation as resolved.
Show resolved Hide resolved

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 can be used in any hosting environment, including Kubernetes or self-hosted.
hhunter-ms marked this conversation as resolved.
Show resolved Hide resolved

### 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,27 @@ The following table lists the properties for HTTP handlers:

See [Middleware pipelines]({{< ref "middleware.md" >}}) for more information

#### Name resolution
hhunter-ms marked this conversation as resolved.
Show resolved Hide resolved

You can set name resolution within the Configuration YAML. Set the `spec.nameResolution.component` property to `"sqlite"`, then pass configuration options in the `spec.nameResolution.configuration` dictionary.
hhunter-ms marked this conversation as resolved.
Show resolved Hide resolved

This is the basic example of a Configuration resource:
hhunter-ms marked this conversation as resolved.
Show resolved Hide resolved

```yaml
apiVersion: dapr.io/v1alpha1
kind: Configuration
metadata:
name: appconfig
spec:
nameResolution:
component: "sqlite"
version: "v1"
configuration:
connectionString: "/home/user/.dapr/nr.db"
```

See [the Name Resolution spec documentation]({{< ref supported-name-resolution >}}) and the [Configuration YAML documentation]({{< ref configuration-schema.md >}}) to learn more about how to configure name resolution per component.
hhunter-ms marked this conversation as resolved.
Show resolved Hide resolved

#### 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 @@ -7,6 +7,8 @@ description: The supported name resolution providers to enable Dapr service invo
no_list: true
---

Name resolution is configured via the [Dapr Configuration]({{< ref configuration-overview.md >}}).
hhunter-ms marked this conversation as resolved.
Show resolved Hide resolved

The following components provide name resolution for the service invocation building block.

{{< partial "components/description.html" >}}
Expand Down
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: "sqlite"
hhunter-ms marked this conversation as resolved.
Show resolved Hide resolved
version: "v1"
hhunter-ms marked this conversation as resolved.
Show resolved Hide resolved
configuration:
connectionString: "/home/user/.dapr/nr.db"
hhunter-ms marked this conversation as resolved.
Show resolved Hide resolved
secrets:
scopes:
- storeName: <NAME-OF-SCOPED-STORE>
Expand Down
Loading