Skip to content

Commit

Permalink
fix: do not specify master nodes if replicas <= 1
Browse files Browse the repository at this point in the history
Closes: elastic#1759
  • Loading branch information
vchirikov committed Aug 27, 2023
1 parent 9303e90 commit 3ce2806
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ index.yaml
.idea/
/venv
.vscode/
tmp/
2 changes: 1 addition & 1 deletion elasticsearch/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.name
{{- if and (has "master" .Values.roles) (gt .Values.replicas 1) }}
{{- if and (has "master" .Values.roles) (gt (int (.Values.replicas)) 1) }}
- name: cluster.initial_master_nodes
value: "{{ template "elasticsearch.endpoints" . }}"
{{- end }}
Expand Down

0 comments on commit 3ce2806

Please sign in to comment.