mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
[incubator/elasticsearch] pre-stop-hook and post-start-hook drain scripts are now optional. (#8622)
We don't need to always drain a data node that is restarting. Signed-off-by: Cédric de Saint Martin <cdesaintmartin@wiremind.fr>
This commit is contained in:
committed by
k8s-ci-robot
parent
35a2602e44
commit
bc14827b62
@@ -1,6 +1,6 @@
|
||||
name: elasticsearch
|
||||
home: https://www.elastic.co/products/elasticsearch
|
||||
version: 1.12.0
|
||||
version: 1.13.0
|
||||
appVersion: 6.4.2
|
||||
description: Flexible and powerful open source, distributed real-time search and analytics
|
||||
engine.
|
||||
|
||||
@@ -110,6 +110,7 @@ The following table lists the configurable parameters of the elasticsearch chart
|
||||
| `data.resources` | Data node resources requests & limits | `{} - cpu limit must be an integer` |
|
||||
| `data.priorityClassName` | Data priorityClass | `nil` |
|
||||
| `data.heapSize` | Data node heap size | `1536m` |
|
||||
| `data.hooks.drain.enabled | Data nodes: Enable drain pre-stop and post-start hook | `true` |
|
||||
| `data.persistence.enabled` | Data persistent enabled/disabled | `true` |
|
||||
| `data.persistence.name` | Data statefulset PVC template name | `data` |
|
||||
| `data.persistence.size` | Data persistent volume size | `30Gi` |
|
||||
|
||||
@@ -119,6 +119,7 @@ data:
|
||||
logger.searchguard.name = com.floragunn
|
||||
logger.searchguard.level = info
|
||||
{{- end }}
|
||||
{{- if .Values.data.hooks.drain.enabled }}
|
||||
pre-stop-hook.sh: |-
|
||||
#!/bin/bash
|
||||
exec &> >(tee -a "/var/log/elasticsearch-hooks.log")
|
||||
@@ -155,3 +156,4 @@ data:
|
||||
}"
|
||||
fi
|
||||
echo "Node ${NODE_NAME} is ready to be used"
|
||||
{{- end }}
|
||||
|
||||
@@ -138,18 +138,19 @@ spec:
|
||||
name: config
|
||||
subPath: log4j2.properties
|
||||
{{- end }}
|
||||
- name: config
|
||||
mountPath: /pre-stop-hook.sh
|
||||
subPath: pre-stop-hook.sh
|
||||
- name: config
|
||||
mountPath: /post-start-hook.sh
|
||||
subPath: post-start-hook.sh
|
||||
{{- if .Values.cluster.keystoreSecret }}
|
||||
- name: keystore
|
||||
mountPath: "/usr/share/elasticsearch/config/elasticsearch.keystore"
|
||||
subPath: elasticsearch.keystore
|
||||
readOnly: true
|
||||
{{- end }}
|
||||
{{- if .Values.data.hooks.drain.enabled }}
|
||||
- name: config
|
||||
mountPath: /pre-stop-hook.sh
|
||||
subPath: pre-stop-hook.sh
|
||||
- name: config
|
||||
mountPath: /post-start-hook.sh
|
||||
subPath: post-start-hook.sh
|
||||
lifecycle:
|
||||
preStop:
|
||||
exec:
|
||||
@@ -157,6 +158,7 @@ spec:
|
||||
postStart:
|
||||
exec:
|
||||
command: ["/bin/bash","/post-start-hook.sh"]
|
||||
{{- end }}
|
||||
terminationGracePeriodSeconds: {{ .Values.data.terminationGracePeriodSeconds }}
|
||||
{{- if .Values.image.pullSecrets }}
|
||||
imagePullSecrets:
|
||||
|
||||
@@ -148,6 +148,9 @@ data:
|
||||
maxUnavailable: 1
|
||||
updateStrategy:
|
||||
type: OnDelete
|
||||
hooks: # post-start and pre-stop hooks
|
||||
drain: # drain the node before stopping it and re-integrate it into the cluster after start
|
||||
enabled: true
|
||||
|
||||
## Additional init containers
|
||||
extraInitContainers: |
|
||||
|
||||
Reference in New Issue
Block a user