diff --git a/daprdocs/content/en/concepts/building-blocks-concept.md b/daprdocs/content/en/concepts/building-blocks-concept.md index 9ab26a3695c..4719626f3c6 100644 --- a/daprdocs/content/en/concepts/building-blocks-concept.md +++ b/daprdocs/content/en/concepts/building-blocks-concept.md @@ -6,15 +6,15 @@ weight: 200 description: "Modular best practices accessible over standard HTTP or gRPC APIs" --- -A [building block]({{< ref building-blocks >}}) is an HTTP or gRPC API that can be called from your code and uses one or more Dapr components. - -Building blocks address common challenges in building resilient, microservices applications and codify best practices and patterns. Dapr consists of a set of building blocks, with extensibility to add new building blocks. +A [building block]({{< ref building-blocks >}}) is an HTTP or gRPC API that can be called from your code and uses one or more Dapr components. Dapr consists of a set of API building blocks, with extensibility to add new building blocks. Dapr's building blocks: +- Address common challenges in building resilient, microservices applications +- Codify best practices and patterns The diagram below shows how building blocks expose a public API that is called from your code, using components to implement the building blocks' capability. -The following are the building blocks provided by Dapr: +Dapr provides the following building blocks: @@ -25,7 +25,6 @@ The following are the building blocks provided by Dapr: | [**Publish and subscribe**]({{< ref "pubsub-overview.md" >}}) | `/v1.0/publish` `/v1.0/subscribe`| Pub/Sub is a loosely coupled messaging pattern where senders (or publishers) publish messages to a topic, to which subscribers subscribe. Dapr supports the pub/sub pattern between applications. | [**Bindings**]({{< ref "bindings-overview.md" >}}) | `/v1.0/bindings` | A binding provides a bi-directional connection to an external cloud/on-premise service or system. Dapr allows you to invoke the external service through the Dapr binding API, and it allows your application to be triggered by events sent by the connected service. | [**Actors**]({{< ref "actors-overview.md" >}}) | `/v1.0/actors` | An actor is an isolated, independent unit of compute and state with single-threaded execution. Dapr provides an actor implementation based on the virtual actor pattern which provides a single-threaded programming model and where actors are garbage collected when not in use. -| [**Observability**]({{< ref "observability-concept.md" >}}) | `N/A` | Dapr system components and runtime emit metrics, logs, and traces to debug, operate and monitor Dapr system services, components and user applications. | [**Secrets**]({{< ref "secrets-overview.md" >}}) | `/v1.0/secrets` | Dapr provides a secrets building block API and integrates with secret stores such as public cloud stores, local stores and Kubernetes to store the secrets. Services can call the secrets API to retrieve secrets, for example to get a connection string to a database. | [**Configuration**]({{< ref "configuration-api-overview.md" >}}) | `/v1.0/configuration` | The Configuration API enables you to retrieve and subscribe to application configuration items for supported configuration stores. This enables an application to retrieve specific configuration information, for example, at start up or when configuration changes are made in the store. | [**Distributed lock**]({{< ref "distributed-lock-api-overview.md" >}}) | `/v1.0-alpha1/lock` | The distributed lock API enables you to take a lock on a resource so that multiple instances of an application can access the resource without conflicts and provide consistency guarantees. diff --git a/daprdocs/content/en/concepts/components-concept.md b/daprdocs/content/en/concepts/components-concept.md index c54b1a82b7d..b7248d65684 100644 --- a/daprdocs/content/en/concepts/components-concept.md +++ b/daprdocs/content/en/concepts/components-concept.md @@ -11,7 +11,7 @@ Dapr uses a modular design where functionality is delivered as a component. Each You can contribute implementations and extend Dapr's component interfaces capabilities via: - The [components-contrib repository](https://github.com/dapr/components-contrib) -- [Pluggable components]({{}}). +- [Pluggable components]({{< ref "components-concept.md#built-in-and-pluggable-components" >}}). A building block can use any combination of components. For example, the [actors]({{< ref "actors-overview.md" >}}) and the [state management]({{< ref "state-management-overview.md" >}}) building blocks both use [state components](https://github.com/dapr/components-contrib/tree/master/state). @@ -19,6 +19,10 @@ As another example, the [pub/sub]({{< ref "pubsub-overview.md" >}}) building blo You can get a list of current components available in the hosting environment using the `dapr components` CLI command. +{{% alert title="Note" color="primary" %}} +For any component that returns data to the app, it is recommended to set the memory capacity of the Dapr sidecar accordingly (process or container) to avoid potential OOM panics. For example in Docker use the `--memory` option. For Kubernetes, use the `dapr.io/sidecar-memory-limit` annotation. For processes this depends on the OS and/or process orchestration tools.* +{{% /alert %}} + ## Component specification Each component has a specification (or spec) that it conforms to. Components are configured at design-time with a YAML file which is stored in either: diff --git a/daprdocs/content/en/concepts/dapr-services/sidecar.md b/daprdocs/content/en/concepts/dapr-services/sidecar.md index 77997387a87..1d783b78f14 100644 --- a/daprdocs/content/en/concepts/dapr-services/sidecar.md +++ b/daprdocs/content/en/concepts/dapr-services/sidecar.md @@ -49,25 +49,31 @@ For a detailed list of all available arguments run `daprd --help` or see this [t daprd --app-id myapp ``` -2. Specify the port your application is listening to +1. Specify the port your application is listening to ```bash daprd --app-id --app-port 5000 ``` -3. If you are using several custom resources and want to specify the location of the resource definition files, use the `--resources-path` argument: +1. If you are using several custom resources and want to specify the location of the resource definition files, use the `--resources-path` argument: ```bash daprd --app-id myapp --resources-path ``` -4. Enable collection of Prometheus metrics while running your app +1. If you've organized your components and other resources (for example, resiliency policies, subscriptions, or configuration) into separate folders or a shared folder, you can specify multiple resource paths: + + ```bash + daprd --app-id myapp --resources-path --resources-path + ``` + +1. Enable collection of Prometheus metrics while running your app ```bash daprd --app-id myapp --enable-metrics ``` -5. Listen to IPv4 and IPv6 loopback only +1. Listen to IPv4 and IPv6 loopback only ```bash daprd --app-id myapp --dapr-listen-addresses '127.0.0.1,[::1]' diff --git a/daprdocs/content/en/concepts/observability-concept.md b/daprdocs/content/en/concepts/observability-concept.md index 9de8295b931..f7635236c11 100644 --- a/daprdocs/content/en/concepts/observability-concept.md +++ b/daprdocs/content/en/concepts/observability-concept.md @@ -27,7 +27,7 @@ Maintaining this instrumentation code, which is not part of the core logic of th ## Observability for your application with Dapr -When you leverage Dapr API building blocks to perform service-to-service calls and pub/sub messaging, Dapr offers an advantage with respect to [distributed tracing]({{< ref develop-tracing >}}). Since this inter-service communication flows through the Dapr runtime (or "sidecar"), Dapr is in a unique position to offload the burden of application-level instrumentation. +When you leverage Dapr API building blocks to perform service-to-service calls, pub/sub messaging, and other APIs, Dapr offers an advantage with respect to [distributed tracing]({{< ref tracing >}}). Since this inter-service communication flows through the Dapr runtime (or "sidecar"), Dapr is in a unique position to offload the burden of application-level instrumentation. ### Distributed tracing @@ -37,7 +37,7 @@ Dapr can be [configured to emit tracing data]({{< ref setup-tracing.md >}}) usin ### Automatic tracing context generation -Dapr uses [W3C tracing]({{< ref w3c-tracing-overview >}}) specification for tracing context, included as part Open Telemetry (OTEL), to generate and propagate the context header for the application or propagate user-provided context headers. This means that you get tracing by default with Dapr. +Dapr uses the [W3C tracing]({{< ref tracing >}}) specification for tracing context, included as part Open Telemetry (OTEL), to generate and propagate the context header for the application or propagate user-provided context headers. This means that you get tracing by default with Dapr. ## Observability for the Dapr sidecar and control plane @@ -54,7 +54,7 @@ Dapr generates [logs]({{< ref logs.md >}}) to: - Provide visibility into sidecar operation - Help users identify issues and perform debugging -Log events contain warning, error, info, and debug messages produced by Dapr system services. You can also configure Dapr to send logs to collectors, such as Open Telemetry Collector, [Fluentd]({{< ref fluentd.md >}}), [New Relic]({{< ref "operations/monitoring/logging/newrelic.md" >}}), [Azure Monitor]({{< ref azure-monitor.md >}}), and other observability tools, so that logs can be searched and analyzed to provide insights. +Log events contain warning, error, info, and debug messages produced by Dapr system services. You can also configure Dapr to send logs to collectors, such as [Open Telemetry Collector]({{< ref otel-collector >}}), [Fluentd]({{< ref fluentd.md >}}), [New Relic]({{< ref "operations/observability/logging/newrelic.md" >}}), [Azure Monitor]({{< ref azure-monitor.md >}}), and other observability tools, so that logs can be searched and analyzed to provide insights. ### Metrics @@ -70,5 +70,5 @@ Conversely, Dapr can be configured to probe for the [health of your application] ## Next steps -- [Learn more about observability in developing with Dapr]({{< ref develop-tracing >}}) +- [Learn more about observability in developing with Dapr]({{< ref tracing >}}) - [Learn more about observability in operating with Dapr]({{< ref tracing >}}) \ No newline at end of file diff --git a/daprdocs/content/en/concepts/overview.md b/daprdocs/content/en/concepts/overview.md index b7eac28ab49..56624053722 100644 --- a/daprdocs/content/en/concepts/overview.md +++ b/daprdocs/content/en/concepts/overview.md @@ -7,7 +7,7 @@ description: > Introduction to the Distributed Application Runtime --- -Dapr is a portable, event-driven runtime that makes it easy for any developer to build resilient, stateless and stateful applications that run on the cloud and edge and embraces the diversity of languages and developer frameworks. +Dapr is a portable, event-driven runtime that makes it easy for any developer to build resilient, stateless, and stateful applications that run on the cloud and edge and embraces the diversity of languages and developer frameworks.
@@ -15,23 +15,32 @@ Dapr is a portable, event-driven runtime that makes it easy for any developer to ## Any language, any framework, anywhere - + -Today we are experiencing a wave of cloud adoption. Developers are comfortable with web + database application architectures, for example classic 3-tier designs, but not with microservice application architectures which are inherently distributed. It’s hard to become a distributed systems expert, nor should you have to. Developers want to focus on business logic, while leaning on the platforms to imbue their applications with scale, resiliency, maintainability, elasticity and the other attributes of cloud-native architectures. +With the current wave of cloud adoption, web + database application architectures (such as classic 3-tier designs) are trending more toward microservice application architectures, which are inherently distributed. You shouldn't have to become a distributed systems expert just to create microservices applications. -This is where Dapr comes in. Dapr codifies the *best practices* for building microservice applications into open, independent APIs called building blocks, that enable you to build portable applications with the language and framework of your choice. Each building block is completely independent and you can use one, some, or all of them in your application. +This is where Dapr comes in. Dapr codifies the *best practices* for building microservice applications into open, independent APIs called [building blocks]({{< ref "#microservice-building-blocks-for-cloud-and-edge" >}}). Dapr's building blocks: +- Enable you to build portable applications using the language and framework of your choice. +- Are completely independent +- Have no limit to how many you use in your application -Using Dapr you can incrementally migrate your existing applications to a microservices architecture, thereby adopting cloud native patterns such scale out/in, resiliency and independent deployments. +Using Dapr, you can incrementally migrate your existing applications to a microservices architecture, thereby adopting cloud native patterns such scale out/in, resiliency, and independent deployments. -In addition, Dapr is platform agnostic, meaning you can run your applications locally, on any Kubernetes cluster, on virtual or physical machines and in other hosting environments that Dapr integrates with. This enables you to build microservice applications that can run on the cloud and edge. +Dapr is platform agnostic, meaning you can run your applications: +- Locally +- On any Kubernetes cluster +- On virtual or physical machines +- In other hosting environments that Dapr integrates with. + +This enables you to build microservice applications that can run on the cloud and edge. ## Microservice building blocks for cloud and edge - + -There are many considerations when architecting microservices applications. Dapr provides best practices for common capabilities when building microservice applications that developers can use in a standard way, and deploy to any environment. It does this by providing distributed system building blocks. +Dapr provides distributed system building blocks for you to build microservice applications in a standard way and to deploy to any environment. -Each of these building block APIs is independent, meaning that you can use one, some, or all of them in your application. The following building blocks are available: +Each of these building block APIs is independent, meaning that you can use any number of them in your application. | Building Block | Description | |----------------|-------------| @@ -40,13 +49,22 @@ Each of these building block APIs is independent, meaning that you can use one, | [**Publish and subscribe**]({{< ref "pubsub-overview.md" >}}) | Publishing events and subscribing to topics between services enables event-driven architectures to simplify horizontal scalability and make them resilient to failure. Dapr provides at-least-once message delivery guarantee, message TTL, consumer groups and other advance features. | [**Resource bindings**]({{< ref "bindings-overview.md" >}}) | Resource bindings with triggers builds further on event-driven architectures for scale and resiliency by receiving and sending events to and from any external source such as databases, queues, file systems, etc. | [**Actors**]({{< ref "actors-overview.md" >}}) | A pattern for stateful and stateless objects that makes concurrency simple, with method and state encapsulation. Dapr provides many capabilities in its actor runtime, including concurrency, state, and life-cycle management for actor activation/deactivation, and timers and reminders to wake up actors. -| [**Observability**]({{< ref "observability-concept.md" >}}) | Dapr emits metrics, logs, and traces to debug and monitor both Dapr and user applications. Dapr supports distributed tracing to easily diagnose and serve inter-service calls in production using the W3C Trace Context standard and Open Telemetry to send to different monitoring tools. | [**Secrets**]({{< ref "secrets-overview.md" >}}) | The secrets management API integrates with public cloud and local secret stores to retrieve the secrets for use in application code. | [**Configuration**]({{< ref "configuration-api-overview.md" >}}) | The configuration API enables you to retrieve and subscribe to application configuration items from configuration stores. | [**Distributed lock**]({{< ref "distributed-lock-api-overview.md" >}}) | The distributed lock API enables your application to acquire a lock for any resource that gives it exclusive access until either the lock is released by the application, or a lease timeout occurs. | [**Workflows**]({{< ref "workflow-overview.md" >}}) | The workflow API can be combined with other Dapr building blocks to define long running, persistent processes or data flows that span multiple microservices using Dapr workflows or workflow components. | [**Cryptography**]({{< ref "cryptography-overview.md" >}}) | The cryptography API provides an abstraction layer on top of security infrastructure such as key vaults. It contains APIs that allow you to perform cryptographic operations, such as encrypting and decrypting messages, without exposing keys to your applications. +### Cross-cutting APIs + +Alongside its building blocks, Dapr provides cross-cutting APIs that apply across all the build blocks you use. + +| Building Block | Description | +|----------------|-------------| +| [**Resiliency**]({{< ref "resiliency-concept.md" >}}) | Dapr provides the capability to define and apply fault tolerance resiliency policies via a resiliency spec. Supported specs define policies for resiliency patterns such as timeouts, retries/back-offs, and circuit breakers. +| [**Observability**]({{< ref "observability-concept.md" >}}) | Dapr emits metrics, logs, and traces to debug and monitor both Dapr and user applications. Dapr supports distributed tracing to easily diagnose and serve inter-service calls in production using the W3C Trace Context standard and Open Telemetry to send to different monitoring tools. +| [**Security**]({{< ref "security-concept.md" >}}) | Dapr supports in-transit encryption of communication between Dapr instances using the Dapr control plane, Sentry service. You can bring in your own certificates, or let Dapr automatically create and persist self-signed root and issuer certificates. + ## Sidecar architecture Dapr exposes its HTTP and gRPC APIs as a sidecar architecture, either as a container or as a process, not requiring the application code to include any Dapr runtime code. This makes integration with Dapr easy from other runtimes, as well as providing separation of the application logic for improved supportability. @@ -55,33 +73,41 @@ Dapr exposes its HTTP and gRPC APIs as a sidecar architecture, either as a conta ## Hosting environments -Dapr can be hosted in multiple environments, including self-hosted on a Windows/Linux/macOS machines for local development and on Kubernetes or clusters of physical or virtual machines in production. +Dapr can be hosted in multiple environments, including: +- Self-hosted on a Windows/Linux/macOS machine for local development +- On Kubernetes or clusters of physical or virtual machines in production ### Self-hosted local development -In [self-hosted mode]({{< ref self-hosted-overview.md >}}) Dapr runs as a separate sidecar process which your service code can call via HTTP or gRPC. Each running service has a Dapr runtime process (or sidecar) which is configured to use state stores, pub/sub, binding components and the other building blocks. +In [self-hosted mode]({{< ref self-hosted-overview.md >}}), Dapr runs as a separate sidecar process, which your service code can call via HTTP or gRPC. Each running service has a Dapr runtime process (or sidecar) configured to use state stores, pub/sub, binding components, and the other building blocks. -You can use the [Dapr CLI](https://github.com/dapr/cli#launch-dapr-and-your-app) to run a Dapr-enabled application on your local machine. The diagram below show Dapr's local development environment when configured with the CLI `init` command. Try this out with the [getting started samples]({{< ref getting-started >}}). +You can use the [Dapr CLI](https://github.com/dapr/cli#launch-dapr-and-your-app) to run a Dapr-enabled application on your local machine. In the following diagram, Dapr's local development environment gets configured with the CLI `init` command. Try this out with the [getting started samples]({{< ref getting-started >}}). Architecture diagram of Dapr in self-hosted mode ### Kubernetes -Kubernetes can be used for either local development (for example with [minikube](https://minikube.sigs.k8s.io/docs/), [k3S](https://k3s.io/)) or in [production]({{< ref kubernetes >}}). In container hosting environments such as Kubernetes, Dapr runs as a sidecar container with the application container in the same pod. +Kubernetes can be used for either: +- Local development (for example, with [minikube](https://minikube.sigs.k8s.io/docs/) and [k3S](https://k3s.io/)), or +- In [production]({{< ref kubernetes >}}). + +In container hosting environments such as Kubernetes, Dapr runs as a sidecar container with the application container in the same pod. -Dapr has control plane services. The `dapr-sidecar-injector` and `dapr-operator` services provide first-class integration to launch Dapr as a sidecar container in the same pod as the service container and provide notifications of Dapr component updates provisioned in the cluster. +Dapr's `dapr-sidecar-injector` and `dapr-operator` control plane services provide first-class integration to: +- Launch Dapr as a sidecar container in the same pod as the service container +- Provide notifications of Dapr component updates provisioned in the cluster The `dapr-sentry` service is a certificate authority that enables mutual TLS between Dapr sidecar instances for secure data encryption, as well as providing identity via [Spiffe](https://spiffe.io/). For more information on the `Sentry` service, read the [security overview]({{< ref "security-concept.md#dapr-to-dapr-communication" >}}) -Deploying and running a Dapr-enabled application into your Kubernetes cluster is as simple as adding a few annotations to the deployment schemes. Visit the [Dapr on Kubernetes docs]({{< ref kubernetes >}}) +Deploying and running a Dapr-enabled application into your Kubernetes cluster is as simple as adding a few annotations to the deployment schemes. Visit the [Dapr on Kubernetes docs]({{< ref kubernetes >}}). Architecture diagram of Dapr in Kubernetes mode ### Clusters of physical or virtual machines -The Dapr control plane services can be deployed in High Availability (HA) mode to clusters of physical or virtual machines in production, for example, as shown in the diagram below. Here the Actor `Placement` and `Sentry` services are started on three different VMs to provide HA control plane. In order to provide name resolution using DNS for the applications running in the cluster, Dapr uses [Hashicorp Consul service]({{< ref setup-nr-consul >}}), also running in HA mode. +The Dapr control plane services can be deployed in high availability (HA) mode to clusters of physical or virtual machines in production. In the diagram below, the Actor `Placement` and security `Sentry` services are started on three different VMs to provide HA control plane. In order to provide name resolution using DNS for the applications running in the cluster, Dapr uses [Hashicorp Consul service]({{< ref setup-nr-consul >}}), also running in HA mode. Architecture diagram of Dapr control plane and Consul deployed to VMs in high availability mode @@ -91,17 +117,15 @@ Dapr offers a variety of SDKs and frameworks to make it easy to begin developing ### Dapr SDKs -To make using Dapr more natural for different languages, it also includes [language specific SDKs]({{}}) for: -- C++ +To make using Dapr more natural for different languages, it also includes [language specific SDKs]({{< ref sdks >}}) for: - Go - Java - JavaScript - .NET - PHP - Python -- Rust -These SDKs expose the functionality of the Dapr building blocks through a typed language API, rather than calling the http/gRPC API. This enables you to write a combination of stateless and stateful functions and actors all in the language of your choice. And because these SDKs share the Dapr runtime, you get cross-language actor and function support. +These SDKs expose the functionality of the Dapr building blocks through a typed language API, rather than calling the http/gRPC API. This enables you to write a combination of stateless and stateful functions and actors all in the language of your choice. Since these SDKs share the Dapr runtime, you get cross-language actor and function support. ### Developer frameworks @@ -120,7 +144,7 @@ Dapr can be used from any developer framework. Here are some that have been inte #### Integrations and extensions Visit the [integrations]({{< ref integrations >}}) page to learn about some of the first-class support Dapr has for various frameworks and external products, including: -- Public cloud services +- Public cloud services, like Azure and AWS - Visual Studio Code - GitHub @@ -128,6 +152,6 @@ Visit the [integrations]({{< ref integrations >}}) page to learn about some of t Dapr is designed for [operations]({{< ref operations >}}) and security. The Dapr sidecars, runtime, components, and configuration can all be managed and deployed easily and securely to match your organization's needs. -The [dashboard](https://github.com/dapr/dashboard), installed via the Dapr CLI, provides a web-based UI enabling you to see information, view logs and more for running Dapr applications. +The [dashboard](https://github.com/dapr/dashboard), installed via the Dapr CLI, provides a web-based UI enabling you to see information, view logs, and more for running Dapr applications. -The [monitoring tools support]({{< ref monitoring >}}) provides deeper visibility into the Dapr system services and side-cars and the [observability capabilities]({{}}) of Dapr provide insights into your application such as tracing and metrics. +Dapr supports [monitoring tools]({{< ref observability >}}) for deeper visibility into the Dapr system services and sidecars, while the [observability capabilities]({{< ref "observability-concept.md" >}}) of Dapr provide insights into your application, such as tracing and metrics. diff --git a/daprdocs/content/en/concepts/security-concept.md b/daprdocs/content/en/concepts/security-concept.md index 20892e71d49..d7ceef443b4 100644 --- a/daprdocs/content/en/concepts/security-concept.md +++ b/daprdocs/content/en/concepts/security-concept.md @@ -211,6 +211,21 @@ The Dapr threat model is below. ## Security audit +### September 2023 + +In September 2023, Dapr completed a security audit done by Ada Logics. + +The audit was a holistic security audit with the following goals: + +- Formalize a threat model of Dapr +- Perform manual code review +- Evaluate Daprs fuzzing suite against the formalized threat model +- Carry out a SLSA review of Dapr. + +You can find the full report [here](/docs/Dapr-september-2023-security-audit-report.pdf). + +The audit found 7 issues none of which were of high or critical severity. One CVE was assigned from an issue in a 3rd-party dependency to Dapr Components Contrib + ### June 2023 In June 2023, Dapr completed a fuzzing audit done by Ada Logics. diff --git a/daprdocs/content/en/developing-applications/building-blocks/actors/actors-overview.md b/daprdocs/content/en/developing-applications/building-blocks/actors/actors-overview.md index ada5c602a35..695d27033aa 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/actors/actors-overview.md +++ b/daprdocs/content/en/developing-applications/building-blocks/actors/actors-overview.md @@ -20,7 +20,11 @@ Dapr includes a runtime that specifically implements the [Virtual Actor pattern] Every actor is defined as an instance of an actor type, identical to the way an object is an instance of a class. For example, there may be an actor type that implements the functionality of a calculator and there could be many actors of that type that are distributed on various nodes across a cluster. Each such actor is uniquely identified by an actor ID. - + + +[The following overview video and demo](https://www.youtube.com/live/0y7ne6teHT4?si=dWNgtsp61f3Sjq0n&t=10797) demonstrates how actors in Dapr work. + + ## Dapr actors vs. Dapr Workflow @@ -98,6 +102,10 @@ The functionality of timers and reminders is very similar. The main difference i This distinction allows users to trade off between light-weight but stateless timers vs. more resource-demanding but stateful reminders. +[The following overview video and demo](https://www.youtube.com/live/0y7ne6teHT4?si=2_xX6mkU3UCy2Plr&t=6607) demonstrates how actor timers and reminders work. + + + - [Learn more about actor timers.]({{< ref "actors-features-concepts.md#timers" >}}) - [Learn more about actor reminders.]({{< ref "actors-features-concepts.md#reminders" >}}) - [Learn more about timer and reminder error handling and failover.]({{< ref "actors-features-concepts.md#timers-and-reminders-error-handling" >}}) diff --git a/daprdocs/content/en/developing-applications/building-blocks/bindings/bindings-overview.md b/daprdocs/content/en/developing-applications/building-blocks/bindings/bindings-overview.md index e98b5440edd..980a39f79a3 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/bindings/bindings-overview.md +++ b/daprdocs/content/en/developing-applications/building-blocks/bindings/bindings-overview.md @@ -15,14 +15,18 @@ Using Dapr's bindings API, you can trigger your app with events coming in from e - Switch between bindings at runtime. - Build portable applications with environment-specific bindings set-up and no required code changes. -For example, with bindings, your microservice can respond to incoming Twilio/SMS messages without: +For example, with bindings, your application can respond to incoming Twilio/SMS messages without: - Adding or configuring a third-party Twilio SDK - Worrying about polling from Twilio (or using WebSockets, etc.) -{{% alert title="Note" color="primary" %}} +Diagram showing bindings + +In the above diagram: +- The input binding triggers a method on your application. +- Execute output binding operations on the component, such as `"create"`. + Bindings are developed independently of Dapr runtime. You can [view and contribute to the bindings](https://github.com/dapr/components-contrib/tree/master/bindings). -{{% /alert %}} {{% alert title="Note" color="primary" %}} If you are using the HTTP Binding, then it is preferable to use [service invocation]({{< ref service_invocation_api.md >}}) instead. Read [How-To: Invoke Non-Dapr Endpoints using HTTP]({{< ref "howto-invoke-non-dapr-endpoints.md" >}}) for more information. @@ -32,6 +36,10 @@ If you are using the HTTP Binding, then it is preferable to use [service invocat With input bindings, you can trigger your application when an event from an external resource occurs. An optional payload and metadata may be sent with the request. +[The following overview video and demo](https://www.youtube.com/live/0y7ne6teHT4?si=wlmAi7BJBWS8KNK7&t=8261) demonstrates how Dapr input binding works. + + + To receive events from an input binding: 1. Define the component YAML that describes the binding type and its metadata (connection info, etc.). @@ -50,13 +58,36 @@ Read the [Create an event-driven app using input bindings guide]({{< ref howto-t With output bindings, you can invoke external resources. An optional payload and metadata can be sent with the invocation request. +[The following overview video and demo](https://www.youtube.com/live/0y7ne6teHT4?si=PoA4NEqL5mqNj6Il&t=7668) demonstrates how Dapr output binding works. + + + To invoke an output binding: 1. Define the component YAML that describes the binding type and its metadata (connection info, etc.). -2. Use the HTTP endpoint or gRPC method to invoke the binding with an optional payload. +1. Use the HTTP endpoint or gRPC method to invoke the binding with an optional payload. +1. Specify an output operation. Output operations depend on the binding component you use, and can include: + - `"create"` + - `"update"` + - `"delete"` + - `"exec"` Read the [Use output bindings to interface with external resources guide]({{< ref howto-bindings.md >}}) to get started with output bindings. +## Binding directions (optional) + +You can provide the `direction` metadata field to indicate the direction(s) supported by the binding component. In doing so, the Dapr sidecar avoids the `"wait for the app to become ready"` state reducing the lifecycle dependency between the Dapr sidecar and the application: + +- `"input"` +- `"output"` +- `"input, output"` + +{{% alert title="Note" color="primary" %}} +It is highly recommended that all bindings should include the `direction` property. +{{% /alert %}} + +[See a full example of the bindings `direction` metadata.]({{< ref "bindings_api.md#binding-direction-optional" >}}) + ## Try out bindings ### Quickstarts and tutorials diff --git a/daprdocs/content/en/developing-applications/building-blocks/bindings/howto-bindings.md b/daprdocs/content/en/developing-applications/building-blocks/bindings/howto-bindings.md index 7a26103546f..1822f543a6d 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/bindings/howto-bindings.md +++ b/daprdocs/content/en/developing-applications/building-blocks/bindings/howto-bindings.md @@ -32,6 +32,8 @@ Create a new binding component named `checkout`. Within the `metadata` section, - The topic to which you'll publish the message - The broker +When creating the binding component, [specify the supported `direction` of the binding]({{< ref "bindings_api.md#binding-direction-optional" >}}). + {{< tabs "Self-Hosted (CLI)" Kubernetes >}} {{% codetab %}} @@ -59,7 +61,9 @@ spec: - name: publishTopic value: sample - name: authRequired - value: "false" + value: false + - name: direction + value: output ``` {{% /codetab %}} @@ -89,7 +93,9 @@ spec: - name: publishTopic value: sample - name: authRequired - value: "false" + value: false + - name: direction + value: output ``` {{% /codetab %}} diff --git a/daprdocs/content/en/developing-applications/building-blocks/bindings/howto-triggers.md b/daprdocs/content/en/developing-applications/building-blocks/bindings/howto-triggers.md index 215ffd05d06..56a24b0aece 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/bindings/howto-triggers.md +++ b/daprdocs/content/en/developing-applications/building-blocks/bindings/howto-triggers.md @@ -37,6 +37,8 @@ Create a new binding component named `checkout`. Within the `metadata` section, - The topic to which you'll publish the message - The broker +When creating the binding component, [specify the supported `direction` of the binding]({{< ref "bindings_api.md#binding-direction-optional" >}}). + {{< tabs "Self-Hosted (CLI)" Kubernetes >}} {{% codetab %}} @@ -64,7 +66,9 @@ spec: - name: publishTopic value: sample - name: authRequired - value: "false" + value: false + - name: direction + value: input ``` {{% /codetab %}} @@ -94,7 +98,9 @@ spec: - name: publishTopic value: sample - name: authRequired - value: "false" + value: false + - name: direction + value: input ``` {{% /codetab %}} @@ -256,15 +262,15 @@ async function start() { {{< /tabs >}} -### ACK-ing an event +### ACK an event Tell Dapr you've successfully processed an event in your application by returning a `200 OK` response from your HTTP handler. -### Rejecting an event +### Reject an event Tell Dapr the event was not processed correctly in your application and schedule it for redelivery by returning any response other than `200 OK`. For example, a `500 Error`. -### Specifying a custom route +### Specify a custom route By default, incoming events will be sent to an HTTP endpoint that corresponds to the name of the input binding. You can override this by setting the following metadata property in `binding.yaml`: diff --git a/daprdocs/content/en/developing-applications/building-blocks/observability/develop-tracing/_index.md b/daprdocs/content/en/developing-applications/building-blocks/observability/develop-tracing/_index.md deleted file mode 100644 index bc0df410947..00000000000 --- a/daprdocs/content/en/developing-applications/building-blocks/observability/develop-tracing/_index.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -type: docs -title: "Tracing" -linkTitle: "Tracing" -weight: 300 -description: Learn more about tracing scenarios and how to use tracing for visibility in your application ---- \ No newline at end of file diff --git a/daprdocs/content/en/developing-applications/building-blocks/pubsub/howto-publish-subscribe.md b/daprdocs/content/en/developing-applications/building-blocks/pubsub/howto-publish-subscribe.md index f771a292bd3..c3ceb433307 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/pubsub/howto-publish-subscribe.md +++ b/daprdocs/content/en/developing-applications/building-blocks/pubsub/howto-publish-subscribe.md @@ -658,6 +658,12 @@ dapr run --app-id orderprocessing --app-port 6001 --dapr-http-port 3601 --dapr-g In order to tell Dapr that a message was processed successfully, return a `200 OK` response. If Dapr receives any other return status code than `200`, or if your app crashes, Dapr will attempt to redeliver the message following at-least-once semantics. +## Demo video + +Watch [this demo video](https://youtu.be/1dqe1k-FXJQ?si=s3gvWxRxeOsmXuE1) to learn more about pub/sub messaging with Dapr. + + + ## Next steps - Try the [pub/sub tutorial](https://github.com/dapr/quickstarts/tree/master/tutorials/pub-sub). diff --git a/daprdocs/content/en/developing-applications/building-blocks/pubsub/pubsub-cloudevents.md b/daprdocs/content/en/developing-applications/building-blocks/pubsub/pubsub-cloudevents.md index f7525632647..b6f46bb2970 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/pubsub/pubsub-cloudevents.md +++ b/daprdocs/content/en/developing-applications/building-blocks/pubsub/pubsub-cloudevents.md @@ -82,12 +82,12 @@ As another example of a v1.0 CloudEvent, the following shows data as XML content Dapr automatically generates several CloudEvent properties. You can replace these generated CloudEvent properties by providing the following optional metadata key/value: -- `cloudevent-id`: overrides `id` -- `cloudevent-source`: overrides `source` -- `cloudevent-type`: overrides `type` -- `cloudevent-traceid`: overrides `traceid` -- `cloudevent-tracestate`: overrides `tracestate` -- `cloudevent-traceparent`: overrides `traceparent` +- `cloudevent.id`: overrides `id` +- `cloudevent.source`: overrides `source` +- `cloudevent.type`: overrides `type` +- `cloudevent.traceid`: overrides `traceid` +- `cloudevent.tracestate`: overrides `tracestate` +- `cloudevent.traceparent`: overrides `traceparent` The ability to replace CloudEvents properties using these metadata properties applies to all pub/sub components. @@ -106,7 +106,7 @@ with DaprClient() as client: result = client.publish_event( pubsub_name='order_pub_sub', topic_name='orders', - publish_metadata={'cloudevent-id: 'd99b228f-6c73-4e78-8c4d-3f80a043d317', cloudevent-source: 'payment'} + publish_metadata={'cloudevent.id: 'd99b228f-6c73-4e78-8c4d-3f80a043d317', cloudevent.source: 'payment'} ) ``` diff --git a/daprdocs/content/en/developing-applications/building-blocks/pubsub/pubsub-overview.md b/daprdocs/content/en/developing-applications/building-blocks/pubsub/pubsub-overview.md index fa633486846..41c9ac23b6c 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/pubsub/pubsub-overview.md +++ b/daprdocs/content/en/developing-applications/building-blocks/pubsub/pubsub-overview.md @@ -13,7 +13,7 @@ Publish and subscribe (pub/sub) enables microservices to communicate with each o An intermediary message broker copies each message from a publisher's input channel to an output channel for all subscribers interested in that message. This pattern is especially useful when you need to decouple microservices from one another. - +

@@ -32,15 +32,17 @@ When using pub/sub in Dapr: 1. The pub/sub building block makes calls into a Dapr pub/sub component that encapsulates a specific message broker. 1. To receive messages on a topic, Dapr subscribes to the pub/sub component on behalf of your service with a topic and delivers the messages to an endpoint on your service when they arrive. +[The following overview video and demo](https://www.youtube.com/live/0y7ne6teHT4?si=FMg2Y7bRuljKism-&t=5384) demonstrates how Dapr pub/sub works. + + + In the diagram below, a "shipping" service and an "email" service have both subscribed to topics published by a "cart" service. Each service loads pub/sub component configuration files that point to the same pub/sub message broker component; for example: Redis Streams, NATS Streaming, Azure Service Bus, or GCP pub/sub. - -

+ In the diagram below, the Dapr API posts an "order" topic from the publishing "cart" service to "order" endpoints on the "shipping" and "email" subscribing services. - -

+ [View the complete list of pub/sub components that Dapr supports]({{< ref supported-pubsub >}}). @@ -100,16 +102,29 @@ Dapr solves multi-tenancy at-scale with [namespaces for consumer groups]({{< ref ### At-least-once guarantee -Dapr guarantees at-least-once semantics for message delivery. When an application publishes a message to a topic using the pub/sub API, Dapr ensures the message is delivered *at least once* to every subscriber. +Dapr guarantees at-least-once semantics for message delivery. When an application publishes a message to a topic using the pub/sub API, Dapr ensures the message is delivered *at least once* to every subscriber. + +Even if the message fails to deliver, or your application crashes, Dapr attempts to redeliver the message until successful delivery. + +All Dapr pub/sub components support the at-least-once guarantee. ### Consumer groups and competing consumers pattern -Dapr automatically handles the burden of dealing with concepts like consumer groups and competing consumers pattern. The competing consumers pattern refers to multiple application instances using a single consumer group. When multiple instances of the same application (running same Dapr app ID) subscribe to a topic, Dapr delivers each message to *only one instance of **that** application*. This concept is illustrated in the diagram below. +Dapr handles the burden of dealing with consumer groups and the competing consumers pattern. In the competing consumers pattern, multiple application instances using a single consumer group compete for the message. Dapr enforces the competing consumer pattern when replicas use the same `app-id` without explict consumer group overrides. + +When multiple instances of the same application (with same `app-id`) subscribe to a topic, Dapr delivers each message to *only one instance of **that** application*. This concept is illustrated in the diagram below.

-Similarly, if two different applications (with different app-IDs) subscribe to the same topic, Dapr delivers each message to *only one instance of **each** application*. +Similarly, if two different applications (with different `app-id`) subscribe to the same topic, Dapr delivers each message to *only one instance of **each** application*. + +Not all Dapr pub/sub components support the competing consumer pattern. Currently, the following (non-exhaustive) pub/sub components support this: + +- [Apache Kafka]({{< ref setup-apache-kafka >}}) +- [Azure Service Bus Queues]({{< ref setup-azure-servicebus-queues >}}) +- [RabbitMQ]({{< ref setup-rabbitmq >}}) +- [Redis Streams]({{< ref setup-redis-pubsub >}}) ### Scoping topics for added security diff --git a/daprdocs/content/en/developing-applications/building-blocks/pubsub/subscription-methods.md b/daprdocs/content/en/developing-applications/building-blocks/pubsub/subscription-methods.md index dce9cbd9a14..0b9e2ca2b35 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/pubsub/subscription-methods.md +++ b/daprdocs/content/en/developing-applications/building-blocks/pubsub/subscription-methods.md @@ -223,7 +223,7 @@ Both of the handlers defined above also need to be mapped to configure the `dapr app.UseEndpoints(endpoints => { endpoints.MapSubscribeHandler(); -} +}); ``` {{% /codetab %}} @@ -321,6 +321,7 @@ app.listen(port, () => console.log(`consumer app listening on port ${port}!`)) ```go package main +import ( "encoding/json" "fmt" "log" diff --git a/daprdocs/content/en/developing-applications/building-blocks/secrets/secrets-overview.md b/daprdocs/content/en/developing-applications/building-blocks/secrets/secrets-overview.md index 856634f216b..717a250e33c 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/secrets/secrets-overview.md +++ b/daprdocs/content/en/developing-applications/building-blocks/secrets/secrets-overview.md @@ -18,6 +18,10 @@ Dapr's dedicated secrets building block API makes it easier for developers to co 1. Retrieve secrets using the Dapr secrets API in the application code. 1. Optionally, reference secrets in Dapr component files. +[The following overview video and demo](https://www.youtube.com/live/0y7ne6teHT4?si=3bmNSSyIEIVSF-Ej&t=9931) demonstrates how Dapr secrets management works. + + + ## Features The secrets management API building block brings several features to your application. diff --git a/daprdocs/content/en/developing-applications/building-blocks/service-invocation/howto-invoke-discover-services.md b/daprdocs/content/en/developing-applications/building-blocks/service-invocation/howto-invoke-discover-services.md index 6e70fe765dd..c3f78e4a4e0 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/service-invocation/howto-invoke-discover-services.md +++ b/daprdocs/content/en/developing-applications/building-blocks/service-invocation/howto-invoke-discover-services.md @@ -3,7 +3,7 @@ type: docs title: "How-To: Invoke services using HTTP" linkTitle: "How-To: Invoke with HTTP" description: "Call between services using service invocation" -weight: 2000 +weight: 20 --- This article demonstrates how to deploy services each with an unique application ID for other services to discover and call endpoints on them using service invocation over HTTP. @@ -19,26 +19,22 @@ This article demonstrates how to deploy services each with an unique application Dapr allows you to assign a global, unique ID for your app. This ID encapsulates the state for your application, regardless of the number of instances it may have. -{{< tabs Dotnet Java Python Go JavaScript Kubernetes>}} +{{< tabs Python JavaScript ".NET" Java Go Kubernetes >}} {{% codetab %}} ```bash +dapr run --app-id checkout --app-protocol http --dapr-http-port 3500 -- python3 checkout/app.py -dapr run --app-id checkout --app-port 6002 --dapr-http-port 3602 --dapr-grpc-port 60002 dotnet run - -dapr run --app-id orderprocessing --app-port 6001 --dapr-http-port 3601 --dapr-grpc-port 60001 dotnet run - +dapr run --app-id order-processor --app-port 8001 --app-protocol http --dapr-http-port 3501 -- python3 order-processor/app.py ``` If your app uses a TLS, you can tell Dapr to invoke your app over a TLS connection by setting `--app-protocol https`: ```bash +dapr run --app-id checkout --app-protocol https --dapr-http-port 3500 -- python3 checkout/app.py -dapr run --app-id checkout --app-port 6002 --dapr-http-port 3602 --dapr-grpc-port 60002 --app-protocol https dotnet run - -dapr run --app-id orderprocessing --app-port 6001 --dapr-http-port 3601 --dapr-grpc-port 60001 --app-protocol https dotnet run - +dapr run --app-id order-processor --app-port 8001 --app-protocol https --dapr-http-port 3501 -- python3 order-processor/app.py ``` {{% /codetab %}} @@ -46,21 +42,17 @@ dapr run --app-id orderprocessing --app-port 6001 --dapr-http-port 3601 --dapr-g {{% codetab %}} ```bash +dapr run --app-id checkout --app-protocol http --dapr-http-port 3500 -- npm start -dapr run --app-id checkout --app-port 6002 --dapr-http-port 3602 --dapr-grpc-port 60002 mvn spring-boot:run - -dapr run --app-id orderprocessing --app-port 6001 --dapr-http-port 3601 --dapr-grpc-port 60001 mvn spring-boot:run - +dapr run --app-id order-processor --app-port 5001 --app-protocol http --dapr-http-port 3501 -- npm start ``` If your app uses a TLS, you can tell Dapr to invoke your app over a TLS connection by setting `--app-protocol https`: ```bash +dapr run --app-id checkout --dapr-http-port 3500 --app-protocol https -- npm start -dapr run --app-id checkout --app-port 6002 --dapr-http-port 3602 --dapr-grpc-port 60002 --app-protocol https mvn spring-boot:run - -dapr run --app-id orderprocessing --app-port 6001 --dapr-http-port 3601 --dapr-grpc-port 60001 --app-protocol https mvn spring-boot:run - +dapr run --app-id order-processor --app-port 5001 --dapr-http-port 3501 --app-protocol https -- npm start ``` {{% /codetab %}} @@ -68,21 +60,17 @@ dapr run --app-id orderprocessing --app-port 6001 --dapr-http-port 3601 --dapr-g {{% codetab %}} ```bash +dapr run --app-id checkout --app-protocol http --dapr-http-port 3500 -- dotnet run -dapr run --app-id checkout --app-port 6002 --dapr-http-port 3602 --dapr-grpc-port 60002 -- python3 CheckoutService.py - -dapr run --app-id orderprocessing --app-port 6001 --dapr-http-port 3601 --dapr-grpc-port 60001 -- python3 OrderProcessingService.py - +dapr run --app-id order-processor --app-port 7001 --app-protocol http --dapr-http-port 3501 -- dotnet run ``` If your app uses a TLS, you can tell Dapr to invoke your app over a TLS connection by setting `--app-protocol https`: ```bash +dapr run --app-id checkout --dapr-http-port 3500 --app-protocol https -- dotnet run -dapr run --app-id checkout --app-port 6002 --dapr-http-port 3602 --dapr-grpc-port 60002 --app-protocol https -- python3 CheckoutService.py - -dapr run --app-id orderprocessing --app-port 6001 --dapr-http-port 3601 --dapr-grpc-port 60001 --app-protocol https -- python3 OrderProcessingService.py - +dapr run --app-id order-processor --app-port 7001 --dapr-http-port 3501 --app-protocol https -- dotnet run ``` {{% /codetab %}} @@ -90,21 +78,17 @@ dapr run --app-id orderprocessing --app-port 6001 --dapr-http-port 3601 --dapr-g {{% codetab %}} ```bash +dapr run --app-id checkout --app-protocol http --dapr-http-port 3500 -- java -jar target/CheckoutService-0.0.1-SNAPSHOT.jar -dapr run --app-id checkout --app-port 6002 --dapr-http-port 3602 --dapr-grpc-port 60002 go run CheckoutService.go - -dapr run --app-id orderprocessing --app-port 6001 --dapr-http-port 3601 --dapr-grpc-port 60001 go run OrderProcessingService.go - +dapr run --app-id order-processor --app-port 9001 --app-protocol http --dapr-http-port 3501 -- java -jar target/OrderProcessingService-0.0.1-SNAPSHOT.jar ``` If your app uses a TLS, you can tell Dapr to invoke your app over a TLS connection by setting `--app-protocol https`: ```bash +dapr run --app-id checkout --dapr-http-port 3500 --app-protocol https -- java -jar target/CheckoutService-0.0.1-SNAPSHOT.jar -dapr run --app-id checkout --app-port 6002 --dapr-http-port 3602 --dapr-grpc-port 60002 --app-protocol https go run CheckoutService.go - -dapr run --app-id orderprocessing --app-port 6001 --dapr-http-port 3601 --dapr-grpc-port 60001 --app-protocol https go run OrderProcessingService.go - +dapr run --app-id order-processor --app-port 9001 --dapr-http-port 3501 --app-protocol https -- java -jar target/OrderProcessingService-0.0.1-SNAPSHOT.jar ``` {{% /codetab %}} @@ -112,21 +96,17 @@ dapr run --app-id orderprocessing --app-port 6001 --dapr-http-port 3601 --dapr-g {{% codetab %}} ```bash +dapr run --app-id checkout --dapr-http-port 3500 -- go run . -dapr run --app-id checkout --app-port 6002 --dapr-http-port 3602 --dapr-grpc-port 60002 npm start - -dapr run --app-id orderprocessing --app-port 6001 --dapr-http-port 3601 --dapr-grpc-port 60001 npm start - +dapr run --app-id order-processor --app-port 6006 --app-protocol http --dapr-http-port 3501 -- go run . ``` If your app uses a TLS, you can tell Dapr to invoke your app over a TLS connection by setting `--app-protocol https`: ```bash +dapr run --app-id checkout --dapr-http-port 3500 --app-protocol https -- go run . -dapr run --app-id checkout --app-port 6002 --dapr-http-port 3602 --dapr-grpc-port 60002 --app-protocol https npm start - -dapr run --app-id orderprocessing --app-port 6001 --dapr-http-port 3601 --dapr-grpc-port 60001 --app-protocol https npm start - +dapr run --app-id order-processor --app-port 6006 --dapr-http-port 3501 --app-protocol https -- go run . ``` {{% /codetab %}} @@ -156,7 +136,7 @@ spec: app: -app annotations: dapr.io/enabled: "true" - dapr.io/app-id: "orderprocessingservice" + dapr.io/app-id: "order-processor" dapr.io/app-port: "6001" ... ``` @@ -173,7 +153,69 @@ To invoke an application using Dapr, you can use the `invoke` API on any Dapr in Below are code examples that leverage Dapr SDKs for service invocation. -{{< tabs Dotnet Java Python Go Javascript>}} +{{< tabs Python JavaScript ".NET" Java Go >}} + +{{% codetab %}} + +```python +#dependencies +import random +from time import sleep +import logging +import requests + +#code +logging.basicConfig(level = logging.INFO) +while True: + sleep(random.randrange(50, 5000) / 1000) + orderId = random.randint(1, 1000) + #Invoke a service + result = requests.post( + url='%s/orders' % (base_url), + data=json.dumps(order), + headers=headers + ) + logging.basicConfig(level = logging.INFO) + logging.info('Order requested: ' + str(orderId)) + logging.info('Result: ' + str(result)) +``` + +{{% /codetab %}} + +{{% codetab %}} + +```javascript +//dependencies +import axios from "axios"; + +//code +const daprHost = "127.0.0.1"; + +var main = function() { + for(var i=0;i<10;i++) { + sleep(5000); + var orderId = Math.floor(Math.random() * (1000 - 1) + 1); + start(orderId).catch((e) => { + console.error(e); + process.exit(1); + }); + } +} + + //Invoke a service + const result = await axios.post('order-processor' , "orders/" + orderId , axiosConfig); + console.log("Order requested: " + orderId); + console.log("Result: " + result.config.data); + + +function sleep(ms) { + return new Promise(resolve => setTimeout(resolve, ms)); +} + +main(); +``` + +{{% /codetab %}} {{% codetab %}} @@ -184,7 +226,6 @@ using System.Collections.Generic; using System.Net.Http; using System.Net.Http.Headers; using System.Threading.Tasks; -using Dapr.Client; using Microsoft.AspNetCore.Mvc; using System.Threading; @@ -196,14 +237,17 @@ namespace EventService static async Task Main(string[] args) { while(true) { - System.Threading.Thread.Sleep(5000); - Random random = new Random(); - int orderId = random.Next(1,1000); - using var client = new DaprClientBuilder().Build(); + await Task.Delay(5000) + var random = new Random(); + var orderId = random.Next(1,1000); //Using Dapr SDK to invoke a method - var result = client.CreateInvokeMethodRequest(HttpMethod.Get, "checkout", "checkout/" + orderId); - await client.InvokeMethodAsync(result); + var order = new Order("1"); + var orderJson = JsonSerializer.Serialize(order); + var content = new StringContent(orderJson, Encoding.UTF8, "application/json"); + + var httpClient = DaprClient.CreateInvokeHttpClient(); + await httpClient.PostAsJsonAsync($"http://order-processor/orders", content); Console.WriteLine("Order requested: " + orderId); Console.WriteLine("Result: " + result); } @@ -218,39 +262,52 @@ namespace EventService ```java //dependencies -import io.dapr.client.DaprClient; -import io.dapr.client.DaprClientBuilder; -import io.dapr.client.domain.HttpExtension; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import java.io.IOException; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; +import java.util.HashMap; +import java.util.Map; import java.util.Random; import java.util.concurrent.TimeUnit; //code @SpringBootApplication -public class OrderProcessingServiceApplication { - - private static final Logger log = LoggerFactory.getLogger(OrderProcessingServiceApplication.class); - - public static void main(String[] args) throws InterruptedException{ - while(true) { - TimeUnit.MILLISECONDS.sleep(5000); - Random random = new Random(); - int orderId = random.nextInt(1000-1) + 1; - DaprClient daprClient = new DaprClientBuilder().build(); - //Using Dapr SDK to invoke a method - var result = daprClient.invokeMethod( - "checkout", - "checkout/" + orderId, - null, - HttpExtension.GET, - String.class - ); - log.info("Order requested: " + orderId); - log.info("Result: " + result); - } - } +public class CheckoutServiceApplication { + private static final HttpClient httpClient = HttpClient.newBuilder() + .version(HttpClient.Version.HTTP_2) + .connectTimeout(Duration.ofSeconds(10)) + .build(); + + public static void main(String[] args) throws InterruptedException, IOException { + while (true) { + TimeUnit.MILLISECONDS.sleep(5000); + Random random = new Random(); + int orderId = random.nextInt(1000 - 1) + 1; + + // Create a Map to represent the request body + Map requestBody = new HashMap<>(); + requestBody.put("orderId", orderId); + // Add other fields to the requestBody Map as needed + + HttpRequest request = HttpRequest.newBuilder() + .POST(HttpRequest.BodyPublishers.ofString(new JSONObject(requestBody).toString())) + .uri(URI.create(dapr_url)) + .header("Content-Type", "application/json") + .header("dapr-app-id", "order-processor") + .build(); + + HttpResponse response = httpClient.send(request, HttpResponse.BodyHandlers.ofString()); + + System.out.println("Order passed: " + orderId); + TimeUnit.MILLISECONDS.sleep(1000); + + log.info("Order requested: " + orderId); + log.info("Result: " + response.body()); + } + } } ``` @@ -258,112 +315,56 @@ public class OrderProcessingServiceApplication { {{% codetab %}} -```python -#dependencies -import random -from time import sleep -import logging -from dapr.clients import DaprClient - -#code -logging.basicConfig(level = logging.INFO) -while True: - sleep(random.randrange(50, 5000) / 1000) - orderId = random.randint(1, 1000) - with DaprClient() as daprClient: - #Using Dapr SDK to invoke a method - result = daprClient.invoke_method( - "checkout", - f"checkout/{orderId}", - data=b'', - http_verb="GET" - ) - logging.basicConfig(level = logging.INFO) - logging.info('Order requested: ' + str(orderId)) - logging.info('Result: ' + str(result)) -``` - -{{% /codetab %}} - -{{% codetab %}} - ```go -//dependencies +package main + import ( - "context" + "fmt" + "io" "log" "math/rand" + "net/http" + "os" "time" - "strconv" - dapr "github.com/dapr/go-sdk/client" - ) -//code -type Order struct { - orderName string - orderNum string -} - func main() { + daprHttpPort := os.Getenv("DAPR_HTTP_PORT") + if daprHttpPort == "" { + daprHttpPort = "3500" + } + + client := &http.Client{ + Timeout: 15 * time.Second, + } + for i := 0; i < 10; i++ { time.Sleep(5000) orderId := rand.Intn(1000-1) + 1 - client, err := dapr.NewClient() + + url := fmt.Sprintf("http://localhost:%s/checkout/%v", daprHttpPort, orderId) + req, err := http.NewRequest(http.MethodGet, url, nil) if err != nil { panic(err) } - defer client.Close() - ctx := context.Background() - //Using Dapr SDK to invoke a method - result, err := client.InvokeMethod(ctx, "checkout", "checkout/" + strconv.Itoa(orderId), "get") - log.Println("Order requested: " + strconv.Itoa(orderId)) - log.Println("Result: ") - log.Println(result) - } -} -``` - -{{% /codetab %}} - -{{% codetab %}} - -```javascript -//dependencies -import { DaprClient, HttpMethod, CommunicationProtocolEnum } from '@dapr/dapr'; -//code -const daprHost = "127.0.0.1"; + // Adding target app id as part of the header + req.Header.Add("dapr-app-id", "order-processor") -var main = function() { - for(var i=0;i<10;i++) { - sleep(5000); - var orderId = Math.floor(Math.random() * (1000 - 1) + 1); - start(orderId).catch((e) => { - console.error(e); - process.exit(1); - }); - } -} + // Invoking a service + resp, err := client.Do(req) + if err != nil { + log.Fatal(err.Error()) + } -async function start(orderId) { - const client = new DaprClient({ - daprHost: daprHost, - daprPort: process.env.DAPR_HTTP_PORT, - communicationProtocol: CommunicationProtocolEnum.HTTP - }); - - //Using Dapr SDK to invoke a method - const result = await client.invoker.invoke('checkoutservice' , "checkout/" + orderId , HttpMethod.GET); - console.log("Order requested: " + orderId); - console.log("Result: " + result); -} + b, err := io.ReadAll(resp.Body) + if err != nil { + panic(err) + } -function sleep(ms) { - return new Promise(resolve => setTimeout(resolve, ms)); + fmt.Println(string(b)) + } } - -main(); ``` {{% /codetab %}} @@ -432,4 +433,4 @@ For more information on tracing and logs, see the [observability]({{< ref observ ## Related Links - [Service invocation overview]({{< ref service-invocation-overview.md >}}) -- [Service invocation API specification]({{< ref service_invocation_api.md >}}) \ No newline at end of file +- [Service invocation API specification]({{< ref service_invocation_api.md >}}) diff --git a/daprdocs/content/en/developing-applications/building-blocks/service-invocation/howto-invoke-non-dapr-endpoints.md b/daprdocs/content/en/developing-applications/building-blocks/service-invocation/howto-invoke-non-dapr-endpoints.md index 4d365c73313..4c5e0224dde 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/service-invocation/howto-invoke-non-dapr-endpoints.md +++ b/daprdocs/content/en/developing-applications/building-blocks/service-invocation/howto-invoke-non-dapr-endpoints.md @@ -3,7 +3,7 @@ type: docs title: "How-To: Invoke Non-Dapr Endpoints using HTTP" linkTitle: "How-To: Invoke Non-Dapr Endpoints" description: "Call Non-Dapr endpoints from Dapr applications using service invocation" -weight: 2000 +weight: 40 --- This article demonstrates how to call a non-Dapr endpoint using Dapr over HTTP. @@ -70,7 +70,7 @@ There are two ways to invoke a non-Dapr endpoint when communicating either to Da ``` ### Using appId when calling Dapr enabled applications -AppIDs are always used to call Dapr applications with the `appID` and `my-method. Read the [How-To: Invoke services using HTTP]({{< ref howto-invoke-discover-services.md >}}) guide for more information. For example: +AppIDs are always used to call Dapr applications with the `appID` and `my-method``. Read the [How-To: Invoke services using HTTP]({{< ref howto-invoke-discover-services.md >}}) guide for more information. For example: ```sh localhost:3500/v1.0/invoke//method/ diff --git a/daprdocs/content/en/developing-applications/building-blocks/service-invocation/howto-invoke-services-grpc.md b/daprdocs/content/en/developing-applications/building-blocks/service-invocation/howto-invoke-services-grpc.md index fc953f6034d..1de970c7d1f 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/service-invocation/howto-invoke-services-grpc.md +++ b/daprdocs/content/en/developing-applications/building-blocks/service-invocation/howto-invoke-services-grpc.md @@ -3,7 +3,7 @@ type: docs title: "How-To: Invoke services using gRPC" linkTitle: "How-To: Invoke with gRPC" description: "Call between services using service invocation" -weight: 3000 +weight: 30 --- This article describe how to use Dapr to connect services using gRPC. diff --git a/daprdocs/content/en/developing-applications/building-blocks/service-invocation/service-invocation-namespaces.md b/daprdocs/content/en/developing-applications/building-blocks/service-invocation/service-invocation-namespaces.md index 6ee966558d1..87370dd1c51 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/service-invocation/service-invocation-namespaces.md +++ b/daprdocs/content/en/developing-applications/building-blocks/service-invocation/service-invocation-namespaces.md @@ -2,7 +2,7 @@ type: docs title: "How to: Service invocation across namespaces" linkTitle: "How to: Service invocation namespaces" -weight: 1000 +weight: 50 description: "Call between services deployed to different namespaces" --- 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 4d2ce7a2c43..edd542ef985 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 @@ -2,13 +2,13 @@ type: docs title: "Service invocation overview" linkTitle: "Overview" -weight: 900 +weight: 10 description: "Overview of the service invocation API building block" --- Using service invocation, your application can reliably and securely communicate with other applications using the standard [gRPC](https://grpc.io) or [HTTP](https://www.w3.org/Protocols/) protocols. -In many microservice-based applications multiple services need the ability to communicate with one another. This inter-service communication requires that application developers handle problems like: +In many microservice-based applications, multiple services need the ability to communicate with one another. This inter-service communication requires that application developers handle problems like: - **Service discovery.** How do I discover my different services? - **Standardizing API calls between services.** How do I invoke methods between services? @@ -25,6 +25,10 @@ Dapr uses a sidecar architecture. To invoke an application using Dapr: - Each application communicates with its own instance of Dapr. - The Dapr instances discover and communicate with each other. +[The following overview video and demo](https://www.youtube.com/live/0y7ne6teHT4?si=mtLMrajE5wVXJYz8&t=3598) demonstrates how Dapr service invocation works. + + + The diagram below is an overview of how Dapr's service invocation works between two Dapr-ized applications. Diagram showing the steps of service invocation @@ -61,7 +65,6 @@ In the event of call failures and transient errors, service invocation provides By default, all calls between applications are traced and metrics are gathered to provide insights and diagnostics for applications. This is especially important in production scenarios, providing call graphs and metrics on the calls between your services. For more information read about [observability]({{< ref observability-concept.md >}}). - ### Access control With access policies, applications can control: @@ -83,7 +86,7 @@ Dapr provides round robin load balancing of service invocation requests with the The diagram below shows an example of how this works. If you have 1 instance of an application with app ID `FrontEnd` and 3 instances of application with app ID `Cart` and you call from `FrontEnd` app to `Cart` app, Dapr round robins' between the 3 instances. These instance can be on the same machine or on different machines. . -Diagram showing the steps of service invocation +Diagram showing the steps of service invocation **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. @@ -97,7 +100,7 @@ Following the above call sequence, suppose you have the applications as describe The diagram below shows sequence 1-7 again on a local machine showing the API calls: - + 1. The Node.js app has a Dapr app ID of `nodeapp`. The python app invokes the Node.js app's `neworder` method by POSTing `http://localhost:3500/v1.0/invoke/nodeapp/method/neworder`, which first goes to the python app's local Dapr sidecar. 2. Dapr discovers the Node.js app's location using name resolution component (in this case mDNS while self-hosted) which runs on your local machine. @@ -135,5 +138,5 @@ For quick testing, try using the Dapr CLI for service invocation: ## Next steps - Read the [service invocation API specification]({{< ref service_invocation_api.md >}}). This reference guide for service invocation describes how to invoke methods on other services. - Understand the [service invocation performance numbers]({{< ref perf-service-invocation.md >}}). -- Take a look at [observability]({{< ref monitoring.md >}}). Here you can dig into Dapr's monitoring tools like tracing, metrics and logging. +- Take a look at [observability]({{< ref observability >}}). Here you can dig into Dapr's monitoring tools like tracing, metrics and logging. - Read up on our [security practices]({{< ref security-concept.md >}}) around mTLS encryption, token authentication, and endpoint authorization. diff --git a/daprdocs/content/en/developing-applications/building-blocks/state-management/state-management-overview.md b/daprdocs/content/en/developing-applications/building-blocks/state-management/state-management-overview.md index a7dacc36194..afc6bd5f1e4 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/state-management/state-management-overview.md +++ b/daprdocs/content/en/developing-applications/building-blocks/state-management/state-management-overview.md @@ -11,7 +11,11 @@ Your application can use Dapr's state management API to save, read, and query ke - Use **HTTP POST** to save or query key/value pairs. - Use **HTTP GET** to read a specific key and have its value returned. - + + +[The following overview video and demo](https://www.youtube.com/live/0y7ne6teHT4?si=2_xX6mkU3UCy2Plr&t=6607) demonstrates how Dapr state management works. + + ## Features diff --git a/daprdocs/content/en/getting-started/quickstarts/bindings-quickstart.md b/daprdocs/content/en/getting-started/quickstarts/bindings-quickstart.md index bac891b5ae3..b818c434836 100644 --- a/daprdocs/content/en/getting-started/quickstarts/bindings-quickstart.md +++ b/daprdocs/content/en/getting-started/quickstarts/bindings-quickstart.md @@ -189,6 +189,8 @@ spec: metadata: - name: schedule value: "@every 10s" # valid cron schedule + - name: direction + value: "input" # direction of the cron binding ``` **Note:** The `metadata` section of `binding-cron.yaml` contains a [Cron expression]({{< ref cron.md >}}) that specifies how often the binding is invoked. @@ -216,6 +218,8 @@ spec: metadata: - name: url # Required value: "user=postgres password=docker host=localhost port=5432 dbname=orders pool_min_conns=1 pool_max_conns=10" + - name: direction + value: "output" # direction of the postgresql binding ``` In the YAML file: @@ -391,6 +395,8 @@ spec: metadata: - name: schedule value: "@every 10s" # valid cron schedule + - name: direction + value: "input" # direction of the cron binding ``` **Note:** The `metadata` section of `binding-cron.yaml` contains a [Cron expression]({{< ref cron.md >}}) that specifies how often the binding is invoked. @@ -418,6 +424,8 @@ spec: metadata: - name: url # Required value: "user=postgres password=docker host=localhost port=5432 dbname=orders pool_min_conns=1 pool_max_conns=10" + - name: direction + value: "output" # direction of the postgresql binding ``` In the YAML file: @@ -595,6 +603,8 @@ spec: metadata: - name: schedule value: "@every 10s" # valid cron schedule + - name: direction + value: "input" # direction of the cron binding ``` **Note:** The `metadata` section of `binding-cron.yaml` contains a [Cron expression]({{< ref cron.md >}}) that specifies how often the binding is invoked. @@ -622,6 +632,8 @@ spec: metadata: - name: url # Required value: "user=postgres password=docker host=localhost port=5432 dbname=orders pool_min_conns=1 pool_max_conns=10" + - name: direction + value: "output" # direction of the postgresql binding ``` In the YAML file: @@ -805,6 +817,8 @@ spec: metadata: - name: schedule value: "@every 10s" # valid cron schedule + - name: direction + value: "input" # direction of the cron binding ``` **Note:** The `metadata` section of `binding-cron.yaml` contains a [Cron expression]({{< ref cron.md >}}) that specifies how often the binding is invoked. @@ -832,6 +846,8 @@ spec: metadata: - name: url # Required value: "user=postgres password=docker host=localhost port=5432 dbname=orders pool_min_conns=1 pool_max_conns=10" + - name: direction + value: "output" # direction of the postgresql binding ``` In the YAML file: @@ -1017,6 +1033,8 @@ spec: metadata: - name: schedule value: "@every 10s" # valid cron schedule + - name: direction + value: "input" # direction of the cron binding ``` **Note:** The `metadata` section of `binding-cron.yaml` contains a [Cron expression]({{< ref cron.md >}}) that specifies how often the binding is invoked. @@ -1044,6 +1062,8 @@ spec: metadata: - name: url # Required value: "user=postgres password=docker host=localhost port=5432 dbname=orders pool_min_conns=1 pool_max_conns=10" + - name: direction + value: "output" # direction of the postgresql binding ``` In the YAML file: diff --git a/daprdocs/content/en/getting-started/quickstarts/serviceinvocation-quickstart.md b/daprdocs/content/en/getting-started/quickstarts/serviceinvocation-quickstart.md index ba5f56523bb..fc61df703cf 100644 --- a/daprdocs/content/en/getting-started/quickstarts/serviceinvocation-quickstart.md +++ b/daprdocs/content/en/getting-started/quickstarts/serviceinvocation-quickstart.md @@ -600,7 +600,7 @@ go build . Run the `order-processor` service alongside a Dapr sidecar. ```bash -dapr run --app-port 6001 --app-id order-processor --app-protocol http --dapr-http-port 3501 -- go run . +dapr run --app-port 6006 --app-id order-processor --app-protocol http --dapr-http-port 3501 -- go run . ``` Each order is received via an HTTP POST request and processed by the diff --git a/daprdocs/content/en/operations/components/setup-pubsub/pubsub-namespaces.md b/daprdocs/content/en/operations/components/setup-pubsub/pubsub-namespaces.md index 81099ca5cf5..612d84bce39 100644 --- a/daprdocs/content/en/operations/components/setup-pubsub/pubsub-namespaces.md +++ b/daprdocs/content/en/operations/components/setup-pubsub/pubsub-namespaces.md @@ -30,6 +30,10 @@ The table below shows which resources are deployed to which namespaces: | Python subscriber | X | | | React UI publisher | | X | +{{% alert title="Note" color="primary" %}} +All pub/sub components support limiting pub/sub topics to specific applications using [namespace or component scopes]({{< ref pubsub-scopes.md >}}). +{{% /alert %}} + ## Pre-requisites * [Dapr installed on Kubernetes]({{< ref "kubernetes-deploy.md" >}}) in any namespace since Dapr works at the cluster level. diff --git a/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-production.md b/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-production.md index e958ea8c34c..5a3388cf0e7 100644 --- a/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-production.md +++ b/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-production.md @@ -68,6 +68,28 @@ Since Dapr is intended to do much of the I/O heavy lifting for your app, it's ex The CPU and memory limits above account for the fact that Dapr is intended to support a high number of I/O bound operations. It is strongly recommended that you use a monitoring tool to get a baseline for the sidecar (and app) containers and tune these settings based on those baselines. +### Setting soft memory limits on Dapr sidecar + +It is recommended to set soft memory limits on the Dapr sidecar when you have set up memory limits. +This allows the sidecar garbage collector to free up memory when the memory usage is above the limit instead of +waiting to be double of the last amount of memory present in the heap when it was run, which is the default behavior +of the [garbage collector](https://tip.golang.org/doc/gc-guide#Memory_limit) used in Go, and can lead to OOM Kill events. + +For example, for an app with app-id `nodeapp`, if you have set your memory limit to be 1000Mi as mentioned above, you can use the following in your pod annotations: + +```yaml + annotations: + dapr.io/enabled: "true" + dapr.io/app-id: "nodeapp" + # our daprd memory settings + dapr.io/sidecar-memory-limit: "1000Mi" # your memory limit + dapr.io/env: "GOMEMLIMIT=900MiB" # 90% of your memory limit. Also notice the suffix "MiB" instead of "Mi" +``` + +In this example, the soft limit has been set to be 90% as recommended in [garbage collector tips](https://tip.golang.org/doc/gc-guide#Memory_limit) where it is recommend to leave 5-10% for other services. + +The `GOMEMLIMIT` environment variable [allows](https://pkg.go.dev/runtime) certain suffixes for the memory size: `B, KiB, MiB, GiB, and TiB.` + ## Highly-available mode When deploying Dapr in a production-ready configuration, it is recommend to deploy with a highly available (HA) configuration of the control plane, which creates 3 replicas of each control plane pod in the dapr-system namespace. This configuration allows the Dapr control plane to retain 3 running instances and survive individual node failures and other outages. @@ -226,7 +248,7 @@ To configure a tracing backend for Dapr visit [this]({{< ref "setup-tracing.md" For metrics, Dapr exposes a Prometheus endpoint listening on port 9090 which can be scraped by Prometheus. -To setup Prometheus, Grafana and other monitoring tools with Dapr, visit [this]({{< ref "monitoring" >}}) link. +To setup Prometheus, Grafana and other monitoring tools with Dapr, visit [this]({{< ref "observability" >}}) link. ## Injector watchdog diff --git a/daprdocs/content/en/operations/monitoring/_index.md b/daprdocs/content/en/operations/monitoring/_index.md deleted file mode 100644 index decdfcabcc2..00000000000 --- a/daprdocs/content/en/operations/monitoring/_index.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -type: docs -title: "Observe your application with Dapr" -linkTitle: "Observability" -weight: 80 -description: "How to observe and gain insights into your application" ---- diff --git a/daprdocs/content/en/operations/monitoring/tracing/_index.md b/daprdocs/content/en/operations/monitoring/tracing/_index.md deleted file mode 100644 index d9948ff4bfb..00000000000 --- a/daprdocs/content/en/operations/monitoring/tracing/_index.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -type: docs -title: "Tracing" -linkTitle: "Tracing" -weight: 100 -description: "How to setup your observability tools to receive application traces" ---- diff --git a/daprdocs/content/en/developing-applications/building-blocks/observability/_index.md b/daprdocs/content/en/operations/observability/_index.md similarity index 54% rename from daprdocs/content/en/developing-applications/building-blocks/observability/_index.md rename to daprdocs/content/en/operations/observability/_index.md index 6b456a7d713..f2e94d1df82 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/observability/_index.md +++ b/daprdocs/content/en/operations/observability/_index.md @@ -6,10 +6,13 @@ weight: 60 description: See and measure the message calls to components and between networked services --- +[The following overview video and demo](https://www.youtube.com/live/0y7ne6teHT4?si=3bmNSSyIEIVSF-Ej&t=9931) demonstrates how observability in Dapr works. + + + {{% alert title="More about Dapr Observability" color="primary" %}} Learn more about how to use Dapr Observability Lock: - Explore observability via any of the supporting [Dapr SDKs]({{< ref sdks >}}). - Review the [Observability API reference documentation]({{< ref health_api.md >}}). - Read the [general overview of the observability concept]({{< ref observability-concept >}}) in Dapr. - - Learn the [operations perspective and guidance on monitoring]({{< ref monitoring >}}). {{% /alert %}} diff --git a/daprdocs/content/en/operations/monitoring/logging/_index.md b/daprdocs/content/en/operations/observability/logging/_index.md similarity index 100% rename from daprdocs/content/en/operations/monitoring/logging/_index.md rename to daprdocs/content/en/operations/observability/logging/_index.md diff --git a/daprdocs/content/en/operations/monitoring/logging/fluentd.md b/daprdocs/content/en/operations/observability/logging/fluentd.md similarity index 100% rename from daprdocs/content/en/operations/monitoring/logging/fluentd.md rename to daprdocs/content/en/operations/observability/logging/fluentd.md diff --git a/daprdocs/content/en/operations/monitoring/logging/logs.md b/daprdocs/content/en/operations/observability/logging/logs.md similarity index 100% rename from daprdocs/content/en/operations/monitoring/logging/logs.md rename to daprdocs/content/en/operations/observability/logging/logs.md diff --git a/daprdocs/content/en/operations/monitoring/logging/newrelic.md b/daprdocs/content/en/operations/observability/logging/newrelic.md similarity index 100% rename from daprdocs/content/en/operations/monitoring/logging/newrelic.md rename to daprdocs/content/en/operations/observability/logging/newrelic.md diff --git a/daprdocs/content/en/operations/monitoring/metrics/_index.md b/daprdocs/content/en/operations/observability/metrics/_index.md similarity index 77% rename from daprdocs/content/en/operations/monitoring/metrics/_index.md rename to daprdocs/content/en/operations/observability/metrics/_index.md index 14e6885c851..dd7496e7276 100644 --- a/daprdocs/content/en/operations/monitoring/metrics/_index.md +++ b/daprdocs/content/en/operations/observability/metrics/_index.md @@ -1,7 +1,7 @@ --- type: docs title: "Metrics" -linkTitle: "View metrics" +linkTitle: "Metrics" weight: 300 description: "How to view Dapr metrics" --- diff --git a/daprdocs/content/en/operations/monitoring/metrics/azure-monitor.md b/daprdocs/content/en/operations/observability/metrics/azure-monitor.md similarity index 100% rename from daprdocs/content/en/operations/monitoring/metrics/azure-monitor.md rename to daprdocs/content/en/operations/observability/metrics/azure-monitor.md diff --git a/daprdocs/content/en/operations/monitoring/metrics/grafana.md b/daprdocs/content/en/operations/observability/metrics/grafana.md similarity index 100% rename from daprdocs/content/en/operations/monitoring/metrics/grafana.md rename to daprdocs/content/en/operations/observability/metrics/grafana.md diff --git a/daprdocs/content/en/operations/monitoring/metrics/metrics-overview.md b/daprdocs/content/en/operations/observability/metrics/metrics-overview.md similarity index 100% rename from daprdocs/content/en/operations/monitoring/metrics/metrics-overview.md rename to daprdocs/content/en/operations/observability/metrics/metrics-overview.md diff --git a/daprdocs/content/en/operations/monitoring/metrics/newrelic.md b/daprdocs/content/en/operations/observability/metrics/newrelic.md similarity index 100% rename from daprdocs/content/en/operations/monitoring/metrics/newrelic.md rename to daprdocs/content/en/operations/observability/metrics/newrelic.md diff --git a/daprdocs/content/en/operations/monitoring/metrics/prometheus.md b/daprdocs/content/en/operations/observability/metrics/prometheus.md similarity index 100% rename from daprdocs/content/en/operations/monitoring/metrics/prometheus.md rename to daprdocs/content/en/operations/observability/metrics/prometheus.md diff --git a/daprdocs/content/en/operations/observability/tracing/_index.md b/daprdocs/content/en/operations/observability/tracing/_index.md new file mode 100644 index 00000000000..f29b7ba7e10 --- /dev/null +++ b/daprdocs/content/en/operations/observability/tracing/_index.md @@ -0,0 +1,7 @@ +--- +type: docs +title: "Tracing" +linkTitle: "Tracing" +weight: 200 +description: Learn about tracing scenarios and how to use tracing for visibility in your application +--- \ No newline at end of file diff --git a/daprdocs/content/en/operations/monitoring/tracing/datadog.md b/daprdocs/content/en/operations/observability/tracing/datadog.md similarity index 100% rename from daprdocs/content/en/operations/monitoring/tracing/datadog.md rename to daprdocs/content/en/operations/observability/tracing/datadog.md diff --git a/daprdocs/content/en/operations/monitoring/tracing/jaeger.md b/daprdocs/content/en/operations/observability/tracing/jaeger.md similarity index 100% rename from daprdocs/content/en/operations/monitoring/tracing/jaeger.md rename to daprdocs/content/en/operations/observability/tracing/jaeger.md diff --git a/daprdocs/content/en/operations/monitoring/tracing/newrelic.md b/daprdocs/content/en/operations/observability/tracing/newrelic.md similarity index 100% rename from daprdocs/content/en/operations/monitoring/tracing/newrelic.md rename to daprdocs/content/en/operations/observability/tracing/newrelic.md diff --git a/daprdocs/content/en/operations/monitoring/tracing/otel-collector/_index.md b/daprdocs/content/en/operations/observability/tracing/otel-collector/_index.md similarity index 100% rename from daprdocs/content/en/operations/monitoring/tracing/otel-collector/_index.md rename to daprdocs/content/en/operations/observability/tracing/otel-collector/_index.md diff --git a/daprdocs/content/en/operations/monitoring/tracing/otel-collector/open-telemetry-collector-appinsights.md b/daprdocs/content/en/operations/observability/tracing/otel-collector/open-telemetry-collector-appinsights.md similarity index 100% rename from daprdocs/content/en/operations/monitoring/tracing/otel-collector/open-telemetry-collector-appinsights.md rename to daprdocs/content/en/operations/observability/tracing/otel-collector/open-telemetry-collector-appinsights.md diff --git a/daprdocs/content/en/operations/monitoring/tracing/otel-collector/open-telemetry-collector.md b/daprdocs/content/en/operations/observability/tracing/otel-collector/open-telemetry-collector.md similarity index 100% rename from daprdocs/content/en/operations/monitoring/tracing/otel-collector/open-telemetry-collector.md rename to daprdocs/content/en/operations/observability/tracing/otel-collector/open-telemetry-collector.md diff --git a/daprdocs/content/en/operations/monitoring/tracing/setup-tracing.md b/daprdocs/content/en/operations/observability/tracing/setup-tracing.md similarity index 80% rename from daprdocs/content/en/operations/monitoring/tracing/setup-tracing.md rename to daprdocs/content/en/operations/observability/tracing/setup-tracing.md index 52147498cf8..3ae01b27603 100644 --- a/daprdocs/content/en/operations/monitoring/tracing/setup-tracing.md +++ b/daprdocs/content/en/operations/observability/tracing/setup-tracing.md @@ -2,14 +2,14 @@ type: docs title: "Configure Dapr to send distributed tracing data" linkTitle: "Configure tracing" -weight: 100 -description: "Configure Dapr to send distributed tracing data" +weight: 30 +description: "Set up Dapr to send distributed tracing data" --- -It is recommended to run Dapr with tracing enabled for any production -scenario. You can configure Dapr to send tracing and telemetry data -to many observability tools based on your environment, whether it is running in -the cloud or on-premises. +{{% alert title="Note" color="primary" %}} +It is recommended to run Dapr with tracing enabled for any production scenario. You can configure Dapr to send tracing and telemetry data to many observability tools based on your environment, whether it is running in the cloud or on-premises. +{{% /alert %}} + ## Configuration @@ -68,4 +68,13 @@ turns on tracing for the sidecar. |----------------------|-------------| | `OTEL_EXPORTER_OTLP_ENDPOINT` | Sets the Open Telemetry (OTEL) server address, turns on tracing | | `OTEL_EXPORTER_OTLP_INSECURE` | Sets the connection to the endpoint as unencrypted (true/false) | -| `OTEL_EXPORTER_OTLP_PROTOCOL` | Transport protocol (`grpc`, `http/protobuf`, `http/json`) | \ No newline at end of file +| `OTEL_EXPORTER_OTLP_PROTOCOL` | Transport protocol (`grpc`, `http/protobuf`, `http/json`) | + +## Next steps + +Learn how to set up tracing with one of the following tools: +- [OTEL Collector]({{< ref otel-collector >}}) +- [New Relic]({{< ref newrelic.md >}}) +- [Jaeger]({{< ref jaeger.md >}}) +- [Zipkin]({{< ref zipkin.md >}}) +- [Datadog]({{< ref datadog.md >}}) \ No newline at end of file diff --git a/daprdocs/content/en/developing-applications/building-blocks/observability/develop-tracing/tracing-overview.md b/daprdocs/content/en/operations/observability/tracing/tracing-overview.md similarity index 93% rename from daprdocs/content/en/developing-applications/building-blocks/observability/develop-tracing/tracing-overview.md rename to daprdocs/content/en/operations/observability/tracing/tracing-overview.md index 9331a75f906..24fed25a3cb 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/observability/develop-tracing/tracing-overview.md +++ b/daprdocs/content/en/operations/observability/tracing/tracing-overview.md @@ -1,9 +1,9 @@ --- type: docs -title: "Distributed tracing" -linkTitle: "Distributed tracing" -weight: 300 -description: "Use tracing to get visibility into your application" +title: "Distributed tracing overview" +linkTitle: "Overview" +weight: 10 +description: "Overview on using tracing to get visibility into your application" --- Dapr uses the Open Telemetry (OTEL) and Zipkin protocols for distributed traces. OTEL is the industry standard and is the recommended trace protocol to use. @@ -17,6 +17,10 @@ Most observability tools support OTEL, including: - [Jaeger](https://www.jaegertracing.io/) - [SignalFX](https://www.signalfx.com/) +The following diagram demonstrates how Dapr (using OTEL and Zipkin protocols) integrates with multiple observability tools. + +Distributed tracing with Dapr + ## Scenarios Tracing is used with service invocaton and pub/sub APIs. You can flow trace context between services that uses these APIs. There are two scenarios for how tracing is used: diff --git a/daprdocs/content/en/developing-applications/building-blocks/observability/develop-tracing/w3c-tracing-overview.md b/daprdocs/content/en/operations/observability/tracing/w3c-tracing-overview.md similarity index 96% rename from daprdocs/content/en/developing-applications/building-blocks/observability/develop-tracing/w3c-tracing-overview.md rename to daprdocs/content/en/operations/observability/tracing/w3c-tracing-overview.md index 53d315d6032..52eccbef4d5 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/observability/develop-tracing/w3c-tracing-overview.md +++ b/daprdocs/content/en/operations/observability/tracing/w3c-tracing-overview.md @@ -1,10 +1,9 @@ --- type: docs -title: "W3C trace context" +title: "W3C trace context overview" linkTitle: "W3C trace context" -weight: 2000 -description: Background and scenarios for using W3C tracing with Dapr -type: docs +weight: 20 +description: Background and scenarios for using W3C tracing context and headers with Dapr --- Dapr uses the [Open Telemetry protocol](https://opentelemetry.io/), which in turn uses the [W3C trace context](https://www.w3.org/TR/trace-context/) for distributed tracing for both service invocation and pub/sub messaging. Dapr generates and propagates the trace context information, which can be sent to observability tools for visualization and querying. diff --git a/daprdocs/content/en/operations/monitoring/tracing/zipkin.md b/daprdocs/content/en/operations/observability/tracing/zipkin.md similarity index 100% rename from daprdocs/content/en/operations/monitoring/tracing/zipkin.md rename to daprdocs/content/en/operations/observability/tracing/zipkin.md diff --git a/daprdocs/content/en/operations/resiliency/health-checks/_index.md b/daprdocs/content/en/operations/resiliency/health-checks/_index.md new file mode 100644 index 00000000000..66730af2fa3 --- /dev/null +++ b/daprdocs/content/en/operations/resiliency/health-checks/_index.md @@ -0,0 +1,7 @@ +--- +type: docs +title: "Health checks" +linkTitle: "Health checks" +weight: 400 +description: "How to setup health checks for the Dapr sidecar and your application" +--- \ No newline at end of file diff --git a/daprdocs/content/en/developing-applications/building-blocks/observability/app-health.md b/daprdocs/content/en/operations/resiliency/health-checks/app-health.md similarity index 97% rename from daprdocs/content/en/developing-applications/building-blocks/observability/app-health.md rename to daprdocs/content/en/operations/resiliency/health-checks/app-health.md index 97c7189293c..193233dd17c 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/observability/app-health.md +++ b/daprdocs/content/en/operations/resiliency/health-checks/app-health.md @@ -71,6 +71,10 @@ Additionally, app health checks are impacted by the protocol used for the app ch | ----------------------------- | ----------------------------------- | ----------- | ------------- | | [`--app-protocol`]({{< ref "app-health.md#health-check-paths" >}}) | `dapr.io/app-protocol` | Protocol used for the app channel. supported values are `http`, `grpc`, `https`, `grpcs`, and `h2c` (HTTP/2 Cleartext). | `http` | +{{% alert title="Note" color="primary" %}} +A low app health probe timeout value can classify an application as unhealthy if it experiences a sudden high load, causing the response time to degrade. If this happens, increase the `dapr.io/app-health-probe-timeout` value. +{{% /alert %}} + ### Health check paths #### HTTP diff --git a/daprdocs/content/en/developing-applications/building-blocks/observability/sidecar-health.md b/daprdocs/content/en/operations/resiliency/health-checks/sidecar-health.md similarity index 100% rename from daprdocs/content/en/developing-applications/building-blocks/observability/sidecar-health.md rename to daprdocs/content/en/operations/resiliency/health-checks/sidecar-health.md diff --git a/daprdocs/content/en/operations/resiliency/policies.md b/daprdocs/content/en/operations/resiliency/policies.md index 56ab3cb9134..db72dd78c5c 100644 --- a/daprdocs/content/en/operations/resiliency/policies.md +++ b/daprdocs/content/en/operations/resiliency/policies.md @@ -1,14 +1,14 @@ --- type: docs -title: "Policies" +title: "Resiliency policies" linkTitle: "Policies" -weight: 4500 +weight: 200 description: "Configure resiliency policies for timeouts, retries, and circuit breakers" --- Define timeouts, retries, and circuit breaker policies under `policies`. Each policy is given a name so you can refer to them from the `targets` section in the resiliency spec. -> Note: Dapr offers default retries for specific APIs. [See here]({{< ref "#override-default-retries" >}}) to learn how you can overwrite default retry logic with user defined retry policies. +> Note: Dapr offers default retries for specific APIs. [See here]({{< ref "#overriding-default-retries" >}}) to learn how you can overwrite default retry logic with user defined retry policies. ## Timeouts @@ -299,4 +299,4 @@ The table below is a break down of which policies are applied when attempting to Try out one of the Resiliency quickstarts: - [Resiliency: Service-to-service]({{< ref resiliency-serviceinvo-quickstart.md >}}) -- [Resiliency: State Management]({{< ref resiliency-state-quickstart.md >}}) \ No newline at end of file +- [Resiliency: State Management]({{< ref resiliency-state-quickstart.md >}}) diff --git a/daprdocs/content/en/operations/resiliency/resiliency-overview.md b/daprdocs/content/en/operations/resiliency/resiliency-overview.md index bb6cdb502c8..e7564757a88 100644 --- a/daprdocs/content/en/operations/resiliency/resiliency-overview.md +++ b/daprdocs/content/en/operations/resiliency/resiliency-overview.md @@ -2,7 +2,7 @@ type: docs title: "Overview" linkTitle: "Overview" -weight: 4500 +weight: 100 description: "Configure Dapr retries, timeouts, and circuit breakers" --- @@ -20,6 +20,14 @@ Policies can then be applied to [targets]({{< ref "targets.md" >}}), which inclu Additionally, resiliency policies can be [scoped to specific apps]({{< ref "component-scopes.md#application-access-to-components-with-scopes" >}}). +## Demo video + +Learn more about [how to write resilient microservices with Dapr](https://youtu.be/uC-4Q5KFq98?si=JSUlCtcUNZLBM9rW). + + + +## Resiliency policy structure + Below is the general structure of a resiliency policy: ```yaml @@ -51,7 +59,7 @@ spec: # components and their applied policies here ``` -### Complete example policy +## Complete example policy ```yaml apiVersion: dapr.io/v1alpha1 diff --git a/daprdocs/content/en/operations/resiliency/targets.md b/daprdocs/content/en/operations/resiliency/targets.md index ffb5ead96fb..15090b2e0ba 100644 --- a/daprdocs/content/en/operations/resiliency/targets.md +++ b/daprdocs/content/en/operations/resiliency/targets.md @@ -2,8 +2,8 @@ type: docs title: "Targets" linkTitle: "Targets" -weight: 4500 -description: "Apply resiliency policies to apps, components and actors" +weight: 300 +description: "Apply resiliency policies to targets including apps, components and actors" --- ### Targets diff --git a/daprdocs/content/en/operations/support/breaking-changes-and-deprecations.md b/daprdocs/content/en/operations/support/breaking-changes-and-deprecations.md index 76c71eed315..d0aeab50797 100644 --- a/daprdocs/content/en/operations/support/breaking-changes-and-deprecations.md +++ b/daprdocs/content/en/operations/support/breaking-changes-and-deprecations.md @@ -21,12 +21,12 @@ Breaking changes are defined as a change to any of the following that cause comp Breaking changes can be applied right away to the following cases: -- Projects versioned at 0.x.y +- Projects that have not reached version 1.0.0 yet - Preview feature - Alpha API - Preview or Alpha interface, class, method or attribute in SDK - Dapr Component in Alpha or Beta -- Components-Contrib interface +- Interfaces for `github.com/dapr/components-contrib` - URLs in Docs and Blog - An **exceptional** case where it is **required** to fix a critical bug or security vulnerability. @@ -39,7 +39,9 @@ There is a process for applying breaking changes: - For example, feature X is announced to be deprecated in the 1.0.0 release notes and will then be removed in 1.2.0. ## Deprecations -Deprecations can apply to + +Deprecations can apply to: + 1. APIs, including alpha APIs 1. Preview features 1. Components @@ -58,11 +60,14 @@ After announcing a future breaking change, the change will happen in 2 releases | Feature | Deprecation announcement | Removal | |-----------------------|-----------------------|------------------------- | -| GET /v1.0/shutdown API (Users should use [POST API]({{< ref kubernetes-job.md >}}) instead) | 1.2.0 | 1.4.0 | +| GET /v1.0/shutdown API (Users should use [POST API]({{< ref kubernetes-job.md >}}) instead) | 1.2.0 | 1.4.0 | | Java domain builder classes deprecated (Users should use [setters](https://github.com/dapr/java-sdk/issues/587) instead) | Java SDK 1.3.0 | Java SDK 1.5.0 | -| Service invocation will no longer provide a default content type header of `application/json` when no content-type is specified. You must explicitly [set a content-type header]({{< ref "service_invocation_api.md#request-contents" >}}) for service invocation if your invoked apps rely on this header. | 1.7.0 | 1.9.0 | +| Service invocation will no longer provide a default content type header of `application/json` when no content-type is specified. You must explicitly [set a content-type header]({{< ref "service_invocation_api.md#request-contents" >}}) for service invocation if your invoked apps rely on this header. | 1.7.0 | 1.9.0 | | gRPC service invocation using `invoke` method is deprecated. Use proxy mode service invocation instead. See [How-To: Invoke services using gRPC ]({{< ref howto-invoke-services-grpc.md >}}) to use the proxy mode.| 1.9.0 | 1.10.0 | | The CLI flag `--app-ssl` (in both the Dapr CLI and daprd) has been deprecated in favor of using `--app-protocol` with values `https` or `grpcs`. [daprd:6158](https://github.com/dapr/dapr/issues/6158) [cli:1267](https://github.com/dapr/cli/issues/1267)| 1.11.0 | 1.13.0 | +| Hazelcast PubSub Component | 1.9.0 | 1.11.0 | +| Twitter Binding Component | 1.10.0 | 1.11.0 | +| NATS Streaming PubSub Component | 1.11.0 | 1.13.0 | ## Related links diff --git a/daprdocs/content/en/operations/support/support-release-policy.md b/daprdocs/content/en/operations/support/support-release-policy.md index 704c58fe30a..915042374eb 100644 --- a/daprdocs/content/en/operations/support/support-release-policy.md +++ b/daprdocs/content/en/operations/support/support-release-policy.md @@ -35,58 +35,62 @@ The Dapr's sidecar image is published to both [GitHub Container Registry](https: * Default sidecar images: `daprio/daprd:` or `ghcr.io/dapr/daprd:` (for example `ghcr.io/dapr/daprd:1.11.1`) * Sidecar images for stable components: `daprio/daprd:-stablecomponents` or `ghcr.io/dapr/daprd:-stablecomponents` (for example `ghcr.io/dapr/daprd:1.11.1-stablecomponents`) -On Kubernetes, the sidecar image can be overwritten for the application Deployment resource with the `dapr.io/sidecar-image` annotation. See more about [Dapr's arguments and annotations]({{}}). The default 'daprio/daprd:latest' image is used if not specified. +On Kubernetes, the sidecar image can be overwritten for the application Deployment resource with the `dapr.io/sidecar-image` annotation. See more about [Dapr's arguments and annotations]({{< ref "arguments-annotations-overview.md" >}}). The default 'daprio/daprd:latest' image is used if not specified. -Learn more about [Dapr components' certification lifecycle]({{}}). +Learn more about [Dapr components' certification lifecycle]({{< ref "certification-lifecycle.md" >}}). ## Supported versions The table below shows the versions of Dapr releases that have been tested together and form a "packaged" release. Any other combinations of releases are not supported. -| Release date | Runtime | CLI | SDKs | Dashboard | Status | -|--------------------|:--------:|:--------|---------|---------|---------| -| June 22nd 2023 | 1.11.1
| 1.11.0 | Java 1.9.0
Go 1.8.0
PHP 1.1.0
Python 1.10.0
.NET 1.11.0
JS 3.1.0 | 0.13.0 | Supported (current) | -| June 12th 2023 | 1.11.0
| 1.11.0 | Java 1.9.0
Go 1.8.0
PHP 1.1.0
Python 1.10.0
.NET 1.11.0
JS 3.1.0 | 0.13.0 | Supported (current) | -| May 15th 2023 | 1.10.7
| 1.10.0 | Java 1.8.0
Go 1.7.0
PHP 1.1.0
Python 1.9.0
.NET 1.10.0
JS 3.0.0 | 0.11.0 | Supported | -| May 12th 2023 | 1.10.6
| 1.10.0 | Java 1.8.0
Go 1.7.0
PHP 1.1.0
Python 1.9.0
.NET 1.10.0
JS 3.0.0 | 0.11.0 | Supported | -| April 13 2023 |1.10.5
| 1.10.0 | Java 1.8.0
Go 1.6.0
PHP 1.1.0
Python 1.9.0
.NET 1.10.0
JS 3.0.0 | 0.11.0 | Supported (current) | -| March 16 2023 | 1.10.4
| 1.10.0 | Java 1.8.0
Go 1.6.0
PHP 1.1.0
Python 1.9.0
.NET 1.10.0
JS 2.5.0 | 0.11.0 | Supported | -| March 14 2023 | 1.10.3
| 1.10.0 | Java 1.8.0
Go 1.6.0
PHP 1.1.0
Python 1.9.0
.NET 1.10.0
JS 2.5.0 | 0.11.0 | Supported | -| February 24 2023 | 1.10.2
| 1.10.0 | Java 1.8.0
Go 1.6.0
PHP 1.1.0
Python 1.9.0
.NET 1.10.0
JS 2.5.0 | 0.11.0 | Supported | -| February 20 2023 | 1.10.1
| 1.10.0 | Java 1.8.0
Go 1.6.0
PHP 1.1.0
Python 1.9.0
.NET 1.10.0
JS 2.5.0 | 0.11.0 | Supported | -| February 14 2023 | 1.10.0
| 1.10.0 | Java 1.8.0
Go 1.6.0
PHP 1.1.0
Python 1.9.0
.NET 1.10.0
JS 2.5.0 | 0.11.0 | Supported| -| December 2nd 2022 | 1.9.5
| 1.9.1 | Java 1.7.0
Go 1.6.0
PHP 1.1.0
Python 1.8.3
.NET 1.9.0
JS 2.4.2 | 0.11.0 | Supported | -| November 17th 2022 | 1.9.4
| 1.9.1 | Java 1.7.0
Go 1.6.0
PHP 1.1.0
Python 1.8.3
.NET 1.9.0
JS 2.4.2 | 0.11.0 | Supported | -| November 4th 2022 | 1.9.3
| 1.9.1 | Java 1.7.0
Go 1.6.0
PHP 1.1.0
Python 1.8.3
.NET 1.9.0
JS 2.4.2 | 0.11.0 | Supported | -| November 1st 2022 | 1.9.2
| 1.9.1 | Java 1.7.0
Go 1.6.0
PHP 1.1.0
Python 1.8.1
.NET 1.9.0
JS 2.4.2 | 0.11.0 | Supported | -| October 26th 2022 | 1.9.1
| 1.9.1 | Java 1.7.0
Go 1.6.0
PHP 1.1.0
Python 1.8.1
.NET 1.9.0
JS 2.4.2 | 0.11.0 | Supported | -| October 13th 2022 | 1.9.0
| 1.9.1 | Java 1.7.0
Go 1.6.0
PHP 1.1.0
Python 1.8.3
.NET 1.9.0
JS 2.4.2 | 0.11.0 | Supported | -| October 26th 2022 | 1.8.6
| 1.8.1 | Java 1.6.0
Go 1.5.0
PHP 1.1.0
Python 1.7.0
.NET 1.8.0
JS 2.3.0 | 0.11.0 | Supported | -| October 13th 2022 | 1.8.5
| 1.8.1 | Java 1.6.0
Go 1.5.0
PHP 1.1.0
Python 1.7.0
.NET 1.8.0
JS 2.3.0 | 0.11.0 | Supported | -| August 10th 2022 | 1.8.4
| 1.8.1 | Java 1.6.0
Go 1.5.0
PHP 1.1.0
Python 1.7.0
.NET 1.8.0
JS 2.3.0 | 0.11.0 | Supported | -| July 29th 2022 | 1.8.3
| 1.8.0 | Java 1.6.0
Go 1.5.0
PHP 1.1.0
Python 1.7.0
.NET 1.8.0
JS 2.3.0 | 0.11.0 | Supported | -| July 21st 2022 | 1.8.2
| 1.8.0 | Java 1.6.0
Go 1.5.0
PHP 1.1.0
Python 1.7.0
.NET 1.8.0
JS 2.3.0 | 0.11.0 | Supported | -| July 20th 2022 | 1.8.1
| 1.8.0 | Java 1.6.0
Go 1.5.0
PHP 1.1.0
Python 1.7.0
.NET 1.8.0
JS 2.3.0 | 0.11.0 | Supported | -| July 7th 2022 | 1.8.0
| 1.8.0 | Java 1.6.0
Go 1.5.0
PHP 1.1.0
Python 1.7.0
.NET 1.8.0
JS 2.3.0 | 0.11.0 | Supported | -| October 26th 2022 | 1.7.5
| 1.7.0 | Java 1.5.0
Go 1.4.0
PHP 1.1.0
Python 1.6.0
.NET 1.7.0
JS 2.2.1 | 0.10.0 | Supported | -| May 31st 2022 | 1.7.4
| 1.7.0 | Java 1.5.0
Go 1.4.0
PHP 1.1.0
Python 1.6.0
.NET 1.7.0
JS 2.2.1 | 0.10.0 | Supported | -| May 17th 2022 | 1.7.3
| 1.7.0 | Java 1.5.0
Go 1.4.0
PHP 1.1.0
Python 1.6.0
.NET 1.7.0
JS 2.2.1 | 0.10.0 | Supported | -| Apr 22th 2022 | 1.7.2
| 1.7.0 | Java 1.5.0
Go 1.4.0
PHP 1.1.0
Python 1.6.0
.NET 1.7.0
JS 2.1.0 | 0.10.0 | Supported | -| Apr 20th 2022 | 1.7.1
| 1.7.0 | Java 1.5.0
Go 1.4.0
PHP 1.1.0
Python 1.6.0
.NET 1.7.0
JS 2.1.0 | 0.10.0 | Supported | -| Apr 7th 2022 | 1.7.0
| 1.7.0 | Java 1.5.0
Go 1.4.0
PHP 1.1.0
Python 1.6.0
.NET 1.7.0
JS 2.1.0 | 0.10.0 | Supported | -| Apr 20th 2022 | 1.6.2
| 1.6.0 | Java 1.4.0
Go 1.3.1
PHP 1.1.0
Python 1.5.0
.NET 1.6.0
JS 2.0.0 | 0.9.0 | Unsupported | -| Mar 25th 2022 | 1.6.1
| 1.6.0 | Java 1.4.0
Go 1.3.1
PHP 1.1.0
Python 1.5.0
.NET 1.6.0
JS 2.0.0 | 0.9.0 | Unsupported | -| Jan 25th 2022 | 1.6.0
| 1.6.0 | Java 1.4.0
Go 1.3.1
PHP 1.1.0
Python 1.5.0
.NET 1.6.0
JS 2.0.0 | 0.9.0 | Unsupported | -| Mar 25th 2022 | 1.5.2
| 1.6.0 | Java 1.3.0
Go 1.3.0
PHP 1.1.0
Python 1.4.0
.NET 1.5.0
JS 1.0.2 | 0.9.0 | Unsupported | -| Dec 6th 2021 | 1.5.1
| 1.5.1 | Java 1.3.0
Go 1.3.0
PHP 1.1.0
Python 1.4.0
.NET 1.5.0
JS 1.0.2 | 0.9.0 | Unsupported | -| Nov 11th 2021 | 1.5.0
| 1.5.0 | Java 1.3.0
Go 1.3.0
PHP 1.1.0
Python 1.4.0
.NET 1.5.0
JS 1.0.2 | 0.9.0 | Unsupported | -| Dev 6th 2021 | 1.4.4
| 1.4.0 | Java 1.3.0
Go 1.2.0
PHP 1.1.0
Python 1.3.0
.NET 1.4.0 | 0.8.0 | Unsupported | -| Oct 7th 2021 | 1.4.3
| 1.4.0 | Java 1.3.0
Go 1.2.0
PHP 1.1.0
Python 1.3.0
.NET 1.4.0 | 0.8.0 | Unsupported | -| Sep 24th 2021 | 1.4.2
| 1.4.0 | Java 1.3.0
Go 1.2.0
PHP 1.1.0
Python 1.3.0
.NET 1.4.0 | 0.8.0 | Unsupported | -| Sep 22nd 2021 | 1.4.1
| 1.4.0 | Java 1.3.0
Go 1.2.0
PHP 1.1.0
Python 1.3.0
.NET 1.4.0 | 0.8.0 | Unsupported | -| Sep 15th 2021 | 1.4
| 1.4.0 | Java 1.3.0
Go 1.2.0
PHP 1.1.0
Python 1.3.0
.NET 1.4.0 | 0.8.0 | Unsupported | -| Sep 14th 2021 | 1.3.1
| 1.3.0 | Java 1.2.0
Go 1.2.0
PHP 1.1.0
Python 1.2.0
.NET 1.3.0 | 0.7.0 | Unsupported | -| Jul 26th 2021 | 1.3
| 1.3.0 | Java 1.2.0
Go 1.2.0
PHP 1.1.0
Python 1.2.0
.NET 1.3.0 | 0.7.0 | Unsupported | +| Release date | Runtime | CLI | SDKs | Dashboard | Status | Release notes | +|--------------------|:--------:|:--------|---------|---------|---------|------------| +| August 31st 2023 | 1.11.3
| 1.11.0 | Java 1.9.0
Go 1.8.0
PHP 1.1.0
Python 1.10.0
.NET 1.11.0
JS 3.1.0 | 0.13.0 | Supported (current) | [v1.11.3 release notes](https://github.com/dapr/dapr/releases/tag/v1.11.3) | +| July 20th 2023 | 1.11.2
| 1.11.0 | Java 1.9.0
Go 1.8.0
PHP 1.1.0
Python 1.10.0
.NET 1.11.0
JS 3.1.0 | 0.13.0 | Supported (current) | [v1.11.2 release notes](https://github.com/dapr/dapr/releases/tag/v1.11.2) | +| June 22nd 2023 | 1.11.1
| 1.11.0 | Java 1.9.0
Go 1.8.0
PHP 1.1.0
Python 1.10.0
.NET 1.11.0
JS 3.1.0 | 0.13.0 | Supported (current) | [v1.11.1 release notes](https://github.com/dapr/dapr/releases/tag/v1.11.1) | +| June 12th 2023 | 1.11.0
| 1.11.0 | Java 1.9.0
Go 1.8.0
PHP 1.1.0
Python 1.10.0
.NET 1.11.0
JS 3.1.0 | 0.13.0 | Supported (current) | [v1.11.0 release notes](https://github.com/dapr/dapr/releases/tag/v1.11.0) | +| July 20th 2023 | 1.10.9
| 1.10.0 | Java 1.8.0
Go 1.7.0
PHP 1.1.0
Python 1.9.0
.NET 1.10.0
JS 3.0.0 | 0.11.0 | Supported | [v1.10.9 release notes](https://github.com/dapr/dapr/releases/tag/v1.10.9) | +| June 22nd 2023 | 1.10.8
| 1.10.0 | Java 1.8.0
Go 1.7.0
PHP 1.1.0
Python 1.9.0
.NET 1.10.0
JS 3.0.0 | 0.11.0 | Supported | [v1.10.8 release notes](https://github.com/dapr/dapr/releases/tag/v1.10.8) | +| May 15th 2023 | 1.10.7
| 1.10.0 | Java 1.8.0
Go 1.7.0
PHP 1.1.0
Python 1.9.0
.NET 1.10.0
JS 3.0.0 | 0.11.0 | Supported | | +| May 12th 2023 | 1.10.6
| 1.10.0 | Java 1.8.0
Go 1.7.0
PHP 1.1.0
Python 1.9.0
.NET 1.10.0
JS 3.0.0 | 0.11.0 | Supported | | +| April 13 2023 |1.10.5
| 1.10.0 | Java 1.8.0
Go 1.6.0
PHP 1.1.0
Python 1.9.0
.NET 1.10.0
JS 3.0.0 | 0.11.0 | Supported | | +| March 16 2023 | 1.10.4
| 1.10.0 | Java 1.8.0
Go 1.6.0
PHP 1.1.0
Python 1.9.0
.NET 1.10.0
JS 2.5.0 | 0.11.0 | Supported | | +| March 14 2023 | 1.10.3
| 1.10.0 | Java 1.8.0
Go 1.6.0
PHP 1.1.0
Python 1.9.0
.NET 1.10.0
JS 2.5.0 | 0.11.0 | Supported | | +| February 24 2023 | 1.10.2
| 1.10.0 | Java 1.8.0
Go 1.6.0
PHP 1.1.0
Python 1.9.0
.NET 1.10.0
JS 2.5.0 | 0.11.0 | Supported | | +| February 20 2023 | 1.10.1
| 1.10.0 | Java 1.8.0
Go 1.6.0
PHP 1.1.0
Python 1.9.0
.NET 1.10.0
JS 2.5.0 | 0.11.0 | Supported | | +| February 14 2023 | 1.10.0
| 1.10.0 | Java 1.8.0
Go 1.6.0
PHP 1.1.0
Python 1.9.0
.NET 1.10.0
JS 2.5.0 | 0.11.0 | Supported| | +| December 2nd 2022 | 1.9.5
| 1.9.1 | Java 1.7.0
Go 1.6.0
PHP 1.1.0
Python 1.8.3
.NET 1.9.0
JS 2.4.2 | 0.11.0 | Supported | | +| November 17th 2022 | 1.9.4
| 1.9.1 | Java 1.7.0
Go 1.6.0
PHP 1.1.0
Python 1.8.3
.NET 1.9.0
JS 2.4.2 | 0.11.0 | Supported | | +| November 4th 2022 | 1.9.3
| 1.9.1 | Java 1.7.0
Go 1.6.0
PHP 1.1.0
Python 1.8.3
.NET 1.9.0
JS 2.4.2 | 0.11.0 | Supported | | +| November 1st 2022 | 1.9.2
| 1.9.1 | Java 1.7.0
Go 1.6.0
PHP 1.1.0
Python 1.8.1
.NET 1.9.0
JS 2.4.2 | 0.11.0 | Supported | | +| October 26th 2022 | 1.9.1
| 1.9.1 | Java 1.7.0
Go 1.6.0
PHP 1.1.0
Python 1.8.1
.NET 1.9.0
JS 2.4.2 | 0.11.0 | Supported | | +| October 13th 2022 | 1.9.0
| 1.9.1 | Java 1.7.0
Go 1.6.0
PHP 1.1.0
Python 1.8.3
.NET 1.9.0
JS 2.4.2 | 0.11.0 | Supported | | +| October 26th 2022 | 1.8.6
| 1.8.1 | Java 1.6.0
Go 1.5.0
PHP 1.1.0
Python 1.7.0
.NET 1.8.0
JS 2.3.0 | 0.11.0 | Unsupported | | +| October 13th 2022 | 1.8.5
| 1.8.1 | Java 1.6.0
Go 1.5.0
PHP 1.1.0
Python 1.7.0
.NET 1.8.0
JS 2.3.0 | 0.11.0 | Unsupported | | +| August 10th 2022 | 1.8.4
| 1.8.1 | Java 1.6.0
Go 1.5.0
PHP 1.1.0
Python 1.7.0
.NET 1.8.0
JS 2.3.0 | 0.11.0 | Unsupported | | +| July 29th 2022 | 1.8.3
| 1.8.0 | Java 1.6.0
Go 1.5.0
PHP 1.1.0
Python 1.7.0
.NET 1.8.0
JS 2.3.0 | 0.11.0 | Unsupported | | +| July 21st 2022 | 1.8.2
| 1.8.0 | Java 1.6.0
Go 1.5.0
PHP 1.1.0
Python 1.7.0
.NET 1.8.0
JS 2.3.0 | 0.11.0 | Unsupported | | +| July 20th 2022 | 1.8.1
| 1.8.0 | Java 1.6.0
Go 1.5.0
PHP 1.1.0
Python 1.7.0
.NET 1.8.0
JS 2.3.0 | 0.11.0 | Unsupported | | +| July 7th 2022 | 1.8.0
| 1.8.0 | Java 1.6.0
Go 1.5.0
PHP 1.1.0
Python 1.7.0
.NET 1.8.0
JS 2.3.0 | 0.11.0 | Unsupported | | +| October 26th 2022 | 1.7.5
| 1.7.0 | Java 1.5.0
Go 1.4.0
PHP 1.1.0
Python 1.6.0
.NET 1.7.0
JS 2.2.1 | 0.10.0 | Unsupported | | +| May 31st 2022 | 1.7.4
| 1.7.0 | Java 1.5.0
Go 1.4.0
PHP 1.1.0
Python 1.6.0
.NET 1.7.0
JS 2.2.1 | 0.10.0 | Unsupported | | +| May 17th 2022 | 1.7.3
| 1.7.0 | Java 1.5.0
Go 1.4.0
PHP 1.1.0
Python 1.6.0
.NET 1.7.0
JS 2.2.1 | 0.10.0 | Unsupported | | +| Apr 22th 2022 | 1.7.2
| 1.7.0 | Java 1.5.0
Go 1.4.0
PHP 1.1.0
Python 1.6.0
.NET 1.7.0
JS 2.1.0 | 0.10.0 | Unsupported | | +| Apr 20th 2022 | 1.7.1
| 1.7.0 | Java 1.5.0
Go 1.4.0
PHP 1.1.0
Python 1.6.0
.NET 1.7.0
JS 2.1.0 | 0.10.0 | Unsupported | | +| Apr 7th 2022 | 1.7.0
| 1.7.0 | Java 1.5.0
Go 1.4.0
PHP 1.1.0
Python 1.6.0
.NET 1.7.0
JS 2.1.0 | 0.10.0 | Unsupported | | +| Apr 20th 2022 | 1.6.2
| 1.6.0 | Java 1.4.0
Go 1.3.1
PHP 1.1.0
Python 1.5.0
.NET 1.6.0
JS 2.0.0 | 0.9.0 | Unsupported | | +| Mar 25th 2022 | 1.6.1
| 1.6.0 | Java 1.4.0
Go 1.3.1
PHP 1.1.0
Python 1.5.0
.NET 1.6.0
JS 2.0.0 | 0.9.0 | Unsupported | | +| Jan 25th 2022 | 1.6.0
| 1.6.0 | Java 1.4.0
Go 1.3.1
PHP 1.1.0
Python 1.5.0
.NET 1.6.0
JS 2.0.0 | 0.9.0 | Unsupported | | +| Mar 25th 2022 | 1.5.2
| 1.6.0 | Java 1.3.0
Go 1.3.0
PHP 1.1.0
Python 1.4.0
.NET 1.5.0
JS 1.0.2 | 0.9.0 | Unsupported | | +| Dec 6th 2021 | 1.5.1
| 1.5.1 | Java 1.3.0
Go 1.3.0
PHP 1.1.0
Python 1.4.0
.NET 1.5.0
JS 1.0.2 | 0.9.0 | Unsupported | | +| Nov 11th 2021 | 1.5.0
| 1.5.0 | Java 1.3.0
Go 1.3.0
PHP 1.1.0
Python 1.4.0
.NET 1.5.0
JS 1.0.2 | 0.9.0 | Unsupported | | +| Dev 6th 2021 | 1.4.4
| 1.4.0 | Java 1.3.0
Go 1.2.0
PHP 1.1.0
Python 1.3.0
.NET 1.4.0 | 0.8.0 | Unsupported | | +| Oct 7th 2021 | 1.4.3
| 1.4.0 | Java 1.3.0
Go 1.2.0
PHP 1.1.0
Python 1.3.0
.NET 1.4.0 | 0.8.0 | Unsupported | | +| Sep 24th 2021 | 1.4.2
| 1.4.0 | Java 1.3.0
Go 1.2.0
PHP 1.1.0
Python 1.3.0
.NET 1.4.0 | 0.8.0 | Unsupported | | +| Sep 22nd 2021 | 1.4.1
| 1.4.0 | Java 1.3.0
Go 1.2.0
PHP 1.1.0
Python 1.3.0
.NET 1.4.0 | 0.8.0 | Unsupported | | +| Sep 15th 2021 | 1.4
| 1.4.0 | Java 1.3.0
Go 1.2.0
PHP 1.1.0
Python 1.3.0
.NET 1.4.0 | 0.8.0 | Unsupported | | +| Sep 14th 2021 | 1.3.1
| 1.3.0 | Java 1.2.0
Go 1.2.0
PHP 1.1.0
Python 1.2.0
.NET 1.3.0 | 0.7.0 | Unsupported | | +| Jul 26th 2021 | 1.3
| 1.3.0 | Java 1.2.0
Go 1.2.0
PHP 1.1.0
Python 1.2.0
.NET 1.3.0 | 0.7.0 | Unsupported | | ## Upgrade paths @@ -118,7 +122,7 @@ General guidance on upgrading can be found for [self hosted mode]({{< ref self-h | 1.8.0 to 1.8.6 | N/A | 1.9.6 | | 1.9.0 | N/A | 1.9.6 | | 1.10.0 | N/A | 1.10.8 | -| 1.11.0 | N/A | 1.11.1 | +| 1.11.0 | N/A | 1.11.3 | ## Upgrade on Hosting platforms diff --git a/daprdocs/content/en/reference/api/bindings_api.md b/daprdocs/content/en/reference/api/bindings_api.md index d7170ff7b44..1dbe37b7ee0 100644 --- a/daprdocs/content/en/reference/api/bindings_api.md +++ b/daprdocs/content/en/reference/api/bindings_api.md @@ -40,13 +40,18 @@ If running on kubernetes apply the component to your cluster. ### Binding direction (optional) In some scenarios, it would be useful to provide additional information to Dapr to indicate the direction supported by the binding component. -Providing the supported binding direction helps the Dapr sidecar avoid the `"wait for the app to become ready"` state, where it waits indefinitely for the application to become available. + +Providing the binding `direction` helps the Dapr sidecar avoid the `"wait for the app to become ready"` state, where it waits indefinitely for the application to become available. This decouples the lifecycle dependency between the Dapr sidecar and the application. You can specify the `direction` field as part of the component's metadata. The valid values for this field are: - `"input"` - `"output"` - `"input, output"` +{{% alert title="Note" color="primary" %}} +It is highly recommended that all bindings should include the `direction` property. +{{% /alert %}} + Here a few scenarios when the `"direction"` metadata field could help: - When an application (detached from the sidecar) runs as a serverless workload and is scaled to zero, the `"wait for the app to become ready"` check done by the Dapr sidecar becomes pointless. diff --git a/daprdocs/content/en/reference/api/configuration_api.md b/daprdocs/content/en/reference/api/configuration_api.md index a1d8784724e..3fe4ed283ea 100644 --- a/daprdocs/content/en/reference/api/configuration_api.md +++ b/daprdocs/content/en/reference/api/configuration_api.md @@ -21,7 +21,7 @@ GET http://localhost:/v1.0/configuration/ Parameter | Description --------- | ----------- `daprPort` | The Dapr port -`storename` | The `metadata.name` field component file. Refer to the [component schema]({{< ref component-schema.md>}}) +`storename` | The `metadata.name` field component file. Refer to the [component spec]({{< ref component-schema.md>}}) #### Query Parameters @@ -83,7 +83,7 @@ GET http://localhost:/v1.0/configuration//subscribe Parameter | Description --------- | ----------- `daprPort` | The Dapr port -`storename` | The `metadata.name` field component file. Refer to the [component schema]({{< ref component-schema.md>}}) +`storename` | The `metadata.name` field component file. Refer to the [component spec]({{< ref component-schema.md>}}) #### Query Parameters @@ -149,7 +149,7 @@ GET http://localhost:/v1.0/configuration// Parameter | Description --------- | ----------- `daprPort` | The Dapr port -`storename` | The `metadata.name` field component file. Refer to the [component schema]({{< ref component-schema.md>}}) +`storename` | The `metadata.name` field component file. Refer to the [component spec]({{< ref component-schema.md>}}) `subscription-id` | The value from the `id` field returned from the response of the subscribe endpoint #### Query Parameters @@ -172,7 +172,7 @@ Code | Description #### Response Body -``` +```json { "ok" : true } @@ -181,7 +181,25 @@ Code | Description ### Example ```shell -curl -X GET 'http://localhost:3500/v1.0/configuration/mystore/bf3aa454-312d-403c-af95-6dec65058fa2/unsubscribe' +curl -X GET 'http://localhost:3500/v1.0-alpha1/configuration/mystore/bf3aa454-312d-403c-af95-6dec65058fa2/unsubscribe' +``` + +> The above command returns the following JSON: + +In case of successful operation: + +```json +{ + "ok": true +} +``` +In case of unsuccessful operation: + +```json +{ + "ok": false, + "message": "" +} ``` ## Optional application (user code) routes @@ -201,7 +219,7 @@ POST http://localhost:/configuration// Parameter | Description --------- | ----------- `appPort` | The application port -`storename` | The `metadata.name` field component file. Refer to the [component schema]({{< ref component-schema.md>}}) +`storename` | The `metadata.name` field component file. Refer to the [component spec]({{< ref component-schema.md>}}) `key` | The key subscribed to #### Request Body diff --git a/daprdocs/content/en/reference/arguments-annotations-overview.md b/daprdocs/content/en/reference/arguments-annotations-overview.md index 1ddf575826d..0cb502a55d6 100644 --- a/daprdocs/content/en/reference/arguments-annotations-overview.md +++ b/daprdocs/content/en/reference/arguments-annotations-overview.md @@ -23,31 +23,32 @@ This table is meant to help users understand the equivalent options for running | `--dapr-http-port` | `--dapr-http-port` | | not supported | The HTTP port for the Dapr API | | `--dapr-http-max-request-size` | --dapr-http-max-request-size | | `dapr.io/http-max-request-size` | Increasing max size of request body http and grpc servers parameter in MB to handle uploading of big files. Default is `4` MB | | `--dapr-http-read-buffer-size` | --dapr-http-read-buffer-size | | `dapr.io/http-read-buffer-size` | Increasing max size of http header read buffer in KB to handle when sending multi-KB headers. The default 4 KB. When sending bigger than default 4KB http headers, you should set this to a larger value, for example 16 (for 16KB) | -| not supported | `--image` | | `dapr.io/sidecar-image` | Dapr sidecar image. Default is daprio/daprd:latest. The Dapr sidecar uses this image instead of the latest default image. Use this when building your own custom image of Dapr and or [using an alternative stable Dapr image]({{}}) | +| not supported | `--image` | | `dapr.io/sidecar-image` | Dapr sidecar image. Default is daprio/daprd:latest. The Dapr sidecar uses this image instead of the latest default image. Use this when building your own custom image of Dapr and or [using an alternative stable Dapr image]({{< ref "support-release-policy.md#build-variations" >}}) | | `--internal-grpc-port` | not supported | | not supported | gRPC port for the Dapr Internal API to listen on | -| `--enable-metrics` | not supported | | configuration spec | Enable prometheus metric (default true) | +| `--enable-metrics` | not supported | | configuration spec | Enable [prometheus metric]({{< ref prometheus >}}) (default true) | | `--enable-mtls` | not supported | | configuration spec | Enables automatic mTLS for daprd to daprd communication channels | -| `--enable-profiling` | `--enable-profiling` | | `dapr.io/enable-profiling` | Enable profiling | +| `--enable-profiling` | `--enable-profiling` | | `dapr.io/enable-profiling` | [Enable profiling]({{< ref profiling-debugging >}}) | | `--unix-domain-socket` | `--unix-domain-socket` | `-u` | `dapr.io/unix-domain-socket-path` | The parent directory of socket file. On Linux, when communicating with the Dapr sidecar, use unix domain sockets for lower latency and greater throughput compared to TCP ports. Not available on Windows OS. | -| `--log-as-json` | not supported | | `dapr.io/log-as-json` | Setting this parameter to `true` outputs logs in JSON format. Default is `false` | -| `--log-level` | `--log-level` | | `dapr.io/log-level` | Sets the log level for the Dapr sidecar. Allowed values are `debug`, `info`, `warn`, `error`. Default is `info` | -| `--enable-api-logging` | `--enable-api-logging` | | `dapr.io/enable-api-logging` | Enables API logging for the Dapr sidecar | -| `--app-max-concurrency` | `--app-max-concurrency` | | `dapr.io/app-max-concurrency` | Limit the concurrency of your application. A valid value is any number larger than `0`| +| `--log-as-json` | not supported | | `dapr.io/log-as-json` | Setting this parameter to `true` outputs [logs in JSON format]({{< ref logs >}}). Default is `false` | +| `--log-level` | `--log-level` | | `dapr.io/log-level` | Sets the [log level]({{< ref logs-troubleshooting >}}) for the Dapr sidecar. Allowed values are `debug`, `info`, `warn`, `error`. Default is `info` | +| `--enable-api-logging` | `--enable-api-logging` | | `dapr.io/enable-api-logging` | [Enables API logging]({{< ref "api-logs-troubleshooting.md#configuring-api-logging-in-kubernetes" >}}) for the Dapr sidecar | +| `--app-max-concurrency` | `--app-max-concurrency` | | `dapr.io/app-max-concurrency` | Limit the [concurrency of your application]({{< ref "control-concurrency.md#setting-app-max-concurrency" >}}). A valid value is any number larger than `0`| | `--metrics-port` | `--metrics-port` | | `dapr.io/metrics-port` | Sets the port for the sidecar metrics server. Default is `9090` | -| `--mode` | not supported | | not supported | Runtime mode for Dapr (default "standalone") | +| `--mode` | not supported | | not supported | Runtime hosting option mode for Dapr, either `"standalone"` or `"kubernetes"` (default `"standalone"`). [Learn more.]({{< ref hosting >}}) | | `--placement-host-address` | `--placement-host-address` | | `dapr.io/placement-host-address` | Comma separated list of addresses for Dapr Actor Placement servers. When no annotation is set, the default value is set by the Sidecar Injector. When the annotation is set and the value is empty, the sidecar does not connect to Placement server. This can be used when there are no actors running in the sidecar. When the annotation is set and the value is not empty, the sidecar connects to the configured address. For example: `127.0.0.1:50057,127.0.0.1:50058` | | `--profiling-port` | `--profiling-port` | | not supported | The port for the profile server (default `7777`) | | `--app-protocol` | `--app-protocol` | `-P` | `dapr.io/app-protocol` | Configures the protocol Dapr uses to communicate with your app. Valid options are `http`, `grpc`, `https` (HTTP with TLS), `grpcs` (gRPC with TLS), `h2c` (HTTP/2 Cleartext). Note that Dapr does not validate TLS certificates presented by the app. Default is `http` | -| `--enable-app-health-check` | `--enable-app-health-check` | | `dapr.io/enable-app-health-check` | Boolean that enables the health checks. Default is `false`. | -| `--app-health-check-path` | `--app-health-check-path` | | `dapr.io/app-health-check-path` | Path that Dapr invokes for health probes when the app channel is HTTP (this value is ignored if the app channel is using gRPC). Requires app health checks to be enabled. Default is `/health` | -| `--app-health-probe-interval` | `--app-health-probe-interval` | | `dapr.io/app-health-probe-interval` | Number of *seconds* between each health probe. Requires app health checks to be enabled. Default is `5` | -| `--app-health-probe-timeout` | `--app-health-probe-timeout` | | `dapr.io/app-health-probe-timeout` | Timeout in *milliseconds* for health probe requests. Requires app health checks to be enabled. Default is `500` | -| `--app-health-threshold` | `--app-health-threshold` | | `dapr.io/app-health-threshold"` | Max number of consecutive failures before the app is considered unhealthy. Requires app health checks to be enabled. Default is `3` | -| `--sentry-address` | `--sentry-address` | | not supported | Address for the Sentry CA service | +| `--enable-app-health-check` | `--enable-app-health-check` | | `dapr.io/enable-app-health-check` | Boolean that enables the [health checks]({{< ref "app-health.md#configuring-app-health-checks" >}}). Default is `false`. | +| `--app-health-check-path` | `--app-health-check-path` | | `dapr.io/app-health-check-path` | Path that Dapr invokes for health probes when the app channel is HTTP (this value is ignored if the app channel is using gRPC). Requires [app health checks to be enabled]({{< ref "app-health.md#configuring-app-health-checks" >}}). Default is `/health`. | +| `--app-health-probe-interval` | `--app-health-probe-interval` | | `dapr.io/app-health-probe-interval` | Number of *seconds* between each health probe. Requires [app health checks to be enabled]({{< ref "app-health.md#configuring-app-health-checks" >}}). Default is `5` | +| `--app-health-probe-timeout` | `--app-health-probe-timeout` | | `dapr.io/app-health-probe-timeout` | Timeout in *milliseconds* for health probe requests. Requires [app health checks to be enabled]({{< ref "app-health.md#configuring-app-health-checks" >}}). Default is `500` | +| `--app-health-threshold` | `--app-health-threshold` | | `dapr.io/app-health-threshold"` | Max number of consecutive failures before the app is considered unhealthy. Requires [app health checks to be enabled]({{< ref "app-health.md#configuring-app-health-checks" >}}). Default is `3` | +| `--sentry-address` | `--sentry-address` | | not supported | Address for the [Sentry CA service]({{< ref sentry >}}) | | `--version` | `--version` | `-v` | not supported | Prints the runtime version | | `--dapr-graceful-shutdown-seconds` | not supported | | `dapr.io/graceful-shutdown-seconds` | Graceful shutdown duration in seconds for Dapr, the maximum duration before forced shutdown when waiting for all in-progress requests to complete. Defaults to `5`. If you are running in Kubernetes mode, this value should not be larger than the Kubernetes termination grace period, who's default value is `30`.| | not supported | not supported | | `dapr.io/enabled` | Setting this paramater to true injects the Dapr sidecar into the pod | -| not supported | not supported | | `dapr.io/api-token-secret` | Tells Dapr which Kubernetes secret to use for token based API authentication. By default this is not set | +| not supported | not supported | | `dapr.io/api-token-secret` | Tells Dapr which Kubernetes secret to use for [token-based API authentication]({{< ref api-token >}}). By default this is not set | +| not supported | not supported | | `dapr.io/app-token-secret` | Tells Dapr which Kubernetes secret to use for [token-based application authentication]({{< ref app-api-token >}}). By default, this is not set | | `--dapr-listen-addresses` | not supported | | `dapr.io/sidecar-listen-addresses` | Comma separated list of IP addresses that sidecar will listen to. Defaults to all in standalone mode. Defaults to `[::1],127.0.0.1` in Kubernetes. To listen to all IPv4 addresses, use `0.0.0.0`. To listen to all IPv6 addresses, use `[::]`.| | not supported | not supported | | `dapr.io/sidecar-cpu-limit` | Maximum amount of CPU that the Dapr sidecar can use. See valid values [here](https://kubernetes.io/docs/tasks/administer-cluster/manage-resources/quota-memory-cpu-namespace/). By default this is not set| | not supported | not supported | | `dapr.io/sidecar-memory-limit` | Maximum amount of Memory that the Dapr sidecar can use. See valid values [here](https://kubernetes.io/docs/tasks/administer-cluster/manage-resources/quota-memory-cpu-namespace/). By default this is not set| @@ -62,7 +63,7 @@ This table is meant to help users understand the equivalent options for running | not supported | not supported | | `dapr.io/sidecar-readiness-probe-period-seconds` | How often (in seconds) to perform the sidecar readiness probe. Read more [here](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes). Default is `6`| | not supported | not supported | | `dapr.io/sidecar-readiness-probe-threshold` | When the sidecar readiness probe fails, Kubernetes will try N times before giving up. In this case, the Pod will be marked Unready. Read more about `failureThreshold` [here](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes). Default is `3`| | not supported | not supported | | `dapr.io/env` | List of environment variable to be injected into the sidecar. Strings consisting of key=value pairs separated by a comma.| -| not supported | not supported | | `dapr.io/volume-mounts` | List of pod volumes to be mounted to the sidecar container in read-only mode. Strings consisting of `volume:path` pairs separated by a comma. Example, `"volume-1:/tmp/mount1,volume-2:/home/root/mount2"`. | -| not supported | not supported | | `dapr.io/volume-mounts-rw` | List of pod volumes to be mounted to the sidecar container in read-write mode. Strings consisting of `volume:path` pairs separated by a comma. Example, `"volume-1:/tmp/mount1,volume-2:/home/root/mount2"`. | -| `--disable-builtin-k8s-secret-store` | not supported | | `dapr.io/disable-builtin-k8s-secret-store` | Disables BuiltIn Kubernetes secret store. Default value is false. See [Kubernetes secret store component]({{}}) for details. | +| not supported | not supported | | `dapr.io/volume-mounts` | List of [pod volumes to be mounted to the sidecar container]({{< ref "kubernetes-volume-mounts" >}}) in read-only mode. Strings consisting of `volume:path` pairs separated by a comma. Example, `"volume-1:/tmp/mount1,volume-2:/home/root/mount2"`. | +| not supported | not supported | | `dapr.io/volume-mounts-rw` | List of [pod volumes to be mounted to the sidecar container]({{< ref "kubernetes-volume-mounts" >}}) in read-write mode. Strings consisting of `volume:path` pairs separated by a comma. Example, `"volume-1:/tmp/mount1,volume-2:/home/root/mount2"`. | +| `--disable-builtin-k8s-secret-store` | not supported | | `dapr.io/disable-builtin-k8s-secret-store` | Disables BuiltIn Kubernetes secret store. Default value is false. See [Kubernetes secret store component]({{< ref "kubernetes-secret-store.md" >}}) for details. | | not supported | not supported | | `dapr.io/sidecar-seccomp-profile-type` | Set the sidecar container's `securityContext.seccompProfile.type` to `Unconfined`, `RuntimeDefault`, or `Localhost`. By default, this annotation is not set on the Dapr sidecar, hence the field is omitted from sidecar container. | diff --git a/daprdocs/content/en/reference/cli/dapr-run.md b/daprdocs/content/en/reference/cli/dapr-run.md index 5587fc21fa2..9a519f98c72 100644 --- a/daprdocs/content/en/reference/cli/dapr-run.md +++ b/daprdocs/content/en/reference/cli/dapr-run.md @@ -27,7 +27,7 @@ dapr run [flags] [command] | `--app-max-concurrency` | | `unlimited` | The concurrency level of the application; default is unlimited | | `--app-port`, `-p` | `APP_PORT` | | The port your application is listening on | | `--app-protocol`, `-P` | | `http` | The protocol Dapr uses to talk to the application. Valid values are: `http`, `grpc`, `https` (HTTP with TLS), `grpcs` (gRPC with TLS), `h2c` (HTTP/2 Cleartext) | -| `--resources-path`, `-d` | | Linux/Mac: `$HOME/.dapr/components`
Windows: `%USERPROFILE%\.dapr\components` | The path for components directory | +| `--resources-path`, `-d` | | Linux/Mac: `$HOME/.dapr/components`
Windows: `%USERPROFILE%\.dapr\components` | The path for resources directory. If you've organized your resources into multiple folders (for example, components in one folder, resiliency policies in another), you can define multiple resource paths. See [example]({{< ref "#examples" >}}) below. | | `--app-channel-address` | | `127.0.0.1` | The network address the application listens on | | `--runtime-path` | | | Dapr runtime install path | | `--config`, `-c` | | Linux/Mac: `$HOME/.dapr/config.yaml`
Windows: `%USERPROFILE%\.dapr\config.yaml` | Dapr configuration file | @@ -78,4 +78,7 @@ dapr run --app-id myapp --app-port 5000 --app-protocol grpc -- go run main.go # Run a NodeJs application that listens to port 3000 with API logging enabled dapr run --app-id myapp --app-port 3000 --enable-api-logging -- node myapp.js + +# Pass multiple resource paths +dapr run --app-id myapp --resources-path path1 --resources-path path2 ``` diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/_index.md b/daprdocs/content/en/reference/components-reference/supported-bindings/_index.md index 6db86fefac4..4894dedfb82 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/_index.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/_index.md @@ -9,8 +9,10 @@ aliases: no_list: true --- -Every binding has its own unique set of properties. Click the name link to see the component YAML for each binding. +The following table lists input and output bindings supported by the Dapr bindings building block. [Learn how to set up different input and output binding components for Dapr bindings.]({{< ref setup-bindings.md >}}) {{< partial "components/description.html" >}} +Every binding component has its own set of properties. Click the name link to see the component specification for each binding. + {{< partial "components/bindings.html" >}} diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/alicloud-dingtalk.md b/daprdocs/content/en/reference/components-reference/supported-bindings/alicloud-dingtalk.md index 767f6fe904e..2d112e2aa98 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/alicloud-dingtalk.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/alicloud-dingtalk.md @@ -23,16 +23,21 @@ spec: value: "https://oapi.dingtalk.com/robot/send?access_token=******" - name: secret value: "****************" + - name: direction + value: "input, output" ``` + {{% alert title="Warning" color="warning" %}} 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 %}} + ## Spec metadata fields | Field | Required | Binding support | Details | Example | |--------------------|:--------:|--------|--------|---------| -| id | Y | Input/Output |unique id| `"test_webhook_id"` -| url | Y | Input/Output |DingTalk's Webhook url | `"https://oapi.dingtalk.com/robot/send?access_token=******"` -| secret | N | Input/Output |the secret of DingTalk's Webhook | `"****************"` +| `id` | Y | Input/Output |Unique id| `"test_webhook_id"` +| `url` | Y | Input/Output |DingTalk's Webhook url | `"https://oapi.dingtalk.com/robot/send?access_token=******"` +| `secret` | N | Input/Output |The secret of DingTalk's Webhook | `"****************"` +| `direction` | N | Input/Output |The direction of the binding | `"input"`, `"output"`, `"input, output"` ## Binding support diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/alicloudoss.md b/daprdocs/content/en/reference/components-reference/supported-bindings/alicloudoss.md index cc7c52b38f0..4036bb03741 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/alicloudoss.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/alicloudoss.md @@ -28,6 +28,8 @@ spec: value: "[access-key]" - name: bucket value: "[bucket]" + - name: direction + value: "output" ``` {{% alert title="Warning" color="warning" %}} @@ -42,6 +44,7 @@ The above example uses secrets as plain strings. It is recommended to use a secr | `accessKeyID` | Y | Output | Access key ID credential. | | `accessKey` | Y | Output | Access key credential. | | `bucket` | Y | Output | Name of the storage bucket. | +| `direction` | N | Output | Direction of the binding. | `"output"` ## Binding support diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/alicloudsls.md b/daprdocs/content/en/reference/components-reference/supported-bindings/alicloudsls.md index 8afc5c92156..b81db6d3cce 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/alicloudsls.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/alicloudsls.md @@ -26,6 +26,8 @@ spec: value: "[accessKey-secret]" - name: Endpoint value: "[endpoint]" + - name: direction + value: "output" ``` ## Spec metadata fields @@ -35,6 +37,7 @@ spec: | `AccessKeyID` | Y | Output | Access key ID credential. | | `AccessKeySecret` | Y | Output | Access key credential secret | | `Endpoint` | Y | Output | Alicloud SLS endpoint. | +| `direction` | N | Output | Direction of the binding. | `"output"` ## Binding support diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/alicloudtablestore.md b/daprdocs/content/en/reference/components-reference/supported-bindings/alicloudtablestore.md index 1a9173ff23c..61daf950eb6 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/alicloudtablestore.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/alicloudtablestore.md @@ -32,6 +32,8 @@ spec: value: "[table]" - name: endpoint value: "[endpoint]" + - name: direction + value: "output" ``` {{% alert title="Warning" color="warning" %}} @@ -47,6 +49,7 @@ The above example uses secrets as plain strings. It is recommended to use a secr | `accessKey` | Y | Output | Access key credential. | | `instanceName` | Y | Output | Name of the instance. | | `tableName` | Y | Output | Name of the table. | +| `direction` | N | Output | Direction of the binding. | `"output"` ## Binding support diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/apns.md b/daprdocs/content/en/reference/components-reference/supported-bindings/apns.md index 2fb74483b76..3b534cc55ea 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/apns.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/apns.md @@ -21,24 +21,27 @@ spec: version: v1 metadata: - name: development - value: + value: "" - name: key-id - value: + value: "" - name: team-id - value: + value: "" - name: private-key secretKeyRef: name: - key: + key: "" + - name: direction + value: "output" ``` ## Spec metadata fields | Field | Required | Binding support | Details | Example | |--------------------|:--------:| ----------------|---------|---------| -| development | Y | Output | Tells the binding which APNs service to use. Set to `"true"` to use the development service or `"false"` to use the production service. Default: `"true"` | `"true"` | -| key-id | Y | Output | The identifier for the private key from the Apple Developer Portal | `"private-key-id`" | -| team-id | Y | Output | The identifier for the organization or author from the Apple Developer Portal | `"team-id"` | -| private-key | Y | Output| Is a PKCS #8-formatted private key. It is intended that the private key is stored in the secret store and not exposed directly in the configuration. See [here](#private-key) for more details | `"pem file"` | +| `development` | Y | Output | Tells the binding which APNs service to use. Set to `"true"` to use the development service or `"false"` to use the production service. Default: `"true"` | `"true"` | +| `key-id` | Y | Output | The identifier for the private key from the Apple Developer Portal | `"private-key-id`" | +| `team-id` | Y | Output | The identifier for the organization or author from the Apple Developer Portal | `"team-id"` | +| `private-key` | Y | Output| Is a PKCS #8-formatted private key. It is intended that the private key is stored in the secret store and not exposed directly in the configuration. See [here](#private-key) for more details | `"pem file"` | +| `direction` | N | Output| The direction of the binding. | `"output"` | ### Private key The APNS binding needs a cryptographic private key in order to generate authentication tokens for the APNS service. diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/blobstorage.md b/daprdocs/content/en/reference/components-reference/supported-bindings/blobstorage.md index 3df3e28048b..b5ed204388e 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/blobstorage.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/blobstorage.md @@ -33,6 +33,8 @@ spec: # value: # - name: publicAccessLevel # value: +# - name: direction +# value: "output" ``` {{% alert title="Warning" color="warning" %}} 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 >}}). @@ -49,6 +51,7 @@ The above example uses secrets as plain strings. It is recommended to use a secr | `decodeBase64` | N | Output | Configuration to decode base64 file content before saving to Blob Storage. (In case of saving a file with binary content). Defaults to `false` | `true`, `false` | | `getBlobRetryCount` | N | Output | Specifies the maximum number of HTTP GET requests that will be made while reading from a RetryReader Defaults to `10` | `1`, `2` | `publicAccessLevel` | N | Output | Specifies whether data in the container may be accessed publicly and the level of access (only used if the container is created by Dapr). Defaults to `none` | `blob`, `container`, `none` +| `direction` | N | Output | The direction of the binding. | `"output"` ### Azure Active Directory (AAD) authentication diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/cloudflare-queues.md b/daprdocs/content/en/reference/components-reference/supported-bindings/cloudflare-queues.md index 2a1420b6df6..b1196b54feb 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/cloudflare-queues.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/cloudflare-queues.md @@ -46,6 +46,9 @@ spec: # URL of the Worker (required if the Worker has been pre-created outside of Dapr) - name: workerUrl value: "" + # Direction of the binding + - name: direction + value: "output" ``` {{% alert title="Warning" color="warning" %}} @@ -61,6 +64,7 @@ The above example uses secrets as plain strings. It is recommended to use a secr | `cfAccountID` | Y/N | Output | Cloudflare account ID. Required to have Dapr manage the worker. | `"456789abcdef8b5588f3d134f74ac"def` | `cfAPIToken` | Y/N | Output | API token for Cloudflare. Required to have Dapr manage the Worker. | `"secret-key"` | `workerUrl` | Y/N | Output | URL of the Worker. Required if the Worker has been pre-provisioned outside of Dapr. | `"https://mydaprqueue.mydomain.workers.dev"` +| `direction` | N | Output | Direction of the binding. | `"output"` > When you configure Dapr to create your Worker for you, you may need to set a longer value for the `initTimeout` property of the component, to allow enough time for the Worker script to be deployed. For example: `initTimeout: "120s"` diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/commercetools.md b/daprdocs/content/en/reference/components-reference/supported-bindings/commercetools.md index 010edf1c897..94fd95d1484 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/commercetools.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/commercetools.md @@ -23,18 +23,19 @@ spec: version: v1 metadata: - name: region # required. - value: region + value: "region" - name: provider # required. - value: provider (gcp/aws) + value: "gcp" - name: projectKey # required. - value: project-key + value: "" - name: clientID # required. - value: ***************** + value: "*****************" - name: clientSecret # required. - value: ***************** + value: "*****************" - name: scopes # required. - value: scopes - + value: "" + - name: direction + value: "output" ``` {{% alert title="Warning" color="warning" %}} 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 >}}). @@ -44,12 +45,13 @@ The above example uses secrets as plain strings. It is recommended to use a secr | Field | Required | Binding support | Details | Example | |--------------------|:--------:|------------|-----|---------| -| region | Y | Output | The region of the commercetools project | `"europe-west1"` | -| provider | Y | Output | The cloud provider, either gcp or aws | `"gcp"` | -| projectKey | Y | Output | The commercetools project key | `"project-key"` | -| clientID | Y | Output | The commercetools client ID for the project | `"client ID"` | -| clientSecret | Y | Output | The commercetools client secret for the project | `"client secret"` | -| scopes | Y | Output | The commercetools scopes for the project | `"manage_project:project-key"` | +| `region` | Y | Output | The region of the commercetools project | `"europe-west1"` | +| `provider` | Y | Output | The cloud provider, either gcp or aws | `"gcp"`, `"aws"` | +| `projectKey` | Y | Output | The commercetools project key | | +| `clientID` | Y | Output | The commercetools client ID for the project | | +| `clientSecret` | Y | Output | The commercetools client secret for the project | | +| `scopes` | Y | Output | The commercetools scopes for the project | `"manage_project:project-key"` | +| `direction` | N | Output | The direction of the binding | `"output"` | For more information see [commercetools - Creating an API Client](https://docs.commercetools.com/getting-started/create-api-client#create-an-api-client) and [commercetools - Regions](https://docs.commercetools.com/api/general-concepts#regions). diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/cosmosdb.md b/daprdocs/content/en/reference/components-reference/supported-bindings/cosmosdb.md index c9a54526f04..111ecab83c0 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/cosmosdb.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/cosmosdb.md @@ -22,15 +22,17 @@ spec: version: v1 metadata: - name: url - value: https://******.documents.azure.com:443/ + value: "https://******.documents.azure.com:443/" - name: masterKey - value: ***** + value: "*****" - name: database - value: db + value: "OrderDb" - name: collection - value: collection + value: "Orders" - name: partitionKey - value: message + value: "" + - name: direction + value: "output" ``` {{% alert title="Warning" color="warning" %}} @@ -41,11 +43,12 @@ The above example uses secrets as plain strings. It is recommended to use a secr | Field | Required | Binding support | Details | Example | |--------------------|:--------:|--------|---------|---------| -| url | Y | Output | The Cosmos DB url | `"https://******.documents.azure.com:443/"` | -| masterKey | Y | Output | The Cosmos DB account master key | `"master-key"` | -| database | Y | Output | The name of the Cosmos DB database | `"OrderDb"` | -| collection | Y | Output | The name of the container inside the database. | `"Orders"` | -| 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"` | +| `url` | Y | Output | The Cosmos DB url | `"https://******.documents.azure.com:443/"` | +| `masterKey` | Y | Output | The Cosmos DB account master key | `"master-key"` | +| `database` | Y | Output | The name of the Cosmos DB database | `"OrderDb"` | +| `collection` | Y | Output | The name of the container inside the database. | `"Orders"` | +| `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"` | +| `direction` | N | Output | The direction of the binding. | `"output"` | For more information see [Azure Cosmos DB resource model](https://docs.microsoft.com/azure/cosmos-db/account-databases-containers-items). diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/cosmosdbgremlinapi.md b/daprdocs/content/en/reference/components-reference/supported-bindings/cosmosdbgremlinapi.md index 16641aa79a0..505bc5ca6bc 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/cosmosdbgremlinapi.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/cosmosdbgremlinapi.md @@ -20,12 +20,14 @@ spec: version: v1 metadata: - name: url - value: wss://******.gremlin.cosmos.azure.com:443/ + value: "wss://******.gremlin.cosmos.azure.com:443/" - name: masterKey - value: ***** + value: "*****" - name: username - value: ***** - ``` + value: "*****" + - name: direction + value: "output" +``` {{% alert title="Warning" color="warning" %}} 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 >}}). @@ -38,6 +40,7 @@ The above example uses secrets as plain strings. It is recommended to use a secr | `url` | Y | Output | The Cosmos DB url for Gremlin APIs | `"wss://******.gremlin.cosmos.azure.com:443/"` | | `masterKey` | Y | Output | The Cosmos DB account master key | `"masterKey"` | | `username` | Y | Output | The username of the Cosmos DB database | `"/dbs//colls/"` | +| `direction` | N | Output | The direction of the binding | `"output"` | For more information see [Quickstart: Azure Cosmos Graph DB using Gremlin](https://docs.microsoft.com/azure/cosmos-db/graph/create-graph-console). diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/cron.md b/daprdocs/content/en/reference/components-reference/supported-bindings/cron.md index ace35d10495..6a046f781b0 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/cron.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/cron.md @@ -23,13 +23,16 @@ spec: metadata: - name: schedule value: "@every 15m" # valid cron schedule + - name: direction + value: "input" ``` ## Spec metadata fields | Field | Required | Binding support | Details | Example | |--------------------|:--------:|-------|--------|---------| -| schedule | Y | Input| The valid cron schedule to use. See [this](#schedule-format) for more details | `"@every 15m"` +| `schedule` | Y | Input| The valid cron schedule to use. See [this](#schedule-format) for more details | `"@every 15m"` +| `direction` | N | Input| The direction of the binding | `"input"` ### Schedule Format diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/dynamodb.md b/daprdocs/content/en/reference/components-reference/supported-bindings/dynamodb.md index 35f81adb968..63654df5c87 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/dynamodb.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/dynamodb.md @@ -23,16 +23,17 @@ spec: version: v1 metadata: - name: table - value: items + value: "items" - name: region - value: us-west-2 + value: "us-west-2" - name: accessKey - value: ***************** + value: "*****************" - name: secretKey - value: ***************** + value: "*****************" - name: sessionToken - value: ***************** - + value: "*****************" + - name: direction + value: "output" ``` {{% alert title="Warning" color="warning" %}} @@ -43,11 +44,12 @@ The above example uses secrets as plain strings. It is recommended to use a secr | Field | Required | Binding support | Details | Example | |--------------------|:--------:|------------|-----|---------| -| table | Y | Output | The DynamoDB table name | `"items"` | -| region | Y | Output | The specific AWS region the AWS DynamoDB instance is deployed in | `"us-east-1"` | -| accessKey | Y | Output | The AWS Access Key to access this resource | `"key"` | -| secretKey | Y | Output | The AWS Secret Access Key to access this resource | `"secretAccessKey"` | -| sessionToken | N | Output | The AWS session token to use | `"sessionToken"` | +| `table` | Y | Output | The DynamoDB table name | `"items"` | +| `region` | Y | Output | The specific AWS region the AWS DynamoDB instance is deployed in | `"us-east-1"` | +| `accessKey` | Y | Output | The AWS Access Key to access this resource | `"key"` | +| `secretKey` | Y | Output | The AWS Secret Access Key to access this resource | `"secretAccessKey"` | +| `sessionToken` | N | Output | The AWS session token to use | `"sessionToken"` | +| `direction` | N | Output | The direction of the binding | `"output"` | {{% alert title="Important" color="warning" %}} When running the Dapr sidecar (daprd) with your application on EKS (AWS Kubernetes), if you're using a node/pod that has already been attached to an IAM policy defining access to AWS resources, you **must not** provide AWS access-key, secret-key, and tokens in the definition of the component spec you're using. diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/eventgrid.md b/daprdocs/content/en/reference/components-reference/supported-bindings/eventgrid.md index f0469b7bbb9..6288baee4b7 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/eventgrid.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/eventgrid.md @@ -46,6 +46,9 @@ spec: # Optional Input Binding Metadata - name: eventSubscriptionName value: "[EventSubscriptionName]" + # Optional metadata + - name: direction + value: "input, output" ``` {{% alert title="Warning" color="warning" %}} @@ -66,6 +69,7 @@ The above example uses secrets as plain strings. It is recommended to use a secr | `handshakePort` | Y | Input | The container port that the input binding listens on when receiving events on the webhook | `"9000"` | | `scope` | Y | Input | The identifier of the resource to which the event subscription needs to be created or updated. See the [scope section](#scope) for more details | `"/subscriptions/{subscriptionId}/"` | | `eventSubscriptionName` | N | Input | The name of the event subscription. Event subscription names must be between 3 and 64 characters long and should use alphanumeric letters only | `"name"` | +| `direction` | N | Input/Output | The direction of the binding | `"input"`, `"output"`, `"input, output"` | ### Scope diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/eventhubs.md b/daprdocs/content/en/reference/components-reference/supported-bindings/eventhubs.md index dfe28434ba2..a4dc7701369 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/eventhubs.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/eventhubs.md @@ -55,6 +55,9 @@ spec: # Alternative to passing storageAccountKey - name: storageConnectionString value: "DefaultEndpointsProtocol=https;AccountName=;AccountKey=" + # Optional metadata + - name: direction + value: "input, output" ``` {{% alert title="Warning" color="warning" %}} @@ -78,6 +81,7 @@ The above example uses secrets as plain strings. It is recommended to use a secr | `storageAccountKey` | Y* | Input | Storage account key for the checkpoint store account.
* When using Azure AD, it's possible to omit this if the service principal has access to the storage account too. | `"112233445566778899"` | `storageConnectionString` | Y* | Input | Connection string for the checkpoint store, alternative to specifying `storageAccountKey` | `"DefaultEndpointsProtocol=https;AccountName=myeventhubstorage;AccountKey="` | `storageContainerName` | Y | Input | Storage container name for the storage account name. | `"myeventhubstoragecontainer"` +| `direction` | N | Input/Output | The direction of the binding. | `"input"`, `"output"`, `"input, output"` ### Azure Active Directory (AAD) authentication diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/gcpbucket.md b/daprdocs/content/en/reference/components-reference/supported-bindings/gcpbucket.md index db2f788a5e2..c4097a525c6 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/gcpbucket.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/gcpbucket.md @@ -22,31 +22,33 @@ spec: version: v1 metadata: - name: bucket - value: mybucket + value: "mybucket" - name: type - value: service_account + value: "service_account" - name: project_id - value: project_111 + value: "project_111" - name: private_key_id - value: ************* + value: "*************" - name: client_email - value: name@domain.com + value: "name@domain.com" - name: client_id - value: '1111111111111111' + value: "1111111111111111" - name: auth_uri - value: https://accounts.google.com/o/oauth2/auth + value: "https://accounts.google.com/o/oauth2/auth" - name: token_uri - value: https://oauth2.googleapis.com/token + value: "https://oauth2.googleapis.com/token" - name: auth_provider_x509_cert_url - value: https://www.googleapis.com/oauth2/v1/certs + value: "https://www.googleapis.com/oauth2/v1/certs" - name: client_x509_cert_url - value: https://www.googleapis.com/robot/v1/metadata/x509/.iam.gserviceaccount.com + value: "https://www.googleapis.com/robot/v1/metadata/x509/.iam.gserviceaccount.com" - name: private_key - value: PRIVATE KEY + value: "PRIVATE KEY" - name: decodeBase64 - value: + value: "" - name: encodeBase64 - value: + value: "" + - name: direction + value: "output" ``` {{% alert title="Warning" color="warning" %}} @@ -57,19 +59,20 @@ The above example uses secrets as plain strings. It is recommended to use a secr | Field | Required | Binding support | Details | Example | |--------------------|:--------:|------------|-----|---------| -| bucket | Y | Output | The bucket name | `"mybucket"` | -| type | Y | Output | Tge GCP credentials type | `"service_account"` | -| project_id | Y | Output | GCP project id| `projectId` -| private_key_id | Y | Output | GCP private key id | `"privateKeyId"` -| private_key | Y | Output | GCP credentials private key. Replace with x509 cert | `12345-12345` -| client_email | Y | Output | GCP client email | `"client@email.com"` -| client_id | Y | Output | GCP client id | `0123456789-0123456789` -| auth_uri | Y | Output | Google account OAuth endpoint | `https://accounts.google.com/o/oauth2/auth` -| token_uri | Y | Output | Google account token uri | `https://oauth2.googleapis.com/token` -| auth_provider_x509_cert_url | Y | Output | GCP credentials cert url | `https://www.googleapis.com/oauth2/v1/certs` -| client_x509_cert_url | Y | Output | GCP credentials project x509 cert url | `https://www.googleapis.com/robot/v1/metadata/x509/.iam.gserviceaccount.com` -| decodeBase64 | N | Output | Configuration to decode base64 file content before saving to bucket storage. (In case of saving a file with binary content). `true` is the only allowed positive value. Other positive variations like `"True", "1"` are not acceptable. Defaults to `false` | `true`, `false` | -| encodeBase64 | N | Output | Configuration to encode base64 file content before return the content. (In case of opening a file with binary content). `true` is the only allowed positive value. Other positive variations like `"True", "1"` are not acceptable. Defaults to `false` | `true`, `false` | +| `bucket` | Y | Output | The bucket name | `"mybucket"` | +| `type` | Y | Output | Tge GCP credentials type | `"service_account"` | +| `project_id` | Y | Output | GCP project id| `projectId` +| `private_key_id` | Y | Output | GCP private key id | `"privateKeyId"` +| `private_key` | Y | Output | GCP credentials private key. Replace with x509 cert | `12345-12345` +| `client_email` | Y | Output | GCP client email | `"client@email.com"` +| `client_id` | Y | Output | GCP client id | `0123456789-0123456789` +| `auth_uri` | Y | Output | Google account OAuth endpoint | `https://accounts.google.com/o/oauth2/auth` +| `token_uri` | Y | Output | Google account token uri | `https://oauth2.googleapis.com/token` +| `auth_provider_x509_cert_url` | Y | Output | GCP credentials cert url | `https://www.googleapis.com/oauth2/v1/certs` +| `client_x509_cert_url` | Y | Output | GCP credentials project x509 cert url | `https://www.googleapis.com/robot/v1/metadata/x509/.iam.gserviceaccount.com` +| `decodeBase64` | N | Output | Configuration to decode base64 file content before saving to bucket storage. (In case of saving a file with binary content). `true` is the only allowed positive value. Other positive variations like `"True", "1"` are not acceptable. Defaults to `false` | `true`, `false` | +| `encodeBase64` | N | Output | Configuration to encode base64 file content before return the content. (In case of opening a file with binary content). `true` is the only allowed positive value. Other positive variations like `"True", "1"` are not acceptable. Defaults to `false` | `true`, `false` | +| `direction` | N | Output | The direction of the binding. | `"output"` ## Binding support diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/gcppubsub.md b/daprdocs/content/en/reference/components-reference/supported-bindings/gcppubsub.md index f1681191e0d..0608fa7d9aa 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/gcppubsub.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/gcppubsub.md @@ -22,29 +22,31 @@ spec: version: v1 metadata: - name: topic - value: topic1 + value: "topic1" - name: subscription - value: subscription1 + value: "subscription1" - name: type - value: service_account + value: "service_account" - name: project_id - value: project_111 + value: "project_111" - name: private_key_id - value: ************* + value: "*************" - name: client_email - value: name@domain.com + value: "name@domain.com" - name: client_id - value: '1111111111111111' + value: "1111111111111111" - name: auth_uri - value: https://accounts.google.com/o/oauth2/auth + value: "https://accounts.google.com/o/oauth2/auth" - name: token_uri - value: https://oauth2.googleapis.com/token + value: "https://oauth2.googleapis.com/token" - name: auth_provider_x509_cert_url - value: https://www.googleapis.com/oauth2/v1/certs + value: "https://www.googleapis.com/oauth2/v1/certs" - name: client_x509_cert_url - value: https://www.googleapis.com/robot/v1/metadata/x509/.iam.gserviceaccount.com + value: "https://www.googleapis.com/robot/v1/metadata/x509/.iam.gserviceaccount.com" - name: private_key - value: PRIVATE KEY + value: "PRIVATE KEY" + - name: direction + value: "input, output" ``` {{% alert title="Warning" color="warning" %}} 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 >}}). @@ -54,18 +56,19 @@ The above example uses secrets as plain strings. It is recommended to use a secr | Field | Required | Binding support | Details | Example | |--------------------|:--------:|-----------| -----|---------| -| topic | Y | Output | GCP Pub/Sub topic name | `"topic1"` | -| subscription | N | GCP Pub/Sub subscription name | `"name1"` | -| type | Y | Output | GCP credentials type | `service_account` -| project_id | Y | Output | GCP project id| `projectId` -| private_key_id | N | Output | GCP private key id | `"privateKeyId"` -| private_key | Y | Output | GCP credentials private key. Replace with x509 cert | `12345-12345` -| client_email | Y | Output | GCP client email | `"client@email.com"` -| client_id | N | Output | GCP client id | `0123456789-0123456789` -| auth_uri | N | Output | Google account OAuth endpoint | `https://accounts.google.com/o/oauth2/auth` -| token_uri | N | Output | Google account token uri | `https://oauth2.googleapis.com/token` -| auth_provider_x509_cert_url | N | Output |GCP credentials cert url | `https://www.googleapis.com/oauth2/v1/certs` -| client_x509_cert_url | N | Output | GCP credentials project x509 cert url | `https://www.googleapis.com/robot/v1/metadata/x509/.iam.gserviceaccount.com` +| `topic` | Y | Output | GCP Pub/Sub topic name | `"topic1"` | +| `subscription` | N | GCP Pub/Sub subscription name | `"name1"` | +| `type` | Y | Output | GCP credentials type | `service_account` +| `project_id` | Y | Output | GCP project id| `projectId` +| `private_key_id` | N | Output | GCP private key id | `"privateKeyId"` +| `private_key` | Y | Output | GCP credentials private key. Replace with x509 cert | `12345-12345` +| `client_email` | Y | Output | GCP client email | `"client@email.com"` +| `client_id` | N | Output | GCP client id | `0123456789-0123456789` +| `auth_uri` | N | Output | Google account OAuth endpoint | `https://accounts.google.com/o/oauth2/auth` +| `token_uri` | N | Output | Google account token uri | `https://oauth2.googleapis.com/token` +| `auth_provider_x509_cert_url` | N | Output |GCP credentials cert url | `https://www.googleapis.com/oauth2/v1/certs` +| `client_x509_cert_url` | N | Output | GCP credentials project x509 cert url | `https://www.googleapis.com/robot/v1/metadata/x509/.iam.gserviceaccount.com` +| `direction` | N |Input/Output | The direction of the binding. | `"input"`, `"output"`, `"input, output"` ## Binding support diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/graghql.md b/daprdocs/content/en/reference/components-reference/supported-bindings/graghql.md index 9c7894e04d1..06ed28b0ae2 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/graghql.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/graghql.md @@ -22,11 +22,13 @@ spec: version: v1 metadata: - name: endpoint - value: http://localhost:8080/v1/graphql + value: "http://localhost:8080/v1/graphql" - name: header:x-hasura-access-key - value: adminkey + value: "adminkey" - name: header:Cache-Control - value: no-cache + value: "no-cache" + - name: direction + value: "output" ``` {{% alert title="Warning" color="warning" %}} @@ -37,9 +39,10 @@ The above example uses secrets as plain strings. It is recommended to use a secr | Field | Required | Binding support | Details | Example | |--------------------|:--------:|------------|-----|---------| -| endpoint | Y | Output | GraphQL endpoint string See [here](#url-format) for more details | `"http://localhost:4000/graphql/graphql"` | -| header:[HEADERKEY] | N | Output | GraphQL header. Specify the header key in the `name`, and the header value in the `value`. | `"no-cache"` (see above) | -| variable:[VARIABLEKEY] | N | Output | GraphQL query variable. Specify the variable name in the `name`, and the variable value in the `value`. | `"123"` (see below) | +| `endpoint` | Y | Output | GraphQL endpoint string See [here](#url-format) for more details | `"http://localhost:4000/graphql/graphql"` | +| `header:[HEADERKEY]` | N | Output | GraphQL header. Specify the header key in the `name`, and the header value in the `value`. | `"no-cache"` (see above) | +| `variable:[VARIABLEKEY]` | N | Output | GraphQL query variable. Specify the variable name in the `name`, and the variable value in the `value`. | `"123"` (see below) | +| `direction` | N | Output | The direction of the binding | `"output"` | ### Endpoint and Header format diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/http.md b/daprdocs/content/en/reference/components-reference/supported-bindings/http.md index 685189cef1f..39355955457 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/http.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/http.md @@ -23,34 +23,37 @@ spec: version: v1 metadata: - name: url - value: http://something.com + value: "http://something.com" - name: MTLSRootCA - value: /Users/somepath/root.pem # OPTIONAL Secret store ref, , or + value: "/Users/somepath/root.pem" # OPTIONAL Secret store ref, , or - name: MTLSClientCert - value: /Users/somepath/client.pem # OPTIONAL Secret store ref, , or + value: "/Users/somepath/client.pem" # OPTIONAL Secret store ref, , or - name: MTLSClientKey - value: /Users/somepath/client.key # OPTIONAL Secret store ref, , or + value: "/Users/somepath/client.key" # OPTIONAL Secret store ref, , or - name: MTLSRenegotiation - value: RenegotiateOnceAsClient # OPTIONAL one of: RenegotiateNever, RenegotiateOnceAsClient, RenegotiateFreelyAsClient + value: "RenegotiateOnceAsClient" # OPTIONAL one of: RenegotiateNever, RenegotiateOnceAsClient, RenegotiateFreelyAsClient - name: securityToken # OPTIONAL secretKeyRef: name: mysecret - key: mytoken + key: "mytoken" - name: securityTokenHeader value: "Authorization: Bearer" # OPTIONAL
+ - name: direction + value: "output" ``` ## Spec metadata fields | Field | Required | Binding support | Details | Example | |--------------------|:--------:|--------|--------|---------| -| url | Y | Output |The base URL of the HTTP endpoint to invoke | `http://host:port/path`, `http://myservice:8000/customers` -| MTLSRootCA | N | Output |Secret store reference, path to root ca certificate, or pem encoded string | -| MTLSClientCert | N | Output |Secret store reference, path to client certificate, or pem encoded string | -| MTLSClientKey | N | Output |Secret store reference, path client private key, or pem encoded string | -| MTLSRenegotiation | N | Output |Type of TLS renegotiation to be used | `RenegotiateOnceAsClient` -| securityToken | N | Output |The value of a token to be added to an HTTP request as a header. Used together with `securityTokenHeader` | -| securityTokenHeader| N | Output |The name of the header for `securityToken` on an HTTP request that | +| `url` | Y | Output |The base URL of the HTTP endpoint to invoke | `http://host:port/path`, `http://myservice:8000/customers` +| `MTLSRootCA` | N | Output |Secret store reference, path to root ca certificate, or pem encoded string | +| `MTLSClientCert` | N | Output |Secret store reference, path to client certificate, or pem encoded string | +| `MTLSClientKey` | N | Output |Secret store reference, path client private key, or pem encoded string | +| `MTLSRenegotiation` | N | Output |Type of TLS renegotiation to be used | `RenegotiateOnceAsClient` +| `securityToken` | N | Output |The value of a token to be added to an HTTP request as a header. Used together with `securityTokenHeader` | +| `securityTokenHeader`| N | Output |The name of the header for `securityToken` on an HTTP request that | +| `direction`| N | Output |The direction of the binding | `"output"` ### How to configure MTLS related fields in Metadata The values for **MTLSRootCA**, **MTLSClientCert** and **MTLSClientKey** can be provided in three ways: diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/huawei-obs.md b/daprdocs/content/en/reference/components-reference/supported-bindings/huawei-obs.md index 5f0c9255a58..5c4e063f7a8 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/huawei-obs.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/huawei-obs.md @@ -20,16 +20,18 @@ spec: type: bindings.huawei.obs version: v1 - name: bucket - value: + value: "" - name: endpoint - value: + value: "" - name: accessKey - value: + value: "" - name: secretKey - value: + value: "" # optional fields - name: region - value: + value: "" + - name: direction + value: "" ``` {{% alert title="Warning" color="warning" %}} @@ -40,12 +42,12 @@ The above example uses secrets as plain strings. It is recommended to use a secr | Field | Required | Binding support | Details | Example | |--------------------|:--------:|------------|-----|---------| -| bucket | Y | Output | The name of the Huawei OBS bucket to write to | `"My-OBS-Bucket"` | -| endpoint | Y | Output | The specific Huawei OBS endpoint | `"obs.cn-north-4.myhuaweicloud.com"` | -| accessKey | Y | Output | The Huawei Access Key (AK) to access this resource | `"************"` | -| secretKey | Y | Output | The Huawei Secret Key (SK) to access this resource | `"************"` | -| region | N | Output | The specific Huawei region of the bucket | `"cn-north-4"` | - +| `bucket` | Y | Output | The name of the Huawei OBS bucket to write to | `"My-OBS-Bucket"` | +| `endpoint` | Y | Output | The specific Huawei OBS endpoint | `"obs.cn-north-4.myhuaweicloud.com"` | +| `accessKey` | Y | Output | The Huawei Access Key (AK) to access this resource | `"************"` | +| `secretKey` | Y | Output | The Huawei Secret Key (SK) to access this resource | `"************"` | +| `region` | N | Output | The specific Huawei region of the bucket | `"cn-north-4"` | +| `direction` | N | Output | The direction of the binding | `"output"` | ## Binding support diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/influxdb.md b/daprdocs/content/en/reference/components-reference/supported-bindings/influxdb.md index dd256df072c..f6fa6e45d47 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/influxdb.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/influxdb.md @@ -22,13 +22,15 @@ spec: version: v1 metadata: - name: url # Required - value: + value: "" - name: token # Required - value: + value: "" - name: org # Required - value: + value: "" - name: bucket # Required - value: + value: "" + - name: direction + value: "" ``` {{% alert title="Warning" color="warning" %}} @@ -39,10 +41,11 @@ The above example uses secrets as plain strings. It is recommended to use a secr | Field | Required | Binding support | Details | Example | |--------------------|:--------:|------------|-----|---------| -| url | Y | Output | The URL for the InfluxDB instance| `"http://localhost:8086"` | -| token | Y | Output | The authorization token for InfluxDB | `"mytoken"` | -| org | Y | Output | The InfluxDB organization | `"myorg"` | -| bucket | Y | Output | Bucket name to write to | `"mybucket"` | +| `url` | Y | Output | The URL for the InfluxDB instance| `"http://localhost:8086"` | +| `token` | Y | Output | The authorization token for InfluxDB | `"mytoken"` | +| `org` | Y | Output | The InfluxDB organization | `"myorg"` | +| `bucket` | Y | Output | Bucket name to write to | `"mybucket"` | +| `direction` | N | Output | Direction of the binding | `"output"` | ## Binding support diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/kafka.md b/daprdocs/content/en/reference/components-reference/supported-bindings/kafka.md index 912471cbbc2..38afe3c503a 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/kafka.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/kafka.md @@ -38,39 +38,42 @@ spec: - name: saslPassword # Required if authRequired is `true`. secretKeyRef: name: kafka-secrets - key: saslPasswordSecret + key: "saslPasswordSecret" - name: saslMechanism value: "SHA-512" - name: initialOffset # Optional. Used for input bindings. value: "newest" - name: maxMessageBytes # Optional. - value: 1024 + value: "1024" - name: version # Optional. - value: 1.0.0 + value: "1.0.0" + - name: direction + value: "input, output" ``` ## Spec metadata fields | Field | Required | Binding support | Details | Example | |--------------------|:--------:|------------|-----|---------| -| topics | N | Input | A comma-separated string of topics. | `"mytopic1,topic2"` | -| brokers | Y | Input/Output | A comma-separated string of Kafka brokers. | `"localhost:9092,dapr-kafka.myapp.svc.cluster.local:9093"` | -| clientID | N | Input/Output | A user-provided string sent with every request to the Kafka brokers for logging, debugging, and auditing purposes. | `"my-dapr-app"` | -| consumerGroup | N | Input | A kafka consumer group to listen on. Each record published to a topic is delivered to one consumer within each consumer group subscribed to the topic. | `"group1"` | -| consumeRetryEnabled | N | Input/Output | Enable consume retry by setting to `"true"`. Default to `false` in Kafka binding component. | `"true"`, `"false"` | -| publishTopic | Y | Output | The topic to publish to. | `"mytopic"` | -| authRequired | N | *Deprecated* | Enable [SASL](https://en.wikipedia.org/wiki/Simple_Authentication_and_Security_Layer) authentication with the Kafka brokers. | `"true"`, `"false"` | -| authType | Y | Input/Output | Configure or disable authentication. Supported values: `none`, `password`, `mtls`, or `oidc` | `"password"`, `"none"` | -| saslUsername | N | Input/Output | The SASL username used for authentication. Only required if `authRequired` is set to `"true"`. | `"adminuser"` | -| saslPassword | N | Input/Output | The SASL password used for authentication. Can be `secretKeyRef` to use a [secret reference]({{< ref component-secrets.md >}}). Only required if `authRequired` is set to `"true"`. | `""`, `"KeFg23!"` | -| saslMechanism | N | Input/Output | The SASL authentication mechanism you'd like to use. Only required if `authtype` is set to `"password"`. If not provided, defaults to `PLAINTEXT`, which could cause a break for some services, like Amazon Managed Service for Kafka. | `"SHA-512", "SHA-256", "PLAINTEXT"` | -| initialOffset | N | Input | The initial offset to use if no offset was previously committed. Should be "newest" or "oldest". Defaults to "newest". | `"oldest"` | -| maxMessageBytes | N | Input/Output | The maximum size in bytes allowed for a single Kafka message. Defaults to 1024. | `2048` | -| oidcTokenEndpoint | N | Input/Output | Full URL to an OAuth2 identity provider access token endpoint. Required when `authType` is set to `oidc` | "https://identity.example.com/v1/token" | -| oidcClientID | N | Input/Output | The OAuth2 client ID that has been provisioned in the identity provider. Required when `authType` is set to `oidc` | `dapr-kafka` | -| oidcClientSecret | N | Input/Output | The OAuth2 client secret that has been provisioned in the identity provider: Required when `authType` is set to `oidc` | `"KeFg23!"` | -| oidcScopes | N | Input/Output | Comma-delimited list of OAuth2/OIDC scopes to request with the access token. Recommended when `authType` is set to `oidc`. Defaults to `"openid"` | `"openid,kafka-prod"` | -| version | N | Input/Output | Kafka cluster version. Defaults to 2.0.0. Please note that this needs to be mandatorily set to `1.0.0` for EventHubs with Kafka. | `1.0.0` | +| `topics` | N | Input | A comma-separated string of topics. | `"mytopic1,topic2"` | +| `brokers` | Y | Input/Output | A comma-separated string of Kafka brokers. | `"localhost:9092,dapr-kafka.myapp.svc.cluster.local:9093"` | +| `clientID` | N | Input/Output | A user-provided string sent with every request to the Kafka brokers for logging, debugging, and auditing purposes. | `"my-dapr-app"` | +| `consumerGroup` | N | Input | A kafka consumer group to listen on. Each record published to a topic is delivered to one consumer within each consumer group subscribed to the topic. | `"group1"` | +| `consumeRetryEnabled` | N | Input/Output | Enable consume retry by setting to `"true"`. Default to `false` in Kafka binding component. | `"true"`, `"false"` | +| `publishTopic` | Y | Output | The topic to publish to. | `"mytopic"` | +| `authRequired` | N | *Deprecated* | Enable [SASL](https://en.wikipedia.org/wiki/Simple_Authentication_and_Security_Layer) authentication with the Kafka brokers. | `"true"`, `"false"` | +| `authType` | Y | Input/Output | Configure or disable authentication. Supported values: `none`, `password`, `mtls`, or `oidc` | `"password"`, `"none"` | +| `saslUsername` | N | Input/Output | The SASL username used for authentication. Only required if `authRequired` is set to `"true"`. | `"adminuser"` | +| `saslPassword` | N | Input/Output | The SASL password used for authentication. Can be `secretKeyRef` to use a [secret reference]({{< ref component-secrets.md >}}). Only required if `authRequired` is set to `"true"`. | `""`, `"KeFg23!"` | +| `saslMechanism` | N | Input/Output | The SASL authentication mechanism you'd like to use. Only required if `authtype` is set to `"password"`. If not provided, defaults to `PLAINTEXT`, which could cause a break for some services, like Amazon Managed Service for Kafka. | `"SHA-512", "SHA-256", "PLAINTEXT"` | +| `initialOffset` | N | Input | The initial offset to use if no offset was previously committed. Should be "newest" or "oldest". Defaults to "newest". | `"oldest"` | +| `maxMessageBytes` | N | Input/Output | The maximum size in bytes allowed for a single Kafka message. Defaults to 1024. | `"2048"` | +| `oidcTokenEndpoint` | N | Input/Output | Full URL to an OAuth2 identity provider access token endpoint. Required when `authType` is set to `oidc` | "https://identity.example.com/v1/token" | +| `oidcClientID` | N | Input/Output | The OAuth2 client ID that has been provisioned in the identity provider. Required when `authType` is set to `oidc` | `"dapr-kafka"` | +| `oidcClientSecret` | N | Input/Output | The OAuth2 client secret that has been provisioned in the identity provider: Required when `authType` is set to `oidc` | `"KeFg23!"` | +| `oidcScopes` | N | Input/Output | Comma-delimited list of OAuth2/OIDC scopes to request with the access token. Recommended when `authType` is set to `oidc`. Defaults to `"openid"` | `"openid,kafka-prod"` | +| `version` | N | Input/Output | Kafka cluster version. Defaults to 2.0.0. Please note that this needs to be mandatorily set to `1.0.0` for EventHubs with Kafka. | `"1.0.0"` | +| `direction` | N | Input/Output | The direction of the binding. | `"input"`, `"output"`, `"input, output"` | #### Note The metadata `version` must be set to `1.0.0` when using Azure EventHubs with Kafka. diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/kinesis.md b/daprdocs/content/en/reference/components-reference/supported-bindings/kinesis.md index d823b70df74..656c7ba2291 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/kinesis.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/kinesis.md @@ -23,20 +23,21 @@ spec: version: v1 metadata: - name: streamName - value: KINESIS_STREAM_NAME # Kinesis stream name + value: "KINESIS_STREAM_NAME" # Kinesis stream name - name: consumerName - value: KINESIS_CONSUMER_NAME # Kinesis consumer name + value: "KINESIS_CONSUMER_NAME" # Kinesis consumer name - name: mode - value: shared # shared - Shared throughput or extended - Extended/Enhanced fanout + value: "shared" # shared - Shared throughput or extended - Extended/Enhanced fanout - name: region - value: AWS_REGION #replace + value: "AWS_REGION" #replace - name: accessKey - value: AWS_ACCESS_KEY # replace + value: "AWS_ACCESS_KEY" # replace - name: secretKey - value: AWS_SECRET_KEY #replace + value: "AWS_SECRET_KEY" #replace - name: sessionToken - value: ***************** - + value: "*****************" + - name: direction + value: "input, output" ``` {{% alert title="Warning" color="warning" %}} 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 >}}). @@ -46,13 +47,14 @@ The above example uses secrets as plain strings. It is recommended to use a secr | Field | Required | Binding support | Details | Example | |--------------------|:--------:|------------|-----|---------| -| mode | N | Input| The Kinesis stream mode. `shared`- Shared throughput, `extended` - Extended/Enhanced fanout methods. More details are [here](https://docs.aws.amazon.com/streams/latest/dev/building-consumers.html). Defaults to `"shared"` | `"shared"`, `"extended"` | -| streamName | Y | Input/Output | The AWS Kinesis Stream Name | `"stream"` | -| consumerName | Y | Input | The AWS Kinesis Consumer Name | `"myconsumer"` | -| region | Y | Output | The specific AWS region the AWS Kinesis instance is deployed in | `"us-east-1"` | -| accessKey | Y | Output | The AWS Access Key to access this resource | `"key"` | -| secretKey | Y | Output | The AWS Secret Access Key to access this resource | `"secretAccessKey"` | -| sessionToken | N | Output | The AWS session token to use | `"sessionToken"` | +| `mode` | N | Input| The Kinesis stream mode. `shared`- Shared throughput, `extended` - Extended/Enhanced fanout methods. More details are [here](https://docs.aws.amazon.com/streams/latest/dev/building-consumers.html). Defaults to `"shared"` | `"shared"`, `"extended"` | +| `streamName` | Y | Input/Output | The AWS Kinesis Stream Name | `"stream"` | +| `consumerName` | Y | Input | The AWS Kinesis Consumer Name | `"myconsumer"` | +| `region` | Y | Output | The specific AWS region the AWS Kinesis instance is deployed in | `"us-east-1"` | +| `accessKey` | Y | Output | The AWS Access Key to access this resource | `"key"` | +| `secretKey` | Y | Output | The AWS Secret Access Key to access this resource | `"secretAccessKey"` | +| `sessionToken` | N | Output | The AWS session token to use | `"sessionToken"` | +| `direction` | N | Input/Output | The direction of the binding | `"input"`, `"output"`, `"input, output"` | {{% alert title="Important" color="warning" %}} When running the Dapr sidecar (daprd) with your application on EKS (AWS Kubernetes), if you're using a node/pod that has already been attached to an IAM policy defining access to AWS resources, you **must not** provide AWS access-key, secret-key, and tokens in the definition of the component spec you're using. diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/kitex.md b/daprdocs/content/en/reference/components-reference/supported-bindings/kitex.md index b262f8ebe54..ec4a19c1fb6 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/kitex.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/kitex.md @@ -26,6 +26,16 @@ spec: type: bindings.kitex version: v1 metadata: + - name: hostPorts + value: "127.0.0.1:8888" + - name: destService + value: "echo" + - name: methodName + value: "echo" + - name: version + value: "0.5.0" + - name: direction + value: "output" ``` ## Spec metadata fields @@ -38,10 +48,11 @@ The `InvokeRequest.Metadata` for `bindings.kitex` requires the client to fill in | Field | Required | Binding support | Details | Example | |-------------|:--------:|--------|---------------------------------------------------------------------------------------------------------|--------------------| -| hostPorts | Y | Output | IP address and port information of the Kitex server (Thrift) | `"127.0.0.1:8888"` | -| destService | Y | Output | Service name of the Kitex server (Thrift) | `"echo"` | -| methodName | Y | Output | Method name under a specific service name of the Kitex server (Thrift) | `"echo"` | -| version | Y | Output | Kitex version | `"0.5.0"` | +| `hostPorts` | Y | Output | IP address and port information of the Kitex server (Thrift) | `"127.0.0.1:8888"` | +| `destService` | Y | Output | Service name of the Kitex server (Thrift) | `"echo"` | +| `methodName` | Y | Output | Method name under a specific service name of the Kitex server (Thrift) | `"echo"` | +| `version` | Y | Output | Kitex version | `"0.5.0"` | +| `direction` | N | Output | Direction of the binding | `"output"` | ## Binding support diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/kubemq.md b/daprdocs/content/en/reference/components-reference/supported-bindings/kubemq.md index 5303abb2694..5cf333ea213 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/kubemq.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/kubemq.md @@ -22,21 +22,24 @@ spec: version: v1 metadata: - name: address - value: localhost:50000 + value: "localhost:50000" - name: channel - value: queue1 + value: "queue1" + - name: direction + value: "input, output" ``` ## Spec metadata fields | Field | Required | Details | Example | |--------------------|:--------:|------------------------------------------------------------------------------------------------------------------------------|----------------------------------------| -| address | Y | Address of the KubeMQ server | `"localhost:50000"` | -| channel | Y | The Queue channel name | `queue1` | -| authToken | N | Auth JWT token for connection. Check out [KubeMQ Authentication](https://docs.kubemq.io/learn/access-control/authentication) | `ew...` | -| autoAcknowledged | N | Sets if received queue message is automatically acknowledged | `true` or `false` (default is `false`) | -| pollMaxItems | N | Sets the number of messages to poll on every connection | `1` | -| pollTimeoutSeconds | N | Sets the time in seconds for each poll interval | `3600` | +| `address` | Y | Address of the KubeMQ server | `"localhost:50000"` | +| `channel` | Y | The Queue channel name | `"queue1"` | +| `authToken` | N | Auth JWT token for connection. Check out [KubeMQ Authentication](https://docs.kubemq.io/learn/access-control/authentication) | `"ew..."` | +| `autoAcknowledged` | N | Sets if received queue message is automatically acknowledged | `"true"` or `"false"` (default is `"false"`) | +| `pollMaxItems` | N | Sets the number of messages to poll on every connection | `"1"` | +| `pollTimeoutSeconds` | N | Sets the time in seconds for each poll interval | `"3600"` | +| `direction` | N | The direction of the binding | `"input"`, `"output"`, `"input, output"` | ## Binding support diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/kubernetes-binding.md b/daprdocs/content/en/reference/components-reference/supported-bindings/kubernetes-binding.md index c6286d30bde..25391a7748d 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/kubernetes-binding.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/kubernetes-binding.md @@ -22,17 +22,20 @@ spec: version: v1 metadata: - name: namespace - value: + value: "" - name: resyncPeriodInSec value: "" + - name: direction + value: "input" ``` ## Spec metadata fields | Field | Required | Binding support | Details | Example | |--------------------|:--------:|------------|-----|---------| -| namespace | Y | Input | The Kubernetes namespace to read events from | `"default"` | -| resyncPeriodInSec | N | Input | The period of time to refresh event list from Kubernetes API server. Defaults to `"10"` | `"15"` +| `namespace` | Y | Input | The Kubernetes namespace to read events from | `"default"` | +| `resyncPeriodInSec` | N | Input | The period of time to refresh event list from Kubernetes API server. Defaults to `"10"` | `"15"` +| `direction` | N | Input | The direction of the binding | `"input"` ## Binding support diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/localstorage.md b/daprdocs/content/en/reference/components-reference/supported-bindings/localstorage.md index f040e5bf13e..5290a69c357 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/localstorage.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/localstorage.md @@ -22,14 +22,17 @@ spec: version: v1 metadata: - name: rootPath - value: + value: "" + - name: direction + value: "" ``` ## Spec metadata fields | Field | Required | Binding support | Details | Example | |--------------------|:--------:|--------|---------|---------| -| rootPath | Y | Input / Output | The root path anchor to which files can be read / saved | `"/temp/files"` | +| `rootPath` | Y | Input / Output | The root path anchor to which files can be read / saved | `"/temp/files"` | +| `direction` | N | Input / Output | The direction of the binding | `"output"` | ## Binding support diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/mqtt3.md b/daprdocs/content/en/reference/components-reference/supported-bindings/mqtt3.md index 0364ea36b7a..1bef18dfc5f 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/mqtt3.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/mqtt3.md @@ -34,6 +34,8 @@ spec: value: "false" - name: backOffMaxRetries value: "0" + - name: direction + value: "input, output" ``` {{% alert title="Warning" color="warning" %}} @@ -53,6 +55,7 @@ The above example uses secrets as plain strings. It is recommended to use a secr | `clientCert` | Required for using TLS | Input/Output | TLS client certificate in PEM format. Must be used with `clientKey`. | See example below | `clientKey` | Required for using TLS | Input/Output | TLS client key in PEM format. Must be used with `clientCert`. Can be `secretKeyRef` to use a secret reference. | See example below | `backOffMaxRetries` | N | Input | The maximum number of retries to process the message before returning an error. Defaults to `"0"`, which means that no retries will be attempted. `"-1"` can be specified to indicate that messages should be retried indefinitely until they are successfully processed or the application is shutdown. The component will wait 5 seconds between retries. | `"3"` +| `direction` | N | Input/Output | The direction of the binding | `"input"`, `"output"`, `"input, output"` ### Communication using TLS diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/mysql.md b/daprdocs/content/en/reference/components-reference/supported-bindings/mysql.md index 103303ba082..d03dcfcab89 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/mysql.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/mysql.md @@ -25,17 +25,19 @@ spec: version: v1 metadata: - name: url # Required, define DB connection in DSN format - value: + value: "" - name: pemPath # Optional - value: + value: "" - name: maxIdleConns - value: + value: "" - name: maxOpenConns - value: + value: "" - name: connMaxLifetime - value: + value: "" - name: connMaxIdleTime - value: + value: "" + - name: direction + value: "" ``` {{% alert title="Warning" color="warning" %}} @@ -47,12 +49,13 @@ Note that you can not use secret just for username/password. If you use secret, | Field | Required | Binding support | Details | Example | |--------------------|:--------:|------------|-----|---------| -| url | Y | Output | Represent DB connection in Data Source Name (DNS) format. See [here](#ssl-connection-details) SSL details | `"user:password@tcp(localhost:3306)/dbname"` | -| pemPath | Y | Output | Path to the PEM file. Used with SSL connection | `"path/to/pem/file"` | -| maxIdleConns | N | Output | The max idle connections. Integer greater than 0 | `"10"` | -| maxOpenConns | N | Output | The max open connections. Integer greater than 0 | `"10"` | -| connMaxLifetime | N | Output | The max connection lifetime. Duration string | `"12s"` | -| connMaxIdleTime | N | Output | The max connection idel time. Duration string | `"12s"` | +| `url` | Y | Output | Represent DB connection in Data Source Name (DNS) format. See [here](#ssl-connection-details) SSL details | `"user:password@tcp(localhost:3306)/dbname"` | +| `pemPath` | Y | Output | Path to the PEM file. Used with SSL connection | `"path/to/pem/file"` | +| `maxIdleConns` | N | Output | The max idle connections. Integer greater than 0 | `"10"` | +| `maxOpenConns` | N | Output | The max open connections. Integer greater than 0 | `"10"` | +| `connMaxLifetime` | N | Output | The max connection lifetime. Duration string | `"12s"` | +| `connMaxIdleTime` | N | Output | The max connection idel time. Duration string | `"12s"` | +| `direction` | N | Output | The direction of the binding | `"output"` | ### SSL connection diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/postgresql.md b/daprdocs/content/en/reference/components-reference/supported-bindings/postgresql.md index fdefee5ccbf..31c9f230cff 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/postgresql.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/postgresql.md @@ -23,7 +23,9 @@ spec: version: v1 metadata: - name: url # Required - value: + value: "" + - name: direction + value: "" ``` {{% alert title="Warning" color="warning" %}} @@ -34,7 +36,8 @@ The above example uses secrets as plain strings. It is recommended to use a secr | Field | Required | Binding support | Details | Example | |--------------------|:--------:|------------|-----|---------| -| url | Y | Output | PostgreSQL connection string See [here](#url-format) for more details | `"user=dapr password=secret host=dapr.example.com port=5432 dbname=dapr sslmode=verify-ca"` | +| `url` | Y | Output | PostgreSQL connection string See [here](#url-format) for more details | `"user=dapr password=secret host=dapr.example.com port=5432 dbname=dapr sslmode=verify-ca"` | +| `direction` | N | Output | The direction of the binding | `"output"` | ### URL format diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/postmark.md b/daprdocs/content/en/reference/components-reference/supported-bindings/postmark.md index f14965a9d7b..03edb8db2ab 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/postmark.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/postmark.md @@ -30,6 +30,8 @@ spec: value: "dave@dapr.io" # optional - name: subject value: "Hello!" # optional + - name: direction + value: "output" # optional ``` {{% alert title="Warning" color="warning" %}} 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 >}}). @@ -39,13 +41,14 @@ The above example uses secrets as plain strings. It is recommended to use a secr | Field | Required | Binding support | Details | Example | |--------------------|:--------:|------------|-----|---------| -| accountToken | Y | Output | The Postmark account token, this should be considered a secret value | `"account token"` | -| serverToken | Y | Output | The Postmark server token, this should be considered a secret value | `"server token"` | -| emailFrom | N | Output | If set this specifies the 'from' email address of the email message | `"me@exmaple.com"` | -| emailTo | N | Output | If set this specifies the 'to' email address of the email message | `"me@example.com"` | -| emailCc | N | Output | If set this specifies the 'cc' email address of the email message | `"me@example.com"` | -| emailBcc | N | Output | If set this specifies the 'bcc' email address of the email message | `"me@example.com"` | -| subject | N | Output | If set this specifies the subject of the email message | `"me@example.com"` | +| `accountToken` | Y | Output | The Postmark account token, this should be considered a secret value | `"account token"` | +| `serverToken` | Y | Output | The Postmark server token, this should be considered a secret value | `"server token"` | +| `emailFrom` | N | Output | If set this specifies the 'from' email address of the email message | `"me@exmaple.com"` | +| `emailTo` | N | Output | If set this specifies the 'to' email address of the email message | `"me@example.com"` | +| `emailCc` | N | Output | If set this specifies the 'cc' email address of the email message | `"me@example.com"` | +| `emailBcc` | N | Output | If set this specifies the 'bcc' email address of the email message | `"me@example.com"` | +| `subject` | N | Output | If set this specifies the subject of the email message | `"me@example.com"` | +| `direction` | N | Output | The direction of the binding | `"output"` | You can specify any of the optional metadata properties on the output binding request too (e.g. `emailFrom`, `emailTo`, `subject`, etc.) diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/rabbitmq.md b/daprdocs/content/en/reference/components-reference/supported-bindings/rabbitmq.md index 30b5b10294a..d18d735e711 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/rabbitmq.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/rabbitmq.md @@ -22,33 +22,35 @@ spec: version: v1 metadata: - name: queueName - value: queue1 + value: "queue1" - name: host - value: amqp://[username][:password]@host.domain[:port] + value: "amqp://[username][:password]@host.domain[:port]" - name: durable - value: true + value: "true" - name: deleteWhenUnused - value: false + value: "false" - name: ttlInSeconds - value: 60 + value: "60" - name: prefetchCount - value: 0 + value: "0" - name: exclusive - value: false + value: "false" - name: maxPriority - value: 5 + value: "5" - name: contentType value: "text/plain" - name: reconnectWaitInSeconds - value: 5 + value: "5" - name: externalSasl - value: false + value: "false" - name: caCert - value: null + value: "null" - name: clientCert - value: null + value: "null" - name: clientKey - value: null + value: "null" + - name: direction + value: "input, output" ``` {{% alert title="Warning" color="warning" %}} @@ -61,20 +63,21 @@ The above example uses secrets as plain strings. It is recommended to use a secr | Field | Required | Binding support | Details | Example | |--------------------|:--------:|------------|-----|---------| -| queueName | Y | Input/Output | The RabbitMQ queue name | `"myqueue"` | -| host | Y | Input/Output | The RabbitMQ host address | `"amqp://[username][:password]@host.domain[:port]"` or with TLS: `"amqps://[username][:password]@host.domain[:port]"` | -| durable | N | Output | Tells RabbitMQ to persist message in storage. Defaults to `"false"` | `"true"`, `"false"` | -| deleteWhenUnused | N | Input/Output | Enables or disables auto-delete. Defaults to `"false"` | `"true"`, `"false"` | -| ttlInSeconds | N | Output | Set the [default message time to live at RabbitMQ queue level](https://www.rabbitmq.com/ttl.html). If this parameter is omitted, messages won't expire, continuing to exist on the queue until processed. See [also](#specifying-a-ttl-per-message) | `60` | -| prefetchCount | N | Input | Set the [Channel Prefetch Setting (QoS)](https://www.rabbitmq.com/confirms.html#channel-qos-prefetch). If this parameter is omiited, QoS would set value to 0 as no limit | `0` | -| exclusive | N | Input/Output | Determines whether the topic will be an exclusive topic or not. Defaults to `"false"` | `"true"`, `"false"` | -| maxPriority| N | Input/Output | Parameter to set the [priority queue](https://www.rabbitmq.com/priority.html). If this parameter is omitted, queue will be created as a general queue instead of a priority queue. Value between 1 and 255. See [also](#specifying-a-priority-per-message) | `"1"`, `"10"` | -| contentType | N | Input/Output | The content type of the message. Defaults to "text/plain". | `"text/plain"`, `"application/cloudevent+json"` and so on | -| reconnectWaitInSeconds | N | Input/Output | Represents the duration in seconds that the client should wait before attempting to reconnect to the server after a disconnection occurs. Defaults to `"5"`. | `"5"`, `"10"` | -| externalSasl | N | Input/Output | With TLS, should the username be taken from an additional field (e.g. CN.) See [RabbitMQ Authentication Mechanisms](https://www.rabbitmq.com/access-control.html#mechanisms). Defaults to `"false"`. | `"true"`, `"false"` | -| caCert | N | Input/Output | The CA certificate to use for TLS connection. Defaults to `null`. | `"-----BEGIN CERTIFICATE-----\nMI..."` | -| clientCert | N | Input/Output | The client certificate to use for TLS connection. Defaults to `null`. | `"-----BEGIN CERTIFICATE-----\nMI..."` | -| clientKey | N | Input/Output | The client key to use for TLS connection. Defaults to `null`. | `"-----BEGIN PRIVATE KEY-----\nMI..."` | +| `queueName` | Y | Input/Output | The RabbitMQ queue name | `"myqueue"` | +| `host` | Y | Input/Output | The RabbitMQ host address | `"amqp://[username][:password]@host.domain[:port]"` or with TLS: `"amqps://[username][:password]@host.domain[:port]"` | +| `durable` | N | Output | Tells RabbitMQ to persist message in storage. Defaults to `"false"` | `"true"`, `"false"` | +| `deleteWhenUnused` | N | Input/Output | Enables or disables auto-delete. Defaults to `"false"` | `"true"`, `"false"` | +| `ttlInSeconds` | N | Output | Set the [default message time to live at RabbitMQ queue level](https://www.rabbitmq.com/ttl.html). If this parameter is omitted, messages won't expire, continuing to exist on the queue until processed. See [also](#specifying-a-ttl-per-message) | `60` | +| `prefetchCount` | N | Input | Set the [Channel Prefetch Setting (QoS)](https://www.rabbitmq.com/confirms.html#channel-qos-prefetch). If this parameter is omiited, QoS would set value to 0 as no limit | `0` | +| `exclusive` | N | Input/Output | Determines whether the topic will be an exclusive topic or not. Defaults to `"false"` | `"true"`, `"false"` | +| `maxPriority`| N | Input/Output | Parameter to set the [priority queue](https://www.rabbitmq.com/priority.html). If this parameter is omitted, queue will be created as a general queue instead of a priority queue. Value between 1 and 255. See [also](#specifying-a-priority-per-message) | `"1"`, `"10"` | +| `contentType` | N | Input/Output | The content type of the message. Defaults to "text/plain". | `"text/plain"`, `"application/cloudevent+json"` and so on | +| `reconnectWaitInSeconds` | N | Input/Output | Represents the duration in seconds that the client should wait before attempting to reconnect to the server after a disconnection occurs. Defaults to `"5"`. | `"5"`, `"10"` | +| `externalSasl` | N | Input/Output | With TLS, should the username be taken from an additional field (e.g. CN.) See [RabbitMQ Authentication Mechanisms](https://www.rabbitmq.com/access-control.html#mechanisms). Defaults to `"false"`. | `"true"`, `"false"` | +| `caCert` | N | Input/Output | The CA certificate to use for TLS connection. Defaults to `null`. | `"-----BEGIN CERTIFICATE-----\nMI..."` | +| `clientCert` | N | Input/Output | The client certificate to use for TLS connection. Defaults to `null`. | `"-----BEGIN CERTIFICATE-----\nMI..."` | +| `clientKey` | N | Input/Output | The client key to use for TLS connection. Defaults to `null`. | `"-----BEGIN PRIVATE KEY-----\nMI..."` | +| `direction` | N | Input/Output | The direction of the binding. | `"input"`, `"output"`, `"input, output"` | ## Binding support diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/redis.md b/daprdocs/content/en/reference/components-reference/supported-bindings/redis.md index 7d5fdc8aed6..4b966a75e03 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/redis.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/redis.md @@ -22,11 +22,13 @@ spec: version: v1 metadata: - name: redisHost - value:
:6379 + value: "
:6379" - name: redisPassword - value: ************** + value: "**************" - name: enableTLS - value: + value: "" + - name: direction + value: "output" ``` {{% alert title="Warning" color="warning" %}} @@ -37,29 +39,29 @@ The above example uses secrets as plain strings. It is recommended to use a secr | Field | Required | Binding support | Details | Example | |--------------------|:--------:|------------|-----|---------| -| redisHost | Y | Output | The Redis host address | `"localhost:6379"` | -| redisPassword | Y | Output | The Redis password | `"password"` | -| redisUsername | N | Output | Username for Redis host. Defaults to empty. Make sure your redis server version is 6 or above, and have created acl rule correctly. | `"username"` | -| enableTLS | N | Output | If the Redis instance supports TLS with public certificates it can be configured to enable or disable TLS. Defaults to `"false"` | `"true"`, `"false"` | -| failover | N | Output | Property to enabled failover configuration. Needs sentinalMasterName to be set. Defaults to `"false"` | `"true"`, `"false"` -| sentinelMasterName | N | Output | The sentinel master name. See [Redis Sentinel Documentation](https://redis.io/docs/reference/sentinel-clients/) | `""`, `"127.0.0.1:6379"` -| redeliverInterval | N | Output | The interval between checking for pending messages to redelivery. Defaults to `"60s"`. `"0"` disables redelivery. | `"30s"` -| processingTimeout | N | Output | The amount time a message must be pending before attempting to redeliver it. Defaults to `"15s"`. `"0"` disables redelivery. | `"30s"` -| redisType | N | Output | 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"` -| redisDB | N | Output | Database selected after connecting to redis. If `"redisType"` is `"cluster"` this option is ignored. Defaults to `"0"`. | `"0"` -| redisMaxRetries | N | Output | Maximum number of times to retry commands before giving up. Default is to not retry failed commands. | `"5"` -| redisMinRetryInterval | N | Output | Minimum backoff for redis commands between each retry. Default is `"8ms"`; `"-1"` disables backoff. | `"8ms"` -| redisMaxRetryInterval | N | Output | Maximum backoff for redis commands between each retry. Default is `"512ms"`;`"-1"` disables backoff. | `"5s"` -| dialTimeout | N | Output | Dial timeout for establishing new connections. Defaults to `"5s"`. | `"5s"` -| readTimeout | N | Output | Timeout for socket reads. If reached, redis commands will fail with a timeout instead of blocking. Defaults to `"3s"`, `"-1"` for no timeout. | `"3s"` -| writeTimeout | N | Output | Timeout for socket writes. If reached, redis commands will fail with a timeout instead of blocking. Defaults is readTimeout. | `"3s"` -| poolSize | N | Output | Maximum number of socket connections. Default is 10 connections per every CPU as reported by runtime.NumCPU. | `"20"` -| poolTimeout | N | Output | Amount of time client waits for a connection if all connections are busy before returning an error. Default is readTimeout + 1 second. | `"5s"` -| maxConnAge | N | Output | Connection age at which the client retires (closes) the connection. Default is to not close aged connections. | `"30m"` -| minIdleConns | N | Output | Minimum number of idle connections to keep open in order to avoid the performance degradation associated with creating new connections. Defaults to `"0"`. | `"2"` -| idleCheckFrequency | N | Output | Frequency of idle checks made by idle connections reaper. Default is `"1m"`. `"-1"` disables idle connections reaper. | `"-1"` -| idleTimeout | N | Output | Amount of time after which the client closes idle connections. Should be less than server's timeout. Default is `"5m"`. `"-1"` disables idle timeout check. | `"10m"` - +| `redisHost` | Y | Output | The Redis host address | `"localhost:6379"` | +| `redisPassword` | Y | Output | The Redis password | `"password"` | +| `redisUsername` | N | Output | Username for Redis host. Defaults to empty. Make sure your redis server version is 6 or above, and have created acl rule correctly. | `"username"` | +| `enableTLS` | N | Output | If the Redis instance supports TLS with public certificates it can be configured to enable or disable TLS. Defaults to `"false"` | `"true"`, `"false"` | +| `failover` | N | Output | Property to enabled failover configuration. Needs sentinalMasterName to be set. Defaults to `"false"` | `"true"`, `"false"` +| `sentinelMasterName` | N | Output | The sentinel master name. See [Redis Sentinel Documentation](https://redis.io/docs/reference/sentinel-clients/) | `""`, `"127.0.0.1:6379"` +| `redeliverInterval` | N | Output | The interval between checking for pending messages to redelivery. Defaults to `"60s"`. `"0"` disables redelivery. | `"30s"` +| `processingTimeout` | N | Output | The amount time a message must be pending before attempting to redeliver it. Defaults to `"15s"`. `"0"` disables redelivery. | `"30s"` +| `redisType` | N | Output | 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"` +| `redisDB` | N | Output | Database selected after connecting to redis. If `"redisType"` is `"cluster"` this option is ignored. Defaults to `"0"`. | `"0"` +| `redisMaxRetries` | N | Output | Maximum number of times to retry commands before giving up. Default is to not retry failed commands. | `"5"` +| `redisMinRetryInterval` | N | Output | Minimum backoff for redis commands between each retry. Default is `"8ms"`; `"-1"` disables backoff. | `"8ms"` +| `redisMaxRetryInterval` | N | Output | Maximum backoff for redis commands between each retry. Default is `"512ms"`;`"-1"` disables backoff. | `"5s"` +| `dialTimeout` | N | Output | Dial timeout for establishing new connections. Defaults to `"5s"`. | `"5s"` +| `readTimeout` | N | Output | Timeout for socket reads. If reached, redis commands will fail with a timeout instead of blocking. Defaults to `"3s"`, `"-1"` for no timeout. | `"3s"` +| `writeTimeout` | N | Output | Timeout for socket writes. If reached, redis commands will fail with a timeout instead of blocking. Defaults is readTimeout. | `"3s"` +| `poolSize` | N | Output | Maximum number of socket connections. Default is 10 connections per every CPU as reported by runtime.NumCPU. | `"20"` +| `poolTimeout` | N | Output | Amount of time client waits for a connection if all connections are busy before returning an error. Default is readTimeout + 1 second. | `"5s"` +| `maxConnAge` | N | Output | Connection age at which the client retires (closes) the connection. Default is to not close aged connections. | `"30m"` +| `minIdleConns` | N | Output | Minimum number of idle connections to keep open in order to avoid the performance degradation associated with creating new connections. Defaults to `"0"`. | `"2"` +| `idleCheckFrequency` | N | Output | Frequency of idle checks made by idle connections reaper. Default is `"1m"`. `"-1"` disables idle connections reaper. | `"-1"` +| `idleTimeout` | N | Output | Amount of time after which the client closes idle connections. Should be less than server's timeout. Default is `"5m"`. `"-1"` disables idle timeout check. | `"10m"` +| `direction` | N | Output | Direction of the binding. | `"output"` ## Binding support diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/rethinkdb.md b/daprdocs/content/en/reference/components-reference/supported-bindings/rethinkdb.md index dab91979466..e159a7bb774 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/rethinkdb.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/rethinkdb.md @@ -15,7 +15,6 @@ To enable users to track change of the state of actors, this binding leverages R To setup RethinkDB statechange binding create a component of type `bindings.rethinkdb.statechange`. See [this guide]({{< ref "howto-bindings.md#1-create-a-binding" >}}) on how to create and apply a binding configuration. - ```yaml apiVersion: dapr.io/v1alpha1 kind: Component @@ -26,17 +25,20 @@ spec: version: v1 metadata: - name: address - value: # Required, e.g. 127.0.0.1:28015 or rethinkdb.default.svc.cluster.local:28015). + value: "" # Required, e.g. 127.0.0.1:28015 or rethinkdb.default.svc.cluster.local:28015). - name: database - value: # Required, e.g. dapr (alpha-numerics only) + value: "" # Required, e.g. dapr (alpha-numerics only) + - name: direction + value: "" ``` ## Spec metadata fields | Field | Required | Binding support | Details | Example | |--------------------|:--------:|------------|-----|---------| -| address | Y | Input | Address of RethinkDB server | `"27.0.0.1:28015"`, `"rethinkdb.default.svc.cluster.local:28015"` | -| database | Y | Input | RethinDB database name | `"dapr"` | +| `address` | Y | Input | Address of RethinkDB server | `"27.0.0.1:28015"`, `"rethinkdb.default.svc.cluster.local:28015"` | +| `database` | Y | Input | RethinDB database name | `"dapr"` | +| `direction` | N | Input | Direction of the binding | `"input"` | ## Binding support diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/s3.md b/daprdocs/content/en/reference/components-reference/supported-bindings/s3.md index 4d50e3447d6..1c01459c3ba 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/s3.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/s3.md @@ -23,27 +23,29 @@ spec: version: v1 metadata: - name: bucket - value: mybucket + value: "mybucket" - name: region - value: us-west-2 + value: "us-west-2" - name: endpoint - value: s3.us-west-2.amazonaws.com + value: "s3.us-west-2.amazonaws.com" - name: accessKey - value: ***************** + value: "*****************" - name: secretKey - value: ***************** + value: "*****************" - name: sessionToken - value: mysession + value: "mysession" - name: decodeBase64 - value: + value: "" - name: encodeBase64 - value: + value: "" - name: forcePathStyle - value: + value: "" - name: disableSSL - value: + value: "" - name: insecureSSL - value: + value: "" + - name: direction + value: "output" ``` {{% alert title="Warning" color="warning" %}} @@ -54,17 +56,18 @@ The above example uses secrets as plain strings. It is recommended to use a secr | Field | Required | Binding support | Details | Example | |--------------------|:--------:|------------|-----|---------| -| bucket | Y | Output | The name of the S3 bucket to write to | `"bucket"` | -| region | Y | Output | The specific AWS region | `"us-east-1"` | -| endpoint | N | Output | The specific AWS endpoint | `"s3.us-east-1.amazonaws.com"` | -| accessKey | Y | Output | The AWS Access Key to access this resource | `"key"` | -| secretKey | Y | Output | The AWS Secret Access Key to access this resource | `"secretAccessKey"` | -| sessionToken | N | Output | The AWS session token to use | `"sessionToken"` | -| forcePathStyle | N | Output | Currently Amazon S3 SDK supports virtual hosted-style and path-style access. `true` is path-style format like `https:////`. `false` is hosted-style format like `https://./`. Defaults to `false` | `true`, `false` | -| decodeBase64 | N | Output | Configuration to decode base64 file content before saving to bucket storage. (In case of saving a file with binary content). `true` is the only allowed positive value. Other positive variations like `"True", "1"` are not acceptable. Defaults to `false` | `true`, `false` | -| encodeBase64 | N | Output | Configuration to encode base64 file content before return the content. (In case of opening a file with binary content). `true` is the only allowed positive value. Other positive variations like `"True", "1"` are not acceptable. Defaults to `false` | `true`, `false` | -| disableSSL | N | Output | Allows to connect to non `https://` endpoints. Defaults to `false` | `true`, `false` | -| insecureSSL | N | Output | When connecting to `https://` endpoints, accepts invalid or self-signed certificates. Defaults to `false` | `true`, `false` | +| `bucket` | Y | Output | The name of the S3 bucket to write to | `"bucket"` | +| `region` | Y | Output | The specific AWS region | `"us-east-1"` | +| `endpoint` | N | Output | The specific AWS endpoint | `"s3.us-east-1.amazonaws.com"` | +| `accessKey` | Y | Output | The AWS Access Key to access this resource | `"key"` | +| `secretKey` | Y | Output | The AWS Secret Access Key to access this resource | `"secretAccessKey"` | +| `sessionToken` | N | Output | The AWS session token to use | `"sessionToken"` | +| `forcePathStyle` | N | Output | Currently Amazon S3 SDK supports virtual hosted-style and path-style access. `"true"` is path-style format like `"https:////"`. `"false"` is hosted-style format like `"https://./"`. Defaults to `"false"` | `"true"`, `"false"` | +| `decodeBase64` | N | Output | Configuration to decode base64 file content before saving to bucket storage. (In case of saving a file with binary content). `"true"` is the only allowed positive value. Other positive variations like `"True", "1"` are not acceptable. Defaults to `false` | `"true"`, `"false"` | +| `encodeBase64` | N | Output | Configuration to encode base64 file content before return the content. (In case of opening a file with binary content). `"true"` is the only allowed positive value. Other positive variations like `"True", "1"` are not acceptable. Defaults to `"false"` | `"true"`, `"false"` | +| `disableSSL` | N | Output | Allows to connect to non `https://` endpoints. Defaults to `"false"` | `"true"`, `"false"` | +| `insecureSSL` | N | Output | When connecting to `https://` endpoints, accepts invalid or self-signed certificates. Defaults to `"false"` | `"true"`, `"false"` | +| `direction` | N | Output | The direction of the binding | `"output"` | {{% alert title="Important" color="warning" %}} When running the Dapr sidecar (daprd) with your application on EKS (AWS Kubernetes), if you're using a node/pod that has already been attached to an IAM policy defining access to AWS resources, you **must not** provide AWS access-key, secret-key, and tokens in the definition of the component spec you're using. diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/sendgrid.md b/daprdocs/content/en/reference/components-reference/supported-bindings/sendgrid.md index a2eb4961f73..64014018725 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/sendgrid.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/sendgrid.md @@ -41,6 +41,8 @@ spec: value: '{"customer":{"name":"John Smith"}}' # optional - name: apiKey value: "YOUR_API_KEY" # required, this is your SendGrid key + - name: direction + value: "output" ``` {{% alert title="Warning" color="warning" %}} @@ -51,16 +53,15 @@ The above example uses secrets as plain strings. It is recommended to use a secr | Field | Required | Binding support | Details | Example | |--------------------|:--------:|------------|-----|---------| -| apiKey | Y | Output | SendGrid API key, this should be considered a secret value | `"apikey"` | -| emailFrom | N | Output | If set this specifies the 'from' email address of the email message. Only a single email address is allowed. Optional field, see [below](#example-request-payload) | `"me@example.com"` | -| emailFromName | N | Output | If set this specifies the 'from' name of the email message. Optional field, see [below](#example-request-payload) | `"me"` | -| emailTo | N | Output | If set this specifies the 'to' email address of the email message. Only a single email address is allowed. Optional field, see [below](#example-request-payload) | `"me@example.com"` | -| emailToName | N | Output | If set this specifies the 'to' name of the email message. Optional field, see [below](#example-request-payload) | `"me"` | -| emailCc | N | Output | If set this specifies the 'cc' email address of the email message. Only a single email address is allowed. Optional field, see [below](#example-request-payload) | `"me@example.com"` | -| emailBcc | N | Output | If set this specifies the 'bcc' email address of the email message. Only a single email address is allowed. Optional field, see [below](#example-request-payload) | `"me@example.com"` | -| subject | N | Output | If set this specifies the subject of the email message. Optional field, see [below](#example-request-payload) | `"subject of the email"` | -| dynamicTemplateId | N | Output | If set this specifies the dynamic template id. Optional field, see [below](#example-request-payload) | `"d-123456789"` | -| dynamicTemplateData | N | Output | If set this specifies the dynamic template data. Optional field, see [below](#example-request-payload) | `'{"customer":{"name":"John Smith"}}'` | +| `apiKey` | Y | Output | SendGrid API key, this should be considered a secret value | `"apikey"` | +| `emailFrom` | N | Output | If set this specifies the 'from' email address of the email message. Only a single email address is allowed. Optional field, see [below](#example-request-payload) | `"me@example.com"` | +| `emailFromName` | N | Output | If set this specifies the 'from' name of the email message. Optional field, see [below](#example-request-payload) | `"me"` | +| `emailTo` | N | Output | If set this specifies the 'to' email address of the email message. Only a single email address is allowed. Optional field, see [below](#example-request-payload) | `"me@example.com"` | +| `emailToName` | N | Output | If set this specifies the 'to' name of the email message. Optional field, see [below](#example-request-payload) | `"me"` | +| `emailCc` | N | Output | If set this specifies the 'cc' email address of the email message. Only a single email address is allowed. Optional field, see [below](#example-request-payload) | `"me@example.com"` | +| `emailBcc` | N | Output | If set this specifies the 'bcc' email address of the email message. Only a single email address is allowed. Optional field, see [below](#example-request-payload) | `"me@example.com"` | +| `subject` | N | Output | If set this specifies the subject of the email message. Optional field, see [below](#example-request-payload) | `"subject of the email"` | +| `direction` | N | Output | The direction of the binding | `"output"` | ## Binding support diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/servicebusqueues.md b/daprdocs/content/en/reference/components-reference/supported-bindings/servicebusqueues.md index 082b4403be2..1f8ffe68b7b 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/servicebusqueues.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/servicebusqueues.md @@ -25,37 +25,39 @@ spec: - name: connectionString # Required when not using Azure Authentication. value: "Endpoint=sb://{ServiceBusNamespace}.servicebus.windows.net/;SharedAccessKeyName={PolicyName};SharedAccessKey={Key};EntityPath={ServiceBus}" - name: queueName - value: queue1 + value: "queue1" # - name: timeoutInSec # Optional - # value: 60 + # value: "60" # - name: handlerTimeoutInSec # Optional - # value: 60 + # value: "60" # - name: disableEntityManagement # Optional # value: "false" # - name: maxDeliveryCount # Optional - # value: 3 + # value: "3" # - name: lockDurationInSec # Optional - # value: 60 + # value: "60" # - name: lockRenewalInSec # Optional - # value: 20 + # value: "20" # - name: maxActiveMessages # Optional - # value: 10000 + # value: "10000" # - name: maxConcurrentHandlers # Optional - # value: 10 + # value: "10" # - name: defaultMessageTimeToLiveInSec # Optional - # value: 10 + # value: "10" # - name: autoDeleteOnIdleInSec # Optional - # value: 3600 + # value: "3600" # - name: minConnectionRecoveryInSec # Optional - # value: 2 + # value: "2" # - name: maxConnectionRecoveryInSec # Optional - # value: 300 + # value: "300" # - name: maxRetriableErrorsPerSec # Optional - # value: 10 + # value: "10" # - name: publishMaxRetries # Optional - # value: 5 + # value: "5" # - name: publishInitialRetryIntervalInMs # Optional - # value: 500 + # value: "500" + # - name: direction + # value: "input, output" ``` {{% alert title="Warning" color="warning" %}} 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 >}}). @@ -67,25 +69,26 @@ The above example uses secrets as plain strings. It is recommended to use a secr |--------------------|:--------:|-----------------|----------|---------| | `connectionString` | Y | Input/Output | The Service Bus connection string. Required unless using Azure AD authentication. | `"Endpoint=sb://************"` | | `queueName` | Y | Input/Output | The Service Bus queue name. Queue names are case-insensitive and will always be forced to lowercase. | `"queuename"` | -| `timeoutInSec` | N | Input/Output | Timeout for all invocations to the Azure Service Bus endpoint, in seconds. *Note that this option impacts network calls and it's unrelated to the TTL applies to messages*. Default: `60` | `60` | +| `timeoutInSec` | N | Input/Output | Timeout for all invocations to the Azure Service Bus endpoint, in seconds. *Note that this option impacts network calls and it's unrelated to the TTL applies to messages*. Default: `"60"` | `"60"` | | `namespaceName`| N | Input/Output | Parameter to set the address of the Service Bus namespace, as a fully-qualified domain name. Required if using Azure AD authentication. | `"namespace.servicebus.windows.net"` | | `disableEntityManagement` | N | Input/Output | When set to true, queues and subscriptions do not get created automatically. Default: `"false"` | `"true"`, `"false"` -| `lockDurationInSec` | N | Input/Output | Defines the length in seconds that a message will be locked for before expiring. Used during subscription creation only. Default set by server. | `30` -| `autoDeleteOnIdleInSec` | N | Input/Output | Time in seconds to wait before auto deleting idle subscriptions. Used during subscription creation only. Default: `0` (disabled) | `3600` -| `defaultMessageTimeToLiveInSec` | N | Input/Output | Default message time to live, in seconds. Used during subscription creation only. | `10` -| `maxDeliveryCount` | N | Input/Output | Defines the number of attempts the server will make to deliver a message. Used during subscription creation only. Default set by server. | `10` -| `minConnectionRecoveryInSec` | N | Input/Output | Minimum interval (in seconds) to wait before attempting to reconnect to Azure Service Bus in case of a connection failure. Default: `2` | `5` -| `maxConnectionRecoveryInSec` | N | Input/Output | Maximum interval (in seconds) to wait before attempting to reconnect to Azure Service Bus in case of a connection failure. After each attempt, the component waits a random number of seconds, increasing every time, between the minimum and the maximum. Default: `300` (5 minutes) | `600` -| `maxActiveMessages` | N | Defines the maximum number of messages to be processing or in the buffer at once. This should be at least as big as the maximum concurrent handlers. Default: `1` | `1` -| `handlerTimeoutInSec`| N | Input | Timeout for invoking the app's handler. Default: `0` (no timeout) | `30` -| `minConnectionRecoveryInSec` | N | Input | Minimum interval (in seconds) to wait before attempting to reconnect to Azure Service Bus in case of a connection failure. Default: `2` | `5` | -| `maxConnectionRecoveryInSec` | N | Input | Maximum interval (in seconds) to wait before attempting to reconnect to Azure Service Bus in case of a connection failure. After each attempt, the binding waits a random number of seconds, increasing every time, between the minimum and the maximum. Default: `300` (5 minutes) | `600` | -| `lockRenewalInSec` | N | Input | Defines the frequency at which buffered message locks will be renewed. Default: `20`. | `20` -| `maxActiveMessages` | N | Input | Defines the maximum number of messages to be processing or in the buffer at once. This should be at least as big as the maximum concurrent handlers. Default: `1` | `2000` -| `maxConcurrentHandlers` | N | Input | Defines the maximum number of concurrent message handlers; set to `0` for unlimited. Default: `1` | `10` -| `maxRetriableErrorsPerSec` | N | Input | Maximum number of retriable errors that are processed per second. If a message fails to be processed with a retriable error, the component adds a delay before it starts processing another message, to avoid immediately re-processing messages that have failed. Default: `10` | `10` -| `publishMaxRetries` | N | Output | The max number of retries for when Azure Service Bus responds with "too busy" in order to throttle messages. Defaults: `5` | `5` -| `publishInitialRetryIntervalInMs` | N | Output | Time in milliseconds for the initial exponential backoff when Azure Service Bus throttle messages. Defaults: `500` | `500` +| `lockDurationInSec` | N | Input/Output | Defines the length in seconds that a message will be locked for before expiring. Used during subscription creation only. Default set by server. | `"30"` +| `autoDeleteOnIdleInSec` | N | Input/Output | Time in seconds to wait before auto deleting idle subscriptions. Used during subscription creation only. Default: `"0"` (disabled) | `"3600"` +| `defaultMessageTimeToLiveInSec` | N | Input/Output | Default message time to live, in seconds. Used during subscription creation only. | `"10"` +| `maxDeliveryCount` | N | Input/Output | Defines the number of attempts the server will make to deliver a message. Used during subscription creation only. Default set by server. | `"10"` +| `minConnectionRecoveryInSec` | N | Input/Output | Minimum interval (in seconds) to wait before attempting to reconnect to Azure Service Bus in case of a connection failure. Default: `"2"` | `"5"` +| `maxConnectionRecoveryInSec` | N | Input/Output | Maximum interval (in seconds) to wait before attempting to reconnect to Azure Service Bus in case of a connection failure. After each attempt, the component waits a random number of seconds, increasing every time, between the minimum and the maximum. Default: `"300"` (5 minutes) | `"600"` +| `maxActiveMessages` | N | Defines the maximum number of messages to be processing or in the buffer at once. This should be at least as big as the maximum concurrent handlers. Default: `"1"` | `"1"` +| `handlerTimeoutInSec`| N | Input | Timeout for invoking the app's handler. Default: `"0"` (no timeout) | `"30"` +| `minConnectionRecoveryInSec` | N | Input | Minimum interval (in seconds) to wait before attempting to reconnect to Azure Service Bus in case of a connection failure. Default: `"2"` | `"5"` | +| `maxConnectionRecoveryInSec` | N | Input | Maximum interval (in seconds) to wait before attempting to reconnect to Azure Service Bus in case of a connection failure. After each attempt, the binding waits a random number of seconds, increasing every time, between the minimum and the maximum. Default: `"300"` (5 minutes) | `"600"` | +| `lockRenewalInSec` | N | Input | Defines the frequency at which buffered message locks will be renewed. Default: `"20"`. | `"20"` +| `maxActiveMessages` | N | Input | Defines the maximum number of messages to be processing or in the buffer at once. This should be at least as big as the maximum concurrent handlers. Default: `"1"` | `"2000"` +| `maxConcurrentHandlers` | N | Input | Defines the maximum number of concurrent message handlers; set to `0` for unlimited. Default: `"1"` | `"10"` +| `maxRetriableErrorsPerSec` | N | Input | Maximum number of retriable errors that are processed per second. If a message fails to be processed with a retriable error, the component adds a delay before it starts processing another message, to avoid immediately re-processing messages that have failed. Default: `"10"` | `"10"` +| `publishMaxRetries` | N | Output | The max number of retries for when Azure Service Bus responds with "too busy" in order to throttle messages. Defaults: `"5"` | `"5"` +| `publishInitialRetryIntervalInMs` | N | Output | Time in milliseconds for the initial exponential backoff when Azure Service Bus throttle messages. Defaults: `"500"` | `"500"` +| `direction` | N | Input/Output | The direction of the binding | `"input"`, `"output"`, `"input, output"` ### Azure Active Directory (AAD) authentication diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/ses.md b/daprdocs/content/en/reference/components-reference/supported-bindings/ses.md index 23451191118..7f63892fb41 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/ses.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/ses.md @@ -40,6 +40,8 @@ spec: value: "bcc@example.com" - name: subject value: "subject" + - name: direction + value: "output" ``` {{% alert title="Warning" color="warning" %}} @@ -50,15 +52,16 @@ The above example uses secrets as plain strings. It is recommended to use a secr | Field | Required | Binding support | Details | Example | |--------------------|:--------:|------------|-----|---------| -| region | N | Output | The specific AWS region | `"eu-west-1"` | -| accessKey | N | Output | The AWS Access Key to access this resource | `"key"` | -| secretKey | N | Output | The AWS Secret Access Key to access this resource | `"secretAccessKey"` | -| sessionToken | N | Output | The AWS session token to use | `"sessionToken"` | -| emailFrom | N | Output | If set, this specifies the email address of the sender. See [also](#example-request) | `"me@example.com"` | -| emailTo | N | Output | If set, this specifies the email address of the receiver. See [also](#example-request) | `"me@example.com"` | -| emailCc | N | Output | If set, this specifies the email address to CC in. See [also](#example-request) | `"me@example.com"` | -| emailBcc | N | Output | If set, this specifies email address to BCC in. See [also](#example-request) | `"me@example.com"` | -| subject | N | Output | If set, this specifies the subject of the email message. See [also](#example-request) | `"subject of mail"` | +| `region` | N | Output | The specific AWS region | `"eu-west-1"` | +| `accessKey` | N | Output | The AWS Access Key to access this resource | `"key"` | +| `secretKey` | N | Output | The AWS Secret Access Key to access this resource | `"secretAccessKey"` | +| `sessionToken` | N | Output | The AWS session token to use | `"sessionToken"` | +| `emailFrom` | N | Output | If set, this specifies the email address of the sender. See [also](#example-request) | `"me@example.com"` | +| `emailTo` | N | Output | If set, this specifies the email address of the receiver. See [also](#example-request) | `"me@example.com"` | +| `emailCc` | N | Output | If set, this specifies the email address to CC in. See [also](#example-request) | `"me@example.com"` | +| `emailBcc` | N | Output | If set, this specifies email address to BCC in. See [also](#example-request) | `"me@example.com"` | +| `subject` | N | Output | If set, this specifies the subject of the email message. See [also](#example-request) | `"subject of mail"` | +| `direction` | N | Output | The direction of the binding | `"output"` | {{% alert title="Important" color="warning" %}} When running the Dapr sidecar (daprd) with your application on EKS (AWS Kubernetes), if you're using a node/pod that has already been attached to an IAM policy defining access to AWS resources, you **must not** provide AWS access-key, secret-key, and tokens in the definition of the component spec you're using. diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/signalr.md b/daprdocs/content/en/reference/components-reference/supported-bindings/signalr.md index b40dcffd776..2da23916d5d 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/signalr.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/signalr.md @@ -22,9 +22,11 @@ spec: version: v1 metadata: - name: connectionString - value: Endpoint=https://.service.signalr.net;AccessKey=;Version=1.0; + value: "Endpoint=https://.service.signalr.net;AccessKey=;Version=1.0;" - name: hub # Optional - value: + value: "" + - name: direction + value: "" ``` {{% alert title="Warning" color="warning" %}} @@ -37,8 +39,9 @@ The above example uses secrets as plain strings. It is recommended to use a secr |--------------------|:--------:|------------|-----|---------| | `connectionString` | Y | Output | The Azure SignalR connection string | `"Endpoint=https://.service.signalr.net;AccessKey=;Version=1.0;"` | | `hub` | N | Output | Defines the hub in which the message will be send. The hub can be dynamically defined as a metadata value when publishing to an output binding (key is "hub") | `"myhub"` | -| `endpoint` | N | Output | Endpoint of Azure SignalR; required if not included in the `connectionString` or if using Azure AD | `https://.service.signalr.net` -| `accessKey` | N | Output | Access key | `your-access-key` +| `endpoint` | N | Output | Endpoint of Azure SignalR; required if not included in the `connectionString` or if using Azure AD | `"https://.service.signalr.net"` +| `accessKey` | N | Output | Access key | `"your-access-key"` +| `direction` | N | Output | The direction of the binding | `"output"` ### Azure Active Directory (Azure AD) authentication diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/smtp.md b/daprdocs/content/en/reference/components-reference/supported-bindings/smtp.md index c277dec0a10..67af19ba455 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/smtp.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/smtp.md @@ -43,6 +43,8 @@ spec: value: "subject" - name: priority value: "[value 1-5]" + - name: direction + value: "output" ``` {{% alert title="Warning" color="warning" %}} @@ -53,17 +55,18 @@ The example configuration shown above, contain a username and password as plain- | Field | Required | Binding support | Details | Example | |--------------------|:--------:|------------|-----|---------| -| host | Y | Output | The host where your SMTP server runs | `"smtphost"` | -| port | Y | Output | The port your SMTP server listens on | `"9999"` | -| user | Y | Output | The user to authenticate against the SMTP server | `"user"` | -| password | Y | Output | The password of the user | `"password"` | -| skipTLSVerify | N | Output | If set to true, the SMPT server's TLS certificate will not be verified. Defaults to `"false"` | `"true"`, `"false"` | -| emailFrom | N | Output | If set, this specifies the email address of the sender. See [also](#example-request) | `"me@example.com"` | -| emailTo | N | Output | If set, this specifies the email address of the receiver. See [also](#example-request) | `"me@example.com"` | -| emailCc | N | Output | If set, this specifies the email address to CC in. See [also](#example-request) | `"me@example.com"` | -| emailBcc | N | Output | If set, this specifies email address to BCC in. See [also](#example-request) | `"me@example.com"` | -| subject | N | Output | If set, this specifies the subject of the email message. See [also](#example-request) | `"subject of mail"` | -| priority | N | Output | If set, this specifies the priority (X-Priority) of the email message, from 1 (lowest) to 5 (highest) (default value: 3). See [also](#example-request) | `"1"` | +| `host` | Y | Output | The host where your SMTP server runs | `"smtphost"` | +| `port` | Y | Output | The port your SMTP server listens on | `"9999"` | +| `user` | Y | Output | The user to authenticate against the SMTP server | `"user"` | +| `password` | Y | Output | The password of the user | `"password"` | +| `skipTLSVerify` | N | Output | If set to true, the SMPT server's TLS certificate will not be verified. Defaults to `"false"` | `"true"`, `"false"` | +| `emailFrom` | N | Output | If set, this specifies the email address of the sender. See [also](#example-request) | `"me@example.com"` | +| `emailTo` | N | Output | If set, this specifies the email address of the receiver. See [also](#example-request) | `"me@example.com"` | +| `emailCc` | N | Output | If set, this specifies the email address to CC in. See [also](#example-request) | `"me@example.com"` | +| `emailBcc` | N | Output | If set, this specifies email address to BCC in. See [also](#example-request) | `"me@example.com"` | +| `subject` | N | Output | If set, this specifies the subject of the email message. See [also](#example-request) | `"subject of mail"` | +| `priority` | N | Output | If set, this specifies the priority (X-Priority) of the email message, from 1 (lowest) to 5 (highest) (default value: 3). See [also](#example-request) | `"1"` | +| `direction` | N | Output | The direction of the binding | `"output"` | ## Binding support diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/sns.md b/daprdocs/content/en/reference/components-reference/supported-bindings/sns.md index 6728fc9eeb5..dd6d704fbd2 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/sns.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/sns.md @@ -23,16 +23,17 @@ spec: version: v1 metadata: - name: topicArn - value: mytopic + value: "mytopic" - name: region - value: us-west-2 + value: "us-west-2" - name: accessKey - value: ***************** + value: "*****************" - name: secretKey - value: ***************** + value: "*****************" - name: sessionToken - value: ***************** - + value: "*****************" + - name: direction + value: "output" ``` {{% alert title="Warning" color="warning" %}} @@ -43,11 +44,12 @@ The above example uses secrets as plain strings. It is recommended to use a secr | Field | Required | Binding support | Details | Example | |--------------------|:--------:|------------|-----|---------| -| topicArn | Y | Output | The SNS topic name | `"arn:::topicarn"` | -| region | Y | Output | The specific AWS region | `"us-east-1"` | -| accessKey | Y | Output | The AWS Access Key to access this resource | `"key"` | -| secretKey | Y | Output | The AWS Secret Access Key to access this resource | `"secretAccessKey"` | -| sessionToken | N | Output | The AWS session token to use | `"sessionToken"` | +| `topicArn` | Y | Output | The SNS topic name | `"arn:::topicarn"` | +| `region` | Y | Output | The specific AWS region | `"us-east-1"` | +| `accessKey` | Y | Output | The AWS Access Key to access this resource | `"key"` | +| `secretKey` | Y | Output | The AWS Secret Access Key to access this resource | `"secretAccessKey"` | +| `sessionToken` | N | Output | The AWS session token to use | `"sessionToken"` | +| `direction` | N | Output | The direction of the binding | `"output"` | {{% alert title="Important" color="warning" %}} When running the Dapr sidecar (daprd) with your application on EKS (AWS Kubernetes), if you're using a node/pod that has already been attached to an IAM policy defining access to AWS resources, you **must not** provide AWS access-key, secret-key, and tokens in the definition of the component spec you're using. diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/sqs.md b/daprdocs/content/en/reference/components-reference/supported-bindings/sqs.md index aeef412d774..35e67106326 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/sqs.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/sqs.md @@ -23,16 +23,17 @@ spec: version: v1 metadata: - name: queueName - value: items + value: "items" - name: region - value: us-west-2 + value: "us-west-2" - name: accessKey - value: ***************** + value: "*****************" - name: secretKey - value: ***************** + value: "*****************" - name: sessionToken - value: ***************** - + value: "*****************" + - name: direction + value: "input, output" ``` {{% alert title="Warning" color="warning" %}} @@ -43,11 +44,12 @@ The above example uses secrets as plain strings. It is recommended to use a secr | Field | Required | Binding support | Details | Example | |--------------------|:--------:|------------|-----|---------| -| queueName | Y | Input/Output | The SQS queue name | `"myqueue"` | -| region | Y | Input/Output | The specific AWS region | `"us-east-1"` | -| accessKey | Y | Input/Output | The AWS Access Key to access this resource | `"key"` | -| secretKey | Y | Input/Output | The AWS Secret Access Key to access this resource | `"secretAccessKey"` | -| sessionToken | N | Input/Output | The AWS session token to use | `"sessionToken"` | +| `queueName` | Y | Input/Output | The SQS queue name | `"myqueue"` | +| `region` | Y | Input/Output | The specific AWS region | `"us-east-1"` | +| `accessKey` | Y | Input/Output | The AWS Access Key to access this resource | `"key"` | +| `secretKey` | Y | Input/Output | The AWS Secret Access Key to access this resource | `"secretAccessKey"` | +| `sessionToken` | N | Input/Output | The AWS session token to use | `"sessionToken"` | +| `direction` | N | Input/Output | The direction of the binding | `"input"`, `"output"`, `"input, output"` | {{% alert title="Important" color="warning" %}} When running the Dapr sidecar (daprd) with your application on EKS (AWS Kubernetes), if you're using a node/pod that has already been attached to an IAM policy defining access to AWS resources, you **must not** provide AWS access-key, secret-key, and tokens in the definition of the component spec you're using. diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/storagequeues.md b/daprdocs/content/en/reference/components-reference/supported-bindings/storagequeues.md index 41fe68c0447..e29e29932b7 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/storagequeues.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/storagequeues.md @@ -39,6 +39,8 @@ spec: # value: "http://127.0.0.1:10001" # - name: visibilityTimeout # value: "30s" +# - name: direction +# value: "input, output" ``` {{% alert title="Warning" color="warning" %}} @@ -57,7 +59,8 @@ The above example uses secrets as plain strings. It is recommended to use a secr | `decodeBase64` | N | Input | Configuration to decode base64 content received from the Storage Queue into a string. Defaults to `false` | `true`, `false` | | `encodeBase64` | N | Output | If enabled base64 encodes the data payload before uploading to Azure storage queues. Default `false`. | `true`, `false` | | `endpoint` | N | Input/Output | 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:10001"` or `"https://accountName.queue.example.com"` | -| `visibilityTimeout` | N | Input | Allows setting a custom queue visibility timeout to avoid immediate retrying of recently failed messages. Defaults to 30 seconds. | "100s" | +| `visibilityTimeout` | N | Input | Allows setting a custom queue visibility timeout to avoid immediate retrying of recently failed messages. Defaults to 30 seconds. | `"100s"` | +| `direction` | N | Input/Output | Direction of the binding. | `"input"`, `"output"`, `"input, output"` | ### Azure Active Directory (Azure AD) authentication diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/twilio.md b/daprdocs/content/en/reference/components-reference/supported-bindings/twilio.md index 1a6917d48d2..de30015c945 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/twilio.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/twilio.md @@ -23,13 +23,15 @@ spec: version: v1 metadata: - name: toNumber # required. - value: 111-111-1111 + value: "111-111-1111" - name: fromNumber # required. - value: 222-222-2222 + value: "222-222-2222" - name: accountSid # required. - value: ***************** + value: "*****************" - name: authToken # required. - value: ***************** + value: "*****************" + - name: direction + value: "output" ``` {{% alert title="Warning" color="warning" %}} 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 >}}). @@ -39,10 +41,11 @@ The above example uses secrets as plain strings. It is recommended to use a secr | Field | Required | Binding support | Details | Example | |--------------------|:--------:|------------|-----|---------| -| toNumber | Y | Output | The target number to send the sms to | `"111-111-1111"` | -| fromNumber | Y | Output | The sender phone number | `"122-222-2222"` | -| accountSid | Y | Output | The Twilio account SID | `"account sid"` | -| authToken | Y | Output | The Twilio auth token | `"auth token"` | +| `toNumber` | Y | Output | The target number to send the sms to | `"111-111-1111"` | +| `fromNumber` | Y | Output | The sender phone number | `"222-222-2222"` | +| `accountSid` | Y | Output | The Twilio account SID | `"account sid"` | +| `authToken` | Y | Output | The Twilio auth token | `"auth token"` | +| `direction` | N | Output | The direction of the binding | `"output"` | ## Binding support diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/wasm.md b/daprdocs/content/en/reference/components-reference/supported-bindings/wasm.md index 3479adcd814..4f1fd1bb63d 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/wasm.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/wasm.md @@ -36,6 +36,10 @@ Wasm binaries are loaded from a URL. For example, the URL `file://rewrite.wasm` loads `rewrite.wasm` from the current directory of the process. On Kubernetes, see [How to: Mount Pod volumes to the Dapr sidecar]({{< ref kubernetes-volume-mounts.md >}}) to configure a filesystem mount that can contain Wasm binaries. +It is also possible to fetch the Wasm binary from a remote URL. In this case, +the URL must point exactly to one Wasm binary. For example: +- `http://example.com/rewrite.wasm`, or +- `https://example.com/rewrite.wasm`. Dapr uses [wazero](https://wazero.io) to run these binaries, because it has no dependencies. This allows use of WebAssembly with no installation process @@ -69,14 +73,16 @@ spec: metadata: - name: url value: "file://uppercase.wasm" + - name: direction + value: "output" ``` ## Spec metadata fields | Field | Details | Required | Example | |-------|----------------------------------------------------------------|----------|----------------| -| url | The URL of the resource including the Wasm binary to instantiate. The supported schemes include `file://`. The path of a `file://` URL is relative to the Dapr process unless it begins with `/`. | true | `file://hello.wasm` | - +| url | The URL of the resource including the Wasm binary to instantiate. The supported schemes include `file://`, `http://`, and `https://`. The path of a `file://` URL is relative to the Dapr process unless it begins with `/`. | true | `file://hello.wasm`, `https://example.com/hello.wasm` | +| `direction` | The direction of the binding | false | `"output"` | ## Binding support @@ -91,18 +97,39 @@ pass metadata properties with each request: - `args` any CLI arguments, comma-separated. This excludes the program name. -For example, if the binding `url` was a Ruby interpreter, such as from -[webassembly-language-runtimes](https://github.com/vmware-labs/webassembly-language-runtimes/releases/tag/ruby%2F3.2.0%2B20230215-1349da9), -the following request would respond back with "Hello, salaboy": +For example, consider binding the `url` to a Ruby interpreter, such as from +[webassembly-language-runtimes](https://github.com/vmware-labs/webassembly-language-runtimes/releases/tag/ruby%2F3.2.0%2B20230215-1349da9): + +```yaml +apiVersion: dapr.io/v1alpha1 +kind: Component +metadata: + name: wasm +spec: + type: bindings.wasm + version: v1 + metadata: + - name: url + value: "https://github.com/vmware-labs/webassembly-language-runtimes/releases/download/ruby%2F3.2.0%2B20230215-1349da9/ruby-3.2.0-slim.wasm" +``` + +Assuming that you wanted to start your Dapr at port 3500 with the Wasm Binding, you'd run: + +``` +$ dapr run --app-id wasm --dapr-http-port 3500 --resources-path components +``` + +The following request responds `Hello "salaboy"`: -```json +```sh +$ curl -X POST http://localhost:3500/v1.0/bindings/wasm -d' { "operation": "execute", "metadata": { - "args": "-ne,'print \"Hello, \"; print'" + "args": "-ne,print \"Hello \"; print" }, "data": "salaboy" -} +}' ``` ## Related links diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/zeebe-command.md b/daprdocs/content/en/reference/components-reference/supported-bindings/zeebe-command.md index b2edbb1673f..4db06840155 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/zeebe-command.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/zeebe-command.md @@ -21,23 +21,26 @@ spec: version: v1 metadata: - name: gatewayAddr - value: : + value: ":" - name: gatewayKeepAlive - value: 45s + value: "45s" - name: usePlainTextConnection - value: true + value: "true" - name: caCertificatePath - value: /path/to/ca-cert + value: "/path/to/ca-cert" + - name: direction + value: "output" ``` ## Spec metadata fields | Field | Required | Binding support | Details | Example | |-------------------------|:--------:|------------|-----|---------| -| gatewayAddr | Y | Output | Zeebe gateway address | `localhost:26500` | -| gatewayKeepAlive | N | Output | Sets how often keep alive messages should be sent to the gateway. Defaults to 45 seconds | `45s` | -| usePlainTextConnection | N | Output | Whether to use a plain text connection or not | `true,false` | -| caCertificatePath | N | Output | The path to the CA cert | `/path/to/ca-cert` | +| `gatewayAddr` | Y | Output | Zeebe gateway address | `"localhost:26500"` | +| `gatewayKeepAlive` | N | Output | Sets how often keep alive messages should be sent to the gateway. Defaults to 45 seconds | `"45s"` | +| `usePlainTextConnection` | N | Output | Whether to use a plain text connection or not | `"true"`, `"false"` | +| `caCertificatePath` | N | Output | The path to the CA cert | `"/path/to/ca-cert"` | +| `direction` | N | Output | The direction of the binding | `"output"` | ## Binding support diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/zeebe-jobworker.md b/daprdocs/content/en/reference/components-reference/supported-bindings/zeebe-jobworker.md index 63717ca7b76..a4c20cff9ba 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/zeebe-jobworker.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/zeebe-jobworker.md @@ -21,53 +21,56 @@ spec: version: v1 metadata: - name: gatewayAddr - value: : + value: ":" - name: gatewayKeepAlive - value: 45s + value: "45s" - name: usePlainTextConnection - value: true + value: "true" - name: caCertificatePath - value: /path/to/ca-cert + value: "/path/to/ca-cert" - name: workerName - value: products-worker + value: "products-worker" - name: workerTimeout - value: 5m + value: "5m" - name: requestTimeout - value: 15s + value: "15s" - name: jobType - value: fetch-products + value: "fetch-products" - name: maxJobsActive - value: 32 + value: "32" - name: concurrency - value: 4 + value: "4" - name: pollInterval - value: 100ms + value: "100ms" - name: pollThreshold - value: 0.3 + value: "0.3" - name: fetchVariables - value: productId, productName, productKey + value: "productId, productName, productKey" - name: autocomplete - value: true + value: "true" + - name: direction + value: "input" ``` ## Spec metadata fields | Field | Required | Binding support | Details | Example | |-------------------------|:--------:|------------|-----|---------| -| gatewayAddr | Y | Input | Zeebe gateway address | `localhost:26500` | -| gatewayKeepAlive | N | Input | Sets how often keep alive messages should be sent to the gateway. Defaults to 45 seconds | `45s` | -| usePlainTextConnection | N | Input | Whether to use a plain text connection or not | `true,false` | -| caCertificatePath | N | Input | The path to the CA cert | `/path/to/ca-cert` | -| workerName | N | Input | The name of the worker activating the jobs, mostly used for logging purposes | `products-worker` | -| workerTimeout | N | Input | A job returned after this call will not be activated by another call until the timeout has been reached; defaults to 5 minutes | `5m` | -| requestTimeout | N | Input | The request will be completed when at least one job is activated or after the requestTimeout. If the requestTimeout = 0, a default timeout is used. If the requestTimeout < 0, long polling is disabled and the request is completed immediately, even when no job is activated. Defaults to 10 seconds | `30s` | -| jobType | Y | Input | the job type, as defined in the BPMN process (e.g. ``) | `fetch-products` | -| maxJobsActive | N | Input | Set the maximum number of jobs which will be activated for this worker at the same time. Defaults to 32 | `32` | -| concurrency | N | Input | The maximum number of concurrent spawned goroutines to complete jobs. Defaults to 4 | `4` | -| pollInterval | N | Input | Set the maximal interval between polling for new jobs. Defaults to 100 milliseconds | `100ms` | -| pollThreshold | N | Input | Set the threshold of buffered activated jobs before polling for new jobs, i.e. threshold * maxJobsActive. Defaults to 0.3 | `0.3` | -| fetchVariables | N | Input | A list of variables to fetch as the job variables; if empty, all visible variables at the time of activation for the scope of the job will be returned | `productId, productName, productKey` | -| autocomplete | N | Input | Indicates if a job should be autocompleted or not. If not set, all jobs will be auto-completed by default. Disable it if the worker should manually complete or fail the job with either a business error or an incident | `true,false` | +| `gatewayAddr` | Y | Input | Zeebe gateway address | `"localhost:26500"` | +| `gatewayKeepAlive` | N | Input | Sets how often keep alive messages should be sent to the gateway. Defaults to 45 seconds | `"45s"` | +| `usePlainTextConnection` | N | Input | Whether to use a plain text connection or not | `"true"`, `"false"` | +| `caCertificatePath` | N | Input | The path to the CA cert | `"/path/to/ca-cert"` | +| `workerName` | N | Input | The name of the worker activating the jobs, mostly used for logging purposes | `"products-worker"` | +| `workerTimeout` | N | Input | A job returned after this call will not be activated by another call until the timeout has been reached; defaults to 5 minutes | `"5m"` | +| `requestTimeout` | N | Input | The request will be completed when at least one job is activated or after the requestTimeout. If the requestTimeout = 0, a default timeout is used. If the requestTimeout < 0, long polling is disabled and the request is completed immediately, even when no job is activated. Defaults to 10 seconds | `"30s"` | +| `jobType` | Y | Input | the job type, as defined in the BPMN process (e.g. ``) | `"fetch-products"` | +| `maxJobsActive` | N | Input | Set the maximum number of jobs which will be activated for this worker at the same time. Defaults to 32 | `"32"` | +| `concurrency` | N | Input | The maximum number of concurrent spawned goroutines to complete jobs. Defaults to 4 | `"4"` | +| `pollInterval` | N | Input | Set the maximal interval between polling for new jobs. Defaults to 100 milliseconds | `"100ms"` | +| `pollThreshold` | N | Input | Set the threshold of buffered activated jobs before polling for new jobs, i.e. threshold * maxJobsActive. Defaults to 0.3 | `"0.3"` | +| `fetchVariables` | N | Input | A list of variables to fetch as the job variables; if empty, all visible variables at the time of activation for the scope of the job will be returned | `"productId"`, `"productName"`, `"productKey"` | +| `autocomplete` | N | Input | Indicates if a job should be autocompleted or not. If not set, all jobs will be auto-completed by default. Disable it if the worker should manually complete or fail the job with either a business error or an incident | `"true"`, `"false"` | +| `direction` | N | Input | The direction of the binding | `"input"` | ## Binding support diff --git a/daprdocs/content/en/reference/components-reference/supported-configuration-stores/azure-appconfig-configuration-store.md b/daprdocs/content/en/reference/components-reference/supported-configuration-stores/azure-appconfig-configuration-store.md index 4d2eeaea528..6ba16586462 100644 --- a/daprdocs/content/en/reference/components-reference/supported-configuration-stores/azure-appconfig-configuration-store.md +++ b/daprdocs/content/en/reference/components-reference/supported-configuration-stores/azure-appconfig-configuration-store.md @@ -40,7 +40,7 @@ spec: - name: azureCertificateFile # Optional value : "[pfx_certificate_file_fully_qualified_local_path]" - name: subscribePollInterval # Optional - value: #Optional [Expected format example - 1s|1m|1h] + value: #Optional [Expected format example - 30s] ``` @@ -55,9 +55,9 @@ The above example uses secrets as plain strings. It is recommended to use a secr | connectionString | Y* | Connection String for the Azure App Configuration instance. No Default. Can be `secretKeyRef` to use a secret reference. *Mutally exclusive with host field. *Not to be used when [Azure Authentication](https://docs.dapr.io/developing-applications/integrations/azure/authenticating-azure/) is used | `Endpoint=https://foo.azconfig.io;Id=osOX-l9-s0:sig;Secret=00000000000000000000000000000000000000000000` | host | N* | Endpoint for the Azure App Configuration instance. No Default. *Mutally exclusive with connectionString field. *To be used when [Azure Authentication](https://docs.dapr.io/developing-applications/integrations/azure/authenticating-azure/) is used | `https://dapr.azconfig.io` | maxRetries | N | Maximum number of retries before giving up. Defaults to `3` | `5`, `10` -| retryDelay | N | RetryDelay specifies the initial amount of delay to use before retrying an operation. The delay increases exponentially with each retry up to the maximum specified by MaxRetryDelay. Defaults to `4` seconds; `"-1"` disables delay between retries. | `4000000000` -| maxRetryDelay | N | MaxRetryDelay specifies the maximum delay allowed before retrying an operation. Typically the value is greater than or equal to the value specified in RetryDelay. Defaults to `120` seconds; `"-1"` disables the limit | `120000000000` -| subscribePollInterval | N | subscribePollInterval specifies the poll interval for polling the subscribed keys for any changes. Default polling interval is set to `24` hours. +| retryDelay | N | RetryDelay specifies the initial amount of delay to use before retrying an operation. The delay increases exponentially with each retry up to the maximum specified by MaxRetryDelay. Defaults to `4` seconds; `"-1"` disables delay between retries. | `4s` +| maxRetryDelay | N | MaxRetryDelay specifies the maximum delay allowed before retrying an operation. Typically the value is greater than or equal to the value specified in RetryDelay. Defaults to `120` seconds; `"-1"` disables the limit | `120s` +| subscribePollInterval | N | subscribePollInterval specifies the poll interval in nanoseconds for polling the subscribed keys for any changes. This will be updated in the future to Go Time format. Default polling interval is set to `24` hours. | `30s` **Note**: either `host` or `connectionString` must be specified. diff --git a/daprdocs/content/en/reference/components-reference/supported-middleware/_index.md b/daprdocs/content/en/reference/components-reference/supported-middleware/_index.md index 6013af82d96..767fafe2dd2 100644 --- a/daprdocs/content/en/reference/components-reference/supported-middleware/_index.md +++ b/daprdocs/content/en/reference/components-reference/supported-middleware/_index.md @@ -8,6 +8,9 @@ no_list: true aliases: - /developing-applications/middleware/supported-middleware/ --- + +The following table lists middleware components supported by Dapr. [Learn how to customize processing pipelines and set up middleware components.]({{< ref "middleware.md" >}}) + {{< partial "components/description.html" >}} {{< partial "components/middleware.html" >}} 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 51d75b0b88d..d83bda22fb2 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 @@ -21,6 +21,10 @@ Wasm binaries are loaded from a URL. For example, the URL `file://rewrite.wasm` loads `rewrite.wasm` from the current directory of the process. On Kubernetes, see [How to: Mount Pod volumes to the Dapr sidecar]({{< ref kubernetes-volume-mounts.md >}}) to configure a filesystem mount that can contain Wasm modules. +It is also possible to fetch the Wasm binary from a remote URL. In this case, +the URL must point exactly to one Wasm binary. For example: +- `http://example.com/rewrite.wasm`, or +- `https://example.com/rewrite.wasm`. ## Component format @@ -35,6 +39,8 @@ spec: metadata: - name: url value: "file://router.wasm" + - guestConfig + value: {"environment":"production"} ``` ## Spec metadata fields @@ -44,7 +50,8 @@ How to compile this is described later. | Field | Details | Required | Example | |-------|----------------------------------------------------------------|----------|----------------| -| url | The URL of the resource including the Wasm binary to instantiate. The supported schemes include `file://`. The path of a `file://` URL is relative to the Dapr process unless it begins with `/`. | true | `file://hello.wasm` | +| url | The URL of the resource including the Wasm binary to instantiate. The supported schemes include `file://`, `http://`, and `https://`. The path of a `file://` URL is relative to the Dapr process unless it begins with `/`. | true | `file://hello.wasm`, `https://example.com/hello.wasm` | +| guestConfig | An optional configuration passed to Wasm guests. Users can pass an arbitrary string to be parsed by the guest code. | false | `enviroment=production`,`{"environment":"production"}` | ## Dapr configuration @@ -116,6 +123,49 @@ If using TinyGo, compile as shown below and set the spec metadata field named tinygo build -o router.wasm -scheduler=none --no-debug -target=wasi router.go` ``` +### Wasm `guestConfig` example + +Here is an example of how to use `guestConfig` to pass configurations to Wasm. In Wasm code, you can use the function `handler.Host.GetConfig` defined in guest SDK to get the configuration. In the following example, the Wasm middleware parses the executed `environment` from JSON config defined in the component. + +```yaml +apiVersion: dapr.io/v1alpha1 +kind: Component +metadata: + name: wasm +spec: + type: middleware.http.wasm + version: v1 + metadata: + - name: url + value: "file://router.wasm" + - guestConfig + value: {"environment":"production"} +``` +Here's an example in TinyGo: + +```go +package main + +import ( + "encoding/json" + "github.com/http-wasm/http-wasm-guest-tinygo/handler" + "github.com/http-wasm/http-wasm-guest-tinygo/handler/api" +) + +type Config struct { + Environment string `json:"environment"` +} + +func main() { + // get config bytes, which is the value of guestConfig defined in the component. + configBytes := handler.Host.GetConfig() + + config := Config{} + json.Unmarshal(configBytes, &config) + handler.Host.Log(api.LogLevelInfo, "Config environment: "+config.Environment) +} +``` + ## Related links diff --git a/daprdocs/content/en/reference/components-reference/supported-pubsub/_index.md b/daprdocs/content/en/reference/components-reference/supported-pubsub/_index.md index 9e7c261c05b..9935e3e07ad 100644 --- a/daprdocs/content/en/reference/components-reference/supported-pubsub/_index.md +++ b/daprdocs/content/en/reference/components-reference/supported-pubsub/_index.md @@ -9,6 +9,8 @@ aliases: no_list: true --- +The following table lists publish and subscribe brokers supported by the Dapr pub/sub building block. [Learn how to set up different brokers for Dapr publish and subscribe.]({{< ref setup-pubsub.md >}}) + {{< partial "components/description.html" >}} {{< partial "components/pubsub.html" >}} diff --git a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-apache-kafka.md b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-apache-kafka.md index 7ae5f124e52..48e2876c2d1 100644 --- a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-apache-kafka.md +++ b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-apache-kafka.md @@ -60,7 +60,7 @@ spec: | brokers | Y | A comma-separated list of Kafka brokers. | `"localhost:9092,dapr-kafka.myapp.svc.cluster.local:9093"` | consumerGroup | N | A kafka consumer group to listen on. Each record published to a topic is delivered to one consumer within each consumer group subscribed to the topic. | `"group1"` | consumerID | N | Consumer ID (consumer tag) organizes one or more consumers into a group. Consumers with the same consumer ID work as one virtual consumer; for example, a message is processed only once by one of the consumers in the group. If the `consumerID` is not provided, the Dapr runtime set it to the Dapr application ID (`appID`) value. | `"channel1"` -| clientID | N | A user-provided string sent with every request to the Kafka brokers for logging, debugging, and auditing purposes. Defaults to `"sarama"`. | `"my-dapr-app"` +| clientID | N | A user-provided string sent with every request to the Kafka brokers for logging, debugging, and auditing purposes. Defaults to `"namespace.appID"` for Kubernetes mode or `"appID"` for Self-Hosted mode. | `"my-namespace.my-dapr-app"`, `"my-dapr-app"` | authRequired | N | *Deprecated* Enable [SASL](https://en.wikipedia.org/wiki/Simple_Authentication_and_Security_Layer) authentication with the Kafka brokers. | `"true"`, `"false"` | authType | Y | Configure or disable authentication. Supported values: `none`, `password`, `mtls`, or `oidc` | `"password"`, `"none"` | saslUsername | N | The SASL username used for authentication. Only required if `authType` is set to `"password"`. | `"adminuser"` diff --git a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-aws-snssqs.md b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-aws-snssqs.md index 4ddddb3a110..61b68290196 100644 --- a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-aws-snssqs.md +++ b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-aws-snssqs.md @@ -9,8 +9,18 @@ aliases: ## Component format -To set up AWS SNS/SQS pub/sub, create a component of type `pubsub.aws.snssqs`. See the [pub/sub broker component file]({{< ref setup-pubsub.md >}}) to learn how ConsumerID is automatically generated. Read the [How-to: Publish and Subscribe guide]({{< ref "howto-publish-subscribe.md#step-1-setup-the-pubsub-component" >}}) on how to create and apply a pub/sub configuration. +To set up AWS SNS/SQS pub/sub, create a component of type `pubsub.aws.snssqs`. +By default, the AWS SNS/SQS component: +- Generates the SNS topics +- Provisions the SQS queues +- Configures a subscription of the queues to the topics + +{{% alert title="Note" color="primary" %}} +If you only have a publisher and no subscriber, only the SNS topics are created. + +However, if you have a subscriber, SNS, SQS, and the dynamic or static subscription thereof are generated. +{{% /alert %}} ```yaml apiVersion: dapr.io/v1alpha1 @@ -72,7 +82,7 @@ The above example uses secrets as plain strings. It is recommended to use [a sec | accessKey | Y | ID of the AWS account/role with appropriate permissions to SNS and SQS (see below) | `"AKIAIOSFODNN7EXAMPLE"` | secretKey | Y | Secret for the AWS user/role. If using an `AssumeRole` access, you will also need to provide a `sessionToken` |`"wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"` | region | Y | The AWS region where the SNS/SQS assets are located or be created in. See [this page](https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services/?p=ugi&l=na) for valid regions. Ensure that SNS and SQS are available in that region | `"us-east-1"` -| consumerID | N | Consumer ID (consumer tag) organizes one or more consumers into a group. Consumers with the same consumer ID work as one virtual consumer; for example, a message is processed only once by one of the consumers in the group. If the `consumerID` is not provided, the Dapr runtime set it to the Dapr application ID (`appID`) value. | `"channel1"` +| consumerID | N | Consumer ID (consumer tag) organizes one or more consumers into a group. Consumers with the same consumer ID work as one virtual consumer; for example, a message is processed only once by one of the consumers in the group. If the `consumerID` is not provided, the Dapr runtime set it to the Dapr application ID (`appID`) value. See the [pub/sub broker component file]({{< ref setup-pubsub.md >}}) to learn how ConsumerID is automatically generated. | `"channel1"` | endpoint | N | AWS endpoint for the component to use. Only used for local development with, for example, [localstack](https://github.com/localstack/localstack). The `endpoint` is unncessary when running against production AWS | `"http://localhost:4566"` | sessionToken | N | AWS session token to use. A session token is only required if you are using temporary security credentials | `"TOKEN"` | messageReceiveLimit | N | Number of times a message is received, after processing of that message fails, that once reached, results in removing of that message from the queue. If `sqsDeadLettersQueueName` is specified, `messageReceiveLimit` is the number of times a message is received, after processing of that message fails, that once reached, results in moving of the message to the SQS dead-letters queue. Default: `10` | `10` diff --git a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-nats-streaming.md b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-nats-streaming.md index 5ac1f720d79..3a2f9d21972 100644 --- a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-nats-streaming.md +++ b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-nats-streaming.md @@ -7,7 +7,16 @@ aliases: - "/operations/components/setup-pubsub/supported-pubsub/setup-nats-streaming/" --- +## ⚠️ Deprecation notice + +{{% alert title="Warning" color="warning" %}} +This component is **deprecated** because the [NATS Streaming Server](hhttps://nats-io.gitbook.io/legacy-nats-docs/nats-streaming-server-aka-stan/developing-with-stan) was deprecated in June 2023 and no longer receives updates. Users are encouraged to switch to using [JetStream]({{< ref setup-jetstream >}} as an alternative. + +This component will be **removed in the Dapr v1.13 release. +{{% /alert %}} + ## Component format + To set up NATS Streaming pub/sub, create a component of type `pubsub.natsstreaming`. See the [pub/sub broker component file]({{< ref setup-pubsub.md >}}) to learn how ConsumerID is automatically generated. Read the [How-to: Publish and Subscribe guide]({{< ref "howto-publish-subscribe.md#step-1-setup-the-pubsub-component" >}}) on how to create and apply a pub/sub configuration. ```yaml @@ -57,10 +66,6 @@ spec: The above example uses secrets as plain strings. It is recommended to [use a secret store for the secrets]({{< ref component-secrets.md >}}). {{% /alert %}} -{{% alert title="Warning" color="warning" %}} -NATS Streaming has been [deprecated](https://github.com/nats-io/nats-streaming-server/#warning--deprecation-notice-warning). Consider using [NATS JetStream]({{< ref setup-jetstream >}}) going forward. -{{% /alert %}} - ## Spec metadata fields | Field | Required | Details | Example | diff --git a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-rabbitmq.md b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-rabbitmq.md index 8d006a35aff..f2fecc6501c 100644 --- a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-rabbitmq.md +++ b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-rabbitmq.md @@ -60,6 +60,8 @@ spec: value: fanout - name: saslExternal value: false + - name: ttlInSeconds + value: 60 ``` {{% alert title="Warning" color="warning" %}} @@ -90,9 +92,10 @@ The above example uses secrets as plain strings. It is recommended to use a secr | maxLenBytes | N | Maximum length in bytes of a queue and its dead letter queue (if dead letter enabled). If both `maxLen` and `maxLenBytes` are set then both will apply; whichever limit is hit first will be enforced. Defaults to no limit. | `"1048576"` | | exchangeKind | N | Exchange kind of the rabbitmq exchange. Defaults to `"fanout"`. | `"fanout"`,`"topic"` | | saslExternal | N | With TLS, should the username be taken from an additional field (for example, CN). See [RabbitMQ Authentication Mechanisms](https://www.rabbitmq.com/access-control.html#mechanisms). Defaults to `"false"`. | `"true"`, `"false"` | -| caCert | Required for using TLS | Input/Output | Certificate Authority (CA) certificate in PEM format for verifying server TLS certificates. | `"-----BEGIN CERTIFICATE-----\n\n-----END CERTIFICATE-----"` -| clientCert | Required for using TLS | Input/Output | TLS client certificate in PEM format. Must be used with `clientKey`. | `"-----BEGIN CERTIFICATE-----\n\n-----END CERTIFICATE-----"` -| clientKey | Required for using TLS | Input/Output | TLS client key in PEM format. Must be used with `clientCert`. Can be `secretKeyRef` to use a secret reference. | `"-----BEGIN RSA PRIVATE KEY-----\n\n-----END RSA PRIVATE KEY-----"` +| ttlInSeconds | N | Set message TTL at the component level, which can be overwritten by message level TTL per request. | `"60"` | +| caCert | Required for using TLS | Certificate Authority (CA) certificate in PEM format for verifying server TLS certificates. | `"-----BEGIN CERTIFICATE-----\n\n-----END CERTIFICATE-----"` +| clientCert | Required for using TLS | TLS client certificate in PEM format. Must be used with `clientKey`. | `"-----BEGIN CERTIFICATE-----\n\n-----END CERTIFICATE-----"` +| clientKey | Required for using TLS | TLS client key in PEM format. Must be used with `clientCert`. Can be `secretKeyRef` to use a secret reference. | `"-----BEGIN RSA PRIVATE KEY-----\n\n-----END RSA PRIVATE KEY-----"` ## Communication using TLS @@ -409,6 +412,14 @@ client.PublishEvent(ctx, PUBSUB_NAME, TOPIC_NAME, []byte(strconv.Itoa(orderId)), {{< /tabs >}} +## Time-to-live + +You can set a time-to-live (TTL) value at either the message or component level. Set default component-level TTL using the component spec `ttlInSeconds` field in your component. + +{{% alert title="Note" color="primary" %}} +If you set both component-level and message-level TTL, the default component-level TTL is ignored in favor of the message-level TTL. +{{% /alert %}} + ## Related links - [Basic schema for a Dapr component]({{< ref component-schema >}}) in the Related links section diff --git a/daprdocs/content/en/reference/components-reference/supported-secret-stores/_index.md b/daprdocs/content/en/reference/components-reference/supported-secret-stores/_index.md index c59000f1a76..64277d89579 100644 --- a/daprdocs/content/en/reference/components-reference/supported-secret-stores/_index.md +++ b/daprdocs/content/en/reference/components-reference/supported-secret-stores/_index.md @@ -9,6 +9,8 @@ aliases: no_list: true --- +The following table lists secret stores supported by the Dapr secrets building block. [Learn how to set up different secret stores for Dapr secrets management.]({{< ref setup-secret-store.md >}}) + {{< partial "components/description.html" >}} {{< partial "components/secret-stores.html" >}} diff --git a/daprdocs/content/en/reference/components-reference/supported-secret-stores/gcp-secret-manager.md b/daprdocs/content/en/reference/components-reference/supported-secret-stores/gcp-secret-manager.md index c0e8ca40045..24a1a155bfe 100644 --- a/daprdocs/content/en/reference/components-reference/supported-secret-stores/gcp-secret-manager.md +++ b/daprdocs/content/en/reference/components-reference/supported-secret-stores/gcp-secret-manager.md @@ -50,7 +50,7 @@ The above example uses secrets as plain strings. It is recommended to use a loca | Field | Required | Details | Example | |--------------------|:--------:|--------------------------------|---------------------| -| type | Y | The type of the account. | `"serviceAccount"` | +| type | Y | The type of the account. | `"service_account"` | | project_id | Y | The project ID associated with this component. | `"project_id"` | | private_key_id | N | The private key ID | `"privatekey"` | | client_email | Y | The client email address | `"client@example.com"` | diff --git a/daprdocs/content/en/reference/components-reference/supported-state-stores/_index.md b/daprdocs/content/en/reference/components-reference/supported-state-stores/_index.md index 1ec0a0bfff0..c25a5139e97 100644 --- a/daprdocs/content/en/reference/components-reference/supported-state-stores/_index.md +++ b/daprdocs/content/en/reference/components-reference/supported-state-stores/_index.md @@ -9,10 +9,12 @@ aliases: no_list: true --- -{{< partial "components/description.html" >}} +The following table lists state stores supported, at various levels, by the Dapr state management building block. [Learn how to set up different state stores for Dapr state management.]({{< ref setup-state-store.md >}}) -The following stores are supported, at various levels, by the Dapr state management building block: +{{< partial "components/description.html" >}} -> State stores can be used for actors if it supports both transactional operations and etag. +{{% alert title="Note" color="primary" %}} +State stores can be used for actors if it supports both transactional operations and ETag. +{{% /alert %}} {{< partial "components/state-stores.html" >}} diff --git a/daprdocs/content/en/reference/resource-specs/component-schema.md b/daprdocs/content/en/reference/resource-specs/component-schema.md index 59169300f8e..d900769c4a8 100644 --- a/daprdocs/content/en/reference/resource-specs/component-schema.md +++ b/daprdocs/content/en/reference/resource-specs/component-schema.md @@ -76,7 +76,7 @@ spec: value: "false" ``` -## Further reading +## Related links - [Components concept]({{< ref components-concept.md >}}) - [Reference secrets in component definitions]({{< ref component-secrets.md >}}) - [Supported state stores]({{< ref supported-state-stores >}}) diff --git a/daprdocs/content/en/reference/resource-specs/httpendpoints-schema.md b/daprdocs/content/en/reference/resource-specs/httpendpoints-schema.md index 62effc30e53..f6bced2a3c1 100644 --- a/daprdocs/content/en/reference/resource-specs/httpendpoints-schema.md +++ b/daprdocs/content/en/reference/resource-specs/httpendpoints-schema.md @@ -38,4 +38,8 @@ auth: # Optional | Field | Required | Details | Example | |--------------------|:--------:|---------|---------| | baseUrl | Y | Base URL of the non-Dapr endpoint | `"https://api.github.com"`, `"http://api.github.com"` -| headers | N | HTTP request headers for service invocation | `name: "Accept-Language" value: "en-US"`
`name: "Authorization" secretKeyRef.name: "my-secret" secretKeyRef.key: "myGithubToken" ` \ No newline at end of file +| headers | N | HTTP request headers for service invocation | `name: "Accept-Language" value: "en-US"`
`name: "Authorization" secretKeyRef.name: "my-secret" secretKeyRef.key: "myGithubToken" ` + +## Related links + +[Learn how to invoke non-Dapr endpoints.]({{< ref howto-invoke-non-dapr-endpoints.md >}}) \ No newline at end of file diff --git a/daprdocs/content/en/reference/resource-specs/resiliency-schema.md b/daprdocs/content/en/reference/resource-specs/resiliency-schema.md index d62061e091d..32888adc753 100644 --- a/daprdocs/content/en/reference/resource-specs/resiliency-schema.md +++ b/daprdocs/content/en/reference/resource-specs/resiliency-schema.md @@ -20,8 +20,8 @@ scopes: - spec: policies: # Required - timeouts: # Replace with any unique name - timeoutName: + timeouts: + timeoutName: # Replace with any unique name retries: retryName: # Replace with any unique name policy: @@ -62,4 +62,4 @@ targets: # Required ## Related links -[Learn more about resiliency policies and targets]({{< ref resiliency-overview.md >}}) \ No newline at end of file +[Learn more about resiliency policies and targets]({{< ref resiliency-overview.md >}}) diff --git a/daprdocs/data/components/bindings/azure.yaml b/daprdocs/data/components/bindings/azure.yaml index 7af5d118bca..54d89da3ef1 100644 --- a/daprdocs/data/components/bindings/azure.yaml +++ b/daprdocs/data/components/bindings/azure.yaml @@ -61,12 +61,4 @@ since: "1.0" features: input: true - output: true -- component: Azure OpenAI - link: openai - state: Alpha - version: v1 - since: "1.12" - features: - input: false - output: true + output: true \ No newline at end of file diff --git a/daprdocs/data/components/bindings/generic.yaml b/daprdocs/data/components/bindings/generic.yaml index 35ec6d43727..4f63295bd38 100644 --- a/daprdocs/data/components/bindings/generic.yaml +++ b/daprdocs/data/components/bindings/generic.yaml @@ -14,6 +14,14 @@ features: input: true output: false +- component: commercetools GraphQL + link: commercetools + state: Alpha + version: v1 + since: "1.8" + features: + input: false + output: true - component: GraphQL link: graghql state: Alpha @@ -22,6 +30,14 @@ features: input: false output: true +- component: Huawei OBS + link: huawei-obs + state: Alpha + version: v1 + since: "1.8" + features: + input: false + output: true - component: InfluxDB link: influxdb state: Beta @@ -38,6 +54,14 @@ features: input: true output: true +- component: Kitex + link: kitex + state: Alpha + version: v1 + since: "1.11" + features: + input: false + output: true - component: Kubernetes Events link: kubernetes-binding state: Alpha @@ -102,6 +126,14 @@ features: input: false output: true +- component: RethinkDB + link: rethinkdb + state: Beta + version: v1 + since: "1.9" + features: + input: true + output: false - component: SMTP link: smtp state: Alpha diff --git a/daprdocs/data/components/pubsub/generic.yaml b/daprdocs/data/components/pubsub/generic.yaml index 38d775c639c..99fa5cd2013 100644 --- a/daprdocs/data/components/pubsub/generic.yaml +++ b/daprdocs/data/components/pubsub/generic.yaml @@ -48,9 +48,9 @@ bulkSubscribe: false - component: NATS Streaming link: setup-nats-streaming - state: Beta + state: Deprecated version: v1 - since: "1.0" + since: "1.11" features: bulkPublish: false bulkSubscribe: false diff --git a/daprdocs/layouts/partials/components/description.html b/daprdocs/layouts/partials/components/description.html index 770fa975bb8..46bb87b46e1 100644 --- a/daprdocs/layouts/partials/components/description.html +++ b/daprdocs/layouts/partials/components/description.html @@ -1,15 +1,29 @@ -

Table captions:

-
-

Status: component certification status

-
- -
-

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

-
-
-

Component version: the version of the component

-
+

Table headers to note:

+ + + + + + + + + + + + + + + + + + + + + + +
HeaderDescriptionExample
StatusComponent certification status + Alpha
+ Beta
+ Stable
+ +
Component versionThe version of the componentv1
Since runtime versionThe version of the Dapr runtime when the component status was set or updated 1.11
\ No newline at end of file diff --git a/daprdocs/layouts/shortcodes/dapr-latest-version.html b/daprdocs/layouts/shortcodes/dapr-latest-version.html index 41d35c1517f..9b4bf780551 100644 --- a/daprdocs/layouts/shortcodes/dapr-latest-version.html +++ b/daprdocs/layouts/shortcodes/dapr-latest-version.html @@ -1 +1 @@ -{{- if .Get "short" }}1.11{{ else if .Get "long" }}1.11.1{{ else if .Get "cli" }}1.11.0{{ else }}1.11.1{{ end -}} +{{- if .Get "short" }}1.11{{ else if .Get "long" }}1.11.3{{ else if .Get "cli" }}1.11.0{{ else }}1.11.3{{ end -}} diff --git a/daprdocs/layouts/shortcodes/table.html b/daprdocs/layouts/shortcodes/table.html new file mode 100644 index 00000000000..7ba0498ba7b --- /dev/null +++ b/daprdocs/layouts/shortcodes/table.html @@ -0,0 +1,6 @@ +{{ $htmlTable := .Inner | markdownify }} +{{ $class := .Get 0 | default "" }} +{{ $old := "" }} +{{ $new := printf "
" $class }} +{{ $htmlTable := replace $htmlTable $old $new }} +{{ $htmlTable | safeHTML }} \ No newline at end of file diff --git a/daprdocs/static/docs/Dapr-september-2023-security-audit-report.pdf b/daprdocs/static/docs/Dapr-september-2023-security-audit-report.pdf new file mode 100644 index 00000000000..ebe454f62ac Binary files /dev/null and b/daprdocs/static/docs/Dapr-september-2023-security-audit-report.pdf differ diff --git a/daprdocs/static/images/binding-overview.png b/daprdocs/static/images/binding-overview.png new file mode 100644 index 00000000000..fd8c08d8e24 Binary files /dev/null and b/daprdocs/static/images/binding-overview.png differ diff --git a/daprdocs/static/images/building-block-service-invocation-example.png b/daprdocs/static/images/building-block-service-invocation-example.png index 286d11eb746..7913ebc9788 100644 Binary files a/daprdocs/static/images/building-block-service-invocation-example.png and b/daprdocs/static/images/building-block-service-invocation-example.png differ diff --git a/daprdocs/static/images/building_blocks.png b/daprdocs/static/images/building_blocks.png index 0a33365675a..a6205cae5a1 100644 Binary files a/daprdocs/static/images/building_blocks.png and b/daprdocs/static/images/building_blocks.png differ diff --git a/daprdocs/static/images/open-telemetry-collector.png b/daprdocs/static/images/open-telemetry-collector.png index d2af81efe12..e47a4972688 100644 Binary files a/daprdocs/static/images/open-telemetry-collector.png and b/daprdocs/static/images/open-telemetry-collector.png differ diff --git a/daprdocs/static/images/overview.png b/daprdocs/static/images/overview.png index 3aeb7f11d22..7888f6a5e2e 100644 Binary files a/daprdocs/static/images/overview.png and b/daprdocs/static/images/overview.png differ diff --git a/sdkdocs/go b/sdkdocs/go index effc2f0d3c9..ad25580bcfb 160000 --- a/sdkdocs/go +++ b/sdkdocs/go @@ -1 +1 @@ -Subproject commit effc2f0d3c92ad76e11958e427c8d3b0900e1932 +Subproject commit ad25580bcfb638d56237faec0543565b4d0e134f diff --git a/sdkdocs/java b/sdkdocs/java index d1c61cae40e..9dc842faba3 160000 --- a/sdkdocs/java +++ b/sdkdocs/java @@ -1 +1 @@ -Subproject commit d1c61cae40e7c5d933d92705198506d947960aaa +Subproject commit 9dc842faba3486e518babc29f7fbbca79248bfab