elastic: application-update support
Modify the podManagementPolicy for elasticsearch pods to OrderedReady so no outage is incurred during application-updates. This setting will also affect initial application-apply, so the elasticsearch helm chart is also modified to set the initial_master_nodes to just the first master pod so it will go ready and the apply can proceed. Change-Id: I87e73f6000430f81f2dc08d37ecd523682377ce3 Story: 2005733 Task: 37290 Signed-off-by: Kevin Smith <kevin.smith@windriver.com>
This commit is contained in:
parent
6716be451f
commit
a796ef7fba
@ -22,6 +22,7 @@ Patch01: 0001-add-makefile.patch
|
|||||||
Patch02: 0002-Add-compatibility-for-k8s-1.16.patch
|
Patch02: 0002-Add-compatibility-for-k8s-1.16.patch
|
||||||
Patch03: 0003-use-oss-image.patch
|
Patch03: 0003-use-oss-image.patch
|
||||||
Patch04: 0004-Update-to-Elastic-7.4.0-Release.patch
|
Patch04: 0004-Update-to-Elastic-7.4.0-Release.patch
|
||||||
|
Patch05: 0005-set-initial-masters-to-master-0.patch
|
||||||
|
|
||||||
BuildRequires: helm
|
BuildRequires: helm
|
||||||
|
|
||||||
@ -34,6 +35,7 @@ Monitor Helm elasticsearch charts
|
|||||||
%patch02 -p1
|
%patch02 -p1
|
||||||
%patch03 -p1
|
%patch03 -p1
|
||||||
%patch04 -p1
|
%patch04 -p1
|
||||||
|
%patch05 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# initialize helm and build the toolkit
|
# initialize helm and build the toolkit
|
||||||
|
@ -0,0 +1,40 @@
|
|||||||
|
From 066b7c9996d9bdee56857eca8a1af72bbbaaafff Mon Sep 17 00:00:00 2001
|
||||||
|
From: Kevin Smith <kevin.smith@windriver.com>
|
||||||
|
Date: Thu, 24 Oct 2019 11:06:30 -0400
|
||||||
|
Subject: [PATCH 1/1] set initial masters to master-0
|
||||||
|
|
||||||
|
---
|
||||||
|
elasticsearch/templates/statefulset.yaml | 2 +-
|
||||||
|
elasticsearch/values.yaml | 3 +++
|
||||||
|
2 files changed, 4 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/elasticsearch/templates/statefulset.yaml b/elasticsearch/templates/statefulset.yaml
|
||||||
|
index 36c7af6..e17d39e 100644
|
||||||
|
--- a/elasticsearch/templates/statefulset.yaml
|
||||||
|
+++ b/elasticsearch/templates/statefulset.yaml
|
||||||
|
@@ -233,7 +233,7 @@ spec:
|
||||||
|
{{- if eq .Values.roles.master "true" }}
|
||||||
|
{{- if ge (int (include "esMajorVersion" .)) 7 }}
|
||||||
|
- name: cluster.initial_master_nodes
|
||||||
|
- value: "{{ template "endpoints" . }}"
|
||||||
|
+ value: "{{ .Values.initialMasterNodes }}"
|
||||||
|
{{- else }}
|
||||||
|
- name: discovery.zen.minimum_master_nodes
|
||||||
|
value: "{{ .Values.minimumMasterNodes }}"
|
||||||
|
diff --git a/elasticsearch/values.yaml b/elasticsearch/values.yaml
|
||||||
|
index 6175540..0d983eb 100755
|
||||||
|
--- a/elasticsearch/values.yaml
|
||||||
|
+++ b/elasticsearch/values.yaml
|
||||||
|
@@ -6,6 +6,9 @@ nodeGroup: "master"
|
||||||
|
# This should be set to clusterName + "-" + nodeGroup for your master group
|
||||||
|
masterService: ""
|
||||||
|
|
||||||
|
+# On initial cluster formation, the initial set of masters.
|
||||||
|
+initialMasterNodes: "mon-elasticsearch-master-0"
|
||||||
|
+
|
||||||
|
# Elasticsearch roles that will be applied to this nodeGroup
|
||||||
|
# These will be set as environment variables. E.g. node.master=true
|
||||||
|
roles:
|
||||||
|
--
|
||||||
|
1.8.3.1
|
||||||
|
|
@ -102,6 +102,7 @@ data:
|
|||||||
imageTag: 7.4.0
|
imageTag: 7.4.0
|
||||||
esMajorVersion: 7
|
esMajorVersion: 7
|
||||||
masterService: 'mon-elasticsearch-data-headless, mon-elasticsearch-master'
|
masterService: 'mon-elasticsearch-data-headless, mon-elasticsearch-master'
|
||||||
|
podManagementPolicy: OrderedReady
|
||||||
wait:
|
wait:
|
||||||
labels:
|
labels:
|
||||||
release: mon-elasticsearch-data
|
release: mon-elasticsearch-data
|
||||||
@ -171,6 +172,7 @@ data:
|
|||||||
imageTag: 7.4.0
|
imageTag: 7.4.0
|
||||||
esMajorVersion: 7
|
esMajorVersion: 7
|
||||||
masterService: 'mon-elasticsearch-data-headless, mon-elasticsearch-master'
|
masterService: 'mon-elasticsearch-data-headless, mon-elasticsearch-master'
|
||||||
|
podManagementPolicy: OrderedReady
|
||||||
wait:
|
wait:
|
||||||
labels:
|
labels:
|
||||||
release: mon-elasticsearch-client
|
release: mon-elasticsearch-client
|
||||||
@ -220,6 +222,7 @@ data:
|
|||||||
imageTag: 7.4.0
|
imageTag: 7.4.0
|
||||||
esMajorVersion: 7
|
esMajorVersion: 7
|
||||||
masterService: 'mon-elasticsearch-data-headless, mon-elasticsearch-master'
|
masterService: 'mon-elasticsearch-data-headless, mon-elasticsearch-master'
|
||||||
|
podManagementPolicy: OrderedReady
|
||||||
wait:
|
wait:
|
||||||
labels:
|
labels:
|
||||||
release: mon-elasticsearch-master
|
release: mon-elasticsearch-master
|
||||||
|
Loading…
Reference in New Issue
Block a user