Question
Capgemini
IT
Last activity: 29 Jan 2025 21:41 EST
Options for handling custom configuration files in client managed deployments
Hello,
According to Pega helm chart documentation (https://github.com/pegasystems/pega-helm-charts/blob/master/charts/pega/README.md#pega-configuration-files) if you want to overwrite default configuration files (prconfig.xml, prlog4j2.xml, ..), the custom files must be fully reported in your "values" file. This is working for us, but as result the values.yaml becomes a huge file, hardly to handle. So, our client is asking if there is any alternative way to handle this configurations, for example via configmap.
Let me explain the idea for prlog4j2.xml as example,, but if you have any other options, they are welcome.
step 1)
Adding the following section in values.yaml
- name: web
custom:
volumeMounts:
- name: prlog4j2-volume
mountPath: /path/pega/config
volumes:
- name: prlog4j2-volume
configMap:
name: prlog4j2-configmap
step 2) Creating a new file in pega/templates, let's suppose we can call it as prlog4j2-configmap.yaml, as below:
Hello,
According to Pega helm chart documentation (https://github.com/pegasystems/pega-helm-charts/blob/master/charts/pega/README.md#pega-configuration-files) if you want to overwrite default configuration files (prconfig.xml, prlog4j2.xml, ..), the custom files must be fully reported in your "values" file. This is working for us, but as result the values.yaml becomes a huge file, hardly to handle. So, our client is asking if there is any alternative way to handle this configurations, for example via configmap.
Let me explain the idea for prlog4j2.xml as example,, but if you have any other options, they are welcome.
step 1)
Adding the following section in values.yaml
- name: web
custom:
volumeMounts:
- name: prlog4j2-volume
mountPath: /path/pega/config
volumes:
- name: prlog4j2-volume
configMap:
name: prlog4j2-configmap
step 2) Creating a new file in pega/templates, let's suppose we can call it as prlog4j2-configmap.yaml, as below:
apiVersion: v1
kind: ConfigMap
metadata:
name: prlog4j2-configmap
namespace: {{{namespace}}
binaryData:
prlog4j2.xml:
{{ .Files.Get "config/prlog4j2.xml" | b64enc | indent 4}}
step 3) In values.yaml setting the parameter -Dpegarules.logging.configuration of JAVA_OPTS as follows:
-Dpegarules.logging.configuration=/path/config/prlog4j2.xml
Do you think it might work? Is there any other viable option to avoid full configuration files in values.yaml?