You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 3.component_model.md
+6-7Lines changed: 6 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ Components describe functional units that may be instantiated as part of a large
10
10
11
11
The role of a `ComponentDefinition` entity is to permit component providers to declare, in infrastructure-neutral format, the runtime characteristics of such unit of execution.
12
12
13
-
For example, each microservice in an application is described as a component. Note that `ComponentDefinition` itself is not an instance of that microservice, but a declaration of the configurable runtime characteristics of that microservice.
13
+
For example, each microservice in an application is described as a component. Note that `ComponentDefinition` itself is *NOT* an instance of that microservice, but a declaration of the configurable attributes of that microservice. These configurable attributes should be expose as a list of parameters which allow the application team to set and instantiate this component later at deployment time.
14
14
15
15
In practice, a simple containerized workload, a Helm chart, or a cloud database may all be modeled as a component.
16
16
@@ -49,16 +49,17 @@ Here are the attributes that provide top-level information about the component d
49
49
50
50
#### Schematic
51
51
52
-
The schematic section of component definition declares the schematic of a reusable and deployable unit that will composed an application in the later workflow.
52
+
This section declares the schematic of a component that could be instantiated as part of an application in the later workflow.
53
+
54
+
The OAM specification has no opinion or enforcement on the schematic itself as long as a JSON schema equivalent parameter list is defined. Though in order to make the specification implementable, several built-in approaches (`cue`, `helm`, `kube`) are defined as part of the specification for now.
55
+
56
+
> Note: below sections may change in the future releases.
53
57
54
58
| Attribute | Type | Required | Default Value | Description |
|`kube`|[Template](#template)| N || A template with parameter list for certain [Kubernetes workload](https://kubernetes.io/docs/concepts/workloads/) resource as component. |
57
61
|`cue`|[Template](#template)| N || A [CUE](https://github.com/cuelang/cue) module as component. |
58
62
|`helm`|[Template](#template)| N || A [Helm](https://helm.sh) chart as component. |
59
-
|`extension`|`unstructured`| N || A extension point for adding other approaches to provide schematic for component definition. |
60
-
61
-
The OAM specification has no opinion on the encapsulation tools to enable component definition schematic. Though in order to make the specification implementable, we currently introduced several built-in approaches (`cue`, `helm`, `kube`) as part of the specification.
62
63
63
64
```yaml
64
65
kind: ComponentDefinition
@@ -110,8 +111,6 @@ kind: ComponentDefinition
110
111
- "spec.template.spec.containers[0].image"
111
112
```
112
113
113
-
Also, by leveraging the `extension` field, the implementation could have its own way to encapsulate a component and expose a parameter list for users to instantiate it. In future releases, we may introduce a structured extension point to enhance this field.
114
-
115
114
### Example
116
115
117
116
Below is a full example of CUE based component definition:
Copy file name to clipboardExpand all lines: 7.application.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ This section describes how applications are designed and deployed.
6
6
7
7
## Application
8
8
9
-
The _Application_ entity defines which components will be instantiated once the application is deployed.
9
+
The _Application_ entity defines a list of components that will be instantiated once the application is deployed.
10
10
11
11
Users will specify the final parametrization of each component and the traits that are applied to augment their functionality or alter their behavior. Additionally, a set of scopes grouping different subsets of components can be specified.
0 commit comments