Skip to content

Configure cluster with both voting and non-voting members. #196

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 11, 2023
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
6 changes: 2 additions & 4 deletions weaviate/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -164,16 +164,14 @@ Usage:
Raft cluster configuration settings
*/}}
{{- define "raft_configuration" -}}
{{- $replicas := .Values.replicas | int -}}
{{- $voters := .Values.env.RAFT_BOOTSTRAP_EXPECT | int -}}
{{- $nodes := list -}}
{{- range $i := until $replicas -}}
{{- range $i := until $voters -}}
{{- $node_name := list -}}
{{- $node_name = append $node_name "weaviate" -}}
{{- $node_name = append $node_name $i -}}
{{- $nodes = append $nodes (join "-" $node_name) -}}
{{- end }}
- name: RAFT_JOIN
value: "{{ join "," $nodes }}"
- name: RAFT_BOOTSTRAP_EXPECT
value: {{ $replicas | quote }}
{{- end -}}
9 changes: 6 additions & 3 deletions weaviate/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ image:
# of weaviate. In accordance with Infra-as-code, you should pin this value
# down and only change it if you explicitly want to upgrade the Weaviate
# version.
tag: 1.22.5
repo: semitechnologies/weaviate
tag: latest
repo: library/module_test_image_raft
# Image pull policy: https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy
pullPolicy: IfNotPresent
pullSecrets: []
Expand Down Expand Up @@ -62,6 +62,7 @@ initContainers:
# to cases where no data is imported yet. Scaling down after importing data may
# break usability. Full dynamic scalability will be added in a future release.
replicas: 1

# Define how pods will be created. Possible values: OrderedReady | Parallel
# OrderedReady - pods will be created one after another
# Parallel - all pods will be created at once
Expand Down Expand Up @@ -229,7 +230,9 @@ env:

# Raft settings are generated automatically by "raft_configuration" template
# Set Raft cluster bootstrap timeout (in seconds), default is 10 (seconds)
# RAFT_BOOTSTRAP_TIMEOUT: 30
RAFT_BOOTSTRAP_TIMEOUT: 30
RAFT_BOOTSTRAP_EXPECT: 1


# Set a MEM limit for the Weaviate Pod so it can help you both increase GC-related
# performance as well as avoid GC-related out-of-memory (“OOM”) situations
Expand Down