add component schema

This commit is contained in:
yaron2 2020-12-16 09:29:45 -08:00
parent a6cb06fa2f
commit 01293049fd
3 changed files with 34 additions and 2 deletions

View File

@ -20,7 +20,6 @@ Dapr uses a modular design where functionality is delivered as a component. Each
* [Service discovery name resolution](https://github.com/dapr/components-contrib/tree/master/nameresolution)
* [Secret stores](https://github.com/dapr/components-contrib/tree/master/secretstores)
* [State](https://github.com/dapr/components-contrib/tree/master/state)
* [Tracing exporters](https://github.com/dapr/components-contrib/tree/master/exporters)
### Service invocation and service discovery components
Service discovery components are used with the [service invocation]({{<ref "service-invocation-overview.md">}}) building block to integrate with the hosting environment to provide service-to-service discovery. For example, the Kubernetes service discovery component integrates with the Kubernetes DNS service and self hosted uses mDNS.

View File

@ -0,0 +1,33 @@
---
type: docs
title: "Component schema"
linkTitle: "Component schema"
weight: 100
description: "The basic schema for a Dapr component"
---
```yaml
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: <COMPONENT-NAME> # Required. Example: prod-statestore.
namespace: <COMPONENT-NAMESPACE> # Optional. Example: app-ns
spec:
type: <COMPONENT-TYPE> # Required. Example: state.redis
version: v1 # Required
initTimeout: <TIMEOUT-DURATION> # Optional. Default: 30s
ignoreErrors: <BOOLEAN> # Optional. Default: false
metadata: # Required.
- name: <METADATA-NAME>
value: <METADATA-VALUE>
```
| Field | Details |
| ------------- | ------------- |
| metadata.name | The name of the component |
| metadata.namespace | The namespace for the component |
| metadata | A key/value pair of component specific configuration |
| spec.type | The type of the component |
| spec.version | The version of the component |
| spec.initTimeout | The timeout duration for the initialization of the component. durations examples: 10s, 10m, 1h |
| spec.ignoreErrors | Tells the Dapr sidecar to continue initialization of the component fails to load |

View File

@ -2,7 +2,7 @@
type: docs
title: "How-To: Scope components to one or more applications"
linkTitle: "How-To: Set component scopes"
weight: 100
weight: 200
description: "Limit component access to particular Dapr instances"
---