Skip to content

Commit 7e1a6aa

Browse files
committed
feat: upgrade chart to the new watcher
1 parent 3fca363 commit 7e1a6aa

File tree

7 files changed

+125
-160
lines changed

7 files changed

+125
-160
lines changed
Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
apiVersion: v2
2-
description: A Helm chart for running eth-validator-watcher
3-
name: eth-validator-watcher
2+
name: ethereum-validator-watcher
3+
description: A Helm chart to deploy ethereum-validator-watcher on Kubernetes
44
type: application
5-
version: 1.3.0
6-
appVersion: 0.7.1
5+
version: 2.0.0
6+
appVersion: mxs-0.0.8-beta1
77
maintainers:
8-
- name: Alluvial
9-
10-
url: https://alluvial.finance
8+
- name: kiln
9+
Lines changed: 24 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,60 @@
1-
# eth-validator-watcher
1+
# ethereum-validator-watcher
22

3-
![Version: 1.3.0](https://img.shields.io/badge/Version-1.3.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.7.1](https://img.shields.io/badge/AppVersion-0.7.1-informational?style=flat-square)
3+
![Version: 6.0.1](https://img.shields.io/badge/Version-6.0.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: mxs-0.0.8-beta1](https://img.shields.io/badge/AppVersion-mxs--0.0.8--beta1-informational?style=flat-square)
44

5-
A Helm chart for running eth-validator-watcher
5+
A Helm chart to deploy ethereum-validator-watcher on Kubernetes
66

77
## Maintainers
88

99
| Name | Email | Url |
1010
| ---- | ------ | --- |
11-
| Alluvial | <contact@alluvial.finance> | <https://alluvial.finance> |
11+
| kiln | <contact@kiln.fi> | |
1212

1313
## Values
1414

1515
| Key | Type | Default | Description |
1616
|-----|------|---------|-------------|
1717
| affinity | object | `{}` | |
18-
| config.beaconType | string | `"other"` | |
19-
| config.beaconUrl | string | `"http://localhost:5052"` | |
20-
| config.watchedKeys | list | `[]` | List of public keys to watch. See https://github.com/kilnfi/eth-validator-watcher/blob/main/README.md#command-lines-examples |
21-
| env | object | `{}` | |
22-
| envFrom | object | `{}` | |
23-
| extraArgs | list | `[]` | |
24-
| extraInitContainers | list | `[]` | |
18+
| config.beacon_timeout_sec | int | `90` | |
19+
| config.beacon_url | string | `"http://beacon-url:5051"` | |
20+
| config.metrics_port | int | `8000` | |
21+
| config.network | string | `"network-name"` | |
22+
| config.watched_keys[0].labels[0] | string | `"operator:kiln"` | |
23+
| config.watched_keys[0].labels[1] | string | `"vc:prysm-validator-1"` | |
24+
| config.watched_keys[0].public_key[0] | string | `"989fa046d04b41fc95a04dabb7ab8b64e84afaa85c0aa49e1c6878d7b2814094402d62ae42dfbf3ac72e6770ee0926a8"` | |
25+
| deploymentAnnotations | object | `{}` | |
26+
| extraArgs | object | `{}` | |
2527
| fullnameOverride | string | `""` | |
2628
| image.pullPolicy | string | `"IfNotPresent"` | |
2729
| image.repository | string | `"ghcr.io/kilnfi/eth-validator-watcher"` | |
28-
| image.tag | string | `""` | |
29-
| imagePullSecrets | list | `[]` | |
30-
| livenessProbe.failureThreshold | int | `1` | |
31-
| livenessProbe.initialDelaySeconds | int | `60` | |
30+
| image.tag | string | `"1.0.0-beta8"` | |
31+
| livenessProbe.failureThreshold | int | `10` | |
32+
| livenessProbe.httpGet.path | string | `"/"` | |
33+
| livenessProbe.httpGet.port | int | `8000` | |
34+
| livenessProbe.initialDelaySeconds | int | `600` | |
3235
| livenessProbe.periodSeconds | int | `60` | |
33-
| livenessProbe.successThreshold | int | `1` | |
34-
| livenessProbe.timeoutSeconds | int | `1` | |
36+
| livenessProbe.timeoutSeconds | int | `60` | |
3537
| nameOverride | string | `""` | |
3638
| nodeSelector | object | `{}` | |
3739
| podAnnotations | object | `{}` | |
3840
| podLabels | object | `{}` | |
3941
| podMonitor.additionalLabels | object | `{}` | |
40-
| podMonitor.enabled | bool | `false` | |
42+
| podMonitor.enabled | bool | `true` | |
4143
| podMonitor.interval | string | `"12s"` | |
4244
| podMonitor.relabelings | list | `[]` | |
4345
| podMonitor.scheme | string | `"http"` | |
4446
| podMonitor.tlsConfig | object | `{}` | |
4547
| podSecurityContext | object | `{}` | |
46-
| readinessProbe.failureThreshold | int | `1` | |
47-
| readinessProbe.initialDelaySeconds | int | `60` | |
48-
| readinessProbe.periodSeconds | int | `60` | |
49-
| readinessProbe.successThreshold | int | `1` | |
50-
| readinessProbe.timeoutSeconds | int | `1` | |
48+
| readinessProbe | object | `{}` | |
5149
| replicaCount | int | `1` | |
52-
| resources.limits.memory | string | `"2400Mi"` | |
53-
| resources.requests.cpu | string | `"100m"` | |
54-
| resources.requests.memory | string | `"1200Mi"` | |
50+
| resources | object | `{}` | |
5551
| securityContext | object | `{}` | |
56-
| service.port | int | `80` | |
57-
| service.type | string | `"ClusterIP"` | |
5852
| serviceAccount.annotations | object | `{}` | |
5953
| serviceAccount.create | bool | `true` | |
6054
| serviceAccount.labels | object | `{}` | |
6155
| serviceAccount.name | string | `""` | |
56+
| startupProbe | object | `{}` | |
6257
| tolerations | list | `[]` | |
63-
| volumeMounts | object | `{}` | |
64-
| volumes | object | `{}` | |
6558

6659
----------------------------------------------
67-
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
60+
Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2)

charts/eth-validator-watcher/templates/_helpers.tpl

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -30,35 +30,33 @@ Create chart name and version as used by the chart label.
3030
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
3131
{{- end }}
3232

33-
{{/*
34-
Create the name of the service account to use
35-
*/}}
36-
{{- define "ethereum-validator-watcher.serviceAccountName" -}}
37-
{{- if .Values.serviceAccount.create }}
38-
{{- default (include "ethereum-validator-watcher.fullname" .) .Values.serviceAccount.name }}
39-
{{- else }}
40-
41-
{{- default "default" .Values.serviceAccount.name }}
42-
{{- end }}
43-
{{- end }}
44-
4533
{{/*
4634
Common labels
4735
*/}}
4836
{{- define "ethereum-validator-watcher.labels" -}}
49-
app.kubernetes.io/name: {{ include "ethereum-validator-watcher.name" . }}
5037
helm.sh/chart: {{ include "ethereum-validator-watcher.chart" . }}
51-
app.kubernetes.io/instance: ethereum-validator-watcher
52-
app.kubernetes.io/managed-by: {{ .Release.Service }}
38+
{{ include "ethereum-validator-watcher.selectorLabels" . }}
5339
{{- if .Chart.AppVersion }}
5440
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
5541
{{- end }}
56-
{{- end -}}
42+
app.kubernetes.io/managed-by: {{ .Release.Service }}
43+
{{- end }}
5744

5845
{{/*
5946
Selector labels
6047
*/}}
61-
{{- define "ethereum-validator-watcher.matchLabels" -}}
48+
{{- define "ethereum-validator-watcher.selectorLabels" -}}
6249
app.kubernetes.io/name: {{ include "ethereum-validator-watcher.name" . }}
6350
app.kubernetes.io/instance: {{ .Release.Name }}
64-
{{- end -}}
51+
{{- end }}
52+
53+
{{/*
54+
Create the name of the service account to use
55+
*/}}
56+
{{- define "ethereum-validator-watcher.serviceAccountName" -}}
57+
{{- if .Values.serviceAccount.create }}
58+
{{- default (include "ethereum-validator-watcher.fullname" .) .Values.serviceAccount.name }}
59+
{{- else }}
60+
{{- default "default" .Values.serviceAccount.name }}
61+
{{- end }}
62+
{{- end }}
Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
1-
{{- if .Values.config.watchedKeys }}
21
apiVersion: v1
32
kind: ConfigMap
43
metadata:
5-
name: {{ include "ethereum-validator-watcher.fullname" . }}
4+
name: {{ include "ethereum-validator-watcher.fullname" . }}-config
65
labels:
76
{{- include "ethereum-validator-watcher.labels" . | nindent 4 }}
87
data:
9-
watched-keys.txt: |
10-
{{- range .Values.config.watchedKeys }}
11-
{{- . | nindent 4 }}
12-
{{- end }}
13-
{{- end }}
8+
config.yaml: |-
9+
{{ .Values.config | nindent 4 }}

charts/eth-validator-watcher/templates/deployment.yaml

Lines changed: 45 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,33 @@ metadata:
55
namespace: {{ .Release.Namespace }}
66
labels:
77
{{- include "ethereum-validator-watcher.labels" . | nindent 4 }}
8-
{{- with .Values.podAnnotations }}
8+
{{- with .Values.deploymentAnnotations }}
99
annotations:
1010
{{- toYaml . | nindent 4 }}
1111
{{- end }}
1212
spec:
13+
strategy:
14+
type: Recreate
1315
replicas: {{ .Values.replicaCount }}
1416
selector:
1517
matchLabels:
16-
{{- include "ethereum-validator-watcher.matchLabels" . | nindent 6 }}
18+
{{- include "ethereum-validator-watcher.selectorLabels" . | nindent 6 }}
1719
template:
1820
metadata:
1921
labels:
20-
{{- include "ethereum-validator-watcher.matchLabels" . | nindent 8 }}
22+
{{- include "ethereum-validator-watcher.labels" . | nindent 8 }}
2123
{{- with .Values.podLabels }}
2224
{{- tpl (toYaml .) $ | nindent 8 }}
2325
{{- end }}
24-
{{- with .Values.podAnnotations }}
25-
annotations: {{ tpl (toYaml .) $ | nindent 8 }}
26-
{{- end }}
26+
annotations:
27+
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
28+
{{- with .Values.podAnnotations }}
29+
{{ tpl (toYaml .) $ | nindent 8 }}
30+
{{- end }}
2731
spec:
2832
containers:
2933
- name: validator-watcher
30-
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
34+
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
3135
imagePullPolicy: {{ .Values.image.pullPolicy }}
3236
{{- with .Values.resources }}
3337
resources:
@@ -36,71 +40,52 @@ spec:
3640
ports:
3741
- name: metrics
3842
containerPort: 8000
39-
args:
40-
{{- if .Values.config.watchedKeys }}
41-
- --pubkeys-file-path=/data/keys/watched-keys.txt
42-
{{- end }}
43-
- --beacon-url={{ .Values.config.beaconUrl }}
44-
- --beacon-type={{ .Values.config.beaconType }}
45-
- --liveness-file=/tmp/liveness
46-
{{- with .Values.extraArgs }}
47-
{{- toYaml . | nindent 10 }}
48-
{{- end }}
43+
{{- with .Values.env }}
4944
env:
50-
{{- with .Values.envFrom }}
51-
{{- range $key, $value := . }}
52-
- name: {{ $key }}
45+
{{- range $name, $value := . }}
46+
{{- $type := typeOf $value }}
47+
- name: {{ $name }}
48+
{{- if eq $type "string" }}
49+
value: {{ $value | quote }}
50+
{{- else }}
5351
{{- toYaml $value | nindent 12 }}
5452
{{- end }}
5553
{{- end }}
56-
{{- with .Values.env }}
57-
{{- range $key, $value := . }}
58-
- name: {{ $key }}
59-
value: {{ $value | quote }}
60-
{{- end }}
6154
{{- end }}
55+
args:
56+
- --config=/config/config.yaml
57+
{{- range $key, $value := .Values.extraArgs }}
58+
{{- if eq ($value | quote | len) 2 }}
59+
- --{{ $key }}
60+
{{- else }}
61+
- --{{ $key }}={{ $value }}
62+
{{- end }}
63+
{{- end }}
6264
{{- with .Values.livenessProbe }}
6365
livenessProbe:
64-
exec:
65-
command:
66-
- /usr/bin/python3.11
67-
- /usr/local/bin/liveness_check.py
68-
- /tmp/liveness
69-
initialDelaySeconds: {{ .initialDelaySeconds }}
70-
periodSeconds: {{ .periodSeconds }}
71-
timeoutSeconds: {{ .timeoutSeconds }}
72-
successThreshold: {{ .successThreshold }}
73-
failureThreshold: {{ .failureThreshold }}
66+
{{- toYaml . | nindent 10 }}
67+
{{- end }}
68+
{{- with .Values.startupProbe }}
69+
startupProbe:
70+
{{- toYaml . | nindent 10 }}
7471
{{- end }}
7572
{{- with .Values.readinessProbe }}
7673
readinessProbe:
77-
exec:
78-
command:
79-
- /usr/bin/python3.11
80-
- /usr/local/bin/liveness_check.py
81-
- /tmp/liveness
82-
initialDelaySeconds: {{ .initialDelaySeconds }}
83-
periodSeconds: {{ .periodSeconds }}
84-
timeoutSeconds: {{ .timeoutSeconds }}
85-
successThreshold: {{ .successThreshold }}
86-
failureThreshold: {{ .failureThreshold }}
74+
{{- toYaml . | nindent 10 }}
8775
{{- end }}
8876
volumeMounts:
89-
{{- if .Values.config.watchedKeys }}
90-
- name: "watched-keys"
91-
mountPath: "/data/keys"
92-
readOnly: true
93-
{{- end }}
94-
{{- with .Values.volumeMounts }}
95-
{{- toYaml . | nindent 12 }}
96-
{{- end }}
77+
- name: config
78+
mountPath: /config
9779
serviceAccountName: {{ include "ethereum-validator-watcher.serviceAccountName" . }}
98-
volumes:
99-
{{- if .Values.config.watchedKeys }}
100-
- name: "watched-keys"
101-
configMap:
102-
name: {{ include "ethereum-validator-watcher.fullname" . }}
103-
{{- end }}
104-
{{- with .Values.volumes }}
80+
{{- with .Values.nodeSelector }}
81+
nodeSelector:
10582
{{- toYaml . | nindent 8 }}
10683
{{- end }}
84+
{{- with .Values.affinity }}
85+
affinity:
86+
{{- toYaml . | nindent 6 }}
87+
{{- end }}
88+
volumes:
89+
- name: config
90+
configMap:
91+
name: {{ include "ethereum-validator-watcher.fullname" . }}-config

charts/eth-validator-watcher/templates/podmonitor.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ metadata:
99
spec:
1010
selector:
1111
matchLabels:
12-
{{- include "ethereum-validator-watcher.matchLabels" . | nindent 8 }}
12+
{{- include "ethereum-validator-watcher.selectorLabels" . | nindent 8 }}
1313
podMetricsEndpoints:
1414
- port: metrics
1515
{{- if .Values.podMonitor.interval }}
@@ -23,11 +23,11 @@ spec:
2323
scheme: {{ .Values.podMonitor.scheme }}
2424
{{- end }}
2525
{{- if .Values.podMonitor.tlsConfig }}
26-
tlsConfig:
26+
tlsConfig:
2727
{{- toYaml .Values.podMonitor.tlsConfig | nindent 6 }}
2828
{{- end }}
2929
{{- if .Values.podMonitor.relabelings }}
30-
relabelings:
30+
relabelings:
3131
{{ toYaml .Values.podMonitor.relabelings | nindent 6 }}
3232
{{- end }}
3333
{{- end }}

0 commit comments

Comments
 (0)