Skip to content

Commit

Permalink
Merge pull request #248 from europeana/EA-3830-externalization-of-log…
Browse files Browse the repository at this point in the history
…4j-config

Ea 3830 externalization of log4j config
  • Loading branch information
gsergiu authored Apr 29, 2024
2 parents 3a2ed16 + 16f05db commit df9f15f
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
7 changes: 7 additions & 0 deletions k8s/base/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,14 @@ spec:
mountPath: "/opt/app/config/set.user.properties"
readOnly: true
subPath: set.user.properties
- name: log4j-config
mountPath: "/opt/app/config/log4j2-spring.xml"
readOnly: true
subPath: log4j2-spring.xml
volumes:
- name: app-properties
secret:
secretName: set-api-properties
- name: log4j-config
configMap:
name: log4j2-properties
8 changes: 7 additions & 1 deletion k8s/base/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,10 @@ labels:
secretGenerator:
- name: set-api-properties
files:
- set.user.properties
- set.user.properties

#generate config mapping for log4j2.xml file
configMapGenerator:
- name: log4j2-properties
files:
- log4j2-spring.xml
3 changes: 2 additions & 1 deletion k8s/overlays/cloud/deployment_patch.yaml.template
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ spec:
-Delastic.apm.application_packages=${ELASTIC_APP_PACKAGES}
-Delastic.apm.server_urls=${ELASTIC_APM_SERVERS}
-Delastic.apm.service_name=${APP_NAME}
-Delastic.apm.environment=${K8S_NAMESPACE}"
-Delastic.apm.environment=${K8S_NAMESPACE}
-Dlogging.config=/opt/app/config/log4j2-spring.xml"
resources:
requests:
memory: "${MEMORY_REQUEST}M"
Expand Down

0 comments on commit df9f15f

Please sign in to comment.