Add configurable liveness probe for elasticsearch client
Signed-off-by: Ruslan Aliev <raliev@mirantis.com> Change-Id: I46e1382123ce4497e3f8e414a83fe0861f0cf43b
This commit is contained in:
parent
35bad7ea02
commit
c4a9e8b03d
@ -15,7 +15,7 @@ apiVersion: v1
|
||||
appVersion: v7.6.2
|
||||
description: OpenStack-Helm ElasticSearch
|
||||
name: elasticsearch
|
||||
version: 0.2.22
|
||||
version: 0.2.23
|
||||
home: https://www.elastic.co/
|
||||
sources:
|
||||
- https://github.com/elastic/elasticsearch
|
||||
|
@ -12,7 +12,7 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/}}
|
||||
|
||||
{{- define "probeTemplate" }}
|
||||
{{- define "readinessProbeTemplate" }}
|
||||
{{- $probePort := tuple "elasticsearch" "internal" "http" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||
{{- $probeUser := .Values.endpoints.elasticsearch.auth.admin.username }}
|
||||
{{- $probePass := .Values.endpoints.elasticsearch.auth.admin.password }}
|
||||
@ -25,6 +25,11 @@ httpGet:
|
||||
- name: Authorization
|
||||
value: Basic {{ $authHeader }}
|
||||
{{- end }}
|
||||
{{- define "livenessProbeTemplate" }}
|
||||
{{- $probePort := tuple "elasticsearch" "internal" "discovery" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||
tcpSocket:
|
||||
port: {{ $probePort }}
|
||||
{{- end }}
|
||||
|
||||
{{- if .Values.manifests.deployment_client }}
|
||||
{{- $envAll := . }}
|
||||
@ -143,12 +148,8 @@ spec:
|
||||
ports:
|
||||
- name: transport
|
||||
containerPort: {{ tuple "elasticsearch" "internal" "discovery" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
port: {{ tuple "elasticsearch" "internal" "discovery" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
||||
initialDelaySeconds: 20
|
||||
periodSeconds: 10
|
||||
{{ dict "envAll" . "component" "elasticsearch" "container" "elasticsearch-client" "type" "readiness" "probeTemplate" (include "probeTemplate" . | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }}
|
||||
{{ dict "envAll" . "component" "elasticsearch" "container" "elasticsearch-client" "type" "liveness" "probeTemplate" (include "livenessProbeTemplate" . | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }}
|
||||
{{ dict "envAll" . "component" "elasticsearch" "container" "elasticsearch-client" "type" "readiness" "probeTemplate" (include "readinessProbeTemplate" . | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }}
|
||||
env:
|
||||
- name: NAMESPACE
|
||||
valueFrom:
|
||||
|
@ -297,6 +297,11 @@ pod:
|
||||
params:
|
||||
initialDelaySeconds: 30
|
||||
timeoutSeconds: 30
|
||||
liveness:
|
||||
enabled: true
|
||||
params:
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 10
|
||||
mounts:
|
||||
elasticsearch:
|
||||
elasticsearch:
|
||||
|
@ -32,4 +32,5 @@ elasticsearch:
|
||||
- 0.2.20 Set default python for helm test
|
||||
- 0.2.21 Added OCI registry authentication
|
||||
- 0.2.22 Update all Ceph images to Focal
|
||||
- 0.2.23 Add configurable liveness probe for elasticsearch client
|
||||
...
|
||||
|
Loading…
Reference in New Issue
Block a user