From 0e45df3e64dde3b3b67e45241bad4983e7aef9ba Mon Sep 17 00:00:00 2001 From: Abhishek Jaisingh Date: Tue, 7 May 2019 02:07:43 +0530 Subject: [PATCH] [stable/logstash] Make LS_JAVA_OPTS configurable (#12311) Make LS_JAVA_OPTS environment variable configurable as logstashJavaOpts in values.yaml. It could be passed as environment varibles in the config block as well, but given its importance, a user will be most probably configue java heap size if he is configuring the resource requests / limits and this commit makes it more easy to do so via LS_JAVA_OPTS. Signed-off-by: Abhishek Jaisingh --- stable/logstash/Chart.yaml | 2 +- stable/logstash/README.md | 1 + stable/logstash/templates/statefulset.yaml | 3 +++ stable/logstash/values.yaml | 3 +++ 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/stable/logstash/Chart.yaml b/stable/logstash/Chart.yaml index 6151a2a3ab..ab4c9c6f2f 100644 --- a/stable/logstash/Chart.yaml +++ b/stable/logstash/Chart.yaml @@ -3,7 +3,7 @@ description: Logstash is an open source, server-side data processing pipeline icon: https://www.elastic.co/assets/blt86e4472872eed314/logo-elastic-logstash-lt.svg home: https://www.elastic.co/products/logstash name: logstash -version: 1.7.0 +version: 1.8.0 appVersion: 6.7.0 sources: - https://www.docker.elastic.co diff --git a/stable/logstash/README.md b/stable/logstash/README.md index 07a02db92b..5598059478 100644 --- a/stable/logstash/README.md +++ b/stable/logstash/README.md @@ -90,6 +90,7 @@ The following table lists the configurable parameters of the chart and its defau | `ingress.path` | Ingress path | `/` | | `ingress.hosts` | Ingress accepted hostnames | `["logstash.cluster.local"]` | | `ingress.tls` | Ingress TLS configuration | `[]` | +| `logstashJavaOpts` | Java options for logstash like heap size | `"-Xmx1g -Xms1g"` | | `resources` | Pod resource requests & limits | `{}` | | `priorityClassName` | priorityClassName | `nil` | | `nodeSelector` | Node selector | `{}` | diff --git a/stable/logstash/templates/statefulset.yaml b/stable/logstash/templates/statefulset.yaml index d2bbc32a6c..f72f3c1f9c 100644 --- a/stable/logstash/templates/statefulset.yaml +++ b/stable/logstash/templates/statefulset.yaml @@ -72,6 +72,9 @@ spec: value: {{ .Values.elasticsearch.host | quote }} - name: ELASTICSEARCH_PORT value: {{ .Values.elasticsearch.port | quote }} + # Logstash Java Options + - name: LS_JAVA_OPTS + value: {{ .Values.logstashJavaOpts }} ## Additional env vars {{- range $key, $value := .Values.config }} - name: {{ $key | upper | replace "." "_" }} diff --git a/stable/logstash/values.yaml b/stable/logstash/values.yaml index a9eb15867e..ac696d327a 100644 --- a/stable/logstash/values.yaml +++ b/stable/logstash/values.yaml @@ -72,6 +72,9 @@ ingress: # hosts: # - logstash.cluster.local +# set java options like heap size +logstashJavaOpts: "-Xmx1g -Xms1g" + resources: {} # We usually recommend not to specify default resources and to leave this as a conscious # choice for the user. This also increases chances charts run on environments with little