From 0fd9ddbf18d1437991ea4e478980509871903011 Mon Sep 17 00:00:00 2001 From: Julien Mailleret Date: Tue, 21 Apr 2020 17:02:54 +0200 Subject: [PATCH] [logstash] update doc and values.yaml for http.host issues * add warning that `http.host: 0.0.0.0` is required with default probes * add syntax to disable or override default probes --- logstash/README.md | 1 + logstash/values.yaml | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/logstash/README.md b/logstash/README.md index c2db20a32..7a1fbc666 100644 --- a/logstash/README.md +++ b/logstash/README.md @@ -17,6 +17,7 @@ This helm chart is a lightweight way to configure and run our official [Logstash * It is important to verify that the JVM heap size in `logstashJavaOpts` and to set the CPU/Memory `resources` to something suitable for your cluster * We have designed this chart to be very un-opinionated about how to configure Logstash. It exposes ways to set environment variables and mount secrets inside of the container. Doing this makes it much easier for this chart to support multiple versions with minimal changes. * `logstash.yml` configuration files can be set either by a ConfigMap using `logstashConfig` in `values.yml` or by environment variables using `extraEnvs` in `values.yml`, however Logstash Docker image can't mix both methods as defining settings with environment variables causes `logstash.yml` to be modified in place while using ConfigMap bind-mount the same file (more details in this [Note](https://www.elastic.co/guide/en/logstash/6.7/docker-config.html#docker-env-config)). +* When overriding `logstash.yml`, `http.host: 0.0.0.0` should always be included to make default probes work. If restricting HTTP API to 127.0.0.1 is required by using `http.host: 127.0.0.1`, default probes should be disabled or overrided (see [values.yaml](https://github.com/elastic/helm-charts/tree/master/logstash/values.yaml) for the good syntax). ## Installing diff --git a/logstash/values.yaml b/logstash/values.yaml index 412252510..2133f8bc3 100755 --- a/logstash/values.yaml +++ b/logstash/values.yaml @@ -3,6 +3,9 @@ replicas: 1 # Allows you to add any config files in /usr/share/logstash/config/ # such as logstash.yml and log4j2.properties +# +# Note that when overriding logstash.yml, `http.host: 0.0.0.0` should always be included +# to make default probes work. logstashConfig: {} # logstash.yml: | # key: @@ -152,6 +155,21 @@ securityContext: # How long to wait for logstash to stop gracefully terminationGracePeriod: 120 +# Probes +# Default probes are using `httpGet` which requires that `http.host: 0.0.0.0` is part of +# `logstash.yml`. If needed probes can be disabled or overrided using the following syntaxes: +# +# disable livenessProbe +# livenessProbe: null +# +# replace httpGet default readinessProbe by some exec probe +# readinessProbe: +# httpGet: null +# exec: +# command: +# - curl +# - localhost:9600 + livenessProbe: httpGet: path: /