From f62373159d91dfd434a9677578d997442642dbb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20de=20Saint=20Martin?= Date: Thu, 13 Feb 2020 23:26:18 +0100 Subject: [PATCH] [stable/elasticsearch] Update to 6.8.6 + Fix plugin install initcontainer which would fail if plugin already exists. (#20630) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [stable/elasticsearch] Fix plugin install initcontainer which would fail if plugin already exists. This happens when Node reboots and keeps emptyDir, or if elasticsearch image already contains plugin. Signed-off-by: Cédric de Saint Martin * [stable/elasticsearch] Update to 6.8.6. Signed-off-by: Cédric de Saint Martin --- stable/elasticsearch/Chart.yaml | 4 ++-- stable/elasticsearch/templates/_helpers.tpl | 8 +++++++- stable/elasticsearch/values.yaml | 4 ++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/stable/elasticsearch/Chart.yaml b/stable/elasticsearch/Chart.yaml index 7c4d6f358b..d35b269228 100755 --- a/stable/elasticsearch/Chart.yaml +++ b/stable/elasticsearch/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v1 name: elasticsearch home: https://www.elastic.co/products/elasticsearch -version: 1.32.2 -appVersion: 6.8.2 +version: 1.32.3 +appVersion: 6.8.6 description: Flexible and powerful open source, distributed real-time search and analytics engine. icon: https://static-www.elastic.co/assets/blteb1c97719574938d/logo-elastic-elasticsearch-lt.svg diff --git a/stable/elasticsearch/templates/_helpers.tpl b/stable/elasticsearch/templates/_helpers.tpl index c137622718..4b1d19144c 100644 --- a/stable/elasticsearch/templates/_helpers.tpl +++ b/stable/elasticsearch/templates/_helpers.tpl @@ -97,7 +97,13 @@ plugin installer template - "-c" - | {{- range .Values.cluster.plugins }} - /usr/share/elasticsearch/bin/elasticsearch-plugin install -b {{ . }} + PLUGIN_NAME="{{ . }}" + echo "Installing $PLUGIN_NAME..." + if /usr/share/elasticsearch/bin/elasticsearch-plugin list | grep "$PLUGIN_NAME" > /dev/null; then + echo "Plugin $PLUGIN_NAME already exists, skipping." + else + /usr/share/elasticsearch/bin/elasticsearch-plugin install -b $PLUGIN_NAME + fi {{- end }} volumeMounts: - mountPath: /usr/share/elasticsearch/plugins/ diff --git a/stable/elasticsearch/values.yaml b/stable/elasticsearch/values.yaml index 7cff378bf0..7a0e274c65 100644 --- a/stable/elasticsearch/values.yaml +++ b/stable/elasticsearch/values.yaml @@ -1,7 +1,7 @@ # Default values for elasticsearch. # This is a YAML-formatted file. # Declare variables to be passed into your templates. -appVersion: "6.8.2" +appVersion: "6.8.6" ## Define serviceAccount names for components. Defaults to component's fully qualified name. ## @@ -42,7 +42,7 @@ securityContext: image: repository: "docker.elastic.co/elasticsearch/elasticsearch-oss" - tag: "6.8.2" + tag: "6.8.6" pullPolicy: "IfNotPresent" # If specified, use these secrets to access the image # pullSecrets: