Passing customer overrides through configMaps by using
additionalMounts
Use additionalMounts to pass customer overrides through a
configMap to the pods.
additionalMounts can be mounted to the OMServer by
using the label selectors. For more information about additionalMounts, see additionalMounts parameter. OMServer, the mountPath for the
customer_overrides.properties varies.- For app and xapi servers, the
mountPathis based on the release version that you are using,- For versions 10.0.2309.1 and
older:
/config/dropins/smcfs.ear/properties.jar/customer_overrides.properties - For versions 10.0.2309.2 and
higher:
/config/dropins/smcfs.ear/lib/properties.jar/customer_overrides.properties
- For versions 10.0.2309.1 and
older:
- For other servers, the
mountPathis/opt/ssfs/runtime/properties/customer_overrides.properties
If the mountPath in the additionalMounts of the
OMServer matches any of the listed customer overrides paths mentioned earlier, then
the Sterling™ Order Management System Software Operator overrides the customer overrides that are specified in
customerOverrides.propertyList.
Consider
the following snippet with serverProperties, servers,
additionalMounts, and configMap. The first
additionalMounts in the following snippet, selects the OMServer
with label name: agentserver and mounts
customer_overrides.properties to the pod with the mountPath
/opt/ssfs/runtime/properties/customer_overrides.properties. Therefore, a new
configMap is not created, and the contents of
customer_overrides.properties key in the om-props configMap is
added to the customer_overrides.properties inside the pod, even though the
deployment-agent server indicates to use the property in the group
Prop_A.
The second additionalMounts in the following
snippet, selects the OMServer with label name: appserver and
mounts customer_overrides.properties to the pod with the mountPath
/config/dropins/smcfs.ear/properties.jar/customer_overrides.properties. As a result, the
contents of customer_overrides.properties key in the om-props
configMap is added to the customer_overrides.properties inside the
pod.
Ensure that when you define customer overrides properties in the YAML, do not to use Kubernetes reserved characters such as "_". For more information about guidelines on special characters, see Guidelines on using quotation marks with YAML special characters.
configMap with customer overrides
data:kind: ConfigMap
apiVersion: v1
metadata:
name: om-props
data:
customer_overrides.properties: |
logService.systemlogger.logfilename: /shared/logs/system.log
logService.systemlogger.sysout: /shared/logs/noapp.log
yfs.log4j.configuration: /resources/log4jconfig.custom.configmap.xml
yfs.yfs.logall: NOMEnvironment spec (truncated)
# serverProperties
serverProperties:
customerOverrides:
- groupName: Prop_A
propertyList:
yfs.yfs.logall: N
yfs.log4j.configuration: /resources/log4jconfig.custom.configmap.xml
# om server
servers:
- name: deployment-agent
replicaCount: 1
profile: ProfileSmall
podLabels:
role: agentserver
property:
customerOverrides: Prop_A
agentServer:
names: [DefaultServer]
# additional mounts
additionalMounts:
configMaps:
- name: om-props
matchLabels:
name: agentserver
mountPath: /opt/ssfs/runtime/properties/customer_overrides.properties
subPath: customer_overrides.properties
readOnly: false
- name: om-props
matchLabels:
name: appserver
mountPath: /config/dropins/smcfs.ear/properties.jar/customer_overrides.properties # mountPath for app server
subPath: customer_overrides.properties
readOnly: falseGuidelines on using quotation marks with YAML special characters
- Use quotation marks in YAML, if the value includes special characters. For example, the
following special characters might require quotation marks:
{, }, [, ], ,, &, :, *, #, ?, |. -, <. >, =, !, %, @, \.
- It is not required to use quotation marks when a single special character is surrounded by spaces. For example, * with spaces on both sides.
- Use quotation marks if a special character is part of a longer string. For example, the cron string */5 * * * * requires quotation marks ("*/5 * * * *").
- Using a single quotation mark, you can add almost any character in your string and it does not parse escape codes. For example, "\n" is returned as the string \n.
- Double quotation marks parse escape codes. For example, "\n" is returned as a line feed character.
- The values
YesandNomust be enclosed in quotation marks (single or double) or else they are interpreted as TrueClass and FalseClass values.