Skip to content

Override log4j.properties when using provided#62

Merged
b-feldmann merged 11 commits intomasterfrom
feature/set-log4-level
Mar 24, 2020
Merged

Override log4j.properties when using provided#62
b-feldmann merged 11 commits intomasterfrom
feature/set-log4-level

Conversation

@b-feldmann
Copy link
Copy Markdown
Contributor

log4j.properties can be provided for helm with --set-file FILE_PATH

@b-feldmann b-feldmann added the enhancement New feature or request label Mar 24, 2020
@b-feldmann b-feldmann self-assigned this Mar 24, 2020
@@ -0,0 +1 @@
{{ if .Values.log4jConfig }}apiVersion: v1kind: ConfigMapmetadata: name: {{ template "streams-app.name" . }}-log4j-configmapdata: log4j.properties: |{{ .Values.log4jConfig | indent 4 }}{{ end }} No newline at end of file
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that supposed to be just one line?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is strange. This file has 9 lines on my file system. I will push the file with linux line endings again

@philipp94831
Copy link
Copy Markdown
Member

@BJennWare Please also make the changes to the statefulset

name: {{ template "streams-app.name" . }}-log4j-configmap
data:
log4j.properties: |
{{ .Values.log4jConfig | indent 4 }}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the purpose of this? Can I still configure log4j.properties via values.yaml? Or just mount a file?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We cannot just mount a file into helm. If we use helm --set-file log4jConfig=FILE_PATH than the contents of the file are in .Values.log4jConfig.

TLDR: We change the log config by mounting a log4j.properties file with --set-file

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

@b-feldmann b-feldmann merged commit fda2395 into master Mar 24, 2020
@b-feldmann b-feldmann deleted the feature/set-log4-level branch March 24, 2020 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants