diff --git a/daprdocs/content/en/developing-applications/building-blocks/secrets/howto-secrets.md b/daprdocs/content/en/developing-applications/building-blocks/secrets/howto-secrets.md index de8e1d221..4ada756ba 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/secrets/howto-secrets.md +++ b/daprdocs/content/en/developing-applications/building-blocks/secrets/howto-secrets.md @@ -42,6 +42,9 @@ spec: Make sure to replace `` with the path to the JSON file you just created. +>Note: the path to the secret store JSON is relative to where you call `dapr run` from. + + To configure a different kind of secret store see the guidance on [how to configure a secret store]({{}}) and review [supported secret stores]({{}}) to see specific details required for different secret store solutions. ## Get a secret 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 91022eb00..0c21d7dbb 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 @@ -57,7 +57,7 @@ spec: dapr.io/app-port: "5000" ... ``` -*If your app uses an SSL connection, you can tell Dapr to invoke your app over an insecure SSL connection with the `app-ssl: "true"` annotation (full list [here]({{< ref kubernetes-annotations.md >}}))* +*If your app uses an SSL connection, you can tell Dapr to invoke your app over an insecure SSL connection with the `app-ssl: "true"` annotation (full list [here]({{< ref arguments-annotations-overview.md >}}))* {{% /codetab %}} diff --git a/daprdocs/content/en/getting-started/get-started-component.md b/daprdocs/content/en/getting-started/get-started-component.md index 6781bac40..a8e05dc5a 100644 --- a/daprdocs/content/en/getting-started/get-started-component.md +++ b/daprdocs/content/en/getting-started/get-started-component.md @@ -55,7 +55,7 @@ spec: value: ":" ``` -You can see that the above file definition has a `type: secretstores.local.file` which tells Dapr to use the local file component as a secret store. The metadata fields provide component specific information needed to work with this component (in this case, the path to the secret store JSON) +You can see that the above file definition has a `type: secretstores.local.file` which tells Dapr to use the local file component as a secret store. The metadata fields provide component specific information needed to work with this component (in this case, the path to the secret store JSON is relative to where you call `dapr run` from.) ## Step 3: Run the Dapr sidecar diff --git a/daprdocs/content/en/operations/configuration/configuration-overview.md b/daprdocs/content/en/operations/configuration/configuration-overview.md index e027eda25..5059a8d58 100644 --- a/daprdocs/content/en/operations/configuration/configuration-overview.md +++ b/daprdocs/content/en/operations/configuration/configuration-overview.md @@ -37,7 +37,7 @@ A Dapr sidecar can apply a specific configuration by using a ```dapr.io/config`` dapr.io/app-port: "3000" dapr.io/config: "myappconfig" ``` -Note: There are more [Kubernetes annotations]({{< ref "kubernetes-annotations.md" >}}) available to configure the Dapr sidecar on activation by sidecar Injector system service. +Note: There are more [Kubernetes annotations]({{< ref "arguments-annotations-overview.md" >}}) available to configure the Dapr sidecar on activation by sidecar Injector system service. ### Sidecar configuration settings diff --git a/daprdocs/content/en/operations/configuration/increase-request-size.md b/daprdocs/content/en/operations/configuration/increase-request-size.md index a71eff13f..118dfaa3a 100644 --- a/daprdocs/content/en/operations/configuration/increase-request-size.md +++ b/daprdocs/content/en/operations/configuration/increase-request-size.md @@ -57,4 +57,4 @@ spec: {{< /tabs >}} ## Related links -- [Dapr Kubernetes pod annotations spec]({{< ref kubernetes-annotations.md >}}) +- [Dapr Kubernetes pod annotations spec]({{< ref arguments-annotations-overview.md >}}) diff --git a/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-annotations.md b/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-annotations.md deleted file mode 100644 index 454434820..000000000 --- a/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-annotations.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -type: docs -title: "Dapr Kubernetes pod annotations spec" -linkTitle: "Kubernetes annotations" -weight: 50000 -description: "The available annotations available when configuring Dapr in your Kubernetes environment" ---- - -The following table shows all the supported pod Spec annotations supported by Dapr. - -| Annotation | Description | -|---------------------------------------------------|-------------| -| `dapr.io/enabled` | Setting this paramater to `true` injects the Dapr sidecar into the pod -| `dapr.io/app-port` | This parameter tells Dapr which port your application is listening on -| `dapr.io/app-id` | The unique ID of the application. Used for service discovery, state encapsulation and the pub/sub consumer ID -| `dapr.io/log-level` | Sets the log level for the Dapr sidecar. Allowed values are `debug`, `info`, `warn`, `error`. Default is `info` -| `dapr.io/config` | Tells Dapr which Configuration CRD to use -| `dapr.io/log-as-json` | Setting this parameter to `true` outputs logs in JSON format. Default is `false` -| `dapr.io/enable-profiling` | Setting this paramater to `true` starts the Dapr profiling server on port `7777`. Default is `false` -| `dapr.io/api-token-secret` | Tells Dapr which Kubernetes secret to use for token based API authentication. By default this is not set. -| `dapr.io/app-protocol` | Tells Dapr which protocol your application is using. Valid options are `http` and `grpc`. Default is `http` -| `dapr.io/app-max-concurrency` | Limit the concurrency of your application. A valid value is any number larger than `0` -| `dapr.io/app-ssl` | Tells Dapr to invoke the app over an insecure SSL connection. Applies to both HTTP and gRPC. Traffic between your app and the Dapr sidecar is encrypted with a certificate issued by a non-trusted certificate authority, which is considered insecure. Default is `false`. -| `dapr.io/metrics-port` | Sets the port for the sidecar metrics server. Default is `9090` -| `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 -| `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 -| `dapr.io/sidecar-cpu-request` | Amount of CPU that the Dapr sidecar requests. See valid values [here](https://kubernetes.io/docs/tasks/administer-cluster/manage-resources/quota-memory-cpu-namespace/). By default this is not set -| `dapr.io/sidecar-memory-request` | Amount of Memory that the Dapr sidecar requests .See valid values [here](https://kubernetes.io/docs/tasks/administer-cluster/manage-resources/quota-memory-cpu-namespace/). By default this is not set -| `dapr.io/sidecar-liveness-probe-delay-seconds` | Number of seconds after the sidecar container has started before liveness probe is initiated. Read more [here](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes). Default is `3` -| `dapr.io/sidecar-liveness-probe-timeout-seconds` | Number of seconds after which the sidecar liveness probe times out. Read more [here](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes). Default is `3` -| `dapr.io/sidecar-liveness-probe-period-seconds` | How often (in seconds) to perform the sidecar liveness probe. Read more [here](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes). Default is `6` -| `dapr.io/sidecar-liveness-probe-threshold` | When the sidecar liveness probe fails, Kubernetes will try N times before giving up. In this case, the Pod will be marked Unhealthy. Read more about `failureThreshold` [here](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes). Default is `3` -| `dapr.io/sidecar-readiness-probe-delay-seconds` | Number of seconds after the sidecar container has started before readiness probe is initiated. Read more [here](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes). Default is `3` -| `dapr.io/sidecar-readiness-probe-timeout-seconds` | Number of seconds after which the sidecar readiness probe times out. Read more [here](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes). Default is `3` -| `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` -| `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` -| `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.io/env` | List of environment variable to be injected into the sidecar. Strings consisting of key=value pairs separated by a comma. diff --git a/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-overview.md b/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-overview.md index 36e5efe72..397bc1d7a 100644 --- a/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-overview.md +++ b/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-overview.md @@ -22,7 +22,7 @@ Read [this guide]({{< ref kubernetes-deploy.md >}}) to learn how to deploy Dapr ## Adding Dapr to a Kubernetes deployment -Deploying and running a Dapr enabled application into your Kubernetes cluster is as simple as adding a few annotations to the deployment schemes. To give your service an `id` and `port` known to Dapr, turn on tracing through configuration and launch the Dapr sidecar container, you annotate your Kubernetes deployment like this. For more information check [dapr annotations]({{< ref kubernetes-annotations.md >}}) +Deploying and running a Dapr enabled application into your Kubernetes cluster is as simple as adding a few annotations to the deployment schemes. To give your service an `id` and `port` known to Dapr, turn on tracing through configuration and launch the Dapr sidecar container, you annotate your Kubernetes deployment like this. For more information check [dapr annotations]({{< ref arguments-annotations-overview.md >}}) ```yml annotations: diff --git a/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-production.md b/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-production.md index a3d2695b5..1a4f2b875 100644 --- a/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-production.md +++ b/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-production.md @@ -35,7 +35,7 @@ The following Dapr control plane deployments are optional: ## Sidecar resource settings -To set the resource assignments for the Dapr sidecar, see the annotations [here]({{< ref "kubernetes-annotations.md" >}}). +To set the resource assignments for the Dapr sidecar, see the annotations [here]({{< ref "arguments-annotations-overview.md" >}}). The specific annotations related to resource constraints are: - `dapr.io/sidecar-cpu-limit` diff --git a/daprdocs/content/en/operations/hosting/self-hosted/self-hosted-overview.md b/daprdocs/content/en/operations/hosting/self-hosted/self-hosted-overview.md index 9077cc9ee..49a417b9f 100644 --- a/daprdocs/content/en/operations/hosting/self-hosted/self-hosted-overview.md +++ b/daprdocs/content/en/operations/hosting/self-hosted/self-hosted-overview.md @@ -23,7 +23,7 @@ The `dapr-placement` service is responsible for managing the actor distribution ## Launching applications with Dapr -You can use the [`dapr run` CLI command]({{< ref dapr-run.md >}}) to a Dapr sidecar process along with your application. +You can use the [`dapr run` CLI command]({{< ref dapr-run.md >}}) to a Dapr sidecar process along with your application. Additional arguments and flags can be found [here]({{< ref arguments-annotations-overview.md >}}). ## Name resolution diff --git a/daprdocs/content/en/operations/troubleshooting/common_issues.md b/daprdocs/content/en/operations/troubleshooting/common_issues.md index 9a802effa..230c1d135 100644 --- a/daprdocs/content/en/operations/troubleshooting/common_issues.md +++ b/daprdocs/content/en/operations/troubleshooting/common_issues.md @@ -91,7 +91,7 @@ The most common cause of this failure is that a component (such as a state store To diagnose the root cause: -- Significantly increase the liveness probe delay - [link]({{< ref "kubernetes-annotations.md" >}}) +- Significantly increase the liveness probe delay - [link]({{< ref "arguments-annotations-overview.md" >}}) - Set the log level of the sidecar to debug - [link]({{< ref "logs-troubleshooting.md#setting-the-sidecar-log-level" >}}) - Watch the logs for meaningful information - [link]({{< ref "logs-troubleshooting.md#viewing-logs-on-kubernetes" >}}) diff --git a/daprdocs/content/en/reference/arguments-annotations-overview.md b/daprdocs/content/en/reference/arguments-annotations-overview.md new file mode 100644 index 000000000..a428b73cc --- /dev/null +++ b/daprdocs/content/en/reference/arguments-annotations-overview.md @@ -0,0 +1,54 @@ +--- +type: docs +title: "Dapr arguments and annotations for daprd, CLI, and Kubernetes" +linkTitle: "Arguments and annotations" +description: "The arguments and annotations available when configuring Dapr in different environments" +weight: 300 +aliases: + - "/operations/hosting/kubernetes/kubernetes-annotations/" +--- + +This table is meant to help users understand the equivalent options for running Dapr sidecars in different contexts--via the [CLI]({{< ref cli-overview.md >}}) directly, via daprd, or on [Kubernetes]({{< ref kubernetes-overview.md >}}) via annotations. + +| daprd | dapr CLI | CLI shorthand | K8s annotations | Description +|----- | ------- | -----------| ----------| ------------ | ------------ | +| `--allowed-origins` | not supported | | not supported | Allowed HTTP origins (default "*") | +| `--app-id` | `--app-id` | `-i` | `dapr.io/app-id` | The unique ID of the application. Used for service discovery, state encapsulation and the pub/sub consumer ID | +| `--app-port` | `--app-port` | `-p` | `dapr.io/app-port` | This parameter tells Dapr which port your application is listening on | +| `--app-ssl` | `--app-ssl` | | `dapr.io/app-ssl` | Sets the URI scheme of the app to https and attempts an SSL connection | +| `--components-path` | `--components-path` | `-d` | not supported | Path for components directory. If empty, components will not be loaded. | +| `--config` | `--config` | `-c` | `dapr.io/config` | Tells Dapr which Configuration CRD to use | +| `--control-plane-address` | not supported | | not supported | Address for a Dapr control plane | +| `--dapr-grpc-port` | `--dapr-grpc-port` | | not supported | gRPC port for the Dapr API to listen on (default "50001") | +| `--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 | +| not supported | `--image` | | not supported +| `--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-mtls` | not supported | | configuration spec | Enables automatic mTLS for daprd to daprd communication channels | +| `--enable-profiling` | `--enable-profiling` | | `dapr.io/enable-profiling` | Enable profiling | +| `--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` | +| `--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` +| `--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") | +| `--placement-address` | `--placement-address` | | not supported | Addresses for Dapr Actor Placement servers | +| `--profiling-port` | `--profiling-port` | | not supported | The port for the profile server (default "7777") | +| `--app-protocol` | `--app-protocol` | `-P` | `dapr.io/app-protocol` | Tells Dapr which protocol your application is using. Valid options are `http` and `grpc`. Default is `http` | +| `--sentry-address` | `--sentry-address` | | not supported | Address for the Sentry CA service | +| `--version` | `--version` | `-v` | not supported | Prints the runtime version | +| 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/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 +| not supported | not supported | | `dapr.io/sidecar-cpu-request` | Amount of CPU that the Dapr sidecar requests. 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-request` | Amount of Memory that the Dapr sidecar requests .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-liveness-probe-delay-seconds` | Number of seconds after the sidecar container has started before liveness probe is initiated. Read more [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/sidecar-liveness-probe-timeout-seconds` | Number of seconds after which the sidecar liveness probe times out. Read more [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/sidecar-liveness-probe-period-seconds` | How often (in seconds) to perform the sidecar liveness 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-liveness-probe-threshold` | When the sidecar liveness probe fails, Kubernetes will try N times before giving up. In this case, the Pod will be marked Unhealthy. 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/sidecar-readiness-probe-delay-seconds` | Number of seconds after the sidecar container has started before readiness probe is initiated. Read more [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/sidecar-readiness-probe-timeout-seconds` | Number of seconds after which the sidecar readiness probe times out. Read more [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/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. diff --git a/daprdocs/content/en/reference/cli/cli-overview.md b/daprdocs/content/en/reference/cli/cli-overview.md index 12497fed6..a7192bddb 100644 --- a/daprdocs/content/en/reference/cli/cli-overview.md +++ b/daprdocs/content/en/reference/cli/cli-overview.md @@ -50,7 +50,7 @@ Use "dapr [command] --help" for more information about a command. ## Command Reference -You can learn more about each Dapr command from the links below. +You can learn more about each Dapr command from the links below. - [`dapr completion`]({{< ref dapr-completion.md >}}) - [`dapr components`]({{< ref dapr-components.md >}}) diff --git a/daprdocs/content/en/reference/cli/dapr-run.md b/daprdocs/content/en/reference/cli/dapr-run.md index fb48c9c7e..cfeedee1e 100644 --- a/daprdocs/content/en/reference/cli/dapr-run.md +++ b/daprdocs/content/en/reference/cli/dapr-run.md @@ -7,7 +7,7 @@ description: "Detailed information on the run CLI command" ## Description -Run Dapr and (optionally) your application side by side. +Run Dapr and (optionally) your application side by side. A full list comparing daprd arguments, CLI arguments, and Kubernetes annotations can be found [here]({{< ref arguments-annotations-overview.md >}}). ## Supported platforms