Skip to content

Commit

Permalink
Fix apache#1093: document how to update multiple trait properties
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaferraro committed Jan 21, 2020
1 parent 1faab73 commit 9bf1664
Show file tree
Hide file tree
Showing 22 changed files with 26 additions and 22 deletions.
6 changes: 5 additions & 1 deletion cmd/util/doc-gen/generators/traitdocgen.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,11 @@ func writeFields(t *types.Type, traitID string, content *[]string) {
res = append(res, adocConfigurationMarkerStart, "== Configuration", "")
res = append(res, "Trait properties can be specified when running any integration with the CLI:")
res = append(res, "```")
res = append(res, fmt.Sprintf("kamel run --trait %s.[key]=[value] integration.groovy", traitID))
if len(t.Members) > 1 {
res = append(res, fmt.Sprintf("kamel run --trait %s.[key]=[value] --trait %s.[key2]=[value2] integration.groovy", traitID, traitID))
} else {
res = append(res, fmt.Sprintf("kamel run --trait %s.[key]=[value] integration.groovy", traitID))
}
res = append(res, "```")
res = append(res, "The following configuration options are available:", "")
res = append(res, "[cols=\"2,1,5a\"]", "|===")
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/traits/affinity.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This trait is available in the following profiles: **Kubernetes, Knative, OpenSh

Trait properties can be specified when running any integration with the CLI:
```
kamel run --trait affinity.[key]=[value] integration.groovy
kamel run --trait affinity.[key]=[value] --trait affinity.[key2]=[value2] integration.groovy
```
The following configuration options are available:

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/traits/builder.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ WARNING: The builder trait is a *platform trait*: disabling it may compromise th

Trait properties can be specified when running any integration with the CLI:
```
kamel run --trait builder.[key]=[value] integration.groovy
kamel run --trait builder.[key]=[value] --trait builder.[key2]=[value2] integration.groovy
```
The following configuration options are available:

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/traits/camel.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ WARNING: The camel trait is a *platform trait*: disabling it may compromise the

Trait properties can be specified when running any integration with the CLI:
```
kamel run --trait camel.[key]=[value] integration.groovy
kamel run --trait camel.[key]=[value] --trait camel.[key2]=[value2] integration.groovy
```
The following configuration options are available:

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/traits/container.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ WARNING: The container trait is a *platform trait*: disabling it may compromise

Trait properties can be specified when running any integration with the CLI:
```
kamel run --trait container.[key]=[value] integration.groovy
kamel run --trait container.[key]=[value] --trait container.[key2]=[value2] integration.groovy
```
The following configuration options are available:

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/traits/deployer.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ WARNING: The deployer trait is a *platform trait*: disabling it may compromise t

Trait properties can be specified when running any integration with the CLI:
```
kamel run --trait deployer.[key]=[value] integration.groovy
kamel run --trait deployer.[key]=[value] --trait deployer.[key2]=[value2] integration.groovy
```
The following configuration options are available:

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/traits/deployment.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ WARNING: The deployment trait is a *platform trait*: disabling it may compromise

Trait properties can be specified when running any integration with the CLI:
```
kamel run --trait deployment.[key]=[value] integration.groovy
kamel run --trait deployment.[key]=[value] --trait deployment.[key2]=[value2] integration.groovy
```
The following configuration options are available:

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/traits/environment.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ WARNING: The environment trait is a *platform trait*: disabling it may compromis

Trait properties can be specified when running any integration with the CLI:
```
kamel run --trait environment.[key]=[value] integration.groovy
kamel run --trait environment.[key]=[value] --trait environment.[key2]=[value2] integration.groovy
```
The following configuration options are available:

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/traits/gc.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This trait is available in the following profiles: **Kubernetes, Knative, OpenSh

Trait properties can be specified when running any integration with the CLI:
```
kamel run --trait gc.[key]=[value] integration.groovy
kamel run --trait gc.[key]=[value] --trait gc.[key2]=[value2] integration.groovy
```
The following configuration options are available:

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/traits/ingress.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This trait is available in the following profiles: **Kubernetes**.

Trait properties can be specified when running any integration with the CLI:
```
kamel run --trait ingress.[key]=[value] integration.groovy
kamel run --trait ingress.[key]=[value] --trait ingress.[key2]=[value2] integration.groovy
```
The following configuration options are available:

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/traits/istio.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This trait is available in the following profiles: **Kubernetes, Knative, OpenSh

Trait properties can be specified when running any integration with the CLI:
```
kamel run --trait istio.[key]=[value] integration.groovy
kamel run --trait istio.[key]=[value] --trait istio.[key2]=[value2] integration.groovy
```
The following configuration options are available:

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/traits/jolokia.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This trait is available in the following profiles: **Kubernetes, Knative, OpenSh

Trait properties can be specified when running any integration with the CLI:
```
kamel run --trait jolokia.[key]=[value] integration.groovy
kamel run --trait jolokia.[key]=[value] --trait jolokia.[key2]=[value2] integration.groovy
```
The following configuration options are available:

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/traits/knative-service.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This trait is available in the following profiles: **Knative**.

Trait properties can be specified when running any integration with the CLI:
```
kamel run --trait knative-service.[key]=[value] integration.groovy
kamel run --trait knative-service.[key]=[value] --trait knative-service.[key2]=[value2] integration.groovy
```
The following configuration options are available:

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/traits/knative.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ This trait is available in the following profiles: **Knative**.

Trait properties can be specified when running any integration with the CLI:
```
kamel run --trait knative.[key]=[value] integration.groovy
kamel run --trait knative.[key]=[value] --trait knative.[key2]=[value2] integration.groovy
```
The following configuration options are available:

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/traits/owner.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ WARNING: The owner trait is a *platform trait*: disabling it may compromise the

Trait properties can be specified when running any integration with the CLI:
```
kamel run --trait owner.[key]=[value] integration.groovy
kamel run --trait owner.[key]=[value] --trait owner.[key2]=[value2] integration.groovy
```
The following configuration options are available:

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/traits/platform.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ WARNING: The platform trait is a *platform trait*: disabling it may compromise t

Trait properties can be specified when running any integration with the CLI:
```
kamel run --trait platform.[key]=[value] integration.groovy
kamel run --trait platform.[key]=[value] --trait platform.[key2]=[value2] integration.groovy
```
The following configuration options are available:

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/traits/probes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This trait is available in the following profiles: **Kubernetes, Knative, OpenSh

Trait properties can be specified when running any integration with the CLI:
```
kamel run --trait probes.[key]=[value] integration.groovy
kamel run --trait probes.[key]=[value] --trait probes.[key2]=[value2] integration.groovy
```
The following configuration options are available:

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/traits/prometheus.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ This trait is available in the following profiles: **Kubernetes, Knative, OpenSh

Trait properties can be specified when running any integration with the CLI:
```
kamel run --trait prometheus.[key]=[value] integration.groovy
kamel run --trait prometheus.[key]=[value] --trait prometheus.[key2]=[value2] integration.groovy
```
The following configuration options are available:

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/traits/pull-secret.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ This trait is available in the following profiles: **Kubernetes, Knative, OpenSh

Trait properties can be specified when running any integration with the CLI:
```
kamel run --trait pull-secret.[key]=[value] integration.groovy
kamel run --trait pull-secret.[key]=[value] --trait pull-secret.[key2]=[value2] integration.groovy
```
The following configuration options are available:

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/traits/quarkus.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This trait is available in the following profiles: **Kubernetes, Knative, OpenSh

Trait properties can be specified when running any integration with the CLI:
```
kamel run --trait quarkus.[key]=[value] integration.groovy
kamel run --trait quarkus.[key]=[value] --trait quarkus.[key2]=[value2] integration.groovy
```
The following configuration options are available:

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/traits/route.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This trait is available in the following profiles: **OpenShift**.

Trait properties can be specified when running any integration with the CLI:
```
kamel run --trait route.[key]=[value] integration.groovy
kamel run --trait route.[key]=[value] --trait route.[key2]=[value2] integration.groovy
```
The following configuration options are available:

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/traits/service.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This trait is available in the following profiles: **Kubernetes, OpenShift**.

Trait properties can be specified when running any integration with the CLI:
```
kamel run --trait service.[key]=[value] integration.groovy
kamel run --trait service.[key]=[value] --trait service.[key2]=[value2] integration.groovy
```
The following configuration options are available:

Expand Down

0 comments on commit 9bf1664

Please sign in to comment.