mirror of https://github.com/dapr/docs.git
resolve conflict
Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>
This commit is contained in:
commit
a0b76f814d
|
@ -13,7 +13,7 @@ jobs:
|
|||
validate:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
PYTHON_VER: 3.7
|
||||
PYTHON_VER: 3.12
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Check Microsoft URLs do not pin localized versions
|
||||
|
@ -27,7 +27,7 @@ jobs:
|
|||
exit 1
|
||||
fi
|
||||
- name: Set up Python ${{ env.PYTHON_VER }}
|
||||
uses: actions/setup-python@v2
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ env.PYTHON_VER }}
|
||||
- name: Install dependencies
|
||||
|
|
|
@ -109,7 +109,7 @@ id = "G-60C6Q1ETC1"
|
|||
lang = "en"
|
||||
[[module.mounts]]
|
||||
source = "../sdkdocs/rust/daprdocs/content/en/rust-sdk-contributing"
|
||||
target = "content/contributing/sdks-contrib"
|
||||
target = "content/contributing/sdk-contrib/"
|
||||
lang = "en"
|
||||
|
||||
[[module.mounts]]
|
||||
|
|
|
@ -199,7 +199,7 @@ string randomString = GetRandomString();
|
|||
// DON'T DO THIS!
|
||||
Instant currentTime = Instant.now();
|
||||
UUID newIdentifier = UUID.randomUUID();
|
||||
string randomString = GetRandomString();
|
||||
String randomString = getRandomString();
|
||||
```
|
||||
|
||||
{{% /codetab %}}
|
||||
|
@ -246,7 +246,7 @@ string randomString = await context.CallActivityAsync<string>("GetRandomString")
|
|||
```java
|
||||
// Do this!!
|
||||
Instant currentTime = context.getCurrentInstant();
|
||||
Guid newIdentifier = context.NewGuid();
|
||||
Guid newIdentifier = context.newGuid();
|
||||
String randomString = context.callActivity(GetRandomString.class.getName(), String.class).await();
|
||||
```
|
||||
|
||||
|
@ -342,7 +342,7 @@ Do this:
|
|||
|
||||
```csharp
|
||||
// Do this!!
|
||||
string configuation = workflowInput.Configuration; // imaginary workflow input argument
|
||||
string configuration = workflowInput.Configuration; // imaginary workflow input argument
|
||||
string data = await context.CallActivityAsync<string>("MakeHttpCall", "https://example.com/api/data");
|
||||
```
|
||||
|
||||
|
@ -352,7 +352,7 @@ string data = await context.CallActivityAsync<string>("MakeHttpCall", "https://e
|
|||
|
||||
```java
|
||||
// Do this!!
|
||||
String configuation = ctx.getInput(InputType.class).getConfiguration(); // imaginary workflow input argument
|
||||
String configuration = ctx.getInput(InputType.class).getConfiguration(); // imaginary workflow input argument
|
||||
String data = ctx.callActivity(MakeHttpCall.class, "https://example.com/api/data", String.class).await();
|
||||
```
|
||||
|
||||
|
@ -362,7 +362,7 @@ String data = ctx.callActivity(MakeHttpCall.class, "https://example.com/api/data
|
|||
|
||||
```javascript
|
||||
// Do this!!
|
||||
const configuation = workflowInput.getConfiguration(); // imaginary workflow input argument
|
||||
const configuration = workflowInput.getConfiguration(); // imaginary workflow input argument
|
||||
const data = yield ctx.callActivity(makeHttpCall, "https://example.com/api/data");
|
||||
```
|
||||
|
||||
|
|
|
@ -34,10 +34,16 @@ In production scenarios, it is recommended to use a solution such as:
|
|||
|
||||
If running on AWS EKS, you can [link an IAM role to a Kubernetes service account](https://docs.aws.amazon.com/eks/latest/userguide/create-service-account-iam-policy-and-role.html), which your pod can use.
|
||||
|
||||
All of these solutions solve the same problem: They allow the Dapr runtime process (or sidecar) to retrive credentials dynamically, so that explicit credentials aren't needed. This provides several benefits, such as automated key rotation, and avoiding having to manage secrets.
|
||||
All of these solutions solve the same problem: They allow the Dapr runtime process (or sidecar) to retrieve credentials dynamically, so that explicit credentials aren't needed. This provides several benefits, such as automated key rotation, and avoiding having to manage secrets.
|
||||
|
||||
Both Kiam and Kube2IAM work by intercepting calls to the [instance metadata service](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-service.html).
|
||||
|
||||
### Setting Up Dapr with AWS EKS Pod Identity
|
||||
|
||||
EKS Pod Identities provide the ability to manage credentials for your applications, similar to the way that Amazon EC2 instance profiles provide credentials to Amazon EC2 instances. Instead of creating and distributing your AWS credentials to the containers or using the Amazon EC2 instance’s role, you associate an IAM role with a Kubernetes service account and configure your Pods to use the service account.
|
||||
|
||||
To see a comprehensive example on how to authorize pod access to AWS Secrets Manager from EKS using AWS EKS Pod Identity, [follow the sample in this repository](https://github.com/dapr/samples/tree/master/dapr-eks-podidentity).
|
||||
|
||||
### Use an instance profile when running in stand-alone mode on AWS EC2
|
||||
|
||||
If running Dapr directly on an AWS EC2 instance in stand-alone mode, you can use instance profiles.
|
||||
|
@ -84,7 +90,6 @@ On Windows, the environment variable needs to be set before starting the `dapr`
|
|||
|
||||
{{< /tabs >}}
|
||||
|
||||
|
||||
### Authenticate to AWS if using AWS SSO based profiles
|
||||
|
||||
If you authenticate to AWS using [AWS SSO](https://aws.amazon.com/single-sign-on/), some AWS SDKs (including the Go SDK) don't yet support this natively. There are several utilities you can use to "bridge the gap" between AWS SSO-based credentials and "legacy" credentials, such as:
|
||||
|
@ -111,7 +116,7 @@ AWS_PROFILE=myprofile awshelper daprd...
|
|||
<!-- windows -->
|
||||
{{% codetab %}}
|
||||
|
||||
On Windows, the environment variable needs to be set before starting the `awshelper` command, doing it inline (like in Linxu/MacOS) is not supported.
|
||||
On Windows, the environment variable needs to be set before starting the `awshelper` command; doing it inline (like in Linux/MacOS) is not supported.
|
||||
|
||||
{{% /codetab %}}
|
||||
|
||||
|
@ -123,4 +128,7 @@ On Windows, the environment variable needs to be set before starting the `awshel
|
|||
|
||||
## Related links
|
||||
|
||||
For more information, see [how the AWS SDK (which Dapr uses) handles credentials](https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-credentials).
|
||||
- For more information, see [how the AWS SDK (which Dapr uses) handles credentials](https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-credentials).
|
||||
- [EKS Pod Identity Documentation](https://docs.aws.amazon.com/eks/latest/userguide/pod-identities.html)
|
||||
- [AWS SDK Credentials Configuration](https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-credentials)
|
||||
- [Set up an Elastic Kubernetes Service (EKS) cluster](https://docs.dapr.io/operations/hosting/kubernetes/cluster/setup-eks/)
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
---
|
||||
type: docs
|
||||
title: "How to: Integrate using Testcontainers Dapr Module"
|
||||
linkTitle: "Dapr Testcontainers"
|
||||
weight: 3000
|
||||
description: "Use the Dapr Testcontainer module from your Java application"
|
||||
---
|
||||
|
||||
You can use the Testcontainers Dapr Module provided by Diagrid to set up Dapr locally for your Java applications. Simply add the following dependency to your Maven project:
|
||||
|
||||
```xml
|
||||
<dependency>
|
||||
<groupId>io.diagrid.dapr</groupId>
|
||||
<artifactId>testcontainers-dapr</artifactId>
|
||||
<version>0.10.x</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
[If you're using Spring Boot, you can also use the Spring Boot Starter.](https://github.com/diagridio/spring-boot-starter-dapr)
|
||||
|
||||
{{< button text="Use the Testcontainers Dapr Module" link="https://github.com/diagridio/testcontainers-dapr" >}}
|
|
@ -66,7 +66,7 @@ This guide walks you through installing an Elastic Kubernetes Service (EKS) clus
|
|||
1. Create the cluster by running the following command:
|
||||
|
||||
```bash
|
||||
eksctl create cluster -f cluster.yaml
|
||||
eksctl create cluster -f cluster-config.yaml
|
||||
```
|
||||
|
||||
1. Verify the kubectl context:
|
||||
|
|
|
@ -675,7 +675,12 @@ To perform a `throw-error` operation, invoke the Zeebe command binding with a `P
|
|||
"data": {
|
||||
"jobKey": 2251799813686172,
|
||||
"errorCode": "product-fetch-error",
|
||||
"errorMessage": "The product could not be fetched"
|
||||
"errorMessage": "The product could not be fetched",
|
||||
"variables": {
|
||||
"productId": "some-product-id",
|
||||
"productName": "some-product-name",
|
||||
"productKey": "some-product-key"
|
||||
}
|
||||
},
|
||||
"operation": "throw-error"
|
||||
}
|
||||
|
@ -686,6 +691,11 @@ The data parameters are:
|
|||
- `jobKey` - the unique job identifier, as obtained when activating the job
|
||||
- `errorCode` - the error code that will be matched with an error catch event
|
||||
- `errorMessage` - (optional) an error message that provides additional context
|
||||
- `variables` - (optional) JSON document that will instantiate the variables at the local scope of the
|
||||
job's associated task; it must be a JSON object, as variables will be mapped in a
|
||||
key-value fashion. e.g. { "a": 1, "b": 2 } will create two variables, named "a" and
|
||||
"b" respectively, with their associated values. [{ "a": 1, "b": 2 }] would not be a
|
||||
valid argument, as the root of the JSON document is an array and not an object.
|
||||
|
||||
##### Response
|
||||
|
||||
|
|
|
@ -195,6 +195,44 @@ Entity management is only possible when using [Microsoft Entra ID Authentication
|
|||
|
||||
> Dapr passes the name of the consumer group to the Event Hub, so this is not supplied in the metadata.
|
||||
|
||||
## Receiving custom properties
|
||||
|
||||
By default, Dapr does not forward [custom properties](https://learn.microsoft.com/azure/event-hubs/add-custom-data-event). However, by setting the subscription metadata `requireAllProperties` to `"true"`, you can receive custom properties as HTTP headers.
|
||||
|
||||
```yaml
|
||||
apiVersion: dapr.io/v2alpha1
|
||||
kind: Subscription
|
||||
metadata:
|
||||
name: order-pub-sub
|
||||
spec:
|
||||
topic: orders
|
||||
routes:
|
||||
default: /checkout
|
||||
pubsubname: order-pub-sub
|
||||
metadata:
|
||||
requireAllProperties: "true"
|
||||
```
|
||||
|
||||
The same can be achieved using the Dapr SDK:
|
||||
|
||||
{{< tabs ".NET" >}}
|
||||
|
||||
{{% codetab %}}
|
||||
|
||||
```csharp
|
||||
[Topic("order-pub-sub", "orders")]
|
||||
[TopicMetadata("requireAllProperties", "true")]
|
||||
[HttpPost("checkout")]
|
||||
public ActionResult Checkout(Order order, [FromHeader] int priority)
|
||||
{
|
||||
return Ok();
|
||||
}
|
||||
```
|
||||
|
||||
{{% /codetab %}}
|
||||
|
||||
{{< /tabs >}}
|
||||
|
||||
## Subscribing to Azure IoT Hub Events
|
||||
|
||||
Azure IoT Hub provides an [endpoint that is compatible with Event Hubs](https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messages-read-builtin#read-from-the-built-in-endpoint), so the Azure Event Hubs pubsub component can also be used to subscribe to Azure IoT Hub events.
|
||||
|
|
|
@ -52,7 +52,7 @@ spec:
|
|||
# Controls the default mode for executing queries. (optional)
|
||||
#- name: queryExecMode
|
||||
# value: ""
|
||||
# Uncomment this if you wish to use PostgreSQL as a state store for actors (optional)
|
||||
# Uncomment this if you wish to use PostgreSQL as a state store for actors or workflows (optional)
|
||||
#- name: actorStateStore
|
||||
# value: "true"
|
||||
```
|
||||
|
|
|
@ -52,7 +52,7 @@ spec:
|
|||
# Controls the default mode for executing queries. (optional)
|
||||
#- name: queryExecMode
|
||||
# value: ""
|
||||
# Uncomment this if you wish to use PostgreSQL as a state store for actors (optional)
|
||||
# Uncomment this if you wish to use PostgreSQL as a state store for actors or workflows (optional)
|
||||
#- name: actorStateStore
|
||||
# value: "true"
|
||||
```
|
||||
|
|
|
@ -720,9 +720,15 @@
|
|||
}
|
||||
},
|
||||
"node_modules/nanoid": {
|
||||
"version": "3.3.2",
|
||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.2.tgz",
|
||||
"integrity": "sha512-CuHBogktKwpm5g2sRgv83jEy2ijFzBwMoYA60orPDR7ynsLijJDqgsi4RDGj3OJpy3Ieb+LYwiRmIOGyytgITA==",
|
||||
"version": "3.3.8",
|
||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz",
|
||||
"integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/ai"
|
||||
}
|
||||
],
|
||||
"bin": {
|
||||
"nanoid": "bin/nanoid.cjs"
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue