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

Why masterService in values.yaml ? #43

Closed
hachh opened this issue Jan 22, 2019 · 2 comments
Closed

Why masterService in values.yaml ? #43

hachh opened this issue Jan 22, 2019 · 2 comments

Comments

@hachh
Copy link

hachh commented Jan 22, 2019

Hi all,

I read how this chart works and I don't understand why is there masterService in values.yaml.
Because service is defined with {{ template "uname" . }}-headless which is exactly the concatenation of clusterName and nodeGroup {{ .Values.clusterName }}-{{ .Values.nodeGroup }}.

In helpers :

{{- define "uname" -}}
{{ .Values.clusterName }}-{{ .Values.nodeGroup }}
{{- end -}}

In service.yaml :

kind: Service
apiVersion: v1
metadata:
  name: {{ template "uname" . }}-headless

But in statefulset.yaml :

          - name: discovery.zen.ping.unicast.hosts
            value: "{{ .Values.masterService }}-headless"
@Crazybus
Copy link
Contributor

Hi!

This value exists so that it is possible to build clusters with distinct groups of dedicated nodes. Rather than hardcoding how many masters or data or machine learning nodes you want, you instead deploy separate releases for each dedicated node type. This variable is used to connect the non-master nodes to the masters.

If you take a look at the multi example you will see how this works. The first group of nodes is deployed with only the master role and the data nodes then have masterService: "multi-master" set so they know how to discover their masters.

Does this make sense? It's explained in the readme in the Clustering and Node Discovery section too. If you have any suggestions for making the documentation better I'd love to hear it.

@Crazybus
Copy link
Contributor

Crazybus commented Apr 2, 2019

Feel free to reopen this issue if you still have questions.

An important note is that this no longer needs to be specified unless your using dedicated node groups and don't use master as the name of your master node group. #78

@Crazybus Crazybus closed this as completed Apr 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants