dapr
A Helm chart for Dapr on Kubernetes
About this chart
Introduction
This chart deploys the Dapr control plane system services on a Kubernetes cluster using the Helm package manager.
Chart Details
This chart installs Dapr via "child-charts":
- Dapr Component and Configuration Kubernetes CRDs
- Dapr Operator
- Dapr Sidecar injector
- Dapr Sentry
- Dapr Placement
- Dapr Scheduler
Prerequisites
- Kubernetes cluster with RBAC (Role-Based Access Control) enabled is required
- Helm 3.4.0 or newer
Resources Required
The chart deploys pods that consume minimum resources as specified in the resources configuration parameter.
Install the Chart
Ensure Helm is initialized in your Kubernetes cluster.
For more details on initializing Helm, read the Helm docs
-
Add dapr.github.io as an helm repo
helm repo add dapr https://dapr.github.io/helm-charts/ helm repo update -
Install the Dapr chart on your cluster in the dapr-system namespace:
helm install dapr dapr/dapr --namespace dapr-system --create-namespace --wait
Verify installation
Once the chart is installed, verify the Dapr control plane system service pods are running in the dapr-system namespace:
kubectl get pods --namespace dapr-system
Uninstall the Chart
To uninstall/delete the dapr release:
helm uninstall dapr -n dapr-system
Upgrade the charts
Follow the upgrade HowTo instructions in Upgrade Dapr with Helm.
Resource configuration
By default, all deployments are configured with blank resources attributes, which means that pods will consume as much cpu and memory as they want. This is probably fine for a local development or a non-production setup, but for production you should configure them. Consult Dapr docs and Kubernetes docs for guidance on setting these values.
For example, in order to configure the memory.requests setting for the dapr-operator deployment, configure a values.yml file with the following:
dapr_operator:
resources:
requests:
memory: 200Mi
Configuration
The Helm chart has the follow configuration options that can be supplied:
Global options:
| Parameter | Description | Default |
|---|---|---|
global.registry | Docker image registry | ghcr.io/dapr |
global.tag | Docker image version tag | latest release |
global.logAsJson | Json log format for control plane services | false |
global.imagePullPolicy | Global Control plane service imagePullPolicy | IfNotPresent |
global.imagePullSecrets | Control plane service images pull secrets for docker registry. Its value can be: a string with single imagePullSecret, an array of {name: pullSecret} maps (Kubernetes-style), or an array of strings | [] |
global.ha.enabled | Highly Availability mode enabled for control plane | false |
global.ha.replicaCount | Number of replicas of control plane services in Highly Availability modeNote that in HA mode, Dapr Placement has 3 replicas and that cannot be configured. | 3 |
global.ha.podAntiAffinityPolicy | Pod anti-affinity scheduling policy: preferredDuringSchedulingIgnoredDuringExecution (soft) or requiredDuringSchedulingIgnoredDuringExecution (hard). | preferredDuringSchedulingIgnoredDuringExecution |
global.ha.disruption.minimumAvailable | Minimum amount of available instances for control plane. This can either be effective count or %. | `` |
global.ha.disruption.maximumUnavailable | Maximum amount of instances that are allowed to be unavailable for control plane. This can either be effective count or %. | 25% |
global.prometheus.enabled | Prometheus metrics enablement for control plane services | true |
global.prometheus.port | Prometheus scrape http endpoint port | 9090 |
global.mtls.enabled | Mutual TLS enablement | true |
global.mtls.workloadCertTTL | TTL for workload cert | 24h |
global.mtls.allowedClockSkew | Allowed clock skew for workload cert rotation | 15m |
global.mtls.controlPlaneTrustDomain | Trust domain for control plane | cluster.local |
global.mtls.sentryAddress | Sentry address for control plane | dapr-sentry.{{ .ReleaseNamespace }}.svc:443 |
global.mtls.mountSentryToken | Gates whether the sentry bound service account token volume is mounted to control plane pods | true |
global.extraVolumes.sentry | Array of extra volumes to make available to sentry pods | [] |
global.extraVolumes.placement | Array of extra volumes to make available to placement pods | [] |
global.extraVolumes.operator | Array of extra volumes to make available to operator pods | [] |
global.extraVolumes.injector | Array of extra volumes to make available to sidecar injector pods | [] |
global.extraVolumes.scheduler | Array of extra volumes to make available to scheduler pods | [] |
global.extraVolumeMounts.sentry | Array of extra volume mounts to make available to sentry pod containers | [] |
global.extraVolumeMounts.placement | Array of extra volume mounts to make available to placement pod containers | [] |
global.extraVolumeMounts.operator | Array of extra volume mounts to make available to operator pod containers | [] |
global.extraVolumeMounts.injector | Array of extra volume mounts to make available to sidecar injector pod containers | [] |
global.extraVolumeMounts.scheduler | Array of extra volume mounts to make available to scheduler pod containers | [] |
global.dnsSuffix | Kubernetes DNS suffix | .cluster.local |
global.daprControlPlaneOs | Operating System for Dapr control plane | linux |
global.daprControlPlaneArch | CPU Architecture for Dapr control plane | amd64 |
global.nodeSelector | Pods will be scheduled onto a node node whose labels match the nodeSelector | {} |
global.tolerations | Pods will be allowed to schedule onto a node whose taints match the tolerations | [] |
global.labels | Custom pod labels | {} |
global.k8sLabels | Custom metadata labels | {} |
global.issuerFilenames.ca | Custom name of the file containing the root CA certificate inside the container | ca.crt |
global.issuerFilenames.cert | Custom name of the file containing the leaf certificate inside the container | issuer.crt |
global.issuerFilenames.key | Custom name of the file containing the leaf certificate's key inside the container | issuer.key |
global.actors.enabled | Enables the Dapr actors building block. When "false", the Dapr Placement service is not installed, and attempting to use Dapr actors will fail. | true |
global.actors.serviceName | Name of the service that provides actor placement services. | placement |
global.reminders.serviceName | Name of the service that provides reminders functionality. If empty (the default), uses the built-in r |
Deploy dapr with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has dapr on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartdapr is pinned at v1.19.2 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply