Skip to content

Commit

Permalink
Merge branch 'v1.13' into issue_3869
Browse files Browse the repository at this point in the history
  • Loading branch information
hhunter-ms authored Feb 6, 2024
2 parents 3018bad + 7c09f2c commit 5749b2e
Show file tree
Hide file tree
Showing 16 changed files with 272 additions and 191 deletions.
12 changes: 0 additions & 12 deletions daprdocs/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -209,18 +209,6 @@ url_latest_version = "https://docs.dapr.io"
[[params.versions]]
version = "v1.7"
url = "https://v1-7.docs.dapr.io"
[[params.versions]]
version = "v1.6"
url = "https://v1-6.docs.dapr.io"
[[params.versions]]
version = "v1.5"
url = "https://v1-5.docs.dapr.io"
[[params.versions]]
version = "v1.4"
url = "https://v1-4.docs.dapr.io"
[[params.versions]]
version = "v1.3"
url = "https://v1-3.docs.dapr.io"

# UI Customization
[params.ui]
Expand Down
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

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ metadata:
name: <NAME>
spec:
type: state.azure.blobstorage
version: v1
# Supports v1 and v2. Users should always use v2 by default. There is no
# migration path from v1 to v2, see `versioning` below.
version: v2
metadata:
- name: accountName
value: "[your_account_name]"
Expand All @@ -32,21 +34,32 @@ spec:
The above example uses secrets as plain strings. It is recommended to use a secret store for the secrets as described [here]({{< ref component-secrets.md >}}).
{{% /alert %}}
## Versioning
Dapr has 2 versions of the Azure Blob Storage state store component: `v1` and `v2`. It is recommended to use `v2` for all new applications. `v1` is considered legacy and is preserved for compatibility with existing applications only.

In `v1`, a longstanding implementation issue was identified, where the [key prefix]({{< ref howto-share-state.md >}}) was incorrectly stripped by the component, essentially behaving as if `keyPrefix` was always set to `none`.
The updated `v2` of the component fixes the incorrect behavior and makes the state store correctly respect the `keyPrefix` property.

While `v1` and `v2` have the same metadata fields, they are otherwise incompatible, with no automatic data migration path for `v1` to `v2`.

If you are using `v1` of this component, you should continue to use `v1` until you create a new state store.

## Spec metadata fields

| Field | Required | Details | Example |
| Field | Required | Details | Example |
|--------------------|:--------:|---------|---------|
| `accountName` | Y | The storage account name | `"mystorageaccount"`.
| `accountKey` | Y (unless using Microsoft Entra ID) | Primary or secondary storage key | `"key"`
| `containerName` | Y | The name of the container to be used for Dapr state. The container will be created for you if it doesn't exist | `"container"`
| `azureEnvironment` | N | Optional name for the Azure environment if using a different Azure cloud | `"AZUREPUBLICCLOUD"` (default value), `"AZURECHINACLOUD"`, `"AZUREUSGOVERNMENTCLOUD"`, `"AZUREGERMANCLOUD"`
| `accountName` | Y | The storage account name | `"mystorageaccount"`. |
| `accountKey` | Y (unless using Microsoft Entra ID) | Primary or secondary storage key | `"key"` |
| `containerName` | Y | The name of the container to be used for Dapr state. The container will be created for you if it doesn't exist | `"container"` |
| `azureEnvironment` | N | Optional name for the Azure environment if using a different Azure cloud | `"AZUREPUBLICCLOUD"` (default value), `"AZURECHINACLOUD"`, `"AZUREUSGOVERNMENTCLOUD"` |
| `endpoint` | N | Optional custom endpoint URL. This is useful when using the [Azurite emulator](https://github.com/Azure/azurite) or when using custom domains for Azure Storage (although this is not officially supported). The endpoint must be the full base URL, including the protocol (`http://` or `https://`), the IP or FQDN, and optional port. | `"http://127.0.0.1:10000"`
| `ContentType` | N | The blob's content type | `"text/plain"`
| `ContentMD5` | N | The blob's MD5 hash | `"vZGKbMRDAnMs4BIwlXaRvQ=="`
| `ContentEncoding` | N | The blob's content encoding | `"UTF-8"`
| `ContentLanguage` | N | The blob's content language | `"en-us"`
| `ContentDisposition` | N | The blob's content disposition. Conveys additional information about how to process the response payload | `"attachment"`
| `CacheControl` | N | The blob's cache control | `"no-cache"`
| `ContentType` | N | The blob's content type | `"text/plain"` |
| `ContentMD5` | N | The blob's MD5 hash | `"vZGKbMRDAnMs4BIwlXaRvQ=="` |
| `ContentEncoding` | N | The blob's content encoding | `"UTF-8"` |
| `ContentLanguage` | N | The blob's content language | `"en-us"` |
| `ContentDisposition` | N | The blob's content disposition. Conveys additional information about how to process the response payload | `"attachment"` |
| `CacheControl`| N | The blob's cache control | `"no-cache"` |

## Setup Azure Blob Storage

Expand Down
Loading

0 comments on commit 5749b2e

Please sign in to comment.