Configuration spec

The basic spec for a Dapr Configuration resource

The Configuration is a Dapr resource that is used to configure the Dapr sidecar, control plane, and others.

Sidecar format

  1. apiVersion: dapr.io/v1alpha1
  2. kind: Configuration
  3. metadata:
  4. name: <REPLACE-WITH-NAME>
  5. namespace: <REPLACE-WITH-NAMESPACE>
  6. spec:
  7. api:
  8. allowed:
  9. - name: <REPLACE-WITH-API>
  10. version: <VERSION>
  11. protocol: <HTTP-OR-GRPC>
  12. tracing:
  13. samplingRate: <REPLACE-WITH-INTEGER>
  14. stdout: true
  15. otel:
  16. endpointAddress: <REPLACE-WITH-ENDPOINT-ADDRESS>
  17. isSecure: false
  18. protocol: <HTTP-OR-GRPC>
  19. httpPipeline: # for incoming http calls
  20. handlers:
  21. - name: <HANDLER-NAME>
  22. type: <HANDLER-TYPE>
  23. appHttpPipeline: # for outgoing http calls
  24. handlers:
  25. - name: <HANDLER-NAME>
  26. type: <HANDLER-TYPE>
  27. secrets:
  28. scopes:
  29. - storeName: <NAME-OF-SCOPED-STORE>
  30. defaultAccess: <ALLOW-OR-DENY>
  31. deniedSecrets: <REPLACE-WITH-DENIED-SECRET>
  32. components:
  33. deny:
  34. - <COMPONENT-TO-DENY>
  35. accessControl:
  36. defaultAction: <ALLOW-OR-DENY>
  37. trustDomain: <REPLACE-WITH-TRUST-DOMAIN>
  38. policies:
  39. - appId: <APP-NAME>
  40. defaultAction: <ALLOW-OR-DENY>
  41. trustDomain: <REPLACE-WITH-TRUST-DOMAIN>
  42. namespace: "default"
  43. operations:
  44. - name: <OPERATION-NAME>
  45. httpVerb: ['POST', 'GET']
  46. action: <ALLOW-OR-DENY>

Spec fields

FieldRequiredDetailsExample
accessControlNApplied to Dapr sidecar for the called application. Enables the configuration of policies that restrict what operations calling applications can perform (via service invocation) on the called appliaction.Learn more about the accessControl configuration.
apiNUsed to enable only the Dapr sidecar APIs used by the application.Learn more about the api configuration.
httpPipelineNConfigure API middleware pipelinesMiddleware pipeline configuration overview
Learn more about the httpPipeline configuration.
appHttpPipelineNConfigure application middleware pipelinesMiddleware pipeline configuration overview
Learn more about the appHttpPipeline configuration.
componentsNUsed to specify a denylist of component types that can’t be initialized.Learn more about the components configuration.
featuresNDefines the preview features that are enabled/disabled.Learn more about the features configuration.
loggingNConfigure how logging works in the Dapr runtime.Learn more about the logging configuration.
metricsNEnable or disable metrics for an application.Learn more about the metrics configuration.
nameResolutionNName resolution configuration spec for the service invocation building block.Learn more about the nameResolution configuration per components.
secretsNLimit the secrets to which your Dapr application has access.Learn more about the secrets configuration.
tracingNTurns on tracing for an application.Learn more about the tracing configuration.

Control plane format

The daprsystem configuration file installed with Dapr applies global settings and is only set up when Dapr is deployed to Kubernetes.

  1. apiVersion: dapr.io/v1alpha1
  2. kind: Configuration
  3. metadata:
  4. name: daprsystem
  5. namespace: default
  6. spec:
  7. mtls:
  8. enabled: true
  9. allowedClockSkew: 15m
  10. workloadCertTTL: 24h

Spec fields

FieldRequiredDetailsExample
mtlsNDefines the mTLS configurationallowedClockSkew: 15m
workloadCertTTL:24h
Learn more about the mtls configuration.

Last modified October 12, 2023: Update config.toml (#3826) (0ffc2e7)