Skip to content

Commit

Permalink
Merge pull request #53 from sebglon/feat/log4j2
Browse files Browse the repository at this point in the history
Add new property `log4j2XML`
  • Loading branch information
pmint93 authored Dec 31, 2022
2 parents bd34db8 + b44359a commit 9e36b07
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 5 deletions.
2 changes: 1 addition & 1 deletion charts/metabase/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description:
The easy, open source way for everyone in your company to ask questions
and learn from data.
name: metabase
version: 2.5.0
version: 2.6.0
appVersion: v0.45.1
maintainers:
- name: pmint93
Expand Down
3 changes: 2 additions & 1 deletion charts/metabase/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ The following table lists the configurable parameters of the Metabase chart and
| ingress.labels | Ingress labels configuration | null |
| ingress.annotations | Ingress annotations configuration | {} |
| ingress.tls | Ingress TLS configuration | null |
| log4jProperties | Custom `log4j.properties` file | null |
| log4j2XML | Custom `log4j2.xml` file | null |
| log4jProperties | DEPRECATED Custom `log4j.properties` file | null |
| resources | Server resource requests and limits | {} |
| nodeSelector | Node labels for pod assignment | {} |
| tolerations | Toleration labels for pod assignment | [] |
Expand Down
4 changes: 4 additions & 0 deletions charts/metabase/templates/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ data:
log4j.properties:
{{ toYaml .Values.log4jProperties | indent 4}}
{{- end}}
{{- if .Values.log4j2XML }}
log4j2.xml:
{{ toYaml .Values.log4j2XML | indent 4}}
{{- end}}
14 changes: 12 additions & 2 deletions charts/metabase/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ spec:
- name: JAVA_OPTS
value: "-Dlog4j.configuration=file:/tmp/conf/log4j.properties"
{{- end }}
{{- if .Values.log4j2XML }}
- name: JAVA_OPTS
value: "-Dlog4j.configuration=file:/tmp/conf/log4j2.xml"
{{- end }}
{{- end }}
{{- if .Values.pluginsDirectory }}
- name: MB_PLUGINS_DIR
Expand Down Expand Up @@ -190,7 +194,7 @@ spec:
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
{{- if or .Values.log4jProperties (ne (len .Values.extraVolumeMounts) 0) }}
volumeMounts:
{{- if .Values.log4jProperties }}
{{- if or .Values.log4jProperties .Values.log4j2XML }}
- name: config
mountPath: /tmp/conf/
{{- end }}
Expand Down Expand Up @@ -256,13 +260,19 @@ spec:
{{- end }}
serviceAccountName: {{ template "metabase.serviceAccountName" . }}
volumes:
{{- if .Values.log4jProperties}}
{{- if or .Values.log4jProperties .Values.log4j2XML }}
- name: config
configMap:
name: {{ template "metabase.fullname" . }}-config
items:
{{- if .Values.log4jProperties }}
- key: log4j.properties
path: log4j.properties
{{- end }}
{{- if .Values.log4j2XML}}
- key: log4j2.xml
path: log4j2.xml
{{- end }}
{{- end }}
{{- if ne (len .Values.extraVolumes) 0 }}
{{ toYaml .Values.extraVolumes | nindent 8 }}
Expand Down
8 changes: 7 additions & 1 deletion charts/metabase/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,13 @@ ingress:
# hosts:
# - metabase.domain.com

# A custom log4j.properties file can be provided using a multiline YAML string.
# A custom log4j2.xml file can be provided using a multiline YAML string.
# See https://github.com/metabase/metabase/blob/master/resources/log4j2.xml
#
# log4j2XML:


# DEPRECATED; A custom log4j.properties file can be provided using a multiline YAML string.
# See https://github.com/metabase/metabase/blob/master/resources/log4j.properties
#
# log4jProperties:
Expand Down

0 comments on commit 9e36b07

Please sign in to comment.