From 643cb41fb0d3abcab2ede45697161ec341c793ec Mon Sep 17 00:00:00 2001 From: Pruthvidhar R Dhodda <60198385+pruthvidhodda@users.noreply.github.com> Date: Thu, 20 Aug 2020 09:59:45 -0700 Subject: [PATCH] Replace all deprecated cli, daprd options and k8s annotations (#737) --- .../troubleshooting/common_issues.md | 10 +++++----- .../troubleshooting/profiling_debugging.md | 4 ++-- concepts/configuration/README.md | 4 ++-- concepts/hosting/README.md | 4 ++-- concepts/observability/logs.md | 2 +- concepts/publish-subscribe-messaging/README.md | 2 +- howto/configure-k8s/README.md | 10 +++++----- howto/control-concurrency/README.md | 18 +++++++++--------- howto/create-grpc-app/README.md | 14 +++++++------- howto/diagnose-with-tracing/azure-monitor.md | 4 ++-- howto/intellij-debugging-daprd/README.md | 10 +++++----- howto/invoke-and-discover-services/README.md | 6 +++--- howto/run-with-docker/README.md | 2 +- .../setup-azure-monitor.md | 2 +- .../setup-fluentd-es-kibana.md | 2 +- .../setup-azure-eventhubs.md | 2 +- .../azure-keyvault-managed-identity.md | 4 ++-- howto/setup-secret-store/azure-keyvault.md | 2 +- howto/setup-secret-store/local-secret-store.md | 2 +- howto/setup-state-store/setup-cloudstate.md | 2 +- howto/vscode-debugging-daprd/README.md | 8 ++++---- reference/specs/bindings/eventgrid.md | 10 +++++----- walkthroughs/daprrun.md | 6 +++--- 23 files changed, 65 insertions(+), 65 deletions(-) diff --git a/best-practices/troubleshooting/common_issues.md b/best-practices/troubleshooting/common_issues.md index 3dab08fad..54d3f2230 100644 --- a/best-practices/troubleshooting/common_issues.md +++ b/best-practices/troubleshooting/common_issues.md @@ -28,8 +28,8 @@ spec: app: node annotations: dapr.io/enabled: "true" - dapr.io/id: "nodeapp" - dapr.io/port: "3000" + dapr.io/app-id: "nodeapp" + dapr.io/app-port: "3000" spec: containers: - name: node @@ -152,13 +152,13 @@ Look at the Dapr API reference [here](../../reference/api/README.md) and make su ### I don't see any incoming events or calls from other services Have you specified the port your app is listening on? -In Kubernetes, make sure the `dapr.io/port` annotation is specified: +In Kubernetes, make sure the `dapr.io/app-port` annotation is specified:
annotations: dapr.io/enabled: "true" - dapr.io/id: "nodeapp" - dapr.io/port: "3000" + dapr.io/app-id: "nodeapp" + dapr.io/app-port: "3000"If using Dapr Standalone and the Dapr CLI, make sure you pass the `--app-port` flag to the `dapr run` command. diff --git a/best-practices/troubleshooting/profiling_debugging.md b/best-practices/troubleshooting/profiling_debugging.md index 05a74411a..173f4f646 100644 --- a/best-practices/troubleshooting/profiling_debugging.md +++ b/best-practices/troubleshooting/profiling_debugging.md @@ -16,8 +16,8 @@ To enable profiling in Kubernetes, simply add the following annotation to your D
annotations: dapr.io/enabled: "true" - dapr.io/id: "rust-app" - dapr.io/profiling: "true" + dapr.io/app-id: "rust-app" + dapr.io/enable-profiling: "true"### Standalone diff --git a/concepts/configuration/README.md b/concepts/configuration/README.md index c862efe37..172ffcaaf 100644 --- a/concepts/configuration/README.md +++ b/concepts/configuration/README.md @@ -32,8 +32,8 @@ A Dapr sidecar can apply a specific configuration by using a ```dapr.io/config`` ```yml annotations: dapr.io/enabled: "true" - dapr.io/id: "nodeapp" - dapr.io/port: "3000" + dapr.io/app-id: "nodeapp" + dapr.io/app-port: "3000" dapr.io/config: "myappconfig" ``` Note: There are more [Kubernetes annotations](../../howto/configure-k8s/README.md) available to configure the Dapr sidecar on activation by sidecar Injector system service. diff --git a/concepts/hosting/README.md b/concepts/hosting/README.md index 000bf2668..2198654a2 100644 --- a/concepts/hosting/README.md +++ b/concepts/hosting/README.md @@ -32,8 +32,8 @@ Deploying and running a Dapr enabled application into your Kubernetes cluster is ```yml annotations: dapr.io/enabled: "true" - dapr.io/id: "nodeapp" - dapr.io/port: "3000" + dapr.io/app-id: "nodeapp" + dapr.io/app-port: "3000" dapr.io/config: "tracing" ``` You can see some examples [here](https://github.com/dapr/quickstarts/tree/master/hello-kubernetes/deploy) in the Kubernetes getting started sample. diff --git a/concepts/observability/logs.md b/concepts/observability/logs.md index a7b92e165..f9848570d 100644 --- a/concepts/observability/logs.md +++ b/concepts/observability/logs.md @@ -73,7 +73,7 @@ spec: app: python annotations: dapr.io/enabled: "true" - dapr.io/id: "pythonapp" + dapr.io/app-id: "pythonapp" dapr.io/log-as-json: "true" ... ``` diff --git a/concepts/publish-subscribe-messaging/README.md b/concepts/publish-subscribe-messaging/README.md index e5c672f44..42c5516be 100644 --- a/concepts/publish-subscribe-messaging/README.md +++ b/concepts/publish-subscribe-messaging/README.md @@ -19,7 +19,7 @@ The burden of dealing with concepts like consumer groups and multiple instances ### App ID -Dapr has the concept of an `id`. This is specified in Kubernetes using the `dapr.io/id` annotation and with the `app-id` flag using the Dapr CLI. Dapr requires an ID to be assigned to every application. +Dapr has the concept of an `id`. This is specified in Kubernetes using the `dapr.io/app-id` annotation and with the `app-id` flag using the Dapr CLI. Dapr requires an ID to be assigned to every application. When multiple instances of the same application ID subscribe to a topic, Dapr will make sure to deliver the message to only one instance. If two different applications with different IDs subscribe to a topic, at least one instance in each application receives a copy of the same message. diff --git a/howto/configure-k8s/README.md b/howto/configure-k8s/README.md index c2f39bf4c..bc14b2fb0 100644 --- a/howto/configure-k8s/README.md +++ b/howto/configure-k8s/README.md @@ -8,14 +8,14 @@ The following table shows all the supported pod Spec annotations supported by Da | Annotation | Description | ----------------------------------- | -------------- | | `dapr.io/enabled` | Setting this paramater to `true` injects the Dapr sidecar into the pod -| `dapr.io/port` | This parameter tells Dapr which port your application is listening on -| `dapr.io/id` | The unique ID of the application. Used for service discovery, state encapsulation and the pub/sub consumer ID +| `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/profiling` | Setting this paramater to `true` starts the Dapr profiling server on port `7777`. Default is `false` -| `dapr.io/protocol` | Tells Dapr which protocol your application is using. Valid options are `http` and `grpc`. Default is `http` -| `dapr.io/max-concurrency` | Limit the concurrency of your application. A valid value is any number larger than `0` +| `dapr.io/enable-profiling` | Setting this paramater to `true` starts the Dapr profiling server on port `7777`. Default is `false` +| `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/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 diff --git a/howto/control-concurrency/README.md b/howto/control-concurrency/README.md index 4b0df145a..501f01212 100644 --- a/howto/control-concurrency/README.md +++ b/howto/control-concurrency/README.md @@ -5,14 +5,14 @@ Using Dapr, you can control how many requests and events will invoke your applic *Note that this rate limiting is guaranteed for every event that's coming from Dapr, meaning Pub/Sub events, direct invocation from other services, bindings events etc. Dapr can't enforce the concurrency policy on requests that are coming to your app externally.* -## Setting max-concurrency +## Setting app-max-concurrency Without using Dapr, a developer would need to create some sort of a semaphore in the application and take care of acquiring and releasing it. Using Dapr, there are no code changes needed to an app. -### Setting max-concurrency in Kubernetes +### Setting app-max-concurrency in Kubernetes -To set max-concurrency in Kubernetes, add the following annotation to your pod: +To set app-max-concurrency in Kubernetes, add the following annotation to your pod: ```yaml apiVersion: apps/v1 @@ -33,18 +33,18 @@ spec: app: nodesubscriber annotations: dapr.io/enabled: "true" - dapr.io/id: "nodesubscriber" - dapr.io/port: "3000" - dapr.io/max-concurrency: "1" + dapr.io/app-id: "nodesubscriber" + dapr.io/app-port: "3000" + dapr.io/app-max-concurrency: "1" ... ``` -### Setting max-concurrency using the Dapr CLI +### Setting app-max-concurrency using the Dapr CLI -To set max-concurrency with the Dapr CLI for running on your local dev machine, add the `max-concurrency` flag: +To set app-max-concurrency with the Dapr CLI for running on your local dev machine, add the `app-max-concurrency` flag: ```bash -dapr run --max-concurrency 1 --app-port 5000 python ./app.py +dapr run --app-max-concurrency 1 --app-port 5000 python ./app.py ``` The above examples will effectively turn your app into a single concurrent service. diff --git a/howto/create-grpc-app/README.md b/howto/create-grpc-app/README.md index 0cc7ee178..56c621ae9 100644 --- a/howto/create-grpc-app/README.md +++ b/howto/create-grpc-app/README.md @@ -35,9 +35,9 @@ spec: app: myapp annotations: dapr.io/enabled: "true" - dapr.io/id: "myapp" - dapr.io/protocol: "grpc" - dapr.io/port: "5005" + dapr.io/app-id: "myapp" + dapr.io/app-protocol: "grpc" + dapr.io/app-port: "5005" ... ``` @@ -45,10 +45,10 @@ This tells Dapr to communicate with your app via gRPC over port `5005`. ### Standalone -When running in standalone mode, use the `--protocol` flag to tell Dapr to use gRPC to talk to the app: +When running in standalone mode, use the `--app-protocol` flag to tell Dapr to use gRPC to talk to the app: ```bash -dapr run --protocol grpc --app-port 5005 -- node app.js +dapr run --app-protocol grpc --app-port 5005 node app.js ``` ## Invoking Dapr - Go example @@ -213,10 +213,10 @@ This creates a gRPC server for your app on port 4000. To run locally, use the Dapr CLI: ``` -dapr run --app-id goapp --app-port 4000 --protocol grpc -- go run main.go +dapr run --app-id goapp --app-port 4000 --app-protocol grpc go run main.go ``` -On Kubernetes, set the required `dapr.io/protocol: "grpc"` and `dapr.io/port: "4000` annotations in your pod spec template as mentioned above. +On Kubernetes, set the required `dapr.io/app-protocol: "grpc"` and `dapr.io/app-port: "4000` annotations in your pod spec template as mentioned above. ## Other languages diff --git a/howto/diagnose-with-tracing/azure-monitor.md b/howto/diagnose-with-tracing/azure-monitor.md index ed4dda01f..8671695ff 100644 --- a/howto/diagnose-with-tracing/azure-monitor.md +++ b/howto/diagnose-with-tracing/azure-monitor.md @@ -149,8 +149,8 @@ spec: ... annotations: dapr.io/enabled: "true" - dapr.io/id: "calculator-front-end" - dapr.io/port: "8080" + dapr.io/app-id: "calculator-front-end" + dapr.io/app-port: "8080" dapr.io/config: "tracing" ``` diff --git a/howto/intellij-debugging-daprd/README.md b/howto/intellij-debugging-daprd/README.md index 252607578..0b2bb7d0a 100644 --- a/howto/intellij-debugging-daprd/README.md +++ b/howto/intellij-debugging-daprd/README.md @@ -3,7 +3,7 @@ When developing Dapr applications, you typically use the Dapr CLI to start your 'Daprized' service similar to this: ```bash -dapr run --app-id nodeapp --app-port 3000 --port 3500 app.js +dapr run --app-id nodeapp --app-port 3000 --dapr-http-port 3500 app.js ``` This uses the default components yaml files (created on `dapr init`) so that your service can interact with the local Redis container. This is great when you are just getting started but what if you want to attach a debugger to your service and step through the code? This is where you can use the dapr cli without invoking an app. @@ -27,10 +27,10 @@ Create or edit the file in `$HOME/.IdeaIC2019.3/config/tools/External\ Tools.xml