Question & Answer
Question
When mounting a properties file to a server pod (i.e. appserver), the properties file does not show up in the specified path.
For example, with the following OMEnvironment yaml file, customer_overrides.properties will not show up in the /config/dropins/smcfs.ear/lib/properties.jar directory:
For example, with the following OMEnvironment yaml file, customer_overrides.properties will not show up in the /config/dropins/smcfs.ear/lib/properties.jar directory:
spec:
servers:
- appServer:
...
podLabels:
role: appserver
...
additionalMounts:
configMaps:
- mountPath: /config/dropins/smcfs.ear/lib/properties.jar/customer_overrides.properties
name: om-props-configmap
subPath: customer_overrides.properties
matchLabels:
role: appserver
Cause
By using a key value of role, i.e. role: appserver, the pod label value may not get read properly. This is because your pod may have a role value set by default, for example for role: appserver for the application server.
You can validate this by checking your pod labels:
Or: oc/kubectl get pods --show-labels
You can validate this by checking your pod labels:
Or: oc/kubectl get pods --show-labels
Answer
To resolve this, ensure that your pod label's key-pair value does not conflict with any existing labels on the pod. Per the IBM documentation on configuring the additionalMounts parameter, you can modify the key value to any arbitrary value, but you will also need to ensure that there are no conflicts with other labels.
For example, the following podLabels / matchLabels value will not work as the appserver pod already has a label with a key-pair value of role: appserver:
For example, the following podLabels / matchLabels value will not work as the appserver pod already has a label with a key-pair value of role: appserver:
spec:
servers:
- appServer:
...
podLabels:
role: appserver
...
additionalMounts:
configMaps:
- mountPath: /config/dropins/smcfs.ear/lib/properties.jar/customer_overrides.properties
name: om-props-configmap
subPath: customer_overrides.properties
matchLabels:
role: appserver
Instead, the following key value of key will work since it does not already exist as a label on the appserver:
spec:
servers:
- appServer:
...
podLabels:
key: appserver
...
additionalMounts:
configMaps:
- mountPath: /config/dropins/smcfs.ear/lib/properties.jar/customer_overrides.properties
name: om-props-configmap
subPath: customer_overrides.properties
matchLabels:
key: appserver
You should then be able to find your properties file in the provided mount path when you exec into your appserver pod. In the above case it would be /config/dropins/smcfs.ear/lib/properties.jar/customer_overrides.properties.
For reference, you can find the default roles attached as follows:
Server Type | Default Label |
---|---|
xapi | role: xapi |
appserver | role: appserver |
orderhub | role: orderhub |
callcenter | role: callcenter |
Note: For the images with tag
10.0.2306.0-amd64
and later, the application servers use Liberty
profile by default in the directory structure. As a result, all the backend JAR files that were previously located in the /config/dropins/smcfs.ear directory are located in the /config/dropins/smcfs.ear/lib directory. Read more
[{"Type":"MASTER","Line of Business":{"code":"LOB59","label":"Sustainability Software"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SS6PEW","label":"IBM Sterling Order Management"},"ARM Category":[{"code":"a8m0z000000cy0AAAQ","label":"Install and Deploy"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"}]
Was this topic helpful?
Document Information
Modified date:
17 April 2024
UID
ibm17124098