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

Make it possible to override the endpoint template. #298

Merged
merged 1 commit into from
Sep 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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