Merge branch 'v1.5' into patch-8

This commit is contained in:
greenie-msft 2021-12-02 13:57:04 -08:00 committed by GitHub
commit 28f7e6274b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 931 additions and 537 deletions

View File

@ -25,7 +25,7 @@ Virtual actor capabilities are one of the building blocks that Dapr provides in
Creating a new actor follows a local call like `http://localhost:3500/v1.0/actors/<actorType>/<actorId>/…`. For example, `http://localhost:3500/v1.0/actors/myactor/50/method/getData` calls the `getData` method on the newly created `myactor` with id `50`.
The Dapr runtime SDKs have language-specific actor frameworks. For example, the .NET SDK has C# actors. The goal is for all the Dapr language SDKs to have an actor framework. Currently .NET, Java and Python SDK have actor frameworks.
The Dapr runtime SDKs have language-specific actor frameworks. For example, the .NET SDK has C# actors. The goal is for all the Dapr language SDKs to have an actor framework. Currently .NET, Java, Go and Python SDK have actor frameworks.
## Developer language SDKs and frameworks

View File

@ -1,18 +0,0 @@
---
type: docs
title: "Configuration overview"
linkTitle: "Configuration overview"
weight: 1000
description: "Use Dapr to get and watch application configuration"
---
Consuming application configuration is a common task when writing applications and frequently configuration stores are used to manage this configuration data. A configuration item is often dynamic in nature and is tightly coupled to the needs of the application that consumes it. For example, common uses for application configuration include names of secrets that need to be retrieved, different identifiers, partition or consumer IDs, names of databased to connect to etc. These configuration items are typically stored as key-value items in a database.
Dapr provides a [State Management API]({{<ref "state-management-overview.md">}}) that is based on key-value stores. However, application configuration can be changed by either developers or operators at runtime and the developer needs to be notified of these changes in order to take the required action and load the new configuration. Also the configuration data may want to be read only. Dapr's Configuration API allows developers to consume configuration items that are returned as key/value pair and subscribe to changes whenever a configuration item changes.
*This API is currently in `Alpha state` and only available on gRPC. An HTTP1.1 supported version with this URL `/v1.0/configuration` will be available before the API becomes stable.*
## References
- [How-To: Manage application configuration]({{< ref howto-manage-configuration.md >}})

View File

@ -8,17 +8,25 @@ description: "Use the secret store building block to securely retrieve a secret"
This article provides guidance on using Dapr's secrets API in your code to leverage the [secrets store building block]({{<ref secrets-overview>}}). The secrets API allows you to easily retrieve secrets in your application code from a configured secret store.
## Example
The below code example loosely describes an application that processes orders. In the example, there is an order processing service, which has a Dapr sidecar. The order processing service uses Dapr to store a secret in a local secret store.
<img src="/images/building-block-secrets-management-example.png" width=1000 alt="Diagram showing secrets management of example service">
## Set up a secret store
Before retrieving secrets in your application's code, you must have a secret store component configured. For the purposes of this guide, as an example you will configure a local secret store which uses a local JSON file to store secrets.
>Note: The component used in this example is not secured and is not recommended for production deployments. You can find other alternatives [here]({{<ref supported-secret-stores >}}).
{{% alert title="Warning" color="warning" %}}
In a production-grade application, local secret stores are not recommended. You can find other alternatives [here]({{<ref supported-secret-stores >}}) to securely manage your secrets.
{{% /alert %}}
Create a file named `mysecrets.json` with the following contents:
Create a file named `secrets.json` with the following contents:
```json
{
"my-secret" : "I'm Batman"
"secret": "Order Processing pass key"
}
```
@ -28,146 +36,226 @@ Create a directory for your components file named `components` and inside it cre
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: my-secrets-store
name: localsecretstore
namespace: default
spec:
type: secretstores.local.file
version: v1
metadata:
- name: secretsFile
value: <PATH TO SECRETS FILE>/mysecrets.json
value: secrets.json #path to secrets file
- name: nestedSeparator
value: ":"
```
Make sure to replace `<PATH TO SECRETS FILE>` with the path to the JSON file you just created.
>Note: the path to the secret store JSON is relative to where you call `dapr run` from.
To configure a different kind of secret store see the guidance on [how to configure a secret store]({{<ref setup-secret-store>}}) and review [supported secret stores]({{<ref supported-secret-stores >}}) to see specific details required for different secret store solutions.
## Get a secret
Now run the Dapr sidecar (with no application)
Run the Dapr sidecar with the application.
{{< tabs Dotnet Java Python Go Javascript>}}
{{% codetab %}}
```bash
dapr run --app-id my-app --dapr-http-port 3500 --components-path ./components
dapr run --app-id orderprocessingservice --app-port 6001 --dapr-http-port 3601 --dapr-grpc-port 60001 --components-path ./components dotnet run
```
{{% /codetab %}}
And now you can get the secret by calling the Dapr sidecar using the secrets API:
{{% codetab %}}
```bash
dapr run --app-id orderprocessingservice --app-port 6001 --dapr-http-port 3601 --dapr-grpc-port 60001 --components-path ./components mvn spring-boot:run
```
{{% /codetab %}}
{{% codetab %}}
```bash
dapr run --app-id orderprocessingservice --app-port 6001 --dapr-http-port 3601 --dapr-grpc-port 60001 --components-path ./components python3 OrderProcessingService.py
```
{{% /codetab %}}
{{% codetab %}}
```bash
dapr run --app-id orderprocessingservice --app-port 6001 --dapr-http-port 3601 --dapr-grpc-port 60001 --components-path ./components go run OrderProcessingService.go
```
{{% /codetab %}}
{{% codetab %}}
```bash
dapr run --app-id orderprocessingservice --app-port 6001 --dapr-http-port 3601 --dapr-grpc-port 60001 --components-path ./components npm start
```
{{% /codetab %}}
{{< /tabs >}}
Get the secret by calling the Dapr sidecar using the secrets API:
```bash
curl http://localhost:3500/v1.0/secrets/my-secrets-store/my-secret
curl http://localhost:3601/v1.0/secrets/localsecretstore/secret
```
For a full API reference, go [here]({{< ref secrets_api.md >}}).
## Calling the secrets API from your code
Once you have a secret store set up, you can call Dapr to get the secrets from your application code. Here are a few examples in different programming languages:
Once you have a secret store, call Dapr to get the secrets from your application code. Below are code examples that leverage Dapr SDKs for retrieving a secret.
{{< tabs "Go" "Javascript" "Python" "Rust" "C#" "PHP" >}}
{{< tabs Dotnet Java Python Go Javascript>}}
{{% codetab %}}
```Go
import (
"fmt"
"net/http"
)
```csharp
func main() {
url := "http://localhost:3500/v1.0/secrets/my-secrets-store/my-secret"
//dependencies
using Dapr.Client;
res, err := http.Get(url)
if err != nil {
panic(err)
//code
namespace EventService
{
class Program
{
static async Task Main(string[] args)
{
string SECRET_STORE_NAME = "localsecretstore";
using var client = new DaprClientBuilder().Build();
//Using Dapr SDK to get a secret
var secret = await client.GetSecretAsync(SECRET_STORE_NAME, "secret");
Console.WriteLine($"Result: {string.Join(", ", secret)}");
Console.WriteLine($"Result for bulk: {string.Join(", ", secret.Keys)}");
}
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(string(body))
}
}
```
{{% /codetab %}}
{{% codetab %}}
```javascript
require('isomorphic-fetch');
const secretsUrl = `http://localhost:3500/v1.0/secrets`;
```java
fetch(`${secretsUrl}/my-secrets-store/my-secret`)
.then((response) => {
if (!response.ok) {
throw "Could not get secret";
//dependencies
import io.dapr.client.DaprClient;
import io.dapr.client.DaprClientBuilder;
//code
@SpringBootApplication
public class OrderProcessingServiceApplication {
private static final Logger log = LoggerFactory.getLogger(OrderProcessingServiceApplication.class);
private static final ObjectMapper JSON_SERIALIZER = new ObjectMapper();
private static final String SECRET_STORE_NAME = "localsecretstore";
public static void main(String[] args) throws InterruptedException, JsonProcessingException {
DaprClient client = new DaprClientBuilder().build();
//Using Dapr SDK to get a secret
Map<String, String> secret = client.getSecret(SECRET_STORE_NAME, "secret").block();
log.info("Result: " + JSON_SERIALIZER.writeValueAsString(secret));
}
}
return response.text();
}).then((secret) => {
console.log(secret);
});
```
```
{{% /codetab %}}
{{% codetab %}}
```python
import requests as req
resp = req.get("http://localhost:3500/v1.0/secrets/my-secrets-store/my-secret")
print(resp.text)
#dependencies
from dapr.clients import DaprClient
from dapr.clients.grpc._state import StateItem
from dapr.clients.grpc._request import TransactionalStateOperation, TransactionOperationType
#code
logging.basicConfig(level = logging.INFO)
DAPR_STORE_NAME = "localsecretstore"
key = 'secret'
with DaprClient() as client:
#Using Dapr SDK to get a secret
secret = client.get_secret(store_name=DAPR_STORE_NAME, key=key)
logging.info('Result: ')
logging.info(secret.secret)
secret = client.get_bulk_secret(store_name=DAPR_STORE_NAME)
logging.info('Result for bulk secret: ')
logging.info(sorted(secret.secrets.items()))
```
{{% /codetab %}}
{{% codetab %}}
```rust
#![deny(warnings)]
use std::{thread};
```go
#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
let res = reqwest::get("http://localhost:3500/v1.0/secrets/my-secrets-store/my-secret").await?;
let body = res.text().await?;
println!("Secret:{}", body);
//dependencies
import (
"context"
"log"
dapr "github.com/dapr/go-sdk/client"
)
thread::park();
Ok(())
//code
func main() {
client, err := dapr.NewClient()
SECRET_STORE_NAME := "localsecretstore"
if err != nil {
panic(err)
}
```
defer client.Close()
ctx := context.Background()
{{% /codetab %}}
secret, err := client.GetSecret(ctx, SECRET_STORE_NAME, "secret", nil)
if err != nil {
return nil, errors.Wrap(err, "Got error for accessing key")
}
{{% codetab %}}
if secret != nil {
log.Println("Result : ")
log.Println(secret)
}
```csharp
var client = new HttpClient();
var response = await client.GetAsync("http://localhost:3500/v1.0/secrets/my-secrets-store/my-secret");
response.EnsureSuccessStatusCode();
secretRandom, err := client.GetBulkSecret(ctx, SECRET_STORE_NAME, nil)
if err != nil {
return nil, errors.Wrap(err, "Got error for accessing key")
}
if secret != nil {
log.Println("Result for bulk: ")
log.Println(secretRandom)
}
}
string secret = await response.Content.ReadAsStringAsync();
Console.WriteLine(secret);
```
{{% /codetab %}}
{{% codetab %}}
```php
<?php
```javascript
require_once __DIR__.'/vendor/autoload.php';
//dependencies
import { DaprClient, HttpMethod, CommunicationProtocolEnum } from 'dapr-client';
//code
const daprHost = "127.0.0.1";
async function main() {
const client = new DaprClient(daprHost, process.env.DAPR_HTTP_PORT, CommunicationProtocolEnum.HTTP);
const SECRET_STORE_NAME = "localsecretstore";
var secret = await client.secret.get(SECRET_STORE_NAME, "secret");
console.log("Result: " + secret);
secret = await client.secret.getBulk(SECRET_STORE_NAME);
console.log("Result for bulk: " + secret);
}
main();
$app = \Dapr\App::create();
$app->run(function(\Dapr\SecretManager $secretManager, \Psr\Log\LoggerInterface $logger) {
$secret = $secretManager->retrieve(secret_store: 'my-secret-store', name: 'my-secret');
$logger->alert('got secret: {secret}', ['secret' => $secret]);
});
```
{{% /codetab %}}
{{< /tabs >}}

View File

@ -10,9 +10,9 @@ This article describe how to deploy services each with an unique application ID,
## Example:
The below code examples loosely describe an application that processes orders. In the examples, there are two services - an order processing service and a checkout service. Both services have Dapr sidecars and the order processing service uses Dapr to invoke the checkout method in the checkout service.
The below code examples loosely describes an application that processes orders. In the examples, there are two services - an order processing service and a checkout service. Both services have Dapr sidecars and the order processing service uses Dapr to invoke the checkout method in the checkout service.
<img src="/images/service_invocation_eg.png" width=1000 height=500 alt="Diagram showing service invocation of example service">
<img src="/images/building-block-service-invocation-example.png" width=1000 height=500 alt="Diagram showing service invocation of example service">
## Step 1: Choose an ID for your service
@ -184,18 +184,26 @@ Below are code examples that leverage Dapr SDKs for service invocation.
{{% codetab %}}
```csharp
//headers
//dependencies
using Dapr.Client;
using System.Net.Http;
//code
namespace EventService
{
class Program
{
static async Task Main(string[] args)
{
int orderId = 100;
CancellationTokenSource source = new CancellationTokenSource();
CancellationToken cancellationToken = source.Token;
//Using Dapr SDK to invoke a method
using var client = new DaprClientBuilder().Build();
var result = client.CreateInvokeMethodRequest(HttpMethod.Get, "checkout", "checkout/" + orderId, cancellationToken);
await client.InvokeMethodAsync(result);
}
}
}
```
{{% /codetab %}}
@ -204,22 +212,27 @@ await client.InvokeMethodAsync(result);
{{% codetab %}}
```java
//headers
//dependencies
import io.dapr.client.DaprClient;
import io.dapr.client.DaprClientBuilder;
import io.dapr.client.domain.HttpExtension;
//code
DaprClient daprClient = new DaprClientBuilder().build();
var result = daprClient.invokeMethod(
@SpringBootApplication
public class OrderProcessingServiceApplication {
public static void main(String[] args) throws InterruptedException {
int orderId = 100;
//Using Dapr SDK to invoke a method
DaprClient client = new DaprClientBuilder().build();
var result = client.invokeMethod(
"checkout",
"checkout/" + orderId,
null,
HttpExtension.GET,
String.class
);
}
}
```
{{% /codetab %}}
@ -227,14 +240,14 @@ var result = daprClient.invokeMethod(
{{% codetab %}}
```python
//headers
#dependencies
from dapr.clients import DaprClient
//code
with DaprClient() as daprClient:
result = daprClient.invoke_method(
#code
orderId = 100
#Using Dapr SDK to invoke a method
with DaprClient() as client:
result = client.invoke_method(
"checkout",
f"checkout/{orderId}",
data=b'',
@ -247,21 +260,25 @@ with DaprClient() as daprClient:
{{% codetab %}}
```go
//headers
//dependencies
import (
"strconv"
dapr "github.com/dapr/go-sdk/client"
)
//code
func main() {
orderId := 100
//Using Dapr SDK to invoke a method
client, err := dapr.NewClient()
if err != nil {
panic(err)
}
defer client.Close()
ctx := context.Background()
result, err := client.InvokeMethod(ctx, "checkout", "checkout/" + strconv.Itoa(orderId), "get")
}
```
{{% /codetab %}}
@ -269,15 +286,20 @@ result, err := client.InvokeMethod(ctx, "checkout", "checkout/" + strconv.Itoa(o
{{% codetab %}}
```javascript
//headers
//dependencies
import { DaprClient, HttpMethod, CommunicationProtocolEnum } from 'dapr-client';
//code
const daprHost = "127.0.0.1";
var main = function() {
var orderId = 100;
//Using Dapr SDK to invoke a method
const client = new DaprClient(daprHost, process.env.DAPR_HTTP_PORT, CommunicationProtocolEnum.HTTP);
const result = await client.invoker.invoke('checkout' , "checkout/" + orderId , HttpMethod.GET);
}
main();
```
{{% /codetab %}}

View File

@ -1,7 +1,7 @@
---
type: docs
title: "State Time-to-Live (TTL)"
linkTitle: "State TTL"
title: "How-To: Set state Time-to-Live (TTL)"
linkTitle: "How-To: Set state TTL"
weight: 500
description: "Manage state with time-to-live."
---
@ -31,12 +31,38 @@ Please refer to the TTL column in the tables at [state store components]({{< ref
State TTL can be set in the metadata as part of the state store set request:
{{< tabs "HTTP API (Bash)" "HTTP API (PowerShell)" "Python SDK" "PHP SDK">}}
{{< tabs Python "HTTP API (Bash)" "HTTP API (PowerShell)">}}
{{% codetab %}}
```python
#dependencies
from dapr.clients import DaprClient
#code
DAPR_STORE_NAME = "statestore"
with DaprClient() as client:
client.save_state(DAPR_STORE_NAME, "order_1", str(orderId), metadata=(
('ttlInSeconds', '120')
))
```
Navigate to the directory containing the above code, then run the following command to launch a Dapr sidecar and run the application:
```bash
dapr run --app-id orderprocessing --app-port 6001 --dapr-http-port 3601 --dapr-grpc-port 60001 -- python3 OrderProcessingService.py
```
{{% /codetab %}}
{{% codetab %}}
```bash
curl -X POST -H "Content-Type: application/json" -d '[{ "key": "key1", "value": "value1", "metadata": { "ttlInSeconds": "120" } }]' http://localhost:3500/v1.0/state/statestore
curl -X POST -H "Content-Type: application/json" -d '[{ "key": "order_1", "value": "250", "metadata": { "ttlInSeconds": "120" } }]' http://localhost:3601/v1.0/state/statestore
```
{{% /codetab %}}
@ -44,48 +70,7 @@ curl -X POST -H "Content-Type: application/json" -d '[{ "key": "key1", "value":
{{% codetab %}}
```powershell
Invoke-RestMethod -Method Post -ContentType 'application/json' -Body '[{"key": "key1", "value": "value1", "metadata": {"ttlInSeconds": "120"}}]' -Uri 'http://localhost:3500/v1.0/state/statestore'
```
{{% /codetab %}}
{{% codetab %}}
```python
from dapr.clients import DaprClient
with DaprClient() as d:
d.save_state(
store_name="statestore",
key="myFirstKey",
value="myFirstValue",
metadata=(
('ttlInSeconds', '120')
)
)
print("State has been stored")
```
{{% /codetab %}}
{{% codetab %}}
Save the following in `state-example.php`:
```php
<?php
require_once __DIR__.'/vendor/autoload.php';
$app = \Dapr\App::create();
$app->run(function(\Dapr\State\StateManager $stateManager, \Psr\Log\LoggerInterface $logger) {
$stateManager->save_state(store_name: 'statestore', item: new \Dapr\State\StateItem(
key: 'myFirstKey',
value: 'myFirstValue',
metadata: ['ttlInSeconds' => '120']
));
$logger->alert('State has been stored');
});
Invoke-RestMethod -Method Post -ContentType 'application/json' -Body '[{"key": "order_1", "value": "250", "metadata": {"ttlInSeconds": "120"}}]' -Uri 'http://localhost:3601/v1.0/state/statestore'
```
{{% /codetab %}}

View File

@ -16,7 +16,7 @@ In self hosted mode the Dapr configuration is a configuration file, for example
A Dapr sidecar can also apply a configuration by using a ```--config``` flag to the file path with ```dapr run``` CLI command.
#### Kubernetes sidecar
In Kubernetes mode the Dapr configuration is a Configuration CRD, that is applied to the cluster. For example;
In Kubernetes mode the Dapr configuration is a Configuration CRD, that is applied to the cluster. For example:
```bash
kubectl apply -f myappconfig.yaml
@ -41,7 +41,7 @@ Note: There are more [Kubernetes annotations]({{< ref "arguments-annotations-ove
### Sidecar configuration settings
The following configuration settings can be applied to Dapr application sidecars;
The following configuration settings can be applied to Dapr application sidecars:
- [Tracing](#tracing)
- [Metrics](#metrics)
- [Middleware](#middleware)

View File

@ -46,7 +46,7 @@ The above example uses secrets as plain strings. It is recommended to use a secr
| masterKey | Y | Output | The CosmosDB account master key | `"master-key"` |
| database | Y | Output | The name of the CosmosDB database | `"OrderDb"` |
| collection | Y | Output | The name of the container inside the database. | `"Orders"` |
| partitionKey | Y | Output | The name of the partitionKey to extract from the payload and is used in the container | `"OrderId"`, `"message"` |
| partitionKey | Y | Output | The name of the key to extract from the payload (document to be created) that is used as the partition key. This name must match the partition key specified upon creation of the Cosmos DB container. | `"OrderId"`, `"message"` |
For more information see [Azure Cosmos DB resource model](https://docs.microsoft.com/azure/cosmos-db/account-databases-containers-items).
@ -56,6 +56,31 @@ This component supports **output binding** with the following operations:
- `create`
## Best Practices for Production Use
Azure Cosmos DB shares a strict metadata request rate limit across all databases in a single Azure Cosmos DB account. New connections to Azure Cosmos DB assume a large percentage of the allowable request rate limit. (See the [CosmosDB documentation](https://docs.microsoft.com/azure/cosmos-db/sql/troubleshoot-request-rate-too-large#recommended-solution-3))
Therefore several strategies must be applied to avoid simultaneous new connections to Azure Cosmos DB:
- Ensure sidecars of applications only load the Azure Cosmos DB component when they require it to avoid unnecessary database connections. This can be done by [scoping your components to specific applications]({{< ref component-scopes.md >}}#application-access-to-components-with-scopes).
- Choose deployment strategies that sequentially deploy or start your applications to minimize bursts in new connections to your Azure Cosmos DB accounts.
- Avoid reusing the same Azure Cosmos DB account for unrelated databases or systems (even outside of Dapr). Distinct Azure Cosmos DB accounts have distinct rate limits.
- Increase the `initTimeout` value to allow the component to retry connecting to Azure Cosmos DB during side car initialization for up to 5 minutes. The default value is `5s` and should be increased. When using Kubernetes, increasing this value may also require an update to your [Readiness and Liveness probes](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/).
```yaml
spec:
type: bindings.azure.cosmosdb
version: v1
initTimeout: 5m
metadata:
```
## Data format
The **output binding** `create` operation requires the following keys to exist in the payload of every document to be created:
- `id`: a unique ID for the document to be created
- `<partitionKey>`: the name of the partition key specified via the `spec.partitionKey` in the component definition. This must also match the partition key specified upon creation of the Cosmos DB container.
## Related links
- [Basic schema for a Dapr component]({{< ref component-schema >}})

View File

@ -86,7 +86,7 @@ with NATS, find the service with: `kubectl get svc my-nats`.
- [Basic schema for a Dapr component]({{< ref component-schema >}})
- Read [this guide]({{< ref "howto-publish-subscribe.md#step-2-publish-a-topic" >}}) for instructions on configuring pub/sub components
- [Pub/Sub building block]({{< ref pubsub >}})
- [JetStream Documentation](https://docs.nats.io/jetstream/jetstream)
- [JetStream Documentation](https://docs.nats.io/nats-concepts/jetstream)
- [NATS CLI](https://github.com/nats-io/natscli)

View File

@ -92,7 +92,7 @@ You can then interact with the server using the client port: `localhost:4222`.
{{% /codetab %}}
{{% codetab %}}
Install NATS on Kubernetes by using the [kubectl](https://docs.nats.io/nats-on-kubernetes/minimal-setup):
Install NATS on Kubernetes by using the [kubectl](https://docs.nats.io/running-a-nats-service/introduction/running/nats-kubernetes/minimal-setup#minimal-nats-setup):
```bash
# Single server NATS

View File

@ -64,6 +64,25 @@ In order to setup CosmosDB as a state store, you need the following properties:
- **Database**: The name of the database
- **Collection**: The name of the collection
## Best Practices for Production Use
Azure Cosmos DB shares a strict metadata request rate limit across all databases in a single Azure Cosmos DB account. New connections to Azure Cosmos DB assume a large percentage of the allowable request rate limit. (See the [CosmosDB documentation](https://docs.microsoft.com/azure/cosmos-db/sql/troubleshoot-request-rate-too-large#recommended-solution-3))
Therefore several strategies must be applied to avoid simultaneous new connections to Azure Cosmos DB:
- Ensure sidecars of applications only load the Azure Cosmos DB component when they require it to avoid unnecessary database connections. This can be done by [scoping your components to specific applications]({{< ref component-scopes.md >}}#application-access-to-components-with-scopes).
- Choose deployment strategies that sequentially deploy or start your applications to minimize bursts in new connections to your Azure Cosmos DB accounts.
- Avoid reusing the same Azure Cosmos DB account for unrelated databases or systems (even outside of Dapr). Distinct Azure Cosmos DB accounts have distinct rate limits.
- Increase the `initTimeout` value to allow the component to retry connecting to Azure Cosmos DB during side car initialization for up to 5 minutes. The default value is `5s` and should be increased. When using Kubernetes, increasing this value may also require an update to your [Readiness and Liveness probes](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/).
```yaml
spec:
type: state.azure.cosmosdb
version: v1
initTimeout: 5m
metadata:
```
## Data format
To use the CosmosDB state store, your data must be sent to Dapr in JSON-serialized. Having it just JSON *serializable* will not work.

View File

@ -14,7 +14,7 @@
{{ end }}
{{ $url := urls.Parse .URL }}
{{ $baseurl := urls.Parse $.Site.Params.Baseurl }}
<a class="nav-link{{if $active }} active{{end}}" href="{{ with .Page }}{{ .RelPermalink }}{{ else }}{{ .URL | relLangURL }}{{ end }}" {{ if ne $url.Host $baseurl.Host }}target="_blank" {{ end }}><span{{if $active }} class="active"{{end}}>{{ .Name }}</span></a>
<a class="nav-link{{if $active }} active{{end}}" href="{{ with .Page }}{{ .RelPermalink }}{{ else }}{{ .URL | relLangURL }}{{ end }}" {{ if ne $url.Host $baseurl.Host }}target="_blank" rel="nofollow noopener noreferrer"{{ end }}><span{{if $active }} class="active"{{end}}>{{ .Name }}</span></a>
</li>
{{ end }}
{{ if .Site.Params.versions }}

View File

@ -21,8 +21,8 @@
{{ $newPageQS := querify "value" $newPageStub.Content "filename" "change-me.md" | safeURL }}
{{ $newPageURL := printf "%s/new/%s?%s" $gh_repo $gh_repo_path $newPageQS }}
<a href="{{ $editURL }}" target="_blank"><i class="fa fa-edit fa-fw"></i> {{ T "post_edit_this" }}</a>
<a href="{{ $issuesURL }}" target="_blank"><i class="fab fa-github fa-fw"></i> {{ T "post_create_issue" }}</a>
<a href="{{ $editURL }}" target="_blank" rel="nofollow noopener noreferrer"><i class="fa fa-edit fa-fw"></i> {{ T "post_edit_this" }}</a>
<a href="{{ $issuesURL }}" target="_blank" rel="nofollow noopener noreferrer"><i class="fab fa-github fa-fw"></i> {{ T "post_create_issue" }}</a>
</div>
{{ end }}
{{ end }}

View File

@ -8,7 +8,7 @@
{{ with $current_version }}<p>The documentation you are viewing is for Dapr {{ . | markdownify }}
which is an older version of Dapr.
{{ with $latest_version }}For up-to-date documentation, see the
<a href="{{ $latest_version | safeURL }}" target="_blank">latest version</a>.</p>
<a href="{{ $latest_version | safeURL }}" target="_blank" rel="nofollow noopener noreferrer">latest version</a>.</p>
{{ end }}
{{ end }}
</div>

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

View File

Before

Width:  |  Height:  |  Size: 181 KiB

After

Width:  |  Height:  |  Size: 181 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB