From 76526dc1d59e637bea0a0669f28a1f696f8bb4a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=A9=E5=85=83?= Date: Tue, 12 May 2020 20:00:46 +0800 Subject: [PATCH 1/4] make component muteable and add revisionName MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 天元 --- 7.application_configuration.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/7.application_configuration.md b/7.application_configuration.md index 7cf12d3..19fedaf 100644 --- a/7.application_configuration.md +++ b/7.application_configuration.md @@ -78,11 +78,17 @@ This section defines the instances of components to create with the application | Attribute | Type | Required | Default Value | Description | |-----------|------|----------|---------------|-------------| -| `componentName` | `string` | Y | | The name of the component of which to create an instance. | +| `componentName` | `string` | N | | The name of the component of which to bind application configuration. Using componentName represent the ApplicationConfiguration always track the latest revision. | +| `revisionName` | `string` | N | | The name of the component revision of which to bind application configuration. | | `parameterValues` | [`[]ParameterValue`](#parameterValue) | N | | Overrides of parameters that are exposed by the application scope type defined in `type`. | | `scopes` | [`[]Scope`](#scope) | N | | The scopes to be used in the component. A component joins a scope by referencing it. | | `traits` | [`[]Trait`](#trait) | N | | The traits to attach to this component instance. | +One of `componentName` and `revisionName` is required. Everytime when a component is changed, a component revision will auto-generated by OAM implementation and can be viewed by user. + +* Using `componentName` here means the ApplicationConfiguration will always track the latest verison of the component. +* Using `revisionName` means only the specific revision of component will work, newly changed component version can only work after the `revisionName` is match with the new name. + In addition to being unique, the `componentName` must follow these naming rules: > The componentName field is required and must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. From ceb68479726c7bb3e885c2b382200d6a7a047e8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=A9=E5=85=83?= Date: Wed, 13 May 2020 17:42:39 +0800 Subject: [PATCH 2/4] address for comments --- 7.application_configuration.md | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/7.application_configuration.md b/7.application_configuration.md index 19fedaf..45c4e25 100644 --- a/7.application_configuration.md +++ b/7.application_configuration.md @@ -78,17 +78,12 @@ This section defines the instances of components to create with the application | Attribute | Type | Required | Default Value | Description | |-----------|------|----------|---------------|-------------| -| `componentName` | `string` | N | | The name of the component of which to bind application configuration. Using componentName represent the ApplicationConfiguration always track the latest revision. | -| `revisionName` | `string` | N | | The name of the component revision of which to bind application configuration. | +| `componentName` | `string` | N | | The name of the component whose latest revision will be bind with application configuration. When the spec of the referenced component changes, ApplicationConfiguration will automatically migrate all trait affect from the prior revision to the new one. This is mutually exclusive with revisionName.| +| `revisionName` | `string` | N | | RevisionName of a specific component revision to which to bind application configuration. This is mutually exclusive with componentName. | | `parameterValues` | [`[]ParameterValue`](#parameterValue) | N | | Overrides of parameters that are exposed by the application scope type defined in `type`. | | `scopes` | [`[]Scope`](#scope) | N | | The scopes to be used in the component. A component joins a scope by referencing it. | | `traits` | [`[]Trait`](#trait) | N | | The traits to attach to this component instance. | -One of `componentName` and `revisionName` is required. Everytime when a component is changed, a component revision will auto-generated by OAM implementation and can be viewed by user. - -* Using `componentName` here means the ApplicationConfiguration will always track the latest verison of the component. -* Using `revisionName` means only the specific revision of component will work, newly changed component version can only work after the `revisionName` is match with the new name. - In addition to being unique, the `componentName` must follow these naming rules: > The componentName field is required and must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. From 7f74777bbedbea59f7aeb38d03647b65d8b79e01 Mon Sep 17 00:00:00 2001 From: Sun Jianbo Date: Fri, 15 May 2020 11:05:01 +0800 Subject: [PATCH 3/4] Update 7.application_configuration.md Co-authored-by: Lei Zhang (Harry) --- 7.application_configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/7.application_configuration.md b/7.application_configuration.md index 45c4e25..74efafa 100644 --- a/7.application_configuration.md +++ b/7.application_configuration.md @@ -78,7 +78,7 @@ This section defines the instances of components to create with the application | Attribute | Type | Required | Default Value | Description | |-----------|------|----------|---------------|-------------| -| `componentName` | `string` | N | | The name of the component whose latest revision will be bind with application configuration. When the spec of the referenced component changes, ApplicationConfiguration will automatically migrate all trait affect from the prior revision to the new one. This is mutually exclusive with revisionName.| +| `componentName` | `string` | N | | The name of the component of which to create an instance. The revision of this instance will always reflect the latest change of the component (i.e. always track latest revision). This is mutually exclusive with revisionName.| | `revisionName` | `string` | N | | RevisionName of a specific component revision to which to bind application configuration. This is mutually exclusive with componentName. | | `parameterValues` | [`[]ParameterValue`](#parameterValue) | N | | Overrides of parameters that are exposed by the application scope type defined in `type`. | | `scopes` | [`[]Scope`](#scope) | N | | The scopes to be used in the component. A component joins a scope by referencing it. | From 62177c57235ca25f1cacfeba15844eddda3b44ae Mon Sep 17 00:00:00 2001 From: Sun Jianbo Date: Fri, 15 May 2020 12:48:16 +0800 Subject: [PATCH 4/4] Update 7.application_configuration.md Co-authored-by: Lei Zhang (Harry) --- 7.application_configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/7.application_configuration.md b/7.application_configuration.md index 74efafa..d9f857e 100644 --- a/7.application_configuration.md +++ b/7.application_configuration.md @@ -79,7 +79,7 @@ This section defines the instances of components to create with the application | Attribute | Type | Required | Default Value | Description | |-----------|------|----------|---------------|-------------| | `componentName` | `string` | N | | The name of the component of which to create an instance. The revision of this instance will always reflect the latest change of the component (i.e. always track latest revision). This is mutually exclusive with revisionName.| -| `revisionName` | `string` | N | | RevisionName of a specific component revision to which to bind application configuration. This is mutually exclusive with componentName. | +| `revisionName` | `string` | N | | The name of specific component revision of which to create an instance, i.e. always stick to specific revision until this field is updated. This is mutually exclusive with componentName. | | `parameterValues` | [`[]ParameterValue`](#parameterValue) | N | | Overrides of parameters that are exposed by the application scope type defined in `type`. | | `scopes` | [`[]Scope`](#scope) | N | | The scopes to be used in the component. A component joins a scope by referencing it. | | `traits` | [`[]Trait`](#trait) | N | | The traits to attach to this component instance. |