Skip to content

Commit 375ec49

Browse files
Tom Barnesmarkxnelson
authored andcommitted
Config overrides site doc (#647)
* Initial revision of config-overrides doc. * Revise config-overrides doc. * Revise config-overrides doc. * Revise config-overrides doc. * Revise config-overrides doc. * Revise config-overrides doc. * Revise config-overrides doc. * Revise config-overrides doc. * Revise config-overrides doc. * Revise config-overrides doc. * Revise config-overrides doc. * Minor doc update.
1 parent cf4098a commit 375ec49

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

site/config-overrides.md

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
---
66
# Overview
77

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.
99

1010
How do you specify overrides?
1111
* Create a Kubernetes config map that contains
12-
* Situational config templates.
12+
* Override templates (also known as situational config templates).
1313
* 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.
1515
* Create Kubernetes secrets that contain template macro values.
1616
* Set your Domain `configOverrideSecrets` to reference the aforementioned secrets.
1717
* Start or restart your domain.
@@ -181,19 +181,26 @@ The following `config.xml` override file demonstrates setting the 'max-message-s
181181

182182
### Overriding a DataSource Module
183183

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`.
185185

186-
TBD expand this sample to include username and password.
187186

188187
```
189188
<?xml version='1.0' encoding='UTF-8'?>
190189
<jdbc-data-source xmlns="http://xmlns.oracle.com/weblogic/jdbc-data-source"
191190
xmlns:f="http://xmlns.oracle.com/weblogic/jdbc-data-source-fragment"
192191
xmlns:s="http://xmlns.oracle.com/weblogic/situational-config">
192+
193193
<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>
197204
</jdbc-data-source>
198205
```
199206

@@ -274,7 +281,7 @@ TBD expand this sample to include username and password.
274281
275282
* When a Domain is first deployed, or is restarted, the operator runtime creates an introspector Kubernetes job named `DOMAIN_UID-introspect-domain-job`.
276283
* 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.
278285
* Reads the mounted situational config templates from the config map and expands them to create the actual situational config files for the domain:
279286
* It expands some fixed replaceable values (e.g. ${env:DOMAIN_UID}).
280287
* It expands referenced secrets by reading value from the corresponding mounted secret file (e.g. ${secret:mysecret.mykey}).

0 commit comments

Comments
 (0)