Updating resources

Updating deployed components, configurations, resiliency, and HTTPEndpoints used by applications

Updates to deployed resources (Components, Subscriptions, Configurations, Resiliency, WorkflowAccessPolicies and HTTPEndpoints) are picked up automatically by the sidecar via hot reloading. Hot reloading is enabled by default; to opt out, disable the HotReload feature in the Dapr application configuration. When hot reloading is disabled, the Dapr sidecar needs to be restarted in order to pick up the latest version of the resource. How this is done depends on the hosting environment.

Kubernetes

When hot reloading is disabled and running in Kubernetes, the process of updating a component involves two steps:

  1. Apply the new component YAML to the desired namespace
  2. Perform a rollout restart operation on your deployments to pick up the latest component

Self Hosted

When hot reloading is disabled, the process of updating a component involves a single step of stopping and restarting the daprd process to pick up the latest component.

Note: On POSIX-compatible systems (Linux, macOS), you can also send a SIGHUP signal to the daprd process to reload the runtime in-process without fully restarting it. See Reloading configuration with SIGHUP for more information.

Hot Reloading

Dapr “hot reloads” resources whereby updates are picked up automatically without the need to manually restart the Dapr sidecar process or Kubernetes pod.

Components and Subscriptions

Creating, updating, or deleting a Component or Subscription manifest is reflected in the Dapr sidecar during runtime.

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.

Configurations, Resiliency, WorkflowAccessPolicies, and HTTPEndpoints

The Dapr sidecar also reloads Configuration, Resiliency, WorkflowAccessPolicy, and HTTPEndpoint resources.

Unlike Components and Subscriptions which are reloaded in-place, changes to these resource types trigger an automatic graceful restart of the Dapr sidecar process. This ensures that the new configuration is applied cleanly. Unchanged resources are detected and silently ignored, so a restart only occurs when an actual change is detected.

Further reading