Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Commit

Permalink
Make it possible to override the endpoint template. (#298)
Browse files Browse the repository at this point in the history
Make it possible to override the endpoint template.
  • Loading branch information
Crazybus committed Sep 23, 2019
2 parents f0c2658 + 8d9d411 commit 21b711a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions elasticsearch/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
{{- end -}}

{{- define "endpoints" -}}
{{- $replicas := .replicas | int }}
{{- $uname := printf "%s-%s" .clusterName .nodeGroup }}
{{- $replicas := .Values.replicas | int }}
{{- $uname := printf "%s-%s" .Values.clusterName .Values.nodeGroup }}
{{- range $i, $e := untilStep 0 $replicas 1 -}}
{{ $uname }}-{{ $i }},
{{- end -}}
Expand Down
2 changes: 1 addition & 1 deletion elasticsearch/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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" .Values }}"
value: "{{ template "endpoints" . }}"
{{- else }}
- name: discovery.zen.minimum_master_nodes
value: "{{ .Values.minimumMasterNodes }}"
Expand Down

0 comments on commit 21b711a

Please sign in to comment.