diff --git a/charts/nitro/Chart.yaml b/charts/nitro/Chart.yaml index b887bb5..b7a60b5 100644 --- a/charts/nitro/Chart.yaml +++ b/charts/nitro/Chart.yaml @@ -7,6 +7,6 @@ maintainers: type: application -version: 0.1.18 +version: 0.1.19 appVersion: "v2.2.3-17468a8" diff --git a/charts/nitro/README.md b/charts/nitro/README.md index 0d283b2..35aa25c 100644 --- a/charts/nitro/README.md +++ b/charts/nitro/README.md @@ -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` | diff --git a/charts/nitro/templates/pdb.yaml b/charts/nitro/templates/pdb.yaml index 113ef98..3082a06 100644 --- a/charts/nitro/templates/pdb.yaml +++ b/charts/nitro/templates/pdb.yaml @@ -15,4 +15,5 @@ spec: selector: matchLabels: {{- include "nitro.selectorLabels" . | nindent 6 }} + function: nitro {{- end }} diff --git a/charts/nitro/templates/service.yaml b/charts/nitro/templates/service.yaml index 40ea2a0..9866225 100644 --- a/charts/nitro/templates/service.yaml +++ b/charts/nitro/templates/service.yaml @@ -48,3 +48,4 @@ spec: {{- end }} selector: {{- include "nitro.selectorLabels" . | nindent 4 }} + function: nitro diff --git a/charts/nitro/templates/statefulset.yaml b/charts/nitro/templates/statefulset.yaml index 396d057..a9625e4 100644 --- a/charts/nitro/templates/statefulset.yaml +++ b/charts/nitro/templates/statefulset.yaml @@ -28,6 +28,7 @@ spec: {{- end }} labels: {{- include "nitro.selectorLabels" . | nindent 8 }} + function: nitro spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: @@ -198,6 +199,7 @@ spec: labelSelector: matchLabels: {{- include "nitro.selectorLabels" $ | nindent 12 }} + function: nitro {{- end }} {{- end }} {{- end }} diff --git a/charts/nitro/templates/validator/pdb.yaml b/charts/nitro/templates/validator/pdb.yaml new file mode 100644 index 0000000..542d5eb --- /dev/null +++ b/charts/nitro/templates/validator/pdb.yaml @@ -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 }} diff --git a/charts/nitro/values.yaml b/charts/nitro/values.yaml index ddecfb4..dd25a5b 100644 --- a/charts/nitro/values.yaml +++ b/charts/nitro/values.yaml @@ -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