@@ -56,14 +56,20 @@ Return the hostname of every ElasticSearch seed node
5656{ {- define " elasticsearch.hosts" -} }
5757{ {- $clusterDomain := .Values.clusterDomain } }
5858{ {- $releaseNamespace := .Release.Namespace } }
59+ { {- if gt (.Values.master.replicas | int) 0 } }
5960{ {- $masterFullname := include " elasticsearch.master.fullname" . } }
60- { {- $coordinatingFullname := include " elasticsearch.coordinating.fullname" . } }
61- { {- $dataFullname := include " elasticsearch.data.fullname" . } }
62- { {- $ingestFullname := include " elasticsearch.ingest.fullname" . } }
6361{ {- $masterFullname } }.{ { $releaseNamespace } }.svc.{ { $clusterDomain } },
62+ { {- end -} }
63+ { {- if gt (.Values.coordinating.replicas | int) 0 } }
64+ { {- $coordinatingFullname := include " elasticsearch.coordinating.fullname" . } }
6465{ {- $coordinatingFullname } }.{ { $releaseNamespace } }.svc.{ { $clusterDomain } },
66+ { {- end -} }
67+ { {- if gt (.Values.data.replicas | int) 0 } }
68+ { {- $dataFullname := include " elasticsearch.data.fullname" . } }
6569{ {- $dataFullname } }.{ { $releaseNamespace } }.svc.{ { $clusterDomain } },
66- { {- if .Values.ingest.enabled } }
70+ { {- end -} }
71+ { {- if and (eq .Values.ingest.enabled true ) (gt (.Values.ingest.replicas | int) 0) } }
72+ { {- $ingestFullname := include " elasticsearch.ingest.fullname" . } }
6773{ {- $ingestFullname } }.{ { $releaseNamespace } }.svc.{ { $clusterDomain } },
6874{ {- end -} }
6975{ {- end -} }
@@ -498,4 +504,4 @@ DESIRED="{{ .value }}";
498504if [ "$DESIRED" -gt "$CURRENT" ]; then
499505 sysctl -w { { .key } }={ { .value } };
500506fi;
501- { {- end -} }
507+ { {- end -} }
0 commit comments