Skip to content

Commit 952c40d

Browse files
authored
Merge pull request #196 from weaviate/raft-configuration_nonvoters
Configure cluster with both voting and non-voting members.
2 parents c128c78 + 5fde591 commit 952c40d

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

weaviate/templates/_helpers.tpl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,16 +164,14 @@ Usage:
164164
Raft cluster configuration settings
165165
*/}}
166166
{{- define "raft_configuration" -}}
167-
{{- $replicas := .Values.replicas | int -}}
167+
{{- $voters := .Values.env.RAFT_BOOTSTRAP_EXPECT | int -}}
168168
{{- $nodes := list -}}
169-
{{- range $i := until $replicas -}}
169+
{{- range $i := until $voters -}}
170170
{{- $node_name := list -}}
171171
{{- $node_name = append $node_name "weaviate" -}}
172172
{{- $node_name = append $node_name $i -}}
173173
{{- $nodes = append $nodes (join "-" $node_name) -}}
174174
{{- end }}
175175
- name: RAFT_JOIN
176176
value: "{{ join "," $nodes }}"
177-
- name: RAFT_BOOTSTRAP_EXPECT
178-
value: {{ $replicas | quote }}
179177
{{- end -}}

weaviate/values.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ image:
77
# of weaviate. In accordance with Infra-as-code, you should pin this value
88
# down and only change it if you explicitly want to upgrade the Weaviate
99
# version.
10-
tag: 1.22.5
11-
repo: semitechnologies/weaviate
10+
tag: latest
11+
repo: library/module_test_image_raft
1212
# Image pull policy: https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy
1313
pullPolicy: IfNotPresent
1414
pullSecrets: []
@@ -62,6 +62,7 @@ initContainers:
6262
# to cases where no data is imported yet. Scaling down after importing data may
6363
# break usability. Full dynamic scalability will be added in a future release.
6464
replicas: 1
65+
6566
# Define how pods will be created. Possible values: OrderedReady | Parallel
6667
# OrderedReady - pods will be created one after another
6768
# Parallel - all pods will be created at once
@@ -229,7 +230,9 @@ env:
229230

230231
# Raft settings are generated automatically by "raft_configuration" template
231232
# Set Raft cluster bootstrap timeout (in seconds), default is 10 (seconds)
232-
# RAFT_BOOTSTRAP_TIMEOUT: 30
233+
RAFT_BOOTSTRAP_TIMEOUT: 30
234+
RAFT_BOOTSTRAP_EXPECT: 1
235+
233236

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

0 commit comments

Comments
 (0)