Skip to content

Commit

Permalink
[stable/elasticsearch] Move logging configuration to values.yaml (hel…
Browse files Browse the repository at this point in the history
…m#14550)

* [stable/elasticsearch] move logging configuration to values.yaml

Signed-off-by: Tetiana Kravchenko <[email protected]>

* [stable/elasticsearch] bump chart version

Signed-off-by: Tetiana Kravchenko <[email protected]>
  • Loading branch information
tetianakravchenko authored and k8s-ci-robot committed Jun 7, 2019
1 parent 73d7e7d commit 0232f25
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 36 deletions.
2 changes: 1 addition & 1 deletion stable/elasticsearch/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
name: elasticsearch
home: https://www.elastic.co/products/elasticsearch
version: 1.28.1
version: 1.28.2
appVersion: 6.7.0
description: Flexible and powerful open source, distributed real-time search and analytics
engine.
Expand Down
2 changes: 2 additions & 0 deletions stable/elasticsearch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ The following table lists the configurable parameters of the elasticsearch chart
| `cluster.bootstrapShellCommand` | Post-init command to run in separate Job | `""` |
| `cluster.additionalJavaOpts` | Cluster parameters to be added to `ES_JAVA_OPTS` environment variable | `""` |
| `cluster.plugins` | List of Elasticsearch plugins to install | `[]` |
| `cluster.loggingYml` | Cluster logging configuration for ES v2 | see `values.yaml` for defaults |
| `cluster.log4j2Properties` | Cluster logging configuration for ES v5 and 6 | see `values.yaml` for defaults |
| `client.name` | Client component name | `client` |
| `client.replicas` | Client node replicas (deployment) | `2` |
| `client.resources` | Client node resources requests & limits | `{} - cpu limit must be an integer` |
Expand Down
38 changes: 3 additions & 35 deletions stable/elasticsearch/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,42 +92,10 @@ data:
{{- end }}
{{- if hasPrefix "2." .Values.appVersion }}
logging.yml: |-
# you can override this using by setting a system property, for example -Des.logger.level=DEBUG
es.logger.level: INFO
rootLogger: ${es.logger.level}, console
logger:
# log action execution errors for easier debugging
action: DEBUG
# reduce the logging for aws, too much is logged under the default INFO
com.amazonaws: WARN
appender:
console:
type: console
layout:
type: consolePattern
conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"
{{- else if hasPrefix "5." .Values.appVersion }}
log4j2.properties: |-
status = error
appender.console.type = Console
appender.console.name = console
appender.console.layout.type = PatternLayout
appender.console.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] %marker%m%n
rootLogger.level = info
rootLogger.appenderRef.console.ref = console
logger.searchguard.name = com.floragunn
logger.searchguard.level = info
{{- else if hasPrefix "6." .Values.appVersion }}
{{ toYaml .Values.cluster.loggingYml | indent 4 }}
{{- else }}
log4j2.properties: |-
status = error
appender.console.type = Console
appender.console.name = console
appender.console.layout.type = PatternLayout
appender.console.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] %marker%m%n
rootLogger.level = info
rootLogger.appenderRef.console.ref = console
logger.searchguard.name = com.floragunn
logger.searchguard.level = info
{{ tpl .Values.cluster.log4j2Properties . | indent 4 }}
{{- end }}
{{- if .Values.data.hooks.drain.enabled }}
pre-stop-hook.sh: |-
Expand Down
27 changes: 27 additions & 0 deletions stable/elasticsearch/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,33 @@ cluster:
# - ingest-attachment
# - mapper-size

loggingYml:
# you can override this using by setting a system property, for example -Des.logger.level=DEBUG
es.logger.level: INFO
rootLogger: ${es.logger.level}, console
logger:
# log action execution errors for easier debugging
action: DEBUG
# reduce the logging for aws, too much is logged under the default INFO
com.amazonaws: WARN
appender:
console:
type: console
layout:
type: consolePattern
conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"

log4j2Properties: |
status = error
appender.console.type = Console
appender.console.name = console
appender.console.layout.type = PatternLayout
appender.console.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] %marker%m%n
rootLogger.level = info
rootLogger.appenderRef.console.ref = console
logger.searchguard.name = com.floragunn
logger.searchguard.level = info
client:
name: client
replicas: 2
Expand Down

0 comments on commit 0232f25

Please sign in to comment.