docs/daprdocs/content/en/operations/components/component-updates.md

1.9 KiB

type title linkTitle weight description
docs Updating components Updating components 300 Updating deployed components used by applications

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.

{{% alert title="Note" color="primary" %}} Dapr can be made to "hot reload" components, where updates are picked up automatically without needing a restart. This is enabled by via the [HotReload feature gate]({{< ref "support-preview-features.md" >}}). All component types are supported for hot reloading. This feature is currently in preview. {{% /alert %}}

Kubernetes

When running in Kubernetes, the process of updating a component involves two steps:

  1. Apply the new component YAML to the desired namespace
  2. Unless the [HotReload feature gate is enabled]({{< ref "support-preview-features.md" >}}), perform a rollout restart operation on your deployments to pick up the latest component

Self Hosted

Unless the [HotReload feature gate is enabled]({{< ref "support-preview-features.md" >}}), the process of updating a component involves a single step of stopping and restarting the daprd process to pick up the latest component.

Further reading

  • [Components concept]({{< ref components-concept.md >}})
  • [Reference secrets in component definitions]({{< ref component-secrets.md >}})
  • [Supported state stores]({{< ref supported-state-stores >}})
  • [Supported pub/sub brokers]({{< ref supported-pubsub >}})
  • [Supported secret stores]({{< ref supported-secret-stores >}})
  • [Supported bindings]({{< ref supported-bindings >}})
  • [Set component scopes]({{< ref component-scopes.md >}})