Skip to content

Commit

Permalink
feat: allow full override of probes
Browse files Browse the repository at this point in the history
  • Loading branch information
cjorge-graphops committed Nov 20, 2024
1 parent 17aee53 commit aad82e5
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 13 deletions.
2 changes: 1 addition & 1 deletion charts/erigon/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ We do not recommend that you upgrade the application by overriding `image.tag`.
| statefulNode.p2pNodePort.port | NodePort to be used. Must be unique. | int | `31000` |
| statefulNode.podAnnotations | Annotations for the `Pod` | object | `{}` |
| statefulNode.podSecurityContext | Pod-wide security context | object | `{"fsGroup":101337,"runAsGroup":101337,"runAsNonRoot":true,"runAsUser":101337}` |
| statefulNode.readinessProbe | Sets a readinessProbe configuration for the container | object | `{"grpc":{"port":9090}}` |
| statefulNode.readinessProbe | Sets a readinessProbe configuration for the container | object | `{}` |
| statefulNode.resources | | object | `{}` |
| statefulNode.restoreSnapshot.enabled | Enable initialising Erigon state from a remote snapshot | bool | `false` |
| statefulNode.restoreSnapshot.snapshotUrl | URL for snapshot to download and extract to restore state | string | `""` |
Expand Down
7 changes: 7 additions & 0 deletions charts/erigon/templates/stateful-node/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,13 @@ spec:
{{- if $values.readinessProbe }}
readinessProbe:
{{ toYaml $values.readinessProbe | nindent 12 }}
{{- else }}
readinessProbe:
# This currently requires GRPCContainerProbe feature gate to be enabled on the kubelet
# https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-a-grpc-liveness-probe
# https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/
grpc:
port: 9090 # named ports not supported yet by grpc probes
{{- end }}
{{- if $values.livenessProbe }}
livenessProbe:
Expand Down
7 changes: 1 addition & 6 deletions charts/erigon/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,7 @@ statefulNode:
# These will be directly copied into the StatefulSet manifest.

# -- Sets a readinessProbe configuration for the container
readinessProbe:
# This currently requires GRPCContainerProbe feature gate to be enabled on the kubelet
# https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-a-grpc-liveness-probe
# https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/
grpc:
port: 9090 # named ports not supported yet by grpc probes
readinessProbe: {}

# -- Sets a livenessProbe configuration for the container
livenessProbe: {}
Expand Down
2 changes: 1 addition & 1 deletion charts/nimbus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ We do not recommend that you upgrade the application by overriding `image.tag`.
| nimbus.p2pNodePort.port | NodePort to be used. Must be unique. | int | `31000` |
| nimbus.podAnnotations | Annotations for the `Pod` | object | `{}` |
| nimbus.podSecurityContext | Pod-wide security context | object | `{"fsGroup":101337,"runAsGroup":101337,"runAsNonRoot":true,"runAsUser":101337}` |
| nimbus.readinessProbe | Sets a readinessProbe configuration for the container | object | `{"initialDelaySeconds":10,"periodSeconds":10,"tcpSocket":{"port":"http-nimbus"}}` |
| nimbus.readinessProbe | Sets a readinessProbe configuration for the container | object | `{}` |
| nimbus.resources | | object | `{}` |
| nimbus.rollingUpdatePartition | When using a RollingUpdate update strategy in the StatefulSet, sets a partition index to only update PODs with that index or higher | int | `0` |
| nimbus.service.ports.http-metrics | Service Port to expose Prometheus metrics on | int | `8008` |
Expand Down
6 changes: 6 additions & 0 deletions charts/nimbus/templates/nimbus/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,12 @@ spec:
{{- if $values.readinessProbe }}
readinessProbe:
{{ toYaml $values.readinessProbe | nindent 12 }}
{{- else }}
readinessProbe:
tcpSocket:
port: http-nimbus
initialDelaySeconds: 10
periodSeconds: 10
{{- end }}
{{- if $values.livenessProbe }}
livenessProbe:
Expand Down
6 changes: 1 addition & 5 deletions charts/nimbus/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,7 @@ nimbus:
# These will be directly copied into the StatefulSet manifest.

# -- Sets a readinessProbe configuration for the container
readinessProbe:
tcpSocket:
port: http-nimbus
initialDelaySeconds: 10
periodSeconds: 10
readinessProbe: {}

# -- Sets a livenessProbe configuration for the container
livenessProbe: {}
Expand Down

0 comments on commit aad82e5

Please sign in to comment.