From a63d3287fed4bf3a434b54f2bf274e8e5390e967 Mon Sep 17 00:00:00 2001 From: Hannah Hunter Date: Fri, 2 Feb 2024 15:50:25 -0500 Subject: [PATCH 1/4] add name resolution to config overview and schema Signed-off-by: Hannah Hunter --- .../configuration/configuration-overview.md | 22 +++++++++++++++++++ .../resource-specs/configuration-schema.md | 5 +++++ 2 files changed, 27 insertions(+) diff --git a/daprdocs/content/en/operations/configuration/configuration-overview.md b/daprdocs/content/en/operations/configuration/configuration-overview.md index ca9601671f4..62b9806da80 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,27 @@ The following table lists the properties for HTTP handlers: See [Middleware pipelines]({{< ref "middleware.md" >}}) for more information +#### Name resolution + +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. + +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" +``` + +See [the Name Resolution spec documentation]({{< ref supported-name-resolution >}}) 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/resource-specs/configuration-schema.md b/daprdocs/content/en/reference/resource-specs/configuration-schema.md index 14a8bb2b864..b10115fbcbc 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: "sqlite" + version: "v1" + configuration: + connectionString: "/home/user/.dapr/nr.db" secrets: scopes: - storeName: From 330be0a82b0d78ccd9dae5f647d0e610499bf456 Mon Sep 17 00:00:00 2001 From: Hannah Hunter Date: Fri, 2 Feb 2024 16:03:45 -0500 Subject: [PATCH 2/4] update titles, add links, update service invo overview Signed-off-by: Hannah Hunter --- .../service-invocation/service-invocation-overview.md | 6 +++++- .../en/operations/configuration/configuration-overview.md | 2 +- .../supported-name-resolution/_index.md | 2 ++ .../supported-name-resolution/nr-kubernetes.md | 2 +- .../supported-name-resolution/nr-mdns.md | 2 +- .../supported-name-resolution/nr-sqlite.md | 2 +- .../supported-name-resolution/setup-nr-consul.md | 2 +- 7 files changed, 12 insertions(+), 6 deletions(-) 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..2f212e23d14 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 @@ -92,7 +92,11 @@ The diagram below shows an example of how this works. If you have 1 instance of ### Pluggable 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 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. 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. ### 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 62b9806da80..e1406768421 100644 --- a/daprdocs/content/en/operations/configuration/configuration-overview.md +++ b/daprdocs/content/en/operations/configuration/configuration-overview.md @@ -209,7 +209,7 @@ spec: connectionString: "/home/user/.dapr/nr.db" ``` -See [the Name Resolution spec documentation]({{< ref supported-name-resolution >}}) to learn more about how to configure name resolution per component. +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. #### Scope secret store access 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..fc072eab7a4 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 @@ -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 >}}). + The following components provide name resolution for the service invocation building block. {{< partial "components/description.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 --- From 2961bc43582b357ef1c160e7750a1ae38bb18865 Mon Sep 17 00:00:00 2001 From: Hannah Hunter Date: Tue, 6 Feb 2024 12:44:20 -0500 Subject: [PATCH 3/4] mark review Signed-off-by: Hannah Hunter --- .../service-invocation/service-invocation-overview.md | 6 +++--- .../operations/configuration/configuration-overview.md | 10 ++++++---- .../supported-name-resolution/_index.md | 4 ++-- .../reference/resource-specs/configuration-schema.md | 4 ++-- 4 files changed, 13 insertions(+), 11 deletions(-) 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 2f212e23d14..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,13 +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. +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 can be used in any hosting environment, including Kubernetes or self-hosted. +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 e1406768421..601f178ee0f 100644 --- a/daprdocs/content/en/operations/configuration/configuration-overview.md +++ b/daprdocs/content/en/operations/configuration/configuration-overview.md @@ -190,11 +190,11 @@ The following table lists the properties for HTTP handlers: See [Middleware pipelines]({{< ref "middleware.md" >}}) for more information -#### Name resolution +#### Name resolution component -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. +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: +This is the basic example of a configuration resource: ```yaml apiVersion: dapr.io/v1alpha1 @@ -209,7 +209,9 @@ spec: 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. +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 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 fc072eab7a4..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 @@ -7,10 +7,10 @@ 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 >}}). - 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/resource-specs/configuration-schema.md b/daprdocs/content/en/reference/resource-specs/configuration-schema.md index b10115fbcbc..6587863dcf0 100644 --- a/daprdocs/content/en/reference/resource-specs/configuration-schema.md +++ b/daprdocs/content/en/reference/resource-specs/configuration-schema.md @@ -47,8 +47,8 @@ spec: - name: type: nameResolution: - component: "sqlite" - version: "v1" + component: + version: configuration: connectionString: "/home/user/.dapr/nr.db" secrets: From 87bfa451653b87706f83b0a53f4bd9615710add2 Mon Sep 17 00:00:00 2001 From: Hannah Hunter Date: Tue, 6 Feb 2024 13:36:27 -0500 Subject: [PATCH 4/4] forgot one Signed-off-by: Hannah Hunter --- .../content/en/reference/resource-specs/configuration-schema.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daprdocs/content/en/reference/resource-specs/configuration-schema.md b/daprdocs/content/en/reference/resource-specs/configuration-schema.md index 6587863dcf0..746d4b5c390 100644 --- a/daprdocs/content/en/reference/resource-specs/configuration-schema.md +++ b/daprdocs/content/en/reference/resource-specs/configuration-schema.md @@ -50,7 +50,7 @@ spec: component: version: configuration: - connectionString: "/home/user/.dapr/nr.db" + secrets: scopes: - storeName: