|
5 | 5 | ---
|
6 | 6 | # Overview
|
7 | 7 |
|
8 |
| -Use configuration overrides to customize a WebLogic domain home configuration. For example, you may want to override a JDBC Datasource xml module Username, Password, and URL so that it references a local database. |
| 8 | +Use configuration overrides to customize a WebLogic domain home configuration without modifying the domain's actual config.xml or system resource files. For example, you may want to override a JDBC Datasource xml module Username, Password, and URL so that it references a local database. |
9 | 9 |
|
10 | 10 | How do you specify overrides?
|
11 | 11 | * Create a Kubernetes config map that contains
|
12 |
| - * Situational config templates. |
| 12 | + * Override templates (also known as situational config templates). |
13 | 13 | * A file named 'version.txt' that contains the string '2.0'.
|
14 |
| -* Set your Domain resource `configOverride` to the name of this config map. |
| 14 | +* Set your Domain resource `configOverrides` to the name of this config map. |
15 | 15 | * Create Kubernetes secrets that contain template macro values.
|
16 | 16 | * Set your Domain `configOverrideSecrets` to reference the aforementioned secrets.
|
17 | 17 | * Start or restart your domain.
|
@@ -181,19 +181,26 @@ The following `config.xml` override file demonstrates setting the 'max-message-s
|
181 | 181 |
|
182 | 182 | ### Overriding a DataSource Module
|
183 | 183 |
|
184 |
| -The following `jdbc-testDS.xml` override file demonstrates setting the URL of a JDBC driver via secret. It overrides a datasource module named "testDS". |
| 184 | +The following `jdbc-testDS.xml` override template demonstrates setting the URL, username, and password-encrypted fields of a JDBC module named `testDS` via secret macros. The generated situational config that replaces the macros with secret values will be located in the DOMAIN_HOME/optconfig/jdbc directory. The `password-encrypted` field will be populated with an encrypted value since it uses a secret macro with a `:encrypted` suffix. The secret is named `dbsecret` and contains three keys: `url`, `username`, and `password`. |
185 | 185 |
|
186 |
| -TBD expand this sample to include username and password. |
187 | 186 |
|
188 | 187 | ```
|
189 | 188 | <?xml version='1.0' encoding='UTF-8'?>
|
190 | 189 | <jdbc-data-source xmlns="http://xmlns.oracle.com/weblogic/jdbc-data-source"
|
191 | 190 | xmlns:f="http://xmlns.oracle.com/weblogic/jdbc-data-source-fragment"
|
192 | 191 | xmlns:s="http://xmlns.oracle.com/weblogic/situational-config">
|
| 192 | +
|
193 | 193 | <name>testDS</name>
|
194 |
| - <jdbc-driver-params> |
195 |
| - <url f:combine-mode="replace">${secret:dbsecret.url}</url> |
196 |
| - </jdbc-driver-params> |
| 194 | + <jdbc-driver-params> |
| 195 | + <url f:combine-mode="replace">${secret:dbsecret.url}</url> |
| 196 | + <properties> |
| 197 | + <property> |
| 198 | + <name>user</name> |
| 199 | + <value f:combine-mode="replace">${secret:dbsecret.username}</value> |
| 200 | + </property> |
| 201 | + </properties> |
| 202 | + <password-encrypted f:combine-mode="replace">${secret:dbsecret.password:encrypt}</password-encrypted> |
| 203 | + </jdbc-driver-params> |
197 | 204 | </jdbc-data-source>
|
198 | 205 | ```
|
199 | 206 |
|
@@ -274,7 +281,7 @@ TBD expand this sample to include username and password.
|
274 | 281 |
|
275 | 282 | * When a Domain is first deployed, or is restarted, the operator runtime creates an introspector Kubernetes job named `DOMAIN_UID-introspect-domain-job`.
|
276 | 283 | * The introspector job's pod:
|
277 |
| - * Mounts the Kubernetes config map and secrets specified via the operator Domain resource `configOverride`, `webLogicCredentialsSecret`, and `configOverrideSecrets` fields. |
| 284 | + * Mounts the Kubernetes config map and secrets specified via the operator Domain resource `configOverrides`, `webLogicCredentialsSecret`, and `configOverrideSecrets` fields. |
278 | 285 | * Reads the mounted situational config templates from the config map and expands them to create the actual situational config files for the domain:
|
279 | 286 | * It expands some fixed replaceable values (e.g. ${env:DOMAIN_UID}).
|
280 | 287 | * It expands referenced secrets by reading value from the corresponding mounted secret file (e.g. ${secret:mysecret.mykey}).
|
|
0 commit comments