From aa44797ca9f10bfb6c520192993639c2a3eb68c7 Mon Sep 17 00:00:00 2001 From: matilote Date: Fri, 29 Mar 2024 13:20:47 +0100 Subject: [PATCH 01/19] add enode-collector templates and use it with Geth --- charts/enode-collector/.helmignore | 23 +++++++ charts/enode-collector/Chart.lock | 6 ++ charts/enode-collector/Chart.yaml | 16 +++++ charts/enode-collector/templates/_helpers.tpl | 62 +++++++++++++++++++ charts/enode-collector/templates/role.yaml | 10 +++ .../templates/rolebinding.yaml | 15 +++++ .../templates/serviceaccount.yaml | 12 ++++ charts/enode-collector/values.yaml | 26 ++++++++ .../templates/statefulset.yaml | 13 ++++ charts/execution-beacon/values.yaml | 5 ++ 10 files changed, 188 insertions(+) create mode 100644 charts/enode-collector/.helmignore create mode 100644 charts/enode-collector/Chart.lock create mode 100644 charts/enode-collector/Chart.yaml create mode 100644 charts/enode-collector/templates/_helpers.tpl create mode 100644 charts/enode-collector/templates/role.yaml create mode 100644 charts/enode-collector/templates/rolebinding.yaml create mode 100644 charts/enode-collector/templates/serviceaccount.yaml create mode 100644 charts/enode-collector/values.yaml diff --git a/charts/enode-collector/.helmignore b/charts/enode-collector/.helmignore new file mode 100644 index 000000000..0e8a0eb36 --- /dev/null +++ b/charts/enode-collector/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/charts/enode-collector/Chart.lock b/charts/enode-collector/Chart.lock new file mode 100644 index 000000000..216e2517d --- /dev/null +++ b/charts/enode-collector/Chart.lock @@ -0,0 +1,6 @@ +dependencies: +- name: common + repository: file://../common + version: 1.0.0 +digest: sha256:07cebde439abe4ba19bb28e844b7419dab83c7f613886416aaf3ec08e8059144 +generated: "2022-07-27T11:12:34.275824+03:00" diff --git a/charts/enode-collector/Chart.yaml b/charts/enode-collector/Chart.yaml new file mode 100644 index 000000000..be9b03f79 --- /dev/null +++ b/charts/enode-collector/Chart.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +name: enode-collector +description: enode-collector fetches and serves a list of enodes which can be used to quicker bootstrapping of Ethereum nodes +version: 1.0.0 +home: https://boost.flashbots.net/ +keywords: + - ethereum + - blockchain + - enode-collector +type: application +appVersion: "1.6.0" + +dependencies: +- name: common + repository: file://../common + version: 1.0.0 diff --git a/charts/enode-collector/templates/_helpers.tpl b/charts/enode-collector/templates/_helpers.tpl new file mode 100644 index 000000000..5ab0553d5 --- /dev/null +++ b/charts/enode-collector/templates/_helpers.tpl @@ -0,0 +1,62 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "enode-collector.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "enode-collector.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "enode-collector.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "enode-collector.labels" -}} +helm.sh/chart: {{ include "enode-collector.chart" . }} +{{ include "enode-collector.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "enode-collector.selectorLabels" -}} +app.kubernetes.io/name: {{ include "enode-collector.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "enode-collector.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "enode-collector.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/charts/enode-collector/templates/role.yaml b/charts/enode-collector/templates/role.yaml new file mode 100644 index 000000000..237f3544f --- /dev/null +++ b/charts/enode-collector/templates/role.yaml @@ -0,0 +1,10 @@ +{{- if .Values.rbac.create -}} +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: {{ template "enode-collector.fullname" . }} + labels: + {{- include "enode-collector.labels" . | nindent 4 }} +rules: +{{- toYaml .Values.rbac.rules | nindent 0 }} +{{- end }} diff --git a/charts/enode-collector/templates/rolebinding.yaml b/charts/enode-collector/templates/rolebinding.yaml new file mode 100644 index 000000000..1ef13e31e --- /dev/null +++ b/charts/enode-collector/templates/rolebinding.yaml @@ -0,0 +1,15 @@ +{{- if .Values.rbac.create }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: {{ template "enode-collector.fullname" . }}-binding + labels: + {{- include "enode-collector.labels" . | nindent 4 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: {{ template "enode-collector.fullname" . }} +subjects: + - kind: ServiceAccount + name: {{ include "enode-collector.serviceAccountName" . }} +{{- end }} diff --git a/charts/enode-collector/templates/serviceaccount.yaml b/charts/enode-collector/templates/serviceaccount.yaml new file mode 100644 index 000000000..ad5aa4d50 --- /dev/null +++ b/charts/enode-collector/templates/serviceaccount.yaml @@ -0,0 +1,12 @@ +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "common.names.serviceAccountName" . }} + labels: + {{- include "common.labels.standard" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +{{- end }} diff --git a/charts/enode-collector/values.yaml b/charts/enode-collector/values.yaml new file mode 100644 index 000000000..8b4a20add --- /dev/null +++ b/charts/enode-collector/values.yaml @@ -0,0 +1,26 @@ +# Default values for enode-collector. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +serviceAccount: + # Specifies whether a service account should be created + create: true + # Annotations to add to the service account + annotations: {} + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "" + +## RBAC configuration. +## ref: https://kubernetes.io/docs/reference/access-authn-authz/rbac/ +## +rbac: + create: true + name: "" + rules: + - apiGroups: [""] + resources: + - "services" + - "endpoints" + verbs: + - "list" \ No newline at end of file diff --git a/charts/execution-beacon/templates/statefulset.yaml b/charts/execution-beacon/templates/statefulset.yaml index 0120ba882..b6c4cf281 100644 --- a/charts/execution-beacon/templates/statefulset.yaml +++ b/charts/execution-beacon/templates/statefulset.yaml @@ -83,6 +83,18 @@ spec: mountPath: /env - name: scripts-init mountPath: /scripts + {{/* Container used for collecting enodes needed for bootnodes */}} + - name: enode-collector + image: "{{ .Values.global.enodeCollectorImage.repository }}:{{ .Values.global.enodeCollectorImage.tag }}" + imagePullPolicy: {{ .Values.global.enodeCollectorImage.pullPolicy }} + env: + - name: NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + volumeMounts: + - name: env-nodeport + mountPath: /env {{/* Container used for initialising nimbus checkpoint sync */}} {{- if and (eq .Values.beacon.client "nimbus") .Values.beacon.checkPointSync.enabled }} - name: init-nimbus @@ -186,6 +198,7 @@ spec: {{- else if eq .Values.execution.client "geth" }} exec geth --syncmode=snap + --bootnodes=$BOOTNODES --datadir=/data/execution --ipcdisable --{{ .Values.global.network }} diff --git a/charts/execution-beacon/values.yaml b/charts/execution-beacon/values.yaml index ea05ae7c2..f2bb46b0e 100644 --- a/charts/execution-beacon/values.yaml +++ b/charts/execution-beacon/values.yaml @@ -167,6 +167,11 @@ global: tag: "1.28" pullPolicy: IfNotPresent + enodeCollectorImage: + repository: "nethermindeth/enode-collector" + tag: "0.0.6" + pullPolicy: IfNotPresent + ## Monitoring ## metrics: From de164160ded9da2c6d5859a657e228d6616e3ff8 Mon Sep 17 00:00:00 2001 From: matilote Date: Fri, 29 Mar 2024 13:26:04 +0100 Subject: [PATCH 02/19] use correct template --- charts/enode-collector/templates/serviceaccount.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/enode-collector/templates/serviceaccount.yaml b/charts/enode-collector/templates/serviceaccount.yaml index ad5aa4d50..73a95cea2 100644 --- a/charts/enode-collector/templates/serviceaccount.yaml +++ b/charts/enode-collector/templates/serviceaccount.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: ServiceAccount metadata: - name: {{ include "common.names.serviceAccountName" . }} + name: {{ include "enode-collector.serviceAccountName" . }} labels: {{- include "common.labels.standard" . | nindent 4 }} {{- with .Values.serviceAccount.annotations }} From 0884367732f8f64631491159dd489399c20169cc Mon Sep 17 00:00:00 2001 From: matilote Date: Fri, 29 Mar 2024 13:29:30 +0100 Subject: [PATCH 03/19] add more rbac permissions to fetch endpoints --- charts/execution-beacon/values.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/charts/execution-beacon/values.yaml b/charts/execution-beacon/values.yaml index f2bb46b0e..e3236e62f 100644 --- a/charts/execution-beacon/values.yaml +++ b/charts/execution-beacon/values.yaml @@ -560,7 +560,8 @@ rbac: - apiGroups: [""] resources: - "services" + - "endpoints" verbs: - "get" - "list" - - "watch" + - "watch" \ No newline at end of file From e11221fc079b2ee9ee8127d776837a60e45ad3c2 Mon Sep 17 00:00:00 2001 From: matilote Date: Fri, 29 Mar 2024 14:31:13 +0100 Subject: [PATCH 04/19] finalise enode-collector changes --- charts/enode-collector/.helmignore | 23 ------- charts/enode-collector/Chart.lock | 6 -- charts/enode-collector/Chart.yaml | 16 ----- charts/enode-collector/templates/_helpers.tpl | 62 ------------------- charts/enode-collector/templates/role.yaml | 10 --- .../templates/rolebinding.yaml | 15 ----- .../templates/serviceaccount.yaml | 12 ---- charts/enode-collector/values.yaml | 26 -------- charts/execution-beacon/values.yaml | 2 +- 9 files changed, 1 insertion(+), 171 deletions(-) delete mode 100644 charts/enode-collector/.helmignore delete mode 100644 charts/enode-collector/Chart.lock delete mode 100644 charts/enode-collector/Chart.yaml delete mode 100644 charts/enode-collector/templates/_helpers.tpl delete mode 100644 charts/enode-collector/templates/role.yaml delete mode 100644 charts/enode-collector/templates/rolebinding.yaml delete mode 100644 charts/enode-collector/templates/serviceaccount.yaml delete mode 100644 charts/enode-collector/values.yaml diff --git a/charts/enode-collector/.helmignore b/charts/enode-collector/.helmignore deleted file mode 100644 index 0e8a0eb36..000000000 --- a/charts/enode-collector/.helmignore +++ /dev/null @@ -1,23 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/charts/enode-collector/Chart.lock b/charts/enode-collector/Chart.lock deleted file mode 100644 index 216e2517d..000000000 --- a/charts/enode-collector/Chart.lock +++ /dev/null @@ -1,6 +0,0 @@ -dependencies: -- name: common - repository: file://../common - version: 1.0.0 -digest: sha256:07cebde439abe4ba19bb28e844b7419dab83c7f613886416aaf3ec08e8059144 -generated: "2022-07-27T11:12:34.275824+03:00" diff --git a/charts/enode-collector/Chart.yaml b/charts/enode-collector/Chart.yaml deleted file mode 100644 index be9b03f79..000000000 --- a/charts/enode-collector/Chart.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: v1 -name: enode-collector -description: enode-collector fetches and serves a list of enodes which can be used to quicker bootstrapping of Ethereum nodes -version: 1.0.0 -home: https://boost.flashbots.net/ -keywords: - - ethereum - - blockchain - - enode-collector -type: application -appVersion: "1.6.0" - -dependencies: -- name: common - repository: file://../common - version: 1.0.0 diff --git a/charts/enode-collector/templates/_helpers.tpl b/charts/enode-collector/templates/_helpers.tpl deleted file mode 100644 index 5ab0553d5..000000000 --- a/charts/enode-collector/templates/_helpers.tpl +++ /dev/null @@ -1,62 +0,0 @@ -{{/* -Expand the name of the chart. -*/}} -{{- define "enode-collector.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "enode-collector.fullname" -}} -{{- if .Values.fullnameOverride }} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- $name := default .Chart.Name .Values.nameOverride }} -{{- if contains $name .Release.Name }} -{{- .Release.Name | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} -{{- end }} -{{- end }} -{{- end }} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "enode-collector.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "enode-collector.labels" -}} -helm.sh/chart: {{ include "enode-collector.chart" . }} -{{ include "enode-collector.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "enode-collector.selectorLabels" -}} -app.kubernetes.io/name: {{ include "enode-collector.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} - -{{/* -Create the name of the service account to use -*/}} -{{- define "enode-collector.serviceAccountName" -}} -{{- if .Values.serviceAccount.create }} -{{- default (include "enode-collector.fullname" .) .Values.serviceAccount.name }} -{{- else }} -{{- default "default" .Values.serviceAccount.name }} -{{- end }} -{{- end }} diff --git a/charts/enode-collector/templates/role.yaml b/charts/enode-collector/templates/role.yaml deleted file mode 100644 index 237f3544f..000000000 --- a/charts/enode-collector/templates/role.yaml +++ /dev/null @@ -1,10 +0,0 @@ -{{- if .Values.rbac.create -}} -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: {{ template "enode-collector.fullname" . }} - labels: - {{- include "enode-collector.labels" . | nindent 4 }} -rules: -{{- toYaml .Values.rbac.rules | nindent 0 }} -{{- end }} diff --git a/charts/enode-collector/templates/rolebinding.yaml b/charts/enode-collector/templates/rolebinding.yaml deleted file mode 100644 index 1ef13e31e..000000000 --- a/charts/enode-collector/templates/rolebinding.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if .Values.rbac.create }} -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: {{ template "enode-collector.fullname" . }}-binding - labels: - {{- include "enode-collector.labels" . | nindent 4 }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: {{ template "enode-collector.fullname" . }} -subjects: - - kind: ServiceAccount - name: {{ include "enode-collector.serviceAccountName" . }} -{{- end }} diff --git a/charts/enode-collector/templates/serviceaccount.yaml b/charts/enode-collector/templates/serviceaccount.yaml deleted file mode 100644 index 73a95cea2..000000000 --- a/charts/enode-collector/templates/serviceaccount.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.serviceAccount.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "enode-collector.serviceAccountName" . }} - labels: - {{- include "common.labels.standard" . | nindent 4 }} - {{- with .Values.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end }} diff --git a/charts/enode-collector/values.yaml b/charts/enode-collector/values.yaml deleted file mode 100644 index 8b4a20add..000000000 --- a/charts/enode-collector/values.yaml +++ /dev/null @@ -1,26 +0,0 @@ -# Default values for enode-collector. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -serviceAccount: - # Specifies whether a service account should be created - create: true - # Annotations to add to the service account - annotations: {} - # The name of the service account to use. - # If not set and create is true, a name is generated using the fullname template - name: "" - -## RBAC configuration. -## ref: https://kubernetes.io/docs/reference/access-authn-authz/rbac/ -## -rbac: - create: true - name: "" - rules: - - apiGroups: [""] - resources: - - "services" - - "endpoints" - verbs: - - "list" \ No newline at end of file diff --git a/charts/execution-beacon/values.yaml b/charts/execution-beacon/values.yaml index e3236e62f..05ffe1f91 100644 --- a/charts/execution-beacon/values.yaml +++ b/charts/execution-beacon/values.yaml @@ -169,7 +169,7 @@ global: enodeCollectorImage: repository: "nethermindeth/enode-collector" - tag: "0.0.6" + tag: "1.0.0" pullPolicy: IfNotPresent ## Monitoring From 401dedcc45bd8c0d37abfbd642cba6968715e2d1 Mon Sep 17 00:00:00 2001 From: matilote Date: Fri, 29 Mar 2024 14:59:02 +0100 Subject: [PATCH 05/19] fix jwt --- charts/execution-beacon/templates/statefulset.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/charts/execution-beacon/templates/statefulset.yaml b/charts/execution-beacon/templates/statefulset.yaml index b6c4cf281..74c2b3fe0 100644 --- a/charts/execution-beacon/templates/statefulset.yaml +++ b/charts/execution-beacon/templates/statefulset.yaml @@ -166,7 +166,6 @@ spec: {{- end }} {{- end }} {{- end }} - {{- if or .Values.global.JWTSecret .Values.global.externalSecrets.enabled }} {{- if .Values.global.externalSecrets.enabled }} --JsonRpc.JwtSecretFile=/external-secrets/JWT_SECRET {{- else }} @@ -202,7 +201,7 @@ spec: --datadir=/data/execution --ipcdisable --{{ .Values.global.network }} - {{- if or .Values.global.JWTSecret .Values.global.externalSecrets.enabled }} + {{- if .Values.global.externalSecrets.enabled }} --authrpc.jwtsecret=/external-secrets/JWT_SECRET {{- else }} --authrpc.jwtsecret=/secret/jwtsecret @@ -248,7 +247,7 @@ spec: --data-path=/data/execution --sync-mode=X_SNAP --p2p-enabled=true - {{- if or .Values.global.JWTSecret .Values.global.externalSecrets.enabled }} + {{- if .Values.global.externalSecrets.enabled }} --engine-jwt-secret=/external-secrets/JWT_SECRET {{- else }} --engine-jwt-secret=/secret/jwtsecret @@ -284,7 +283,7 @@ spec: {{- if .Values.execution.terminalTotalDifficulty }} --override.terminaltotaldifficulty={{ .Values.execution.terminalTotalDifficulty }} {{- end }} - {{- if or .Values.global.JWTSecret .Values.global.externalSecrets.enabled }} + {{- if .Values.global.externalSecrets.enabled }} --authrpc.jwtsecret=/external-secrets/JWT_SECRET {{- else }} --authrpc.jwtsecret=/secret/jwtsecret From 65b2aac6f522f397190bd01807ff7d9785617474 Mon Sep 17 00:00:00 2001 From: matilote Date: Fri, 29 Mar 2024 15:01:46 +0100 Subject: [PATCH 06/19] fix template --- charts/execution-beacon/templates/statefulset.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/charts/execution-beacon/templates/statefulset.yaml b/charts/execution-beacon/templates/statefulset.yaml index 74c2b3fe0..46f022f47 100644 --- a/charts/execution-beacon/templates/statefulset.yaml +++ b/charts/execution-beacon/templates/statefulset.yaml @@ -174,7 +174,6 @@ spec: --JsonRpc.EnginePort={{ .Values.execution.jsonrpc.engine.port }} --JsonRpc.EngineHost={{ .Values.execution.jsonrpc.host }} --JsonRpc.EngineEnabledModules={{ .Values.execution.jsonrpc.namespaces.nethermind | join "," }} - {{- end }} {{- if and .Values.global.metrics.enabled .Values.execution.metrics.enabled }} --Metrics.Enabled={{ .Values.execution.metrics.enabled }} --Metrics.ExposePort={{ .Values.execution.metrics.port }} From ee21c42ff5d08433f143ea1e7d5d544b1bf0e026 Mon Sep 17 00:00:00 2001 From: matilote Date: Fri, 29 Mar 2024 15:05:01 +0100 Subject: [PATCH 07/19] add Admin rpc as default --- charts/execution-beacon/values.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/charts/execution-beacon/values.yaml b/charts/execution-beacon/values.yaml index 05ffe1f91..36c36bf31 100644 --- a/charts/execution-beacon/values.yaml +++ b/charts/execution-beacon/values.yaml @@ -326,17 +326,20 @@ execution: - Net - Subscribe - Health + - Admin geth: - web3 - eth - net - engine + - admin erigon: - eth - erigon - web3 - net - engine + - admin host: "0.0.0.0" grpc: port: 9090 From 379e557614eb637cb21dbe17f15720cd5a3fd088 Mon Sep 17 00:00:00 2001 From: matilote Date: Fri, 29 Mar 2024 16:07:02 +0100 Subject: [PATCH 08/19] add readiness for p2p --- charts/execution-beacon/templates/statefulset.yaml | 14 ++++++++++++-- charts/execution-beacon/values.yaml | 13 +++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/charts/execution-beacon/templates/statefulset.yaml b/charts/execution-beacon/templates/statefulset.yaml index 46f022f47..2c7a5b081 100644 --- a/charts/execution-beacon/templates/statefulset.yaml +++ b/charts/execution-beacon/templates/statefulset.yaml @@ -351,14 +351,24 @@ spec: - name: metrics-exec containerPort: {{ .Values.execution.metrics.port }} {{- end }} - {{- if .Values.global.p2pNodePort.enabled }} + {{- if .Values.global.p2pNodePort.enabled }} - name: p2p-tcp-exec containerPort: {{ include "execution.p2pPort" . }} protocol: TCP - name: p2p-udp-exec containerPort: {{ include "execution.p2pPort" . }} protocol: UDP - {{- end }} + readinessProbe: + initialDelaySeconds: {{ .Values.execution.readinessProbe.initialDelaySeconds }} + timeoutSeconds: {{ .Values.execution.readinessProbe.timeoutSeconds }} + periodSeconds: {{ .Values.execution.readinessProbe.periodSeconds }} + failureThreshold: {{ .Values.execution.readinessProbe.failureThreshold }} + successThreshold: {{ .Values.execution.readinessProbe.successThreshold }} + httpGet: + path: {{ .Values.execution.readinessProbe.httpGet.path }} + port: {{ .Values.execution.readinessProbe.httpGet.port }} + scheme: {{ .Values.execution.readinessProbe.httpGet.scheme }} + {{- end }} volumeMounts: {{- if .Values.global.sharedPersistence.enabled }} - name: data diff --git a/charts/execution-beacon/values.yaml b/charts/execution-beacon/values.yaml index 36c36bf31..e3d250358 100644 --- a/charts/execution-beacon/values.yaml +++ b/charts/execution-beacon/values.yaml @@ -384,6 +384,19 @@ execution: extraFlags: [] resources: {} + readinessProbe: + enabled: true + initialDelaySeconds: 5 + timeoutSeconds: 3 + periodSeconds: 1 + failureThreshold: 3 + successThreshold: 3 + httpGet: + path: / + port: 30303 + scheme: TCP + + beacon: client: nimbus From 5ac6adf811f98fb4d65e4399a687d472c91836d4 Mon Sep 17 00:00:00 2001 From: matilote Date: Fri, 29 Mar 2024 16:08:20 +0100 Subject: [PATCH 09/19] fix scheme --- charts/execution-beacon/templates/statefulset.yaml | 2 +- charts/execution-beacon/values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/execution-beacon/templates/statefulset.yaml b/charts/execution-beacon/templates/statefulset.yaml index 2c7a5b081..f5f884fd2 100644 --- a/charts/execution-beacon/templates/statefulset.yaml +++ b/charts/execution-beacon/templates/statefulset.yaml @@ -366,7 +366,7 @@ spec: successThreshold: {{ .Values.execution.readinessProbe.successThreshold }} httpGet: path: {{ .Values.execution.readinessProbe.httpGet.path }} - port: {{ .Values.execution.readinessProbe.httpGet.port }} + port: {{ include "execution.p2pPort" . }} scheme: {{ .Values.execution.readinessProbe.httpGet.scheme }} {{- end }} volumeMounts: diff --git a/charts/execution-beacon/values.yaml b/charts/execution-beacon/values.yaml index e3d250358..1b737df0c 100644 --- a/charts/execution-beacon/values.yaml +++ b/charts/execution-beacon/values.yaml @@ -394,7 +394,7 @@ execution: httpGet: path: / port: 30303 - scheme: TCP + scheme: HTTP beacon: From 3e6f229f69d2e21439a8aefd0a9698d11d6d5e5a Mon Sep 17 00:00:00 2001 From: matilote Date: Fri, 29 Mar 2024 16:26:22 +0100 Subject: [PATCH 10/19] add host --- charts/execution-beacon/templates/statefulset.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/charts/execution-beacon/templates/statefulset.yaml b/charts/execution-beacon/templates/statefulset.yaml index f5f884fd2..b493815de 100644 --- a/charts/execution-beacon/templates/statefulset.yaml +++ b/charts/execution-beacon/templates/statefulset.yaml @@ -358,6 +358,7 @@ spec: - name: p2p-udp-exec containerPort: {{ include "execution.p2pPort" . }} protocol: UDP + {{- range $i, $e := until (int .Values.global.replicaCount) }} readinessProbe: initialDelaySeconds: {{ .Values.execution.readinessProbe.initialDelaySeconds }} timeoutSeconds: {{ .Values.execution.readinessProbe.timeoutSeconds }} @@ -367,8 +368,10 @@ spec: httpGet: path: {{ .Values.execution.readinessProbe.httpGet.path }} port: {{ include "execution.p2pPort" . }} + host: {{ include "common.names.fullname" $ }}-execution-{{ $i }} scheme: {{ .Values.execution.readinessProbe.httpGet.scheme }} {{- end }} + {{- end }} volumeMounts: {{- if .Values.global.sharedPersistence.enabled }} - name: data From 8e2855ded20f3429d37a5c1c95791c2137955ebe Mon Sep 17 00:00:00 2001 From: matilote Date: Fri, 29 Mar 2024 16:29:31 +0100 Subject: [PATCH 11/19] fix --- charts/execution-beacon/templates/statefulset.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/execution-beacon/templates/statefulset.yaml b/charts/execution-beacon/templates/statefulset.yaml index b493815de..c3f872425 100644 --- a/charts/execution-beacon/templates/statefulset.yaml +++ b/charts/execution-beacon/templates/statefulset.yaml @@ -358,7 +358,6 @@ spec: - name: p2p-udp-exec containerPort: {{ include "execution.p2pPort" . }} protocol: UDP - {{- range $i, $e := until (int .Values.global.replicaCount) }} readinessProbe: initialDelaySeconds: {{ .Values.execution.readinessProbe.initialDelaySeconds }} timeoutSeconds: {{ .Values.execution.readinessProbe.timeoutSeconds }} @@ -368,9 +367,10 @@ spec: httpGet: path: {{ .Values.execution.readinessProbe.httpGet.path }} port: {{ include "execution.p2pPort" . }} + {{- range $i, $e := until (int .Values.global.replicaCount) }} host: {{ include "common.names.fullname" $ }}-execution-{{ $i }} - scheme: {{ .Values.execution.readinessProbe.httpGet.scheme }} {{- end }} + scheme: {{ .Values.execution.readinessProbe.httpGet.scheme }} {{- end }} volumeMounts: {{- if .Values.global.sharedPersistence.enabled }} From 6018ae29a916a1297c7f9985836d0ed04875a842 Mon Sep 17 00:00:00 2001 From: matilote Date: Fri, 29 Mar 2024 16:35:56 +0100 Subject: [PATCH 12/19] fix endpoint --- charts/execution-beacon/templates/statefulset.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/execution-beacon/templates/statefulset.yaml b/charts/execution-beacon/templates/statefulset.yaml index c3f872425..94597437d 100644 --- a/charts/execution-beacon/templates/statefulset.yaml +++ b/charts/execution-beacon/templates/statefulset.yaml @@ -368,7 +368,7 @@ spec: path: {{ .Values.execution.readinessProbe.httpGet.path }} port: {{ include "execution.p2pPort" . }} {{- range $i, $e := until (int .Values.global.replicaCount) }} - host: {{ include "common.names.fullname" $ }}-execution-{{ $i }} + host: {{ include "common.names.fullname" $ }}-execution-{{ $i }}.{{ .Release.Namespace }}.svc.cluster.local {{- end }} scheme: {{ .Values.execution.readinessProbe.httpGet.scheme }} {{- end }} From 85097ed171a5ea3577c105c496b23f20e8add5e9 Mon Sep 17 00:00:00 2001 From: matilote Date: Fri, 29 Mar 2024 16:40:23 +0100 Subject: [PATCH 13/19] fix host --- charts/execution-beacon/templates/statefulset.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/execution-beacon/templates/statefulset.yaml b/charts/execution-beacon/templates/statefulset.yaml index 94597437d..5672cfb6c 100644 --- a/charts/execution-beacon/templates/statefulset.yaml +++ b/charts/execution-beacon/templates/statefulset.yaml @@ -368,7 +368,7 @@ spec: path: {{ .Values.execution.readinessProbe.httpGet.path }} port: {{ include "execution.p2pPort" . }} {{- range $i, $e := until (int .Values.global.replicaCount) }} - host: {{ include "common.names.fullname" $ }}-execution-{{ $i }}.{{ .Release.Namespace }}.svc.cluster.local + host: {{ include "common.names.fullname" $ }}-execution-{{ $i }}.{{ metadata.namespace }}.svc.cluster.local {{- end }} scheme: {{ .Values.execution.readinessProbe.httpGet.scheme }} {{- end }} From 13651d41a80c70ea53625a98f0d5ff1f46ee4880 Mon Sep 17 00:00:00 2001 From: matilote Date: Fri, 29 Mar 2024 16:42:23 +0100 Subject: [PATCH 14/19] try again --- charts/execution-beacon/templates/statefulset.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/execution-beacon/templates/statefulset.yaml b/charts/execution-beacon/templates/statefulset.yaml index 5672cfb6c..505e35396 100644 --- a/charts/execution-beacon/templates/statefulset.yaml +++ b/charts/execution-beacon/templates/statefulset.yaml @@ -368,7 +368,7 @@ spec: path: {{ .Values.execution.readinessProbe.httpGet.path }} port: {{ include "execution.p2pPort" . }} {{- range $i, $e := until (int .Values.global.replicaCount) }} - host: {{ include "common.names.fullname" $ }}-execution-{{ $i }}.{{ metadata.namespace }}.svc.cluster.local + host: {{ include "common.names.fullname" $ }}-execution-{{ $i }}.{{ $.Release.Namespace | quote }}.svc.cluster.local {{- end }} scheme: {{ .Values.execution.readinessProbe.httpGet.scheme }} {{- end }} From d7fa0ccd1d1f2eb3f1a4ba02b128184d02f94985 Mon Sep 17 00:00:00 2001 From: matilote Date: Fri, 29 Mar 2024 16:44:09 +0100 Subject: [PATCH 15/19] remove quote --- charts/execution-beacon/templates/statefulset.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/execution-beacon/templates/statefulset.yaml b/charts/execution-beacon/templates/statefulset.yaml index 505e35396..4a06d045e 100644 --- a/charts/execution-beacon/templates/statefulset.yaml +++ b/charts/execution-beacon/templates/statefulset.yaml @@ -368,7 +368,7 @@ spec: path: {{ .Values.execution.readinessProbe.httpGet.path }} port: {{ include "execution.p2pPort" . }} {{- range $i, $e := until (int .Values.global.replicaCount) }} - host: {{ include "common.names.fullname" $ }}-execution-{{ $i }}.{{ $.Release.Namespace | quote }}.svc.cluster.local + host: {{ include "common.names.fullname" $ }}-execution-{{ $i }}.{{ $.Release.Namespace }}.svc.cluster.local {{- end }} scheme: {{ .Values.execution.readinessProbe.httpGet.scheme }} {{- end }} From d9f431a5b53aa22673172054b4597b46ec03a410 Mon Sep 17 00:00:00 2001 From: matilote Date: Fri, 29 Mar 2024 17:02:40 +0100 Subject: [PATCH 16/19] try with exec --- .../execution-beacon/templates/statefulset.yaml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/charts/execution-beacon/templates/statefulset.yaml b/charts/execution-beacon/templates/statefulset.yaml index 4a06d045e..00d4688c3 100644 --- a/charts/execution-beacon/templates/statefulset.yaml +++ b/charts/execution-beacon/templates/statefulset.yaml @@ -364,13 +364,15 @@ spec: periodSeconds: {{ .Values.execution.readinessProbe.periodSeconds }} failureThreshold: {{ .Values.execution.readinessProbe.failureThreshold }} successThreshold: {{ .Values.execution.readinessProbe.successThreshold }} - httpGet: - path: {{ .Values.execution.readinessProbe.httpGet.path }} - port: {{ include "execution.p2pPort" . }} - {{- range $i, $e := until (int .Values.global.replicaCount) }} - host: {{ include "common.names.fullname" $ }}-execution-{{ $i }}.{{ $.Release.Namespace }}.svc.cluster.local - {{- end }} - scheme: {{ .Values.execution.readinessProbe.httpGet.scheme }} + exec: + command: ["nc", "-z", "127.0.0.1", "{{ include "execution.p2pPort" . }}"] + # httpGet: + # path: {{ .Values.execution.readinessProbe.httpGet.path }} + # port: {{ include "execution.p2pPort" . }} + # {{- range $i, $e := until (int .Values.global.replicaCount) }} + # host: {{ include "common.names.fullname" $ }}-execution-{{ $i }}.{{ $.Release.Namespace }}.svc.cluster.local + # {{- end }} + # scheme: {{ .Values.execution.readinessProbe.httpGet.scheme }} {{- end }} volumeMounts: {{- if .Values.global.sharedPersistence.enabled }} From e1c62a26448f5fbb82c5a3ad39954fdf1578a3a5 Mon Sep 17 00:00:00 2001 From: matilote Date: Fri, 29 Mar 2024 17:42:45 +0100 Subject: [PATCH 17/19] try different approach --- charts/execution-beacon/templates/statefulset.yaml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/charts/execution-beacon/templates/statefulset.yaml b/charts/execution-beacon/templates/statefulset.yaml index 00d4688c3..4c1da7370 100644 --- a/charts/execution-beacon/templates/statefulset.yaml +++ b/charts/execution-beacon/templates/statefulset.yaml @@ -364,15 +364,9 @@ spec: periodSeconds: {{ .Values.execution.readinessProbe.periodSeconds }} failureThreshold: {{ .Values.execution.readinessProbe.failureThreshold }} successThreshold: {{ .Values.execution.readinessProbe.successThreshold }} - exec: - command: ["nc", "-z", "127.0.0.1", "{{ include "execution.p2pPort" . }}"] - # httpGet: - # path: {{ .Values.execution.readinessProbe.httpGet.path }} - # port: {{ include "execution.p2pPort" . }} - # {{- range $i, $e := until (int .Values.global.replicaCount) }} - # host: {{ include "common.names.fullname" $ }}-execution-{{ $i }}.{{ $.Release.Namespace }}.svc.cluster.local - # {{- end }} - # scheme: {{ .Values.execution.readinessProbe.httpGet.scheme }} + httpGet: + path: / + port: p2p-tcp-exec {{- end }} volumeMounts: {{- if .Values.global.sharedPersistence.enabled }} From 9eaf195424d139ac21cf695c6e30eaeab89960b4 Mon Sep 17 00:00:00 2001 From: matilote Date: Fri, 29 Mar 2024 17:49:52 +0100 Subject: [PATCH 18/19] remove extra readinessProbe --- charts/execution-beacon/templates/statefulset.yaml | 9 --------- charts/execution-beacon/values.yaml | 13 ------------- 2 files changed, 22 deletions(-) diff --git a/charts/execution-beacon/templates/statefulset.yaml b/charts/execution-beacon/templates/statefulset.yaml index 4c1da7370..92e3e4962 100644 --- a/charts/execution-beacon/templates/statefulset.yaml +++ b/charts/execution-beacon/templates/statefulset.yaml @@ -358,15 +358,6 @@ spec: - name: p2p-udp-exec containerPort: {{ include "execution.p2pPort" . }} protocol: UDP - readinessProbe: - initialDelaySeconds: {{ .Values.execution.readinessProbe.initialDelaySeconds }} - timeoutSeconds: {{ .Values.execution.readinessProbe.timeoutSeconds }} - periodSeconds: {{ .Values.execution.readinessProbe.periodSeconds }} - failureThreshold: {{ .Values.execution.readinessProbe.failureThreshold }} - successThreshold: {{ .Values.execution.readinessProbe.successThreshold }} - httpGet: - path: / - port: p2p-tcp-exec {{- end }} volumeMounts: {{- if .Values.global.sharedPersistence.enabled }} diff --git a/charts/execution-beacon/values.yaml b/charts/execution-beacon/values.yaml index 1b737df0c..36c36bf31 100644 --- a/charts/execution-beacon/values.yaml +++ b/charts/execution-beacon/values.yaml @@ -384,19 +384,6 @@ execution: extraFlags: [] resources: {} - readinessProbe: - enabled: true - initialDelaySeconds: 5 - timeoutSeconds: 3 - periodSeconds: 1 - failureThreshold: 3 - successThreshold: 3 - httpGet: - path: / - port: 30303 - scheme: HTTP - - beacon: client: nimbus From 7dab99b033287e2deb91a47b17e41d269b845753 Mon Sep 17 00:00:00 2001 From: matilote Date: Fri, 29 Mar 2024 17:53:36 +0100 Subject: [PATCH 19/19] try publishNotReadyAddresses --- charts/execution-beacon/templates/service-p2p.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/charts/execution-beacon/templates/service-p2p.yaml b/charts/execution-beacon/templates/service-p2p.yaml index 0e02f11c5..ebda56ac5 100644 --- a/charts/execution-beacon/templates/service-p2p.yaml +++ b/charts/execution-beacon/templates/service-p2p.yaml @@ -24,6 +24,7 @@ metadata: spec: type: {{ $.Values.global.p2pNodePort.type }} externalTrafficPolicy: Local + publishNotReadyAddresses: true ports: - name: p2p-tcp-exec port: {{ include "execution.p2pPort" $ }} @@ -58,6 +59,7 @@ metadata: spec: type: {{ $.Values.global.p2pNodePort.type }} externalTrafficPolicy: Local + publishNotReadyAddresses: true ports: - name: p2p-tcp-beacon port: {{ include "beacon.p2pPort" $ }}