You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A `MODULENAME` must correspond to the MBean name of a system resource defined in your original `config.xml` file.
127
+
A `MODULENAME` must correspond to the MBean name of a system resource defined in your original `config.xml` file. It's not possible to add a new module by using overrides. If you need your overrides to set up a new module, then have your original configuration specify 'skeleton' modules that can be overridden.
126
128
127
129
#### Override template schemas
128
130
@@ -184,24 +186,28 @@ The secret macro `SECRETNAME` field must reference the name of a Kubernetes secr
184
186
185
187
#### Override template syntax special requirements
186
188
187
-
**Check each item below to ensure custom situational configuration takes effect:**
189
+
**Check each item below for best practices and to ensure custom situational configuration takes effect:**
188
190
189
191
* Reference the name of the current bean and each parent bean in any hierarchy you override.
190
192
* Note that the `combine-mode` verbs (`add` and `replace`) should be omitted for beans that are already defined in your original domain home configuration.
191
-
* See [Override template samples](#override-template-samples) for examples.
193
+
* See [Override template samples](#override-template-samples) for examples.
192
194
* Use situational config `replace` and `add` verbs as follows:
193
195
* If you are adding a new bean that doesn't already exist in your original domain home `config.xml`, then specify `add` on the MBean itself and on each attribute within the bean.
194
196
* See the `server-debug` stanza in [Override template samples](#override-template-samples) for an example.
195
197
* If you are adding a new attribute to an existing bean in the domain home `config.xml`, then the attribute needs an `add` verb.
196
198
* See the `max-message-size` stanza in [Override template samples](#override-template-samples) for an example.
197
199
* If you are changing the value of an existing attribute within a domain home `config.xml`, then the attribute needs a `replace` verb.
198
-
* See the `public-address` stanza in [Override template samples](#override-template-samples) for an example.
200
+
* See the `public-address` stanza in [Override template samples](#override-template-samples) for an example.
199
201
* When overriding `config.xml`:
200
202
* The XML namespace (`xmlns:` in the XML) must be exactly as specified in [Override template schemas](#override-template-schemas).
201
203
* For example, use `d:` to reference `config.xml` beans and attributes, `f:` for `add` and `replace``domain-fragment` verbs, and `s:` to reference the situational configuration schema.
202
204
* Avoid specifying the domain name stanza, as this may cause some overrides to be ignored (for example, server-template scoped overrides).
203
205
* When overriding modules:
204
206
* It is a best practice to use XML namespace abbreviations `jms:`, `jdbc:`, and `wldf:` respectively for JMS, JDBC, and WLDF (diagnostics) module override files.
207
+
* A module must already exist in your original configuration if you want to override it; it's not possible to add a new module by using overrides. If you need your overrides to set up a new module, then have your original configuration specify 'skeleton' modules that can be overridden.
208
+
* See [Overriding a data source module](#overriding-a-data-source-module) for best practice advice. Note that similar advice applies generally to other module types.
209
+
* Consider having your original configuration reference invalid user names, passwords, and URLs:
210
+
* If your original (non-overridden) configuration references non-working user names, passwords, and URLS, then this helps guard against accidentally deploying a working configuration that's invalid for the intended environment. For example, if your base configuration references a working QA database, and there is some mistake in setting up overrides, then it's possible the running servers will connect to the QA database when you deploy to your production environment.
205
211
206
212
#### Override template samples
207
213
@@ -238,8 +244,13 @@ The following `config.xml` override file demonstrates:
238
244
239
245
#### Overriding a data source module
240
246
241
-
The following `jdbc-testDS.xml` override template demonstrates setting the URL, user name, and password-encrypted fields of a JDBC module named `testDS`via`secret macros`. The generated situational configuration 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 because it uses a secret macro with an `:encrypt` suffix. The secret is named `dbsecret` and contains three keys: `url`, `username`, and `password`.
247
+
The following `jdbc-testDS.xml` override template demonstrates setting the URL, user name, and password-encrypted fields of a JDBC module named `testDS`by using`secret macros`. The generated situational configuration 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 because it uses a secret macro with an `:encrypt` suffix. The secret is named `dbsecret` and contains three keys: `url`, `username`, and `password`.
242
248
249
+
Best practices for data source modules and their overrides:
250
+
251
+
* A data source module must already exist in your original configuration if you want to override it; it's not possible to add a new module by using overrides. If you need your overrides to set up a new module, then have your original configuration specify 'skeleton' modules that can be overridden. See the next two bulleted items for the typical contents of a skeleton data source module.
252
+
* Set your original (non-overridden) URL, username, and password to invalid values. This helps prevent accidentally starting a server without overrides, and then having the data source successfully connect to a database that's wrong for the current environment. For example, if these attributes are set to reference a QA database in your original configuration, then a mistake configuring overrides in your production Kubernetes deployment could cause your production applications to use your QA database.
253
+
* Set your original (non-overridden) `JDBCConnectionPoolParams``MinCapacity` and `InitialCapacity` to `0`, and set your original `DriverName` to a reference an existing JDBC Driver. This ensures that you can still successfully boot a server even when you have configured invalid URL/username/password values, your database isn't running, and/or you haven't specified your overrides yet.
243
254
244
255
```
245
256
<?xml version='1.0' encoding='UTF-8'?>
@@ -282,7 +293,7 @@ The following `jdbc-testDS.xml` override template demonstrates setting the URL,
282
293
kubectl -n MYNAMESPACE label cm MYCMNAME weblogic.domainUID=DOMAIN_UID
283
294
```
284
295
* Create any Kubernetes secrets referenced by a template 'secret macro'.
285
-
* Secrets can have multiple keys (files) that can hold either cleartext or base64 values. We recommend that you use base64 values for passwords via `Opaque` type secrets in their `data` field, so that they can't be easily read at a casual glance. For more information, see https://kubernetes.io/docs/concepts/configuration/secret/.
296
+
* Secrets can have multiple keys (files) that can hold either cleartext or base64 values. We recommend that you use base64 values for passwords by using `Opaque` type secrets in their `data` field, so that they can't be easily read at a casual glance. For more information, see https://kubernetes.io/docs/concepts/configuration/secret/.
286
297
* Secrets must be in the same Kubernetes namespace as the domain.
287
298
* If a secret is going to be used by a single `DOMAIN_UID`, then we recommend adding the `weblogic.domainUID=<mydomainuid>` label to help track the resource.
288
299
* For example:
@@ -382,7 +393,7 @@ Incorrectly formatted override files may be accepted without warnings or errors
382
393
383
394
* When a domain is first deployed, or is restarted, the operator runtime creates an introspector Kubernetes job named `DOMAIN_UID-introspect-domain-job`.
384
395
* The introspector job's pod:
385
-
* Mounts the Kubernetes configuration map and secrets specified via the operator domain resource `configOverrides`, `webLogicCredentialsSecret`, and `configOverrideSecrets` fields.
396
+
* Mounts the Kubernetes configuration map and secrets specified by using the operator domain resource `configOverrides`, `webLogicCredentialsSecret`, and `configOverrideSecrets` fields.
386
397
* Reads the mounted situational configuration templates from the configuration map and expands them to create the actual situational configuration files for the domain:
387
398
* It expands some fixed replaceable values (for example, `${env:DOMAIN_UID}`).
388
399
* It expands referenced secrets by reading the value from the corresponding mounted secret file (for example, `${secret:mysecret.mykey}`).
0 commit comments