mirror of https://github.com/dapr/docs.git
add component schema
This commit is contained in:
parent
a6cb06fa2f
commit
01293049fd
|
|
@ -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)
|
* [Service discovery name resolution](https://github.com/dapr/components-contrib/tree/master/nameresolution)
|
||||||
* [Secret stores](https://github.com/dapr/components-contrib/tree/master/secretstores)
|
* [Secret stores](https://github.com/dapr/components-contrib/tree/master/secretstores)
|
||||||
* [State](https://github.com/dapr/components-contrib/tree/master/state)
|
* [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 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.
|
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.
|
||||||
|
|
|
||||||
|
|
@ -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 |
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
type: docs
|
type: docs
|
||||||
title: "How-To: Scope components to one or more applications"
|
title: "How-To: Scope components to one or more applications"
|
||||||
linkTitle: "How-To: Set component scopes"
|
linkTitle: "How-To: Set component scopes"
|
||||||
weight: 100
|
weight: 200
|
||||||
description: "Limit component access to particular Dapr instances"
|
description: "Limit component access to particular Dapr instances"
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue