Helm chartv1.19.2App 1.19.2

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

  1. Add dapr.github.io as an helm repo

    helm repo add dapr https://dapr.github.io/helm-charts/
    helm repo update
    
  2. 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:

ParameterDescriptionDefault
global.registryDocker image registryghcr.io/dapr
global.tagDocker image version taglatest release
global.logAsJsonJson log format for control plane servicesfalse
global.imagePullPolicyGlobal Control plane service imagePullPolicyIfNotPresent
global.imagePullSecretsControl 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.enabledHighly Availability mode enabled for control planefalse
global.ha.replicaCountNumber 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.podAntiAffinityPolicyPod anti-affinity scheduling policy: preferredDuringSchedulingIgnoredDuringExecution (soft) or requiredDuringSchedulingIgnoredDuringExecution (hard).preferredDuringSchedulingIgnoredDuringExecution
global.ha.disruption.minimumAvailableMinimum amount of available instances for control plane. This can either be effective count or %.``
global.ha.disruption.maximumUnavailableMaximum amount of instances that are allowed to be unavailable for control plane. This can either be effective count or %.25%
global.prometheus.enabledPrometheus metrics enablement for control plane servicestrue
global.prometheus.portPrometheus scrape http endpoint port9090
global.mtls.enabledMutual TLS enablementtrue
global.mtls.workloadCertTTLTTL for workload cert24h
global.mtls.allowedClockSkewAllowed clock skew for workload cert rotation15m
global.mtls.controlPlaneTrustDomain Trust domain for control planecluster.local
global.mtls.sentryAddressSentry address for control planedapr-sentry.{{ .ReleaseNamespace }}.svc:443
global.mtls.mountSentryTokenGates whether the sentry bound service account token volume is mounted to control plane podstrue
global.extraVolumes.sentryArray of extra volumes to make available to sentry pods[]
global.extraVolumes.placementArray of extra volumes to make available to placement pods[]
global.extraVolumes.operatorArray of extra volumes to make available to operator pods[]
global.extraVolumes.injectorArray of extra volumes to make available to sidecar injector pods[]
global.extraVolumes.schedulerArray of extra volumes to make available to scheduler pods[]
global.extraVolumeMounts.sentryArray of extra volume mounts to make available to sentry pod containers[]
global.extraVolumeMounts.placementArray of extra volume mounts to make available to placement pod containers[]
global.extraVolumeMounts.operatorArray of extra volume mounts to make available to operator pod containers[]
global.extraVolumeMounts.injectorArray of extra volume mounts to make available to sidecar injector pod containers[]
global.extraVolumeMounts.schedulerArray of extra volume mounts to make available to scheduler pod containers[]
global.dnsSuffixKubernetes DNS suffix.cluster.local
global.daprControlPlaneOsOperating System for Dapr control planelinux
global.daprControlPlaneArchCPU Architecture for Dapr control planeamd64
global.nodeSelectorPods will be scheduled onto a node node whose labels match the nodeSelector{}
global.tolerationsPods will be allowed to schedule onto a node whose taints match the tolerations[]
global.labelsCustom pod labels{}
global.k8sLabelsCustom metadata labels{}
global.issuerFilenames.caCustom name of the file containing the root CA certificate inside the containerca.crt
global.issuerFilenames.certCustom name of the file containing the leaf certificate inside the containerissuer.crt
global.issuerFilenames.keyCustom name of the file containing the leaf certificate's key inside the containerissuer.key
global.actors.enabledEnables 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.serviceNameName of the service that provides actor placement services.placement
global.reminders.serviceNameName 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.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartdapr is pinned at v1.19.2 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. 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