Skip to content

Commit cbeb42a

Browse files
committed
feat(network-nodes): allow priority classes
1 parent 0535ee5 commit cbeb42a

4 files changed

Lines changed: 19 additions & 0 deletions

File tree

charts/network/charts/network-nodes/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ A Helm chart for Kubernetes
139139
| podDisruptionBudgets.validator.unhealthyPodEvictionPolicy | string | `""` | Optional unhealthy pod eviction policy (Default or AlwaysAllow). |
140140
| podLabels | object | `{}` | |
141141
| podSecurityContext | object | `{}` | |
142+
| priorityClassNames.rpc | string | `""` | PriorityClass name assigned to RPC pods. Leave empty to inherit namespace defaults. |
143+
| priorityClassNames.validator | string | `""` | PriorityClass name assigned to validator pods. Leave empty to inherit namespace defaults. |
142144
| readinessProbe | string | `nil` | |
143145
| resources | object | `{}` | |
144146
| rpcReplicaCount | int | `2` | Number of RPC node replicas provisioned via StatefulSet. |

charts/network/charts/network-nodes/templates/statefulset-rpc.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ spec:
3131
{{- $privateKeyFilename := default "privateKey" .Values.config.privateKeyFilename }}
3232
{{- $shouldMountPersistence := $persistenceEnabled }}
3333
{{- $rpcReplicaBudget := .Values.rpcReplicaCount | int }}
34+
{{- $priorityClasses := .Values.priorityClassNames | default (dict) }}
35+
{{- $rpcPriorityClass := default "" (get $priorityClasses "rpc") }}
3436
{{- $initContainers := .Values.initContainers | default (dict) }}
3537
{{- $sharedInitContainers := get $initContainers "shared" }}
3638
{{- $rpcInitContainers := get $initContainers "rpc" }}
@@ -68,6 +70,9 @@ spec:
6870
{{- toYaml . | nindent 8 }}
6971
{{- end }}
7072
serviceAccountName: {{ include "nodes.serviceAccountName" . }}
73+
{{- if $rpcPriorityClass }}
74+
priorityClassName: {{ $rpcPriorityClass | quote }}
75+
{{- end }}
7176
{{- with .Values.podSecurityContext }}
7277
securityContext:
7378
{{- toYaml . | nindent 8 }}

charts/network/charts/network-nodes/templates/statefulset-validator.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ spec:
3232
{{- $staticNodesConfigMapName := default "besu-static-nodes" (get $globalNodes "staticNodesConfigMapName") }}
3333
{{- $validatorPodPrefix := default "besu-node-validator" (get $globalNodes "podPrefix") }}
3434
{{- $validatorReplicaBudget := (include "nodes.validatorReplicaCount" . | int) }}
35+
{{- $priorityClasses := .Values.priorityClassNames | default (dict) }}
36+
{{- $validatorPriorityClass := default "" (get $priorityClasses "validator") }}
3537
{{- $initContainers := .Values.initContainers | default (dict) }}
3638
{{- $sharedInitContainers := get $initContainers "shared" }}
3739
{{- $validatorInitContainers := get $initContainers "validator" }}
@@ -69,6 +71,9 @@ spec:
6971
{{- toYaml . | nindent 8 }}
7072
{{- end }}
7173
serviceAccountName: {{ include "nodes.serviceAccountName" . }}
74+
{{- if $validatorPriorityClass }}
75+
priorityClassName: {{ $validatorPriorityClass | quote }}
76+
{{- end }}
7277
{{- with .Values.podSecurityContext }}
7378
securityContext:
7479
{{- toYaml . | nindent 8 }}

charts/network/charts/network-nodes/values.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,13 @@ networkPolicy:
153153
- protocol: TCP
154154
port: 30303
155155

156+
# PriorityClass configuration applied to Besu workloads.
157+
priorityClassNames:
158+
# -- PriorityClass name assigned to validator pods. Leave empty to inherit namespace defaults.
159+
validator: ""
160+
# -- PriorityClass name assigned to RPC pods. Leave empty to inherit namespace defaults.
161+
rpc: ""
162+
156163
# Pod-level security context shared by all containers.
157164
podSecurityContext:
158165
{}

0 commit comments

Comments
 (0)