Skip to content

Commit

Permalink
fix: change liveness/readinessprobe for CLs when in validator mode (#278
Browse files Browse the repository at this point in the history
)
  • Loading branch information
barnabasbusa committed Jan 24, 2024
1 parent f4c3198 commit a2dc71b
Show file tree
Hide file tree
Showing 12 changed files with 91 additions and 13 deletions.
2 changes: 1 addition & 1 deletion charts/lighthouse/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ icon: https://launchpad.ethereum.org/static/media/lighthouse-circle.e0b82d14.png
sources:
- https://github.com/sigp/lighthouse
type: application
version: 1.1.1
version: 1.1.2
maintainers:
- name: skylenet
email: rafael@skyle.net
Expand Down
4 changes: 3 additions & 1 deletion charts/lighthouse/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# lighthouse

![Version: 1.1.1](https://img.shields.io/badge/Version-1.1.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![Version: 1.1.2](https://img.shields.io/badge/Version-1.1.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)

An open-source Ethereum 2.0 client, written in Rust

Expand Down Expand Up @@ -96,6 +96,8 @@ An open-source Ethereum 2.0 client, written in Rust
| topologySpreadConstraints | list | `[]` | Topology Spread Constraints for pods |
| updateStrategy | object | `{"type":"RollingUpdate"}` | Update stategy for the Statefulset |
| updateStrategy.type | string | `"RollingUpdate"` | Update stategy type |
| validatorLivenessProbe | object | See `values.yaml` | Validator Liveness probe |
| validatorReadinessProbe | object | See `values.yaml` | Validator Readiness probe |

# Examples

Expand Down
12 changes: 9 additions & 3 deletions charts/lighthouse/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,18 +123,24 @@ spec:
- name: p2p-udp
containerPort: {{ include "lighthouse.p2pPort" . }}
protocol: UDP
{{- end }}
{{- if or (eq .Values.mode "beacon") (eq .Values.mode "validator") }}
- name: http-api
containerPort: {{ .Values.httpPort }}
protocol: TCP
{{- end }}
- name: metrics
containerPort: {{ .Values.metricsPort }}
{{- end }}
protocol: TCP
{{- if eq .Values.mode "beacon" }}
livenessProbe:
{{- toYaml .Values.livenessProbe | nindent 12 }}
readinessProbe:
{{- toYaml .Values.readinessProbe | nindent 12 }}
{{- else if eq .Values.mode "validator" }}
livenessProbe:
{{- toYaml .Values.validatorLivenessProbe | nindent 12 }}
readinessProbe:
{{- toYaml .Values.validatorReadinessProbe | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
env:
Expand Down
16 changes: 16 additions & 0 deletions charts/lighthouse/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,22 @@ readinessProbe:
initialDelaySeconds: 10
periodSeconds: 10

# -- Validator Liveness probe
# @default -- See `values.yaml`
validatorLivenessProbe:
tcpSocket:
port: metrics
initialDelaySeconds: 60
periodSeconds: 120

# -- Validator Readiness probe
# @default -- See `values.yaml`
validatorReadinessProbe:
tcpSocket:
port: metrics
initialDelaySeconds: 10
periodSeconds: 10

# -- P2P Port
p2pPort: 9000

Expand Down
2 changes: 1 addition & 1 deletion charts/lodestar/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ icon: https://raw.githubusercontent.com/ChainSafe/lodestar/master/assets/lodesta
sources:
- https://github.com/ChainSafe/lodestar
type: application
version: 1.1.1
version: 1.1.2
maintainers:
- name: skylenet
email: rafael@skyle.net
Expand Down
4 changes: 3 additions & 1 deletion charts/lodestar/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# lodestar

![Version: 1.1.1](https://img.shields.io/badge/Version-1.1.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![Version: 1.1.2](https://img.shields.io/badge/Version-1.1.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)

Lodestar is a open-source TypeScript implementation of the Ethereum consensus engine.

Expand Down Expand Up @@ -95,6 +95,8 @@ Lodestar is a open-source TypeScript implementation of the Ethereum consensus en
| topologySpreadConstraints | list | `[]` | Topology Spread Constraints for pods |
| updateStrategy | object | `{"type":"RollingUpdate"}` | Update stategy for the Statefulset |
| updateStrategy.type | string | `"RollingUpdate"` | Update stategy type |
| validatorLivenessProbe | object | See `values.yaml` | Validator Liveness probe |
| validatorReadinessProbe | object | See `values.yaml` | Validator Readiness probe |

# Examples

Expand Down
10 changes: 9 additions & 1 deletion charts/lodestar/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,21 @@ spec:
- name: http-api
containerPort: {{ .Values.httpPort }}
protocol: TCP
{{- end }}
- name: metrics
containerPort: {{ .Values.metricsPort }}
{{- end }}
protocol: TCP
{{- if eq .Values.mode "beacon" }}
livenessProbe:
{{- toYaml .Values.livenessProbe | nindent 12 }}
readinessProbe:
{{- toYaml .Values.readinessProbe | nindent 12 }}
{{- else if eq .Values.mode "validator" }}
livenessProbe:
{{- toYaml .Values.validatorLivenessProbe | nindent 12 }}
readinessProbe:
{{- toYaml .Values.validatorReadinessProbe | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
env:
Expand Down
20 changes: 20 additions & 0 deletions charts/lodestar/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ defaultValidatorCommandTemplate: |
node /usr/app/node_modules/.bin/lodestar
validator
--dataDir=/data
--metrics
--metrics.address=0.0.0.0
--metrics.port={{ .Values.metricsPort }}
{{- range .Values.extraArgs }}
{{ tpl . $ }}
{{- end }}
Expand Down Expand Up @@ -162,6 +165,23 @@ readinessProbe:
initialDelaySeconds: 10
periodSeconds: 10

# -- Validator Liveness probe
# @default -- See `values.yaml`
validatorLivenessProbe:
tcpSocket:
port: metrics
initialDelaySeconds: 60
periodSeconds: 120

# -- Validator Readiness probe
# @default -- See `values.yaml`
validatorReadinessProbe:
tcpSocket:
port: metrics
initialDelaySeconds: 10
periodSeconds: 10


# -- P2P Port
p2pPort: 9000

Expand Down
2 changes: 1 addition & 1 deletion charts/prysm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ icon: https://launchpad.ethereum.org/static/media/prysmatic-labs-circle.96c803fe
sources:
- https://github.com/prysmaticlabs/prysm
type: application
version: 1.1.1
version: 1.1.2
maintainers:
- name: skylenet
email: rafael@skyle.net
Expand Down
4 changes: 3 additions & 1 deletion charts/prysm/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# prysm

![Version: 1.1.1](https://img.shields.io/badge/Version-1.1.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![Version: 1.1.2](https://img.shields.io/badge/Version-1.1.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)

An open-source Ethereum 2.0 client, written in Go

Expand Down Expand Up @@ -96,6 +96,8 @@ An open-source Ethereum 2.0 client, written in Go
| topologySpreadConstraints | list | `[]` | Topology Spread Constraints for pods |
| updateStrategy | object | `{"type":"RollingUpdate"}` | Update stategy for the Statefulset |
| updateStrategy.type | string | `"RollingUpdate"` | Update stategy type |
| validatorLivenessProbe | object | See `values.yaml` | Validator Liveness probe |
| validatorReadinessProbe | object | See `values.yaml` | Validator Readiness probe |

# Examples

Expand Down
12 changes: 9 additions & 3 deletions charts/prysm/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,21 +121,27 @@ spec:
- name: p2p-udp
containerPort: {{ include "prysm.p2pPort" . }}
protocol: UDP
{{- end }}
{{- if or (eq .Values.mode "beacon") (eq .Values.mode "validator") }}
- name: http-api
containerPort: {{ .Values.httpPort }}
protocol: TCP
- name: rpc
containerPort: {{ .Values.rpcPort }}
protocol: TCP
{{- end }}
- name: metrics
containerPort: {{ .Values.metricsPort }}
{{- end }}
protocol: TCP
{{- if eq .Values.mode "beacon" }}
livenessProbe:
{{- toYaml .Values.livenessProbe | nindent 12 }}
readinessProbe:
{{- toYaml .Values.readinessProbe | nindent 12 }}
{{- else if eq .Values.mode "validator" }}
livenessProbe:
{{- toYaml .Values.validatorLivenessProbe | nindent 12 }}
readinessProbe:
{{- toYaml .Values.validatorReadinessProbe | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
env:
Expand Down
16 changes: 16 additions & 0 deletions charts/prysm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,22 @@ readinessProbe:
initialDelaySeconds: 10
periodSeconds: 10

# -- Validator Liveness probe
# @default -- See `values.yaml`
validatorLivenessProbe:
tcpSocket:
port: metrics
initialDelaySeconds: 60
periodSeconds: 120

# -- Validator Readiness probe
# @default -- See `values.yaml`
validatorReadinessProbe:
tcpSocket:
port: metrics
initialDelaySeconds: 10
periodSeconds: 10

# -- P2P Port
p2pPort: 13000

Expand Down

0 comments on commit a2dc71b

Please sign in to comment.