Skip to content
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

Fix stateless validator topology spread constraints #18

Merged
merged 4 commits into from
Feb 7, 2024
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
2 changes: 1 addition & 1 deletion charts/nitro/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ maintainers:

type: application

version: 0.1.18
version: 0.1.19

appVersion: "v2.2.3-17468a8"
3 changes: 3 additions & 0 deletions charts/nitro/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@ helm install xai offchainlabs/nitro -f values.yaml
| `validator.statefulset.livenessProbe.tcpSocket.port` | Port to probe | `auth` |
| `validator.statefulset.livenessProbe.initialDelaySeconds` | Initial delay for the liveness probe | `30` |
| `validator.statefulset.livenessProbe.periodSeconds` | Period for the liveness probe | `10` |
| `validator.statefulset.pdb.enabled` | Enable pod disruption budget | `false` |
| `validator.statefulset.pdb.minAvailable` | Minimum number of pods available | `75%` |
| `validator.statefulset.pdb.maxUnavailable` | Maximum number of pods unavailable | `""` |
| `validator.statefulset.readinessProbe.enabled` | Enable the readiness probe for the validator statefulset | `true` |
| `validator.statefulset.readinessProbe.tcpSocket.port` | Port to probe | `auth` |
| `validator.statefulset.readinessProbe.initialDelaySeconds` | Initial delay for the readiness probe | `3` |
Expand Down
1 change: 1 addition & 0 deletions charts/nitro/templates/pdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ spec:
selector:
matchLabels:
{{- include "nitro.selectorLabels" . | nindent 6 }}
function: nitro
{{- end }}
1 change: 1 addition & 0 deletions charts/nitro/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,4 @@ spec:
{{- end }}
selector:
{{- include "nitro.selectorLabels" . | nindent 4 }}
function: nitro
2 changes: 2 additions & 0 deletions charts/nitro/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ spec:
{{- end }}
labels:
{{- include "nitro.selectorLabels" . | nindent 8 }}
function: nitro
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
Expand Down Expand Up @@ -198,6 +199,7 @@ spec:
labelSelector:
matchLabels:
{{- include "nitro.selectorLabels" $ | nindent 12 }}
function: nitro
{{- end }}
{{- end }}
{{- end }}
Expand Down
19 changes: 19 additions & 0 deletions charts/nitro/templates/validator/pdb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{- if .Values.validator.statefulset.pdb.enabled }}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ include "nitro.fullname" . }}
labels:
{{- include "nitro.labels" . | nindent 4 }}
spec:
{{- if and (.Values.validator.statefulset.pdb.minAvailable) (not .Values.validator.statefulset.pdb.maxUnavailable) }}
minAvailable: {{ .Values.validator.statefulset.pdb.minAvailable }}
{{- end }}
{{- if and (.Values.validator.statefulset.pdb.maxUnavailable) (not .Values.validator.statefulset.pdb.minAvailable) }}
maxUnavailable: {{ .Values.validator.statefulset.pdb.maxUnavailable }}
{{- end }}
selector:
matchLabels:
{{- include "nitro.selectorLabels" . | nindent 6 }}
function: arb-validator
{{- end }}
8 changes: 8 additions & 0 deletions charts/nitro/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,14 @@ validator:
initialDelaySeconds: 30
periodSeconds: 10

## @param validator.statefulset.pdb.enabled Enable pod disruption budget
## @param validator.statefulset.pdb.minAvailable Minimum number of pods available
## @param validator.statefulset.pdb.maxUnavailable Maximum number of pods unavailable
pdb:
enabled: false
minAvailable: "75%"
maxUnavailable: ""

## @param validator.statefulset.readinessProbe.enabled Enable the readiness probe for the validator statefulset
## @param validator.statefulset.readinessProbe.tcpSocket.port Port to probe
## @param validator.statefulset.readinessProbe.initialDelaySeconds Initial delay for the readiness probe
Expand Down
Loading