Dapr 0.10.0
It's been six weeks, and We're happy to announce the release of Dapr v0.10.0!
With Dapr approaching v1.0, our releases increasingly focus on operational concerns like stability, reliability, and upgradability in production environments.
As always, community and user requests and feedback are top of mind along with bug fixes.
We would like to extend our thanks to all new and existing contributors who helped make this release happen.
Highlights
- Support for multiple Pub/Sub components Publisher, Subscriber
- Support for Windows containers on Kubernetes
- New Bulk Get API for State
- New Transactions API for State
- Highly available control plane on Kubernetes
- Production deployment and upgrade guidelines for Kubernetes
- Improved Go and Python SDKs
- Improved Dashboard with new features
- New CLI commands (view root cert expiry, export TLS certs, init on k8s with a custom namespace)
- New components: InfluxDB binding, Non-interactive OAuth2 middleware, Azure Blob Storage state store
If you're new to Dapr, visit the getting started page and familiarize yourself with Dapr.
Docs have been updated with all the new features and changes of this release. To get started with new capabilities introduced in this release, go to the Concepts and the How To section.
Note: This release contains a few breaking changes.
See this section on upgrading Dapr to version 0.10.0.
New in this release
Dapr Runtime
Refactored Kubernetes operator with Kubebuilder, allowing for multi-replica reconciliation (Thanks @yittg)
Added Windows containers support
Added support for multiple pub/sub components
Added Bulk Get API
Changed command line arguments
Added stdout log exporter (Thanks @brendandburns)
Fixed actors stability bug under high RPS
Added Windows e2e tests
Removed outdated third-party vendor docs (Thanks @yittg)
Fixed actor reminder firing twice bug
Added topic field to Pub/Sub cloud events spec (Thanks @allymparker)
Upgraded to use Go 1.15
Removed glog dependency and redundant flags
Fixed race condition in actor timers
Updated dashboard permissions Helm chart
Fixed test default values for TARGET_OS
and TARGET_ARCH
Added CPU/Memory utilization for performance tests
Added ability to turn off telemetry for performance tests
Fixed sidecar not resolving secrets after first time installation
Removed state retry options
Fixed actor reminders overwrite bug
Added Grafana dashboards as part of release assets
Fixed grpc_client_method
and grpc_client_status
metrics tags always empty bug (Thanks @kirk91)
Added log entry on sidecar when API auth token is enabled
Added versioning scheme to component definition
Updated pub/sub to CloudEvents 1.0 spec
Added High availability option to Helm Chart
Fixed operator k8s service update bug (Thanks @yittg)
Added traceparent header in gRPC call
Dapr CLI
Added support for multi pub/sub in publish
command
Added command to export existing TLS certificates in a Kubernetes cluster
Added command to check on TLS root cert expiry date
Changed dapr init -k
to allow for custom namespaces, HA mode and TLS enabled/disabled
Changed command line arguments to be consistent with daprd
Fixed version flag not uniform in standalone/Kubernetes modes
Updated helm message for uninstall --all
command
Added webhook to trigger homebrew release
Changed init and uninstall behavior for self hosted mode
Components
Added oauth2 client authorization middleware (Thanks @h2floh)
Added Azure Blob Storage state store (Thanks @ksivamuthu)
Added InflubxDB output binding (Thanks @gbaeke)
Added TLS support for MQTT pub/sub (Thanks @kumaya)
Fixed SQL Server data serialization issue with gRPC
Fixed RabbitMQ pub/sub consumer exclusivity bug
Updated output bindings operations list
Added Metadata field to transactional state request
Fixed SQL Server connection leak issue
Updated Kubernetes events input binding with new payloads
Java SDK
Added multi pub/sub support
Updated k8s annotations, CLI options and daprd arguments
Updated API to support HTTP extensions
Removed retry options from state
Fixed gRPC manager not shutting down
.NET SDK
Added multi pub/sub support
Updated actor usage docs (Thanks @tomkerkhove)
Updated proto package with Any type (Thanks @akkie)
Fixed null reference exception when no model binder provided (Thanks @altinoren)
Added Bulk Get API
Updated k8s annotations, CLI options and daprd arguments
Removed retry options from state
Added api token injection
Go SDK
Added multi pub/sub support
Removed retry options from state
Updated k8s annotations, CLI options and daprd arguments
Added server side callback wrapper
Added Bulk Get API
Added state transactions API
Python SDK
Added multi pub/sub support
Updated k8s annotations, CLI options and daprd arguments
Added wrapper methods for state store APIs (Thanks @chinzhiweiblank)
Added wrapper layers for gRPC
Added server side wrapper for app callback
Added actor service via fastapi
Added wrapper methods for secrets API
Added wrapper methods for pub/sub API
Added wrapper methods for bindings API
Added support for api token auth
Rust SDK
Added multi pub/sub support
Updated k8s annotations, CLI options and daprd arguments
JavaScript SDK
Added multi pub/sub support
Updated k8s annotations, CLI options and daprd arguments
Docs
Added Kubernetes production deployment and upgrade guidelines
Updated multi pub/sub parts
Updated k8s annotations, CLI and daprd arguments
Fixed broken KEDA link (Thanks @tomkerkhove)
Updated with new IntelliJ instructions for multiple dapr runs
Updated API reference with state transactions API
Updated API reference with state bulk get API
Updated Kubernetes events input binding
Updated troubleshoot section for configuring multiple replicas to the Kubernetes sidecar injector
Updated state API reference to remove retry options
Updated links to reference to new quickstarts repo
Upgrading to Dapr 0.10.0
If you're upgrading from an older version of Dapr to 0.10.0, follow the steps here to ensure a smooth upgrade. You know, the one where you don't get red errors on the terminal.. we all hate that, right?
Local Machine / Self-hosted
Uninstall Dapr using the CLI you currently have. Note that this will remove the default $HOME/.dapr directory, binaries and all containers dapr_redis, dapr_placement and dapr_zipkin. Linux users need to run sudo if they have installed binary in default path /usr/local/bin/ or have docker command needing sudo.:
dapr uninstall --all
Next, get the latest CLI following these instructions, or alternatively download the latest and greatest release from here and put the dapr
binary in your PATH.
Once you have downloaded the CLI, run:
dapr init
Wait for the update to finish, and you're good to go!
Make sure you have the right runtime version (0.10.0) with:
dapr --version
Kubernetes
Upgrading from 0.9.0
If you previously installed Dapr using Helm, starting with this releases you can now upgrade Dapr to a new version.
If you installed Dapr using the CLI, go here.
Note: For this release only, you will not be carrying your old certs over due to a breaking change in Go 1.15. This might lead to errors during upgrade. To see the full documentation regarding upgrading Dapr, see here.
1. Get the latest CLI
Get the latest version of the Dapr CLI as outlined above, and put it in your path.
You can also use the helper scripts outlined here to get the latest version.
2. Upgrade
First, update your Helm repos:
helm repo update
Run the following command to upgrade Dapr:
helm upgrade dapr dapr/dapr --version 0.10.0 --namespace dapr-system --reset-values
Wait until all the pods are in Running state:
kubectl get pods -w -n dapr-system
Verify the control plane is updated and healthy:
dapr status -k
Next, issue a rolling update to your Dapr enabled deployments. When the pods restart, the new sidecar version will be picked up.
kubectl rollout restart deploy/<DEPLOYMENT-NAME>
All done!
Starting fresh
If you previously installed Dapr on your Kubernetes cluster using the Dapr CLI, run:
Note: Make sure you're uninstalling with your existing CLI
dapr uninstall --kubernetes
It's fine to ignore any errors that might show up.
If you previously installed Dapr using Helm 2.X:
helm del --purge dapr
If you previously installed Dapr using Helm 3.X:
helm uninstall dapr -n dapr-system
Update the Dapr repo:
helm repo update
If you installed Dapr with Helm to a namespace other than dapr-system
, modify the uninstall command above to account for that.
You can now follow these instructions on how to install Dapr using Helm 3.
Alternatively, you can use the CLI:
dapr init --kubernetes
Post installation
Verify the control plane pods are running and are healthy:
dapr status -k
dapr-sentry dapr-system True Running 0.10.0 1d 2020-08-18 10:15.21
dapr-operator dapr-system True Running 0.10.0 1d 2020-08-18 10:15.21
dapr-sidecar-injector dapr-system True Running 0.10.0 1d 2020-08-18 10:15.21
dapr-placement dapr-system True Running 0.10.0 1d 2020-08-18 10:15.21
After Dapr 0.10.0 has been installed, perform a rolling restart for your deployments to pick up the new version of the sidecar.
This can be done with:
kubectl rollout restart deploy/<deployment-name>
Breaking Changes
Multi Pub/Sub
With the v0.10.0 release, we have added the support for multiple pub/sub components. That means that you can now publish and subscribe to topics arriving from different components.
To this end, several changes have been made to both the publisher and consumer sides.
Publisher
An additional parameter has been added to tell Dapr which pub/sub component you're targeting.
Old API:
POST http://localhost:<daprPort>/v1.0/publish/<topic>
New API:
POST http://localhost:<daprPort>/v1.0/publish/<pubsubname>/<topic>
Subscriber
Note: The following example in in Javascript but applicable to all languages
An additional pubsubName
field has been added to the subscription payload to tell Dapr which pub/sub component this subscription is for.
Old subscription:
app.get('/dapr/subscribe', (req, res) => {
res.json([
{
topic: "newOrder",
route: "orders",
}
]);
})
New subscription:
app.get('/dapr/subscribe', (req, res) => {
res.json([
{
topic: "newOrder",
route: "orders",
pubsubName: "messagebus"
}
]);
})
Changes have been made to the different SDKs, so make sure to get the latest version of the SDK you're using.
Specifically, the subscription structures have added a pubsubName
field and the publish methods take the pubsubName
argument.
CLI
The publish
command on the Dapr CLI now takes a required param --pubsub
to specifiy the pubsub component:
dapr publish --pubsub pubsub --topic myevent --data '{ "name": "yoda" }'
State retries
The retry options for state operations have been removed. If you've never used retries, this is not a breaking change.
The updated API references can be found here.
Java SDK
The Service Invocation method now accepts an HTTPExtension argument.
Old method call:
client.invokeService(serviceAppId, method, message);
New method call:
client.invokeService(serviceAppId, method, message, HttpExtension.NONE);
CLI install path
The command dapr init
will now install the runtime binary daprd
into $HOME/.dapr/bin
for Mac/Linux and %USERPROFILE%\.dapr\
for Windows.
In addition, the --install-path
argument has been removed from the dapr init
and dapr uninstall
commands.