From e6828cec48f5e820af96462818d552767d8faa20 Mon Sep 17 00:00:00 2001 From: Hannah Hunter Date: Thu, 14 Apr 2022 11:24:54 -0500 Subject: [PATCH 1/3] add new dapr init flags and examples to docs Signed-off-by: Hannah Hunter --- .../content/en/reference/cli/dapr-init.md | 35 ++++++++++++------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/daprdocs/content/en/reference/cli/dapr-init.md b/daprdocs/content/en/reference/cli/dapr-init.md index 320db98d0..0d6ac3e03 100644 --- a/daprdocs/content/en/reference/cli/dapr-init.md +++ b/daprdocs/content/en/reference/cli/dapr-init.md @@ -22,19 +22,22 @@ dapr init [flags] ### Flags -| Name | Environment Variable | Default | Description | -| -------------------- | -------------------- | ------------- | ------------------------------------------------------------------------------------ | -| `--enable-ha` | | `false` | Enable high availability (HA) mode | -| `--enable-mtls` | | `true` | Enable mTLS in your cluster | -| `--help`, `-h` | | | Print this help message | -| `--kubernetes`, `-k` | | `false` | Deploy Dapr to a Kubernetes cluster | -| `--wait` | | `false` | Wait for Kubernetes initialization to complete | -| `--timeout` | | `300` | The wait timeout for the Kubernetes installation | -| `--namespace`, `-n` | | `dapr-system` | The Kubernetes namespace to install Dapr in | -| `--runtime-version` | | `latest` | The version of the Dapr runtime to install, for example: `1.0.0` | -| `--slim`, `-s` | | `false` | Exclude placement service, Redis and Zipkin containers from self-hosted installation | -| `--from-dir` | | | Path to a local directory containing a downloaded "Dapr Installer Bundle" release which is used to `init` the airgap environment | -| `--image-registry` | | | Pulls container images required by Dapr from the given image registry | +| Name | Environment Variable | Default | Description | +| --------------------- | -------------------- | ------------- | ------------------------------------------------------------------------------------ | +| `--dashboard-version` | | `latest` | The version of the Dapr dashboard to install, for example: `1.0.0` | +| `--enable-ha` | | `false` | Enable high availability (HA) mode | +| `--enable-mtls` | | `true` | Enable mTLS in your cluster | +| `--from-dir` | | | Path to a local directory containing a downloaded "Dapr Installer Bundle" release which is used to `init` the airgap environment | +| `--help`, `-h` | | | Print this help message | +| `--image-registry` | | | Pulls container images required by Dapr from the given image registry | +| `--kubernetes`, `-k` | | `false` | Deploy Dapr to a Kubernetes cluster | +| `--namespace`, `-n` | | `dapr-system` | The Kubernetes namespace to install Dapr in | +| `--network` | | | The Docker network on which to install and deploy the Dapr runtime | +| `--runtime-version` | | `latest` | The version of the Dapr runtime to install, for example: `1.0.0` | +| `--set` | | | Configure options on the command line to be passed to the Dapr Helm chart and the Kubernetes cluster upon install. Can specify multiple values in a comma-separated list, for example: `key1=val1,key2=val2` | +| `--slim`, `-s` | | `false` | Exclude placement service, Redis and Zipkin containers from self-hosted installation | +| `--timeout` | | `300` | The wait timeout for the Kubernetes installation | +| `--wait` | | `false` | Wait for Kubernetes initialization to complete | | N/A |DAPR_DEFAULT_IMAGE_REGISTRY| | In self hosted mode, it is used to specify the default container registry to pull images from. When its value is set to `GHCR` or `ghcr` it pulls the required images from Github container registry. To default to Docker hub as default, just unset this env variable.| ### Examples @@ -111,3 +114,9 @@ You can also specify a specific runtime version. ```bash dapr init -k --runtime-version 1.4.0 ``` + +You can configure a set of [Helm Chart values](https://github.com/dapr/dapr/tree/master/charts/dapr#configuration) during Dapr installation to help set up a Kubernetes cluster. + +```bash +dapr init -k --set global.tag=1.0.0 --set dapr_operator.logLevel=error +``` \ No newline at end of file From 01dcb963019722e8bb59f42e31e2562ca2897848 Mon Sep 17 00:00:00 2001 From: Hannah Hunter Date: Thu, 14 Apr 2022 11:26:16 -0500 Subject: [PATCH 2/3] quick save Signed-off-by: Hannah Hunter --- daprdocs/content/en/reference/cli/dapr-init.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daprdocs/content/en/reference/cli/dapr-init.md b/daprdocs/content/en/reference/cli/dapr-init.md index 0d6ac3e03..566176220 100644 --- a/daprdocs/content/en/reference/cli/dapr-init.md +++ b/daprdocs/content/en/reference/cli/dapr-init.md @@ -115,7 +115,7 @@ You can also specify a specific runtime version. dapr init -k --runtime-version 1.4.0 ``` -You can configure a set of [Helm Chart values](https://github.com/dapr/dapr/tree/master/charts/dapr#configuration) during Dapr installation to help set up a Kubernetes cluster. +Use the `--set` flag to configure a set of [Helm Chart values](https://github.com/dapr/dapr/tree/master/charts/dapr#configuration) during Dapr installation to help set up a Kubernetes cluster. ```bash dapr init -k --set global.tag=1.0.0 --set dapr_operator.logLevel=error From 3cbcf52e067f92f806866a126a87396f5e2384bf Mon Sep 17 00:00:00 2001 From: Taction Date: Wed, 13 Apr 2022 14:22:18 +0800 Subject: [PATCH 3/3] Fix curl example `\` is missing for some curl examples. Signed-off-by: zhangchao --- daprdocs/content/en/reference/api/actors_api.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/daprdocs/content/en/reference/api/actors_api.md b/daprdocs/content/en/reference/api/actors_api.md index d783bd745..6adf5d985 100644 --- a/daprdocs/content/en/reference/api/actors_api.md +++ b/daprdocs/content/en/reference/api/actors_api.md @@ -53,7 +53,7 @@ You can provide the method parameters and values in the body of the request, for ```shell curl -X POST http://localhost:3500/v1.0/actors/x-wing/33/method/fly \ - -H "Content-Type: application/json" + -H "Content-Type: application/json" \ -d '{ "destination": "Hoth" }' @@ -63,7 +63,7 @@ or ```shell curl -X POST http://localhost:3500/v1.0/actors/x-wing/33/method/fly \ - -H "Content-Type: application/json" + -H "Content-Type: application/json" \ -d "{\"destination\":\"Hoth\"}" ``` @@ -103,7 +103,7 @@ Parameter | Description ```shell curl -X POST http://localhost:3500/v1.0/actors/stormtrooper/50/state \ - -H "Content-Type: application/json" + -H "Content-Type: application/json" \ -d '[ { "operation": "upsert", @@ -242,7 +242,7 @@ Parameter | Description ```shell curl http://localhost:3500/v1.0/actors/stormtrooper/50/reminders/checkRebels \ - -H "Content-Type: application/json" + -H "Content-Type: application/json" \ -d '{ "data": "someData", "dueTime": "1m", @@ -383,7 +383,7 @@ Parameter | Description ```shell curl http://localhost:3500/v1.0/actors/stormtrooper/50/timers/checkRebels \ - -H "Content-Type: application/json" + -H "Content-Type: application/json" \ -d '{ "data": "someData", "dueTime": "1m",