Skip to content

Commit 643cb41

Browse files
Replace all deprecated cli, daprd options and k8s annotations (#737)
1 parent 93837dc commit 643cb41

File tree

23 files changed

+65
-65
lines changed

23 files changed

+65
-65
lines changed

best-practices/troubleshooting/common_issues.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ spec:
2828
app: node
2929
annotations:
3030
<b>dapr.io/enabled: "true"</b>
31-
<b>dapr.io/id: "nodeapp"</b>
32-
<b>dapr.io/port: "3000"</b>
31+
<b>dapr.io/app-id: "nodeapp"</b>
32+
<b>dapr.io/app-port: "3000"</b>
3333
spec:
3434
containers:
3535
- name: node
@@ -152,13 +152,13 @@ Look at the Dapr API reference [here](../../reference/api/README.md) and make su
152152
### I don't see any incoming events or calls from other services
153153

154154
Have you specified the port your app is listening on?
155-
In Kubernetes, make sure the `dapr.io/port` annotation is specified:
155+
In Kubernetes, make sure the `dapr.io/app-port` annotation is specified:
156156

157157
<pre>
158158
annotations:
159159
dapr.io/enabled: "true"
160-
dapr.io/id: "nodeapp"
161-
<b>dapr.io/port: "3000"</b>
160+
dapr.io/app-id: "nodeapp"
161+
<b>dapr.io/app-port: "3000"</b>
162162
</pre>
163163

164164
If using Dapr Standalone and the Dapr CLI, make sure you pass the `--app-port` flag to the `dapr run` command.

best-practices/troubleshooting/profiling_debugging.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ To enable profiling in Kubernetes, simply add the following annotation to your D
1616
<pre>
1717
annotations:
1818
dapr.io/enabled: "true"
19-
dapr.io/id: "rust-app"
20-
<b>dapr.io/profiling: "true"</b>
19+
dapr.io/app-id: "rust-app"
20+
<b>dapr.io/enable-profiling: "true"</b>
2121
</pre>
2222

2323
### Standalone

concepts/configuration/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ A Dapr sidecar can apply a specific configuration by using a ```dapr.io/config``
3232
```yml
3333
annotations:
3434
dapr.io/enabled: "true"
35-
dapr.io/id: "nodeapp"
36-
dapr.io/port: "3000"
35+
dapr.io/app-id: "nodeapp"
36+
dapr.io/app-port: "3000"
3737
dapr.io/config: "myappconfig"
3838
```
3939
Note: There are more [Kubernetes annotations](../../howto/configure-k8s/README.md) available to configure the Dapr sidecar on activation by sidecar Injector system service.

concepts/hosting/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ Deploying and running a Dapr enabled application into your Kubernetes cluster is
3232
```yml
3333
annotations:
3434
dapr.io/enabled: "true"
35-
dapr.io/id: "nodeapp"
36-
dapr.io/port: "3000"
35+
dapr.io/app-id: "nodeapp"
36+
dapr.io/app-port: "3000"
3737
dapr.io/config: "tracing"
3838
```
3939
You can see some examples [here](https://github.com/dapr/quickstarts/tree/master/hello-kubernetes/deploy) in the Kubernetes getting started sample.

concepts/observability/logs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ spec:
7373
app: python
7474
annotations:
7575
dapr.io/enabled: "true"
76-
dapr.io/id: "pythonapp"
76+
dapr.io/app-id: "pythonapp"
7777
dapr.io/log-as-json: "true"
7878
...
7979
```

concepts/publish-subscribe-messaging/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The burden of dealing with concepts like consumer groups and multiple instances
1919

2020
### App ID
2121

22-
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.
22+
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.
2323

2424
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.
2525

howto/configure-k8s/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ The following table shows all the supported pod Spec annotations supported by Da
88
| Annotation | Description
99
| ----------------------------------- | -------------- |
1010
| `dapr.io/enabled` | Setting this paramater to `true` injects the Dapr sidecar into the pod
11-
| `dapr.io/port` | This parameter tells Dapr which port your application is listening on
12-
| `dapr.io/id` | The unique ID of the application. Used for service discovery, state encapsulation and the pub/sub consumer ID
11+
| `dapr.io/app-port` | This parameter tells Dapr which port your application is listening on
12+
| `dapr.io/app-id` | The unique ID of the application. Used for service discovery, state encapsulation and the pub/sub consumer ID
1313
| `dapr.io/log-level` | Sets the log level for the Dapr sidecar. Allowed values are `debug`, `info`, `warn`, `error`. Default is `info`
1414
| `dapr.io/config` | Tells Dapr which Configuration CRD to use
1515
| `dapr.io/log-as-json` | Setting this parameter to `true` outputs logs in JSON format. Default is `false`
16-
| `dapr.io/profiling` | Setting this paramater to `true` starts the Dapr profiling server on port `7777`. Default is `false`
17-
| `dapr.io/protocol` | Tells Dapr which protocol your application is using. Valid options are `http` and `grpc`. Default is `http`
18-
| `dapr.io/max-concurrency` | Limit the concurrency of your application. A valid value is any number larger than `0`
16+
| `dapr.io/enable-profiling` | Setting this paramater to `true` starts the Dapr profiling server on port `7777`. Default is `false`
17+
| `dapr.io/app-protocol` | Tells Dapr which protocol your application is using. Valid options are `http` and `grpc`. Default is `http`
18+
| `dapr.io/app-max-concurrency` | Limit the concurrency of your application. A valid value is any number larger than `0`
1919
| `dapr.io/metrics-port` | Sets the port for the sidecar metrics server. Default is `9090`
2020
| `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
2121
| `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

howto/control-concurrency/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ Using Dapr, you can control how many requests and events will invoke your applic
55

66
*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.*
77

8-
## Setting max-concurrency
8+
## Setting app-max-concurrency
99

1010
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.
1111
Using Dapr, there are no code changes needed to an app.
1212

13-
### Setting max-concurrency in Kubernetes
13+
### Setting app-max-concurrency in Kubernetes
1414

15-
To set max-concurrency in Kubernetes, add the following annotation to your pod:
15+
To set app-max-concurrency in Kubernetes, add the following annotation to your pod:
1616

1717
```yaml
1818
apiVersion: apps/v1
@@ -33,18 +33,18 @@ spec:
3333
app: nodesubscriber
3434
annotations:
3535
dapr.io/enabled: "true"
36-
dapr.io/id: "nodesubscriber"
37-
dapr.io/port: "3000"
38-
<b>dapr.io/max-concurrency: "1"</b>
36+
dapr.io/app-id: "nodesubscriber"
37+
dapr.io/app-port: "3000"
38+
<b>dapr.io/app-max-concurrency: "1"</b>
3939
...
4040
```
4141

42-
### Setting max-concurrency using the Dapr CLI
42+
### Setting app-max-concurrency using the Dapr CLI
4343

44-
To set max-concurrency with the Dapr CLI for running on your local dev machine, add the `max-concurrency` flag:
44+
To set app-max-concurrency with the Dapr CLI for running on your local dev machine, add the `app-max-concurrency` flag:
4545

4646
```bash
47-
dapr run --max-concurrency 1 --app-port 5000 python ./app.py
47+
dapr run --app-max-concurrency 1 --app-port 5000 python ./app.py
4848
```
4949

5050
The above examples will effectively turn your app into a single concurrent service.

howto/create-grpc-app/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,20 @@ spec:
3535
app: myapp
3636
annotations:
3737
dapr.io/enabled: "true"
38-
dapr.io/id: "myapp"
39-
dapr.io/protocol: "grpc"
40-
dapr.io/port: "5005"
38+
dapr.io/app-id: "myapp"
39+
dapr.io/app-protocol: "grpc"
40+
dapr.io/app-port: "5005"
4141
...
4242
```
4343

4444
This tells Dapr to communicate with your app via gRPC over port `5005`.
4545

4646
### Standalone
4747

48-
When running in standalone mode, use the `--protocol` flag to tell Dapr to use gRPC to talk to the app:
48+
When running in standalone mode, use the `--app-protocol` flag to tell Dapr to use gRPC to talk to the app:
4949

5050
```bash
51-
dapr run --protocol grpc --app-port 5005 -- node app.js
51+
dapr run --app-protocol grpc --app-port 5005 node app.js
5252
```
5353

5454
## Invoking Dapr - Go example
@@ -213,10 +213,10 @@ This creates a gRPC server for your app on port 4000.
213213
To run locally, use the Dapr CLI:
214214

215215
```
216-
dapr run --app-id goapp --app-port 4000 --protocol grpc -- go run main.go
216+
dapr run --app-id goapp --app-port 4000 --app-protocol grpc go run main.go
217217
```
218218

219-
On Kubernetes, set the required `dapr.io/protocol: "grpc"` and `dapr.io/port: "4000` annotations in your pod spec template as mentioned above.
219+
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.
220220

221221
## Other languages
222222

howto/diagnose-with-tracing/azure-monitor.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,8 @@ spec:
149149
...
150150
annotations:
151151
dapr.io/enabled: "true"
152-
dapr.io/id: "calculator-front-end"
153-
dapr.io/port: "8080"
152+
dapr.io/app-id: "calculator-front-end"
153+
dapr.io/app-port: "8080"
154154
dapr.io/config: "tracing"
155155
```
156156

0 commit comments

Comments
 (0)