diff --git a/elasticsearch/templates/_helpers.tpl b/elasticsearch/templates/_helpers.tpl index 6ca92a5a3..d651d5671 100755 --- a/elasticsearch/templates/_helpers.tpl +++ b/elasticsearch/templates/_helpers.tpl @@ -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 -}} diff --git a/elasticsearch/templates/statefulset.yaml b/elasticsearch/templates/statefulset.yaml index 2af675e61..004578f2c 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" .Values }}" + value: "{{ template "endpoints" . }}" {{- else }} - name: discovery.zen.minimum_master_nodes value: "{{ .Values.minimumMasterNodes }}"