Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ea 3830 externalization of log4j config #248

Merged
merged 3 commits into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading