Skip to content

Commit

Permalink
rectify parameter fieldPath to have leading dot
Browse files Browse the repository at this point in the history
  • Loading branch information
hongchaodeng committed Mar 16, 2020
1 parent 5d51190 commit 0d03986
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions 4.component.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ The Parameters section defines all of the configurable parameters for this compo

Parameter `name` fields must be Unicode letter and number characters. Application Configurations will specify parameters values using this name.

Parameter `fieldPaths` specifies an array of fields within this Component's workload that will be overwritten by the value of this parameter. `fieldPaths` are specified as JSON field paths without a leading dot, for example `spec.containers[0].image`. The type of the parameter is inferred by the type of the fields those paths refer. Thus, all fields those paths refer to __MUST__ have the same type and __MUST NOT__ be object type.
Parameter `fieldPaths` specifies an array of fields within this Component's workload that will be overwritten by the value of this parameter. `fieldPaths` are specified as JSON field paths with a leading dot, for example `.spec.containers[0].image`. The type of the parameter is inferred by the type of the fields those paths refer to. Thus, all fields those paths refer to __MUST__ have the same type and __MUST NOT__ be object type.

### Examples

Expand Down Expand Up @@ -99,11 +99,11 @@ spec:
- name: imageName
required: false
fieldPaths:
- "spec.containers[0].image"
- ".spec.containers[0].image"
- name: cacheSecret
required: true
fieldPaths:
- "spec.containers[0].env[0].value"
- ".spec.containers[0].env[0].value"
```
| Previous Part | Next Part |
Expand Down
6 changes: 3 additions & 3 deletions examples/workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ spec:
required: true
type: string
fieldPaths:
- "spec.containers[0].env[0].value"
- ".spec.containers[0].env[0].value"
```
```yaml
Expand All @@ -66,12 +66,12 @@ spec:
description: Max stale requests.
type: int
fieldPaths:
- "spec.maxStalenessPrefix"
- ".spec.maxStalenessPrefix"
- name: defaultConsistencyLevel
description: The default consistency level
type: string
fieldPaths:
- "spec.defaultConsistencyLevel"
- ".spec.defaultConsistencyLevel"
```
Note that each component allows certain parameters to be overridden. For example, the `message` parameter is exposed for configuration in the frontend component. Within the component config, the parameter is piped to an environment variable where the component code can read the value.
Expand Down

0 comments on commit 0d03986

Please sign in to comment.