diff --git a/daprdocs/content/en/developing-applications/building-blocks/configuration/configuration-api-overview.md b/daprdocs/content/en/developing-applications/building-blocks/configuration/configuration-api-overview.md index 5f2ac9096..2e95f6b49 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/configuration/configuration-api-overview.md +++ b/daprdocs/content/en/developing-applications/building-blocks/configuration/configuration-api-overview.md @@ -6,17 +6,40 @@ weight: 1000 description: "Overview of the configuration API building block" --- -## Introduction +Consuming application configuration is a common task when writing applications. Frequently, configuration stores are used to manage this configuration data. A configuration item is often dynamic in nature and tightly coupled to the needs of the application that consumes it. -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, different identifiers, partition or consumer IDs, names of databases to connect to etc. These configuration items are typically stored as key/value items in a state store or database. 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 configuration data is typically read only from the application API perspective, with updates to the configuration store made through operator tooling. Dapr's configuration API allows developers to consume configuration items that are returned as read only key/value pairs and subscribe to changes whenever a configuration item changes. +For example, application configuration can include: +- Names of secrets +- Different identifiers +- Partition or consumer IDs +- Names of databases to connect to, etc + +Usually, configuration items are stored as key/value items in a state store or database. Developers or operators can change application configuration at runtime in the configuration store. Once changes are made, a service is notified to load the new configuration. + +Configuration data is read-only from the application API perspective, with updates to the configuration store made through operator tooling. With Dapr's configuration API, you can: +- Consume configuration items that are returned as read-only key/value pairs +- Subscribe to changes whenever a configuration item changes -It is worth noting that this configuration API should not be confused with the [Dapr sidecar and control plane configuration]({{}}) which is used to set policies and settings on instances of Dapr sidecars or the installed Dapr control plane. +{{% alert title="Note" color="primary" %}} + The Configuration API should not be confused with the [Dapr sidecar and control plane configuration]({{< ref "configuration-overview" >}}), which is used to set policies and settings on Dapr sidecar instances or the installed Dapr control plane. +{{% /alert %}} -*This API is currently in `Alpha` state* +## Try out configuration + +### Quickstart + +Want to put the Dapr configuration API to the test? Walk through the following quickstart to see the configuration API in action: + +| Quickstart | Description | +| ---------- | ----------- | +| [Configuration quickstart]({{< ref configuration-quickstart.md >}}) | Get configuration items or subscribe to configuration changes using the configuration API. | + +### Start using the configuration API directly in your app + +Want to skip the quickstarts? Not a problem. You can try out the configuration building block directly in your application to read and manage configuration data. After [Dapr is installed]({{< ref "getting-started/_index.md" >}}), you can begin using the configuration API starting with [the configuration how-to guide]({{< ref howto-manage-configuration.md >}}). -## Features ## Next steps Follow these guides on: diff --git a/daprdocs/content/en/developing-applications/building-blocks/configuration/howto-manage-configuration.md b/daprdocs/content/en/developing-applications/building-blocks/configuration/howto-manage-configuration.md index af70ae08e..b05722312 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/configuration/howto-manage-configuration.md +++ b/daprdocs/content/en/developing-applications/building-blocks/configuration/howto-manage-configuration.md @@ -8,12 +8,13 @@ description: "Learn how to get application configuration and subscribe for chang This example uses the Redis configuration store component to demonstrate how to retrieve a configuration item. +Diagram showing get configuration of example service + {{% alert title="Note" color="primary" %}} -This API is currently in `Alpha` state and only available on gRPC. An HTTP1.1 supported version with this URL syntax `/v1.0/configuration` will be available before the API is certified into `Stable` state. + If you haven't already, [try out the configuration quickstart]({{< ref configuration-quickstart.md >}}) for a quick walk-through on how to use the configuration API. {{% /alert %}} -Diagram showing get configuration of example service ## Create a configuration item in store @@ -68,7 +69,7 @@ spec: ## Retrieve Configuration Items ### Get configuration items using Dapr SDKs -{{< tabs Dotnet Java Python>}} +{{< tabs ".NET" Java Python>}} {{% codetab %}} diff --git a/daprdocs/content/en/developing-applications/building-blocks/observability/tracing-overview.md b/daprdocs/content/en/developing-applications/building-blocks/observability/tracing-overview.md index eb758b335..38ac85d25 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/observability/tracing-overview.md +++ b/daprdocs/content/en/developing-applications/building-blocks/observability/tracing-overview.md @@ -18,7 +18,7 @@ There are two scenarios for how tracing is used: 1. Dapr generates the trace context and you propagate the trace context to another service. 2. You generate the trace context and Dapr propagates the trace context to a service. -### Propogating sequential service calls +### Propagating sequential service calls Dapr takes care of creating the trace headers. However, when there are more than two services, you're responsible for propagating the trace headers between them. Let's go through the scenarios with examples: @@ -45,7 +45,7 @@ There are no helper methods exposed in Dapr SDKs to propagate and retrieve trace 4. Pub/sub messages Dapr generates the trace headers in the published message topic. These trace headers are propagated to any services listening on that topic. -### Propogating multiple different service calls +### Propagating multiple different service calls In the following scenarios, Dapr does some of the work for you and you need to either create or propagate trace headers. @@ -115,4 +115,4 @@ In the gRPC API calls, trace context is passed through `grpc-trace-bin` header. - [Observability concepts]({{< ref observability-concept.md >}}) - [W3C Trace Context for distributed tracing]({{< ref w3c-tracing-overview >}}) - [W3C Trace Context specification](https://www.w3.org/TR/trace-context/) -- [Observability quickstart](https://github.com/dapr/quickstarts/tree/master/tutorials/observability) \ No newline at end of file +- [Observability quickstart](https://github.com/dapr/quickstarts/tree/master/tutorials/observability) diff --git a/daprdocs/content/en/developing-applications/building-blocks/state-management/howto-state-query-api.md b/daprdocs/content/en/developing-applications/building-blocks/state-management/howto-state-query-api.md index 209eda9d0..6b321d34d 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/state-management/howto-state-query-api.md +++ b/daprdocs/content/en/developing-applications/building-blocks/state-management/howto-state-query-api.md @@ -16,7 +16,7 @@ Even though the state store is a key/value store, the `value` might be a JSON do ## Querying the state -Submit query requests via HTTP POST/PUT or gRPC. The body of the request is the JSON map with 3 _optional_ entries: +Submit query requests via HTTP POST/PUT or gRPC. The body of the request is the JSON map with 3 entries: - `filter` - `sort` diff --git a/daprdocs/content/en/getting-started/install-dapr-cli.md b/daprdocs/content/en/getting-started/install-dapr-cli.md index 258ff34e0..4c8d39880 100644 --- a/daprdocs/content/en/getting-started/install-dapr-cli.md +++ b/daprdocs/content/en/getting-started/install-dapr-cli.md @@ -188,6 +188,7 @@ Available Commands: stop Stop Dapr instances and their associated apps. . Supported platforms: Self-hosted uninstall Uninstall Dapr runtime. Supported platforms: Kubernetes and self-hosted upgrade Upgrades a Dapr control plane installation in a cluster. Supported platforms: Kubernetes + version Print the Dapr runtime and CLI version Flags: -h, --help help for dapr diff --git a/daprdocs/content/en/getting-started/quickstarts/_index.md b/daprdocs/content/en/getting-started/quickstarts/_index.md index 67380fa87..727b9a17b 100644 --- a/daprdocs/content/en/getting-started/quickstarts/_index.md +++ b/daprdocs/content/en/getting-started/quickstarts/_index.md @@ -27,4 +27,5 @@ Hit the ground running with our Dapr quickstarts, complete with code samples aim | [State Management]({{< ref statemanagement-quickstart.md >}}) | Store a service's data as key/value pairs in supported state stores. | | [Bindings]({{< ref bindings-quickstart.md >}}) | Work with external systems using input bindings to respond to events and output bindings to call operations. | | [Secrets Management]({{< ref secrets-quickstart.md >}}) | Securely fetch secrets. | +| [Configuration]({{< ref configuration-quickstart.md >}}) | Get configuration items and subscribe for configuration updates. | | [Resiliency]({{< ref resiliency >}}) | Define and apply fault-tolerance policies to your Dapr API requests. | diff --git a/daprdocs/content/en/getting-started/quickstarts/bindings-quickstart.md b/daprdocs/content/en/getting-started/quickstarts/bindings-quickstart.md index 4eef26f5c..b34f3985e 100644 --- a/daprdocs/content/en/getting-started/quickstarts/bindings-quickstart.md +++ b/daprdocs/content/en/getting-started/quickstarts/bindings-quickstart.md @@ -46,7 +46,7 @@ Run the [PostgreSQL instance](https://www.postgresql.org/) locally in a Docker c In a terminal window, from the root of the Quickstarts clone directory, navigate to the `bindings/db` directory. ```bash -cd quickstarts/bindings/db +cd bindings/db ``` Run the following command to set up the container: @@ -73,7 +73,7 @@ CONTAINER ID IMAGE COMMAND CREATED STATUS In a new terminal window, navigate to the SDK directory. ```bash -cd quickstarts/bindings/python/sdk/batch +cd bindings/python/sdk/batch ``` Install the dependencies: @@ -137,7 +137,7 @@ Your output binding's `print` statement output: In a new terminal, verify the same data has been inserted into the database. Navigate to the `bindings/db` directory. ```bash -cd quickstarts/bindings/db +cd bindings/db ``` Run the following to start the interactive Postgres CLI: @@ -253,7 +253,7 @@ Run the [PostgreSQL instance](https://www.postgresql.org/) locally in a Docker c In a terminal window, from the root of the Quickstarts clone directory, navigate to the `bindings/db` directory. ```bash -cd quickstarts/bindings/db +cd bindings/db ``` Run the following command to set up the container: @@ -280,7 +280,7 @@ CONTAINER ID IMAGE COMMAND CREATED STATUS In a new terminal window, navigate to the SDK directory. ```bash -cd quickstarts/bindings/javascript/sdk/batch +cd bindings/javascript/sdk/batch ``` Install the dependencies: @@ -339,7 +339,7 @@ Your output binding's `print` statement output: In a new terminal, verify the same data has been inserted into the database. Navigate to the `bindings/db` directory. ```bash -cd quickstarts/bindings/db +cd bindings/db ``` Run the following to start the interactive Postgres CLI: @@ -455,7 +455,7 @@ Run the [PostgreSQL instance](https://www.postgresql.org/) locally in a Docker c In a terminal window, from the root of the Quickstarts clone directory, navigate to the `bindings/db` directory. ```bash -cd quickstarts/bindings/db +cd bindings/db ``` Run the following command to set up the container: @@ -482,7 +482,7 @@ CONTAINER ID IMAGE COMMAND CREATED STATUS In a new terminal window, navigate to the SDK directory. ```bash -cd quickstarts/bindings/csharp/sdk/batch +cd bindings/csharp/sdk/batch ``` Install the dependencies: @@ -543,7 +543,7 @@ Your output binding's `print` statement output: In a new terminal, verify the same data has been inserted into the database. Navigate to the `bindings/db` directory. ```bash -cd quickstarts/bindings/db +cd bindings/db ``` Run the following to start the interactive Postgres CLI: @@ -662,7 +662,7 @@ Run the [PostgreSQL instance](https://www.postgresql.org/) locally in a Docker c In a terminal window, from the root of the Quickstarts clone directory, navigate to the `bindings/db` directory. ```bash -cd quickstarts/bindings/db +cd bindings/db ``` Run the following command to set up the container: @@ -689,7 +689,7 @@ CONTAINER ID IMAGE COMMAND CREATED STATUS In a new terminal window, navigate to the SDK directory. ```bash -cd quickstarts/bindings/java/sdk/batch +cd bindings/java/sdk/batch ``` Install the dependencies: @@ -753,7 +753,7 @@ Your output binding's `print` statement output: In a new terminal, verify the same data has been inserted into the database. Navigate to the `bindings/db` directory. ```bash -cd quickstarts/bindings/db +cd bindings/db ``` Run the following to start the interactive Postgres CLI: @@ -869,7 +869,7 @@ Run the [PostgreSQL instance](https://www.postgresql.org/) locally in a Docker c In a terminal window, from the root of the Quickstarts clone directory, navigate to the `bindings/db` directory. ```bash -cd quickstarts/bindings/db +cd bindings/db ``` Run the following command to set up the container: @@ -896,7 +896,7 @@ CONTAINER ID IMAGE COMMAND CREATED STATUS In a new terminal window, navigate to the SDK directory. ```bash -cd quickstarts/bindings/go/sdk/batch +cd bindings/go/sdk/batch ``` Install the dependencies: @@ -965,7 +965,7 @@ Your output binding's `print` statement output: In a new terminal, verify the same data has been inserted into the database. Navigate to the `bindings/db` directory. ```bash -cd quickstarts/bindings/db +cd bindings/db ``` Run the following to start the interactive Postgres CLI: diff --git a/daprdocs/content/en/getting-started/quickstarts/configuration-quickstart.md b/daprdocs/content/en/getting-started/quickstarts/configuration-quickstart.md new file mode 100644 index 000000000..e457612a1 --- /dev/null +++ b/daprdocs/content/en/getting-started/quickstarts/configuration-quickstart.md @@ -0,0 +1,639 @@ +--- +type: docs +title: "Quickstart: Configuration" +linkTitle: Configuration +weight: 76 +description: Get started with Dapr's Configuration building block +--- + +Let's take a look at Dapr's [Configuration building block]({{< ref configuration-api-overview.md >}}). A configuration item is often dynamic in nature and tightly coupled to the needs of the application that consumes it. Configuration items are key/value pairs containing configuration data, such as: +- App ids +- Partition keys +- Database names, etc + +In this quickstart, you'll run an `order-processor` microservice that utilizes the Configuration API. The service: +1. Gets configuration items from the configuration store. +1. Subscribes for configuration updates. + +Diagram that demonstrates the flow of the configuration API quickstart with key/value pairs used. + +Select your preferred language-specific Dapr SDK before proceeding with the Quickstart. + +{{< tabs "Python" "JavaScript" ".NET" "Java" "Go" >}} + +{{% codetab %}} + +### Pre-requisites + +For this example, you will need: + +- [Dapr CLI and initialized environment](https://docs.dapr.io/getting-started). +- [Python 3.7+ installed](https://www.python.org/downloads/). + +- [Docker Desktop](https://www.docker.com/products/docker-desktop) + + +### Step 1: Set up the environment + +Clone the [sample provided in the Quickstarts repo](https://github.com/dapr/quickstarts/tree/master/configuration). + +```bash +git clone https://github.com/dapr/quickstarts.git +``` + +Once cloned, open a new terminal and run the following command to set values for configuration items `orderId1` and `orderId2`. + +```bash +docker exec dapr_redis redis-cli MSET orderId1 "101" orderId2 "102" +``` + +### Step 2: Run the `order-processor` service + +From the root of the Quickstarts clone directory, navigate to the `order-processor` directory. + +```bash +cd configuration/python/sdk/order-processor +``` + +Install the dependencies: + +```bash +pip3 install -r requirements.txt +``` + +Run the `order-processor` service alongside a Dapr sidecar. + +```bash +dapr run --app-id order-processor --components-path ../../../components/ --app-port 6001 -- python3 app.py +``` + +> **Note**: Since Python3.exe is not defined in Windows, you may need to use `python app.py` instead of `python3 app.py`. + +The expected output: + +``` +== APP == Configuration for orderId1 : value: "101" +== APP == +== APP == Configuration for orderId2 : value: "102" +== APP == +== APP == App unsubscribed from config changes +``` + +### (Optional) Step 3: Update configuration item values + +Once the app has unsubscribed, try updating the configuration item values. Change the `orderId1` and `orderId2` values using the following command: + +```bash +docker exec dapr_redis redis-cli MSET orderId1 "103" orderId2 "104" +``` + +Run the `order-processor` service again: + +```bash +dapr run --app-id order-processor --components-path ../../../components/ --app-port 6001 -- python3 app.py +``` + +> **Note**: Since Python3.exe is not defined in Windows, you may need to use `python app.py` instead of `python3 app.py`. + +The app will return the updated configuration values: + +``` +== APP == Configuration for orderId1 : value: "103" +== APP == +== APP == Configuration for orderId2 : value: "104" +== APP == +``` + +### The `order-processor` service + +The `order-processor` service includes code for: +- Getting the configuration items from the config store +- Subscribing to configuration updates (which you made in the CLI earlier) +- Unsubscribing from configuration updates and exiting the app after 20 seconds of inactivity. + +Get configuration items: + +```python +# Get config items from the config store +for config_item in CONFIGURATION_ITEMS: + config = client.get_configuration(store_name=DAPR_CONFIGURATION_STORE, keys=[config_item], config_metadata={}) + print(f"Configuration for {config_item} : {config.items[config_item]}", flush=True) +``` + +Subscribe to configuration updates: + +```python +# Subscribe for configuration changes +configuration = await client.subscribe_configuration(DAPR_CONFIGURATION_STORE, CONFIGURATION_ITEMS) +``` + +Unsubscribe from configuration updates and exit the application: + +```python +# Unsubscribe from configuration updates +unsubscribed = True +for config_item in CONFIGURATION_ITEMS: + unsub_item = client.unsubscribe_configuration(DAPR_CONFIGURATION_STORE, config_item) + #... +if unsubscribed == True: + print("App unsubscribed from config changes", flush=True) +``` + + +{{% /codetab %}} + + + +{{% codetab %}} + +### Pre-requisites + +For this example, you will need: + +- [Dapr CLI and initialized environment](https://docs.dapr.io/getting-started). +- [Python 3.7+ installed](https://www.python.org/downloads/). + +- [Docker Desktop](https://www.docker.com/products/docker-desktop) + + +### Step 1: Set up the environment + +Clone the [sample provided in the Quickstarts repo](https://github.com/dapr/quickstarts/tree/master/configuration). + +```bash +git clone https://github.com/dapr/quickstarts.git +``` + +Once cloned, open a new terminal and run the following command to set values for configuration items `orderId1` and `orderId2`. + +```bash +docker exec dapr_redis redis-cli MSET orderId1 "101" orderId2 "102" +``` + +### Step 2: Run the `order-processor` service + +From the root of the Quickstarts clone directory, navigate to the `order-processor` directory. + +```bash +cd configuration/javascript/sdk/order-processor +``` + +Install the dependencies: + +```bash +npm install +``` + +Run the `order-processor` service alongside a Dapr sidecar. + +```bash +dapr run --app-id order-processor --components-path ../../../components/ --app-protocol grpc --dapr-grpc-port 3500 -- node index.js +``` + +The expected output: + +``` +== APP == Configuration for orderId1: {"key":"orderId1","value":"101","version":"","metadata":{}} +== APP == Configuration for orderId2: {"key":"orderId2","value":"102","version":"","metadata":{}} +== APP == App unsubscribed to config changes +``` + +### (Optional) Step 3: Update configuration item values + +Once the app has unsubscribed, try updating the configuration item values. Change the `orderId1` and `orderId2` values using the following command: + +```bash +docker exec dapr_redis redis-cli MSET orderId1 "103" orderId2 "104" +``` + +Run the `order-processor` service again: + +```bash +dapr run --app-id order-processor --components-path ../../../components/ --app-protocol grpc --dapr-grpc-port 3500 -- node index.js +``` + +The app will return the updated configuration values: + +``` +== APP == Configuration for orderId1: {"key":"orderId1","value":"103","version":"","metadata":{}} +== APP == Configuration for orderId2: {"key":"orderId2","value":"104","version":"","metadata":{}} +``` + +### The `order-processor` service + +The `order-processor` service includes code for: +- Getting the configuration items from the config store +- Subscribing to configuration updates (which you made in the CLI earlier) +- Unsubscribing from configuration updates and exiting the app after 20 seconds of inactivity. + +Get configuration items: + +```javascript +// Get config items from the config store +//... + const config = await client.configuration.get(DAPR_CONFIGURATION_STORE, CONFIGURATION_ITEMS); + Object.keys(config.items).forEach((key) => { + console.log("Configuration for " + key + ":", JSON.stringify(config.items[key])); + }); +``` + +Subscribe to configuration updates: + +```javascript +// Subscribe to config updates +try { + const stream = await client.configuration.subscribeWithKeys( + DAPR_CONFIGURATION_STORE, + CONFIGURATION_ITEMS, + (config) => { + console.log("Configuration update", JSON.stringify(config.items)); + } + ); +``` + +Unsubscribe from configuration updates and exit the application: + +```javascript +// Unsubscribe to config updates and exit app after 20 seconds +setTimeout(() => { + stream.stop(); + console.log("App unsubscribed to config changes"); + process.exit(0); +}, +``` + +{{% /codetab %}} + + +{{% codetab %}} + +### Pre-requisites + +For this example, you will need: + +- [Dapr CLI and initialized environment](https://docs.dapr.io/getting-started). +- [.NET SDK or .NET 6 SDK installed](https://dotnet.microsoft.com/download). + +- [Docker Desktop](https://www.docker.com/products/docker-desktop) + + +### Step 1: Set up the environment + +Clone the [sample provided in the Quickstarts repo](https://github.com/dapr/quickstarts/tree/master/configuration). + +```bash +git clone https://github.com/dapr/quickstarts.git +``` + +Once cloned, open a new terminal and run the following command to set values for configuration items `orderId1` and `orderId2`. + +```bash +docker exec dapr_redis redis-cli MSET orderId1 "101" orderId2 "102" +``` + +### Step 2: Run the `order-processor` service + +From the root of the Quickstarts clone directory, navigate to the `order-processor` directory. + +```bash +cd configuration/csharp/sdk/order-processor +``` + +Recall NuGet packages: + +```bash +dotnet restore +dotnet build +``` + +Run the `order-processor` service alongside a Dapr sidecar. + +```bash +dapr run --app-id order-processor-http --components-path ../../../components/ --app-port 7001 -- dotnet run --project . +``` + +The expected output: + +``` +== APP == Configuration for orderId1: {"Value":"101","Version":"","Metadata":{}} +== APP == Configuration for orderId2: {"Value":"102","Version":"","Metadata":{}} +== APP == App unsubscribed from config changes +``` + +### (Optional) Step 3: Update configuration item values + +Once the app has unsubscribed, try updating the configuration item values. Change the `orderId1` and `orderId2` values using the following command: + +```bash +docker exec dapr_redis redis-cli MSET orderId1 "103" orderId2 "104" +``` + +Run the `order-processor` service again: + +```bash +dapr run --app-id order-processor-http --components-path ../../../components/ --app-port 7001 -- dotnet run --project . +``` + +The app will return the updated configuration values: + +``` +== APP == Configuration for orderId1: {"Value":"103","Version":"","Metadata":{}} +== APP == Configuration for orderId2: {"Value":"104","Version":"","Metadata":{}} +``` + +### The `order-processor` service + +The `order-processor` service includes code for: +- Getting the configuration items from the config store +- Subscribing to configuration updates (which you made in the CLI earlier) +- Unsubscribing from configuration updates and exiting the app after 20 seconds of inactivity. + +Get configuration items: + +```csharp +// Get config from configuration store +GetConfigurationResponse config = await client.GetConfiguration(DAPR_CONFIGURATION_STORE, CONFIGURATION_ITEMS); +foreach (var item in config.Items) +{ + var cfg = System.Text.Json.JsonSerializer.Serialize(item.Value); + Console.WriteLine("Configuration for " + item.Key + ": " + cfg); +} +``` + +Subscribe to configuration updates: + +```csharp +// Subscribe to config updates +SubscribeConfigurationResponse subscribe = await client.SubscribeConfiguration(DAPR_CONFIGURATION_STORE, CONFIGURATION_ITEMS); +``` + +Unsubscribe from configuration updates and exit the application: + +```csharp +// Unsubscribe to config updates and exit the app +try +{ + client.UnsubscribeConfiguration(DAPR_CONFIGURATION_STORE, subscriptionId); + Console.WriteLine("App unsubscribed from config changes"); + Environment.Exit(0); +} +``` + +{{% /codetab %}} + + +{{% codetab %}} + +### Pre-requisites + +For this example, you will need: + +- [Dapr CLI and initialized environment](https://docs.dapr.io/getting-started). +- Java JDK 11 (or greater): + - [Oracle JDK](https://www.oracle.com/technetwork/java/javase/downloads/index.html#JDK11), or + - OpenJDK +- [Apache Maven](https://maven.apache.org/install.html), version 3.x. + +- [Docker Desktop](https://www.docker.com/products/docker-desktop) + + +### Step 1: Set up the environment + +Clone the [sample provided in the Quickstarts repo](https://github.com/dapr/quickstarts/tree/master/configuration). + +```bash +git clone https://github.com/dapr/quickstarts.git +``` + +Once cloned, open a new terminal and run the following command to set values for configuration items `orderId1` and `orderId2`. + +```bash +docker exec dapr_redis redis-cli MSET orderId1 "101" orderId2 "102" +``` + +### Step 2: Run the `order-processor` service + +From the root of the Quickstarts clone directory, navigate to the `order-processor` directory. + +```bash +cd configuration/java/sdk/order-processor +``` + +Install the dependencies: + +```bash +mvn clean install +``` + +Run the `order-processor` service alongside a Dapr sidecar. + +```bash +dapr run --app-id order-processor --components-path ../../../components -- java -jar target/OrderProcessingService-0.0.1-SNAPSHOT.jar +``` + +The expected output: + +``` +== APP == Configuration for orderId1: {'value':'101'} +== APP == Configuration for orderId2: {'value':'102'} +== APP == App unsubscribed to config changes +``` + +### (Optional) Step 3: Update configuration item values + +Once the app has unsubscribed, try updating the configuration item values. Change the `orderId1` and `orderId2` values using the following command: + +```bash +docker exec dapr_redis redis-cli MSET orderId1 "103" orderId2 "104" +``` + +Run the `order-processor` service again: + +```bash +dapr run --app-id order-processor --components-path ../../../components -- java -jar target/OrderProcessingService-0.0.1-SNAPSHOT.jar +``` + +The app will return the updated configuration values: + +``` +== APP == Configuration for orderId1: {'value':'103'} +== APP == Configuration for orderId2: {'value':'104'} +``` + +### The `order-processor` service + +The `order-processor` service includes code for: +- Getting the configuration items from the config store +- Subscribing to configuration updates (which you made in the CLI earlier) +- Unsubscribing from configuration updates and exiting the app after 20 seconds of inactivity. + +Get configuration items: + +```java +// Get config items from the config store +try (DaprPreviewClient client = (new DaprClientBuilder()).buildPreviewClient()) { + for (String configurationItem : CONFIGURATION_ITEMS) { + ConfigurationItem item = client.getConfiguration(DAPR_CONFIGURATON_STORE, configurationItem).block(); + System.out.println("Configuration for " + configurationItem + ": {'value':'" + item.getValue() + "'}"); + } +``` + +Subscribe to configuration updates: + +```java +// Subscribe for config changes +Flux subscription = client.subscribeConfiguration(DAPR_CONFIGURATON_STORE, + CONFIGURATION_ITEMS.toArray(String[]::new)); +``` + +Unsubscribe from configuration updates and exit the application: + +```java +// Unsubscribe from config changes +UnsubscribeConfigurationResponse unsubscribe = client + .unsubscribeConfiguration(subscriptionId, DAPR_CONFIGURATON_STORE).block(); +if (unsubscribe.getIsUnsubscribed()) { + System.out.println("App unsubscribed to config changes"); +} +``` + +{{% /codetab %}} + + +{{% codetab %}} + +### Pre-requisites + +For this example, you will need: + +- [Dapr CLI and initialized environment](https://docs.dapr.io/getting-started). +- [Latest version of Go](https://go.dev/dl/). + +- [Docker Desktop](https://www.docker.com/products/docker-desktop) + + +### Step 1: Set up the environment + +Clone the [sample provided in the Quickstarts repo](https://github.com/dapr/quickstarts/tree/master/configuration). + +```bash +git clone https://github.com/dapr/quickstarts.git +``` + +Once cloned, open a new terminal and run the following command to set values for configuration items `orderId1` and `orderId2`. + +```bash +docker exec dapr_redis redis-cli MSET orderId1 "101" orderId2 "102" +``` + +### Step 2: Run the `order-processor` service + +From the root of the Quickstarts clone directory, navigate to the `order-processor` directory. + +```bash +cd configuration/go/sdk/order-processor +``` + +Run the `order-processor` service alongside a Dapr sidecar. + +```bash +dapr run --app-id order-processor --app-port 6001 --components-path ../../../components -- go run . +``` + +The expected output: + +``` +== APP == Configuration for orderId1: {"Value":"101","Version":"","Metadata":null} +== APP == Configuration for orderId2: {"Value":"102","Version":"","Metadata":null} +== APP == dapr configuration subscribe finished. +== APP == App unsubscribed to config changes +``` + +### (Optional) Step 3: Update configuration item values + +Once the app has unsubscribed, try updating the configuration item values. Change the `orderId1` and `orderId2` values using the following command: + +```bash +docker exec dapr_redis redis-cli MSET orderId1 "103" orderId2 "104" +``` + +Run the `order-processor` service again: + +```bash +dapr run --app-id order-processor --app-port 6001 --components-path ../../../components -- go run . +``` + +The app will return the updated configuration values: + +``` +== APP == Configuration for orderId1: {"Value":"103","Version":"","Metadata":null} +== APP == Configuration for orderId2: {"Value":"104","Version":"","Metadata":null} +``` + +### The `order-processor` service + +The `order-processor` service includes code for: +- Getting the configuration items from the config store +- Subscribing to configuration updates (which you made in the CLI earlier) +- Unsubscribing from configuration updates and exiting the app after 20 seconds of inactivity. + +Get configuration items: + +```go +// Get config items from config store +for _, item := range CONFIGURATION_ITEMS { + config, err := client.GetConfigurationItem(ctx, DAPR_CONFIGURATION_STORE, item) + //... + c, _ := json.Marshal(config) + fmt.Println("Configuration for " + item + ": " + string(c)) +} +``` + +Subscribe to configuration updates: + +```go +// Subscribe for config changes +err = client.SubscribeConfigurationItems(ctx, DAPR_CONFIGURATION_STORE, CONFIGURATION_ITEMS, func(id string, config map[string]*dapr.ConfigurationItem) { + // First invocation when app subscribes to config changes only returns subscription id + if len(config) == 0 { + fmt.Println("App subscribed to config changes with subscription id: " + id) + subscriptionId = id + return + } +}) +``` + +Unsubscribe from configuration updates and exit the application: + +```go +// Unsubscribe to config updates and exit app after 20 seconds +select { +case <-ctx.Done(): + err = client.UnsubscribeConfigurationItems(context.Background(), DAPR_CONFIGURATION_STORE, subscriptionId) + //... + { + fmt.Println("App unsubscribed to config changes") + } +``` + +{{% /codetab %}} + +{{< /tabs >}} + +## Tell us what you think! + +We're continuously working to improve our Quickstart examples and value your feedback. Did you find this quickstart helpful? Do you have suggestions for improvement? + +Join the discussion in our [discord channel](https://discord.com/channels/778680217417809931/953427615916638238). + +## Next steps + +- Use Dapr Configuration with HTTP instead of an SDK. + - [Python](https://github.com/dapr/quickstarts/tree/master/configuration/python/http) + - [JavaScript](https://github.com/dapr/quickstarts/tree/master/configuration/javascript/http) + - [.NET](https://github.com/dapr/quickstarts/tree/master/configuration/csharp/http) + - [Java](https://github.com/dapr/quickstarts/tree/master/configuration/java/http) + - [Go](https://github.com/dapr/quickstarts/tree/master/configuration/go/http) +- Learn more about [Configuration building block]({{< ref configuration-api-overview >}}) + +{{< button text="Explore Dapr tutorials >>" page="getting-started/tutorials/_index.md" >}} \ No newline at end of file diff --git a/daprdocs/content/en/getting-started/quickstarts/secrets-quickstart.md b/daprdocs/content/en/getting-started/quickstarts/secrets-quickstart.md index 12f3fc51c..e8d6c2373 100644 --- a/daprdocs/content/en/getting-started/quickstarts/secrets-quickstart.md +++ b/daprdocs/content/en/getting-started/quickstarts/secrets-quickstart.md @@ -106,7 +106,7 @@ In the YAML file: **`secrets.json` file** -`SECRET_NAME` is defined in the `secrets.json` file, located in [secrets_management/python/sdk/order-processor](https://github.com/dapr/quickstarts/tree/master/secrets_management/javascript/sdk/order-processor/secrets.json): +`SECRET_NAME` is defined in the `secrets.json` file, located in [secrets_management/python/sdk/order-processor](https://github.com/dapr/quickstarts/tree/master/secrets_management/python/sdk/order-processor/secrets.json): ```json { @@ -328,7 +328,7 @@ In the YAML file: **`secrets.json` file** -`SECRET_NAME` is defined in the `secrets.json` file, located in [secrets_management/csharp/sdk/order-processor](https://github.com/dapr/quickstarts/tree/master/secrets_management/javascript/sdk/order-processor/secrets.json): +`SECRET_NAME` is defined in the `secrets.json` file, located in [secrets_management/csharp/sdk/order-processor](https://github.com/dapr/quickstarts/tree/master/secrets_management/csharp/sdk/order-processor/secrets.json): ```json { @@ -436,7 +436,7 @@ In the YAML file: **`secrets.json` file** -`SECRET_NAME` is defined in the `secrets.json` file, located in [secrets_management/python/sdk/order-processor](https://github.com/dapr/quickstarts/tree/master/secrets_management/javascript/sdk/order-processor/secrets.json): +`SECRET_NAME` is defined in the `secrets.json` file, located in [secrets_management/java/sdk/order-processor](https://github.com/dapr/quickstarts/tree/master/secrets_management/java/sdk/order-processor/secrets.json): ```json { @@ -543,7 +543,7 @@ In the YAML file: **`secrets.json` file** -`SECRET_NAME` is defined in the `secrets.json` file, located in [secrets_management/python/sdk/order-processor](https://github.com/dapr/quickstarts/tree/master/secrets_management/javascript/sdk/order-processor/secrets.json): +`SECRET_NAME` is defined in the `secrets.json` file, located in [secrets_management/go/sdk/order-processor](https://github.com/dapr/quickstarts/tree/master/secrets_management/go/sdk/order-processor/secrets.json): ```json { diff --git a/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-deploy.md b/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-deploy.md index fb860a9de..267447227 100644 --- a/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-deploy.md +++ b/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-deploy.md @@ -64,9 +64,11 @@ There are some scenarios where it's necessary to install Dapr from a private Hel - having a custom Dapr deployment - pulling Helm charts from trusted registries that are managed and maintained by your organization +``` export DAPR_HELM_REPO_URL="https://helm.custom-domain.com/dapr/dapr" export DAPR_HELM_REPO_USERNAME="username_xxx" export DAPR_HELM_REPO_PASSWORD="passwd_xxx" +``` Setting the above parameters will allow `dapr init -k` to install Dapr images from the configured Helm repository. diff --git a/daprdocs/content/en/operations/troubleshooting/common_issues.md b/daprdocs/content/en/operations/troubleshooting/common_issues.md index eedbcb601..07a0bf170 100644 --- a/daprdocs/content/en/operations/troubleshooting/common_issues.md +++ b/daprdocs/content/en/operations/troubleshooting/common_issues.md @@ -50,45 +50,54 @@ spec: imagePullPolicy: Always ``` -If your pod spec template is annotated correctly and you still don't see the sidecar injected, make sure Dapr was deployed to the cluster before your deployment or pod were deployed. +There are some known cases where this might not properly work: -If this is the case, restarting the pods will fix the issue. +- If your pod spec template is annotated correctly, and you still don't see the sidecar injected, make sure Dapr was deployed to the cluster before your deployment or pod were deployed. -If you are deploying Dapr on a private GKE cluster, sidecar injection does not work without extra steps. See [Setup a Google Kubernetes Engine cluster]({{< ref setup-gke.md >}}). + If this is the case, restarting the pods will fix the issue. -In order to further diagnose any issue, check the logs of the Dapr sidecar injector: +- If you are deploying Dapr on a private GKE cluster, sidecar injection does not work without extra steps. See [Setup a Google Kubernetes Engine cluster]({{< ref setup-gke.md >}}). -```bash - kubectl logs -l app=dapr-sidecar-injector -n dapr-system -``` + In order to further diagnose any issue, check the logs of the Dapr sidecar injector: -*Note: If you installed Dapr to a different namespace, replace dapr-system above with the desired namespace* + ```bash + kubectl logs -l app=dapr-sidecar-injector -n dapr-system + ``` -If you are deploying Dapr on Amazon EKS and using an overlay network such as Calico, you will need to set `hostNetwork` parameter to true, this is a limitation of EKS with such CNIs. + *Note: If you installed Dapr to a different namespace, replace dapr-system above with the desired namespace* -You can set this parameter using Helm `values.yaml` file: +- If you are deploying Dapr on Amazon EKS and using an overlay network such as Calico, you will need to set `hostNetwork` parameter to true, this is a limitation of EKS with such CNIs. -``` -helm upgrade --install dapr dapr/dapr \ + You can set this parameter using Helm `values.yaml` file: + + ``` + helm upgrade --install dapr dapr/dapr \ --namespace dapr-system \ --create-namespace \ --values values.yaml -``` + ``` -`values.yaml` -```yaml -dapr_sidecar_injector: - hostNetwork: true -``` + `values.yaml` + ```yaml + dapr_sidecar_injector: + hostNetwork: true + ``` -or using command line: + or using command line: -``` -helm upgrade --install dapr dapr/dapr \ + ``` + helm upgrade --install dapr dapr/dapr \ --namespace dapr-system \ --create-namespace \ --set dapr_sidecar_injector.hostNetwork=true -``` + ``` + +- Make sure the kube api server can reach the following webhooks services: + - [Sidecar Mutating Webhook Injector Service](https://github.com/dapr/dapr/blob/44235fe8e8799589bb393a3124d2564db2dd6885/charts/dapr/charts/dapr_sidecar_injector/templates/dapr_sidecar_injector_deployment.yaml#L157) at port __4000__ that is served from the sidecar injector. + - [CRD Conversion Webhook Service](https://github.com/dapr/dapr/blob/44235fe8e8799589bb393a3124d2564db2dd6885/charts/dapr/charts/dapr_operator/templates/dapr_operator_service.yaml#L28) at port __19443__ that is served from the operator. + + Check with your cluster administrators to setup allow ingress + rules to the above ports, __4000__ and __19443__, in the cluster from the kube api servers. ## My pod is in CrashLoopBackoff or another failed state due to the daprd sidecar diff --git a/daprdocs/content/en/reference/cli/cli-overview.md b/daprdocs/content/en/reference/cli/cli-overview.md index 7ac94c482..ef9d17e05 100644 --- a/daprdocs/content/en/reference/cli/cli-overview.md +++ b/daprdocs/content/en/reference/cli/cli-overview.md @@ -42,6 +42,7 @@ Available Commands: stop Stop Dapr instances and their associated apps. Supported platforms: Self-hosted uninstall Uninstall Dapr runtime. Supported platforms: Kubernetes and self-hosted upgrade Upgrades a Dapr control plane installation in a cluster. Supported platforms: Kubernetes + version Print the Dapr runtime and CLI version Flags: -h, --help help for dapr @@ -73,8 +74,8 @@ You can learn more about each Dapr command from the links below. - [`dapr stop`]({{< ref dapr-stop.md >}}) - [`dapr uninstall`]({{< ref dapr-uninstall.md >}}) - [`dapr upgrade`]({{< ref dapr-upgrade.md >}}) - - [`dapr-version`]({{< ref dapr-version.md >}}) + - [`dapr version`]({{< ref dapr-version.md >}}) ### Environment Variables -Some Dapr flags can be set via environment variables (e.g. `DAPR_NETWORK` for the `--network` flag of the `dapr init` command). Note that specifying the flag on the command line overrides any set environment variable. \ No newline at end of file +Some Dapr flags can be set via environment variables (e.g. `DAPR_NETWORK` for the `--network` flag of the `dapr init` command). Note that specifying the flag on the command line overrides any set environment variable. diff --git a/daprdocs/content/en/reference/components-reference/supported-locks/redis-lock.md b/daprdocs/content/en/reference/components-reference/supported-locks/redis-lock.md index ca6c2b54b..7c39c9f6e 100644 --- a/daprdocs/content/en/reference/components-reference/supported-locks/redis-lock.md +++ b/daprdocs/content/en/reference/components-reference/supported-locks/redis-lock.md @@ -85,8 +85,8 @@ The above example uses secrets as plain strings. It is recommended to use a secr | enableTLS | N | If the Redis instance supports TLS with public certificates, can be configured to be enabled or disabled. Defaults to `"false"` | `"true"`, `"false"` | maxRetries | N | Maximum number of retries before giving up. Defaults to `3` | `5`, `10` | maxRetryBackoff | N | Maximum backoff between each retry. Defaults to `2` seconds; `"-1"` disables backoff. | `3000000000` -| failover | N | Property to enabled failover configuration. Needs sentinalMasterName to be set. The redisHost should be the sentinel host address. See [Redis Sentinel Documentation](https://redis.io/docs/manual/sentinel/). Defaults to `"false"` | `"true"`, `"false"` -| sentinelMasterName | N | The sentinel master name. See [Redis Sentinel Documentation](https://redis.io/docs/manual/sentinel/) | `""`, `"127.0.0.1:6379"` +| failover | N | Property to enabled failover configuration. Needs sentinelMasterName to be set. The redisHost should be the sentinel host address. See [Redis Sentinel Documentation](https://redis.io/docs/manual/sentinel/). Defaults to `"false"` | `"true"`, `"false"` +| sentinelMasterName | N | The sentinel master name. See [Redis Sentinel Documentation](https://redis.io/docs/manual/sentinel/) | `"mymaster"` | redeliverInterval | N | The interval between checking for pending messages to redelivery. Defaults to `"60s"`. `"0"` disables redelivery. | `"30s"` | processingTimeout | N | The amount time a message must be pending before attempting to redeliver it. Defaults to `"15s"`. `"0"` disables redelivery. | `"30s"` | redisType | N | The type of redis. There are two valid values, one is `"node"` for single node mode, the other is `"cluster"` for redis cluster mode. Defaults to `"node"`. | `"cluster"` diff --git a/daprdocs/content/en/reference/components-reference/supported-middleware/middleware-wasm.md b/daprdocs/content/en/reference/components-reference/supported-middleware/middleware-wasm.md index 343b25a12..e95c6671a 100644 --- a/daprdocs/content/en/reference/components-reference/supported-middleware/middleware-wasm.md +++ b/daprdocs/content/en/reference/components-reference/supported-middleware/middleware-wasm.md @@ -14,10 +14,10 @@ extension. The Wasm [HTTP middleware]({{< ref middleware.md >}}) allows you to rewrite a request URI with custom logic compiled to a Wasm binary. In other words, you can extend Dapr using external files that are not pre-compiled into the `daprd` -binary. Dapr embeds [wazero][https://wazero.io] to accomplish this without CGO. +binary. Dapr embeds [wazero](https://wazero.io) to accomplish this without CGO. Wasm modules are loaded from a filesystem path. On Kubernetes, see [mounting -volumes to the Dapr sidecar]({{> kubernetes-volume-mounts.md >}}) to configure +volumes to the Dapr sidecar]({{< ref kubernetes-volume-mounts.md >}}) to configure a filesystem mount that can contain Wasm modules. ## Component format diff --git a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-jetstream.md b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-jetstream.md index 815430fd7..d62a73fe3 100644 --- a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-jetstream.md +++ b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-jetstream.md @@ -62,7 +62,7 @@ spec: value: false - name: rateLimit value: 1024 - - name: hearbeat + - name: heartbeat value: 15s - name: ackPolicy value: explicit @@ -98,7 +98,7 @@ spec: | replicas | N | [Replicas] | `3` | | memoryStorage | N | [Memory Storage] | `false` | | rateLimit | N | [Rate Limit] | `1024` | -| hearbeat | N | [Hearbeat] | `10s` | +| heartbeat | N | [Heartbeat] | `10s` | | ackPolicy | N | [Ack Policy] | `explicit` | | deliverPolicy | N | One of: all, last, new, sequence, time | `all` | | domain | N | [JetStream Leafondes] | `HUB` | @@ -166,7 +166,7 @@ nats -s localhost:4222 stream add myStream --subjects mySubject [Replicas]: https://docs.nats.io/jetstream/concepts/consumers#replicas [Memory Storage]: https://docs.nats.io/jetstream/concepts/consumers#memorystorage [Rate Limit]: https://docs.nats.io/jetstream/concepts/consumers#ratelimit -[Hearbeat]: https://docs.nats.io/jetstream/concepts/consumers#hearbeat +[Heartbeat]: https://docs.nats.io/jetstream/concepts/consumers#heartbeat [Ack Policy]: https://docs.nats.io/nats-concepts/jetstream/consumers#ackpolicy [JetStream Leafonodes]: https://docs.nats.io/running-a-nats-service/configuration/leafnodes/jetstream_leafnodes [Decentralized JWT Authentication/Authorization]: https://docs.nats.io/running-a-nats-service/configuration/securing_nats/auth_intro/jwt diff --git a/daprdocs/layouts/partials/components/bindings.html b/daprdocs/layouts/partials/components/bindings.html index 31fa0c58f..1f590db2b 100644 --- a/daprdocs/layouts/partials/components/bindings.html +++ b/daprdocs/layouts/partials/components/bindings.html @@ -21,11 +21,22 @@ {{ range sort $components "component" }} - {{ .component - }} + {{ .component }} + + + {{ if .features.input }} + + {{else}} + Input binding not supported + {{ end }} + + + {{ if .features.output }} + + {{else}} + Output binding not supported + {{ end }} - {{ if .features.input }}✅{{else}}{{ end }} - {{ if .features.output }}✅{{else}}{{ end }} {{ .state }} {{ .version }} {{ .since }} diff --git a/daprdocs/layouts/partials/components/configuration-stores.html b/daprdocs/layouts/partials/components/configuration-stores.html index d9d35b134..19a123a73 100644 --- a/daprdocs/layouts/partials/components/configuration-stores.html +++ b/daprdocs/layouts/partials/components/configuration-stores.html @@ -13,8 +13,7 @@ {{ range sort $components "component" }} - {{ .component - }} + {{ .component }} {{ .state }} {{ .version }} diff --git a/daprdocs/layouts/partials/components/description.html b/daprdocs/layouts/partials/components/description.html index 7cc5a1bf6..770fa975b 100644 --- a/daprdocs/layouts/partials/components/description.html +++ b/daprdocs/layouts/partials/components/description.html @@ -1,7 +1,6 @@

Table captions:

-

Status: Component - certification status

+

Status: component certification status

-

Since: defines from which Dapr Runtime version, the component is in the current status

+

Since: the version of the Dapr Runtime in which the component first moved to the current status

-

Component version: defines the version of the component

+

Component version: the version of the component

diff --git a/daprdocs/layouts/partials/components/locks.html b/daprdocs/layouts/partials/components/locks.html index 4039e5eb0..109ba9ec8 100644 --- a/daprdocs/layouts/partials/components/locks.html +++ b/daprdocs/layouts/partials/components/locks.html @@ -13,8 +13,7 @@ {{ range sort $components "component" }} - {{ .component - }} + {{ .component }} {{ .state }} {{ .version }} diff --git a/daprdocs/layouts/partials/components/middleware.html b/daprdocs/layouts/partials/components/middleware.html index c98f9e4c2..32a1486f2 100644 --- a/daprdocs/layouts/partials/components/middleware.html +++ b/daprdocs/layouts/partials/components/middleware.html @@ -13,8 +13,7 @@ {{ range sort $components "component" }} - {{ .component - }} + {{ .component }} {{ .description | markdownify}} {{ .state }} diff --git a/daprdocs/layouts/partials/components/name-resolution.html b/daprdocs/layouts/partials/components/name-resolution.html index 816873583..a16dd0bc5 100644 --- a/daprdocs/layouts/partials/components/name-resolution.html +++ b/daprdocs/layouts/partials/components/name-resolution.html @@ -15,8 +15,7 @@ {{ range sort $components "component" }} - {{ .component - }} + {{ .component }} {{ .state }} {{ .version }} diff --git a/daprdocs/layouts/partials/components/pubsub.html b/daprdocs/layouts/partials/components/pubsub.html index 244a6f623..01c80e7ce 100644 --- a/daprdocs/layouts/partials/components/pubsub.html +++ b/daprdocs/layouts/partials/components/pubsub.html @@ -16,8 +16,7 @@ {{ range sort $components "component" }} - {{ .component - }} + {{ .component }} {{ .state }} {{ .version }} diff --git a/daprdocs/layouts/partials/components/secret-stores.html b/daprdocs/layouts/partials/components/secret-stores.html index 05d105bfb..2412f8b1d 100644 --- a/daprdocs/layouts/partials/components/secret-stores.html +++ b/daprdocs/layouts/partials/components/secret-stores.html @@ -27,10 +27,16 @@ {{ range sort $components "component" }} - {{ .component - }} + + {{ .component }} + + + {{ if .features.multipleKeyValuesPerSecret }} + + {{else}} + Multiple Key-Values Per Secret: Not supported + {{ end }} - {{ if .features.multipleKeyValuesPerSecret }}✅{{else}}{{ end }} {{ .state }} {{ .version }} {{ .since }} diff --git a/daprdocs/layouts/partials/components/state-stores.html b/daprdocs/layouts/partials/components/state-stores.html index 35d28d46b..7d1e4693a 100644 --- a/daprdocs/layouts/partials/components/state-stores.html +++ b/daprdocs/layouts/partials/components/state-stores.html @@ -24,16 +24,51 @@ {{ range sort $components "component" }} - {{ .component - }} + + {{ .component }} + + + {{ if .features.crud }} + + {{else}} + CRUD: Not supported + {{ end }} + + + {{ if .features.transactions }} + + {{else}} + Transactions: Not supported + {{ end }} + + + {{ if .features.etag }} + + {{else}} + ETag: Not supported + {{ end }} + + + {{ if .features.ttl }} + + {{else}} + TTL: Not supported + {{ end }} + + + {{ if (and .features.transactions .features.etag) }} + + {{else}} + Actors: Not supported + {{ end }} + + + {{ if .features.query }} + + {{else}} + Query: Not supported + {{ end }} - {{ if .features.crud }}✅{{else}}{{ end }} - {{ if .features.transactions }}✅{{else}}{{ end }} - {{ if .features.etag }}✅{{else}}{{ end }} - {{ if .features.ttl }}✅{{else}}{{ end }} - {{ if (and .features.transactions .features.etag) }}✅{{else}}{{ end }} - {{ if .features.query }}✅{{else}}{{ end }} {{ .state }} {{ .version }} {{ .since }} diff --git a/daprdocs/static/images/configuration-quickstart/configuration-quickstart-flow.png b/daprdocs/static/images/configuration-quickstart/configuration-quickstart-flow.png new file mode 100644 index 000000000..29dc6f44c Binary files /dev/null and b/daprdocs/static/images/configuration-quickstart/configuration-quickstart-flow.png differ