Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions daprdocs/content/en/concepts/dapr-services/sidecar.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,25 +33,6 @@ You can find the various arguments that the CLI exposes to configure the sidecar

On [Kubernetes]({{% ref kubernetes %}}), the Dapr control plane includes the [dapr-sidecar-injector service]({{% ref kubernetes-overview %}}), which watches for new pods with the `dapr.io/enabled` annotation and injects a container with the `daprd` process within the pod. In this case, sidecar arguments can be passed through annotations as outlined in the **Kubernetes annotations** column in [this table]({{% ref arguments-annotations-overview%}}).

### Native sidecars (Kubernetes 1.28+)

By default, `daprd` is injected as a regular container alongside your application. With [Kubernetes native sidecars](https://kubernetes.io/docs/concepts/workloads/pods/sidecar-containers/) ([KEP-753](https://github.com/kubernetes/enhancements/issues/753)), `daprd` is instead injected as an init container with `restartPolicy: Always`. Refer to the [Kubernetes sidecar containers documentation](https://kubernetes.io/docs/concepts/workloads/pods/sidecar-containers/) for details on behavior and lifecycle semantics.

Enable native sidecars globally via Helm:

```yaml
dapr_sidecar_injector:
nativeSidecar: true
```

Or per-pod via annotation:

```yaml
annotations:
dapr.io/enabled: "true"
dapr.io/enable-native-sidecar: "true"
```

## Running the sidecar directly

In most cases you do not need to run `daprd` explicitly, as the sidecar is either launched by the [CLI]({{% ref cli-overview%}}) (self-hosted mode) or by the dapr-sidecar-injector service (Kubernetes). For advanced use cases (debugging, scripted deployments, etc.) the `daprd` process can be launched directly.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ description: "Use Dapr API in a Kubernetes Job context"

The Dapr sidecar is designed to be a long running process. In the context of a [Kubernetes Job](https://kubernetes.io/docs/concepts/workloads/controllers/job/) this behavior can block your job completion.

{{% alert title="Native sidecars" color="primary" %}}
On Kubernetes 1.28+, you can enable [native sidecars]({{% ref "sidecar.md#native-sidecars-kubernetes-128" %}}) to ensure `daprd` operates as a [Kubernetes native sidecar](https://kubernetes.io/docs/concepts/workloads/pods/sidecar-containers/) and follows its shutdown semantics.
{{% /alert %}}
To address this issue, the Dapr sidecar has an endpoint to `Shutdown` the sidecar.

When running a basic [Kubernetes Job](https://kubernetes.io/docs/concepts/workloads/controllers/job/), you need to call the `/shutdown` endpoint for the sidecar to gracefully stop and the job to be considered `Completed`.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,3 @@ This table is meant to help users understand the equivalent options for running
| `--disable-init-endpoints` | `--disable-init-endpoints` | | `dapr.io/disable-init-endpoints` | Comma-separated list of initialization endpoints to disable. Supported values are `config` (disables `/dapr/config`) and `subscribe` (disables `/dapr/subscribe`). Example: `"config,subscribe"`. By default, this is not set. |
| not supported | not supported | | `dapr.io/sidecar-seccomp-profile-type` | Set the sidecar container's `securityContext.seccompProfile.type` to `Unconfined`, `RuntimeDefault`, or `Localhost`. By default, this annotation is not set on the Dapr sidecar, hence the field is omitted from sidecar container. |
| not supported | not supported | | `dapr.io/sidecar-svc-annotations` | Custom annotations to be applied to the operator-managed `-dapr` sidecar service. Strings consisting of `key=value` pairs separated by a comma. Read more [here]({{% ref "sidecar-service-annotations.md" %}}). |
| not supported | not supported | | `dapr.io/enable-native-sidecar` | When set to `"true"`, injects daprd as a Kubernetes native sidecar (init container with `restartPolicy: Always`, [KEP-753](https://github.com/kubernetes/enhancements/issues/753)). Overrides the global `dapr_sidecar_injector.nativeSidecar` Helm setting. Requires Kubernetes 1.28+. Default is not set (inherits global Helm value). |
Loading