When making an update to an existing deployed component used by an application, Dapr does not update the component automatically unless the
HotReload feature gate is enabled.
The Dapr sidecar needs to be restarted in order to pick up the latest version of the component.
How this is done depends on the hosting environment.
When running in Kubernetes, the process of updating a component involves two steps:
- Apply the new component YAML to the desired namespace
- Unless the
HotReloadfeature gate is enabled, perform a rollout restart operation on your deployments to pick up the latest component
HotReload feature gate is enabled, the process of updating a component involves a single step of stopping and restarting the
daprd process to pick up the latest component.
Hot Reloading (Preview Feature)
Dapr can be made to “hot reload” components whereby component updates are picked up automatically without the need to restart the Dapr sidecar process or Kubernetes pod. This means creating, updating, or deleting a component manifest will be reflected in the Dapr sidecar during runtime.
Updating ComponentsWhen a component is updated it is first closed, and then re-initialized using the new configuration. This causes the component to be unavailable for a short period of time during this process.
If the initialization processes errors when a component is created or updated through hot reloading, the Dapr sidecar respects the component field
That is, the behaviour is the same as when the sidecar loads components on boot.
spec.ignoreErrors=false(default): the sidecar gracefully shuts down.
spec.ignoreErrors=true: the sidecar continues to run with neither the old or new component configuration registered.
All components are supported for hot reloading except for the following types. Any create, update, or deletion of these component types is ignored by the sidecar with a restart required to pick up changes.
- Components concept
- Reference secrets in component definitions
- Supported state stores
- Supported pub/sub brokers
- Supported secret stores
- Supported bindings
- Set component scopes
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.