Logger categories not written to standalone-openshift.xml
Issue
- When running a JBoss application (version JBoss image version: 7.4.3) in a container on open shift. When we create a config map to set custom logger categories it is not updated inside the pod.
Example configMap:
kind: ConfigMap
apiVersion: v1
metadata:
name: example-config
namespace: jboss-example
data:
logging.env: |+
LOGGER_CATEGORIES=general:DEBUG, be.example:DEBUG, org.jboss.as:INFO
- Then we have created the deployment config which will call configure_logger_category.sh to update logger categories inside standalone-openshift.xml. But it is not updating the logger categories inside standalone-openshift.xml.
Example deployment config:
apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
metadata:
name: example
namespace: jboss-example
spec:
replicas: 1
selector:
deploymentConfig: example
strategy:
type: Rolling
template:
metadata:
labels:
application: example
deploymentConfig: example
environment: dvl
sla: bronze
name: example
spec:
containers:
- env:
- name: ENV_FILES
value: /anypath/logger.env
image: jboss-eap-7/eap74-openjdk11-runtime-openshift-rhel8:7.4.3-3
imagePullPolicy: IfNotPresent
name: example
ports:
- containerPort: 8080
name: http
protocol: TCP
resources:
limits:
cpu: 500m
memory: 4Gi
requests:
cpu: 250m
memory: 2Gi
volumeMounts:
- mountPath: /anypath/logger.env
name: example-config
subPath: logger.env
restartPolicy: Always
volumes:
- configMap:
defaultMode: 420
items:
- key: logger.env
path: logger.env
name: example-config
name: example-config
triggers:
- type: ConfigChange
Environment
- Red Hat OpenShift Container Platform Version 4.8
- Red Hat JBoss Enterprise Application Platform Version 7.4.3
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.