-
Notifications
You must be signed in to change notification settings - Fork 0
XS✔ ◾ feat: HA & Raft quorum safety guardrails #2
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
Changes from all commits
12129cc
f32ae71
8062508
e6444bd
91ae0ca
643bbac
055714c
fbe1f41
24e1986
d733e33
f85ade8
dcca488
2781846
76d70b9
9ba208b
22accbb
51875fa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -13,6 +13,30 @@ spec: | |||||||||||||
| serviceName: {{ include "typesense.fullname" . }}-headless-svc | ||||||||||||||
| podManagementPolicy: Parallel | ||||||||||||||
| replicas: {{ .Values.replicaCount }} | ||||||||||||||
| updateStrategy: | ||||||||||||||
| {{- if not (or (eq .Values.updateStrategy.type "RollingUpdate") (eq .Values.updateStrategy.type "OnDelete")) }} | ||||||||||||||
| {{- fail (printf "updateStrategy.type must be RollingUpdate or OnDelete, got %q" .Values.updateStrategy.type) }} | ||||||||||||||
| {{- end }} | ||||||||||||||
| type: {{ .Values.updateStrategy.type }} | ||||||||||||||
| {{- if eq .Values.updateStrategy.type "RollingUpdate" }} | ||||||||||||||
| {{- $replicaCount := int .Values.replicaCount }} | ||||||||||||||
| {{- $maxFault := div $replicaCount 2 }} | ||||||||||||||
| {{- $maxUnavailable := .Values.updateStrategy.rollingUpdate.maxUnavailable }} | ||||||||||||||
| {{- if and (kindIs "string" $maxUnavailable) (eq $maxUnavailable "auto") }} | ||||||||||||||
| {{- if gt $replicaCount 1 }} | ||||||||||||||
| {{- $maxUnavailable = $maxFault }} | ||||||||||||||
| {{- else }} | ||||||||||||||
| {{- $maxUnavailable = 1 }} | ||||||||||||||
| {{- end }} | ||||||||||||||
|
Comment on lines
+26
to
+30
|
||||||||||||||
| {{- if gt $replicaCount 1 }} | |
| {{- $maxUnavailable = $maxFault }} | |
| {{- else }} | |
| {{- $maxUnavailable = 1 }} | |
| {{- end }} | |
| {{- $maxUnavailable = $maxFault }} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,4 @@ | ||
| suite: Configuration | ||
| chart: | ||
| version: 1.0.0 | ||
| release: | ||
| name: foo | ||
| namespace: bar | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,4 @@ | ||
| suite: Secrets | ||
| chart: | ||
| version: 1.0.0 | ||
| release: | ||
| name: foo | ||
| namespace: bar | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,4 @@ | ||
| suite: Networking | ||
| chart: | ||
| version: 1.0.0 | ||
| release: | ||
| name: foo | ||
| namespace: bar | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,4 @@ | ||
| suite: Networking | ||
| chart: | ||
| version: 1.0.0 | ||
| release: | ||
| name: foo | ||
| namespace: bar | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,4 @@ | ||
| suite: ServiceAccount | ||
| chart: | ||
| version: 1.0.0 | ||
| release: | ||
| name: foo | ||
| namespace: bar | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,4 @@ | ||
| suite: ServiceMonitor | ||
| chart: | ||
| version: 1.0.0 | ||
| release: | ||
| name: foo | ||
| namespace: bar | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updateStrategy.typeis rendered directly into the StatefulSet spec, but the template only handlesRollingUpdateexplicitly; any other value will produce an invalid manifest (and silently omit therollingUpdateblock). Consider adding template-level validation (e.g.,failon unknown values) and/or a schemaenumforupdateStrategy.typeto ensure onlyRollingUpdateandOnDeleteare accepted.