Skip to content

Commit d1fd337

Browse files
authored
Documentation for target output merge (#1096)
* Added documentation for target output merge * Changed verb tense
1 parent 52d1f47 commit d1fd337

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

documentation/2.0/content/userguide/target_env.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ weight: 2
1111
- [Specifying a target environment](#specifying-a-target-environment)
1212
- [Pre-configured target environments](#pre-configured-target-environments)
1313
- [Using secret credentials in the model](#using-secret-credentials-in-the-model)
14+
- [Merging content from the WDT model](#merging-content-from-the-wdt-model)
1415
- [Target configuration files](#target-environment-configuration-files)
1516

1617
### Overview
@@ -113,6 +114,22 @@ The script should be updated with correct `<user>` and `<password>` values as re
113114

114115
The script performs a check to determine if any generated secret names are more than 63 characters in length, because that will prevent them from being mounted correctly in the Kubernetes environment. If any secret names exceed this limit, they will need to be shortened in this script, in the model files, and in the Kubernetes resource file. Each shortened name should be distinct from other secret names.
115116

117+
### Merging content from the WDT model
118+
119+
When a Kubernetes resource file is created using a target environment, content from the `kubernetes` section of the WDT model will be merged into the resulting output, if that section is present. For example, if the `-target wko` option is used, you can define this section in the model:
120+
```yaml
121+
kubernetes:
122+
spec:
123+
domainHome: /etc/domainHome
124+
image: my-image
125+
clusters:
126+
- clusterName: my-cluster
127+
replicas: 4
128+
- clusterName: other-cluster
129+
replicas: 6
130+
```
131+
These fields will override the values in the output file, and the file would be rewritten with the revised values. List values in the model will be combined with existing values in the output file. For example, if `my-cluster` was in the original output file, the model content for `my-cluster` would be merged with it, overriding the `replicas` value. If `my-cluster` was not in the original output file, it would be added to the list of clusters.
132+
116133
### Target environment configuration files
117134

118135
A target environment is configured in a JSON file at this location:

0 commit comments

Comments
 (0)