Skip to content

Commit

Permalink
Add Vero client (#583)
Browse files Browse the repository at this point in the history
  • Loading branch information
antares-sw authored Sep 16, 2024
1 parent dbee4e9 commit 1b350fd
Show file tree
Hide file tree
Showing 9 changed files with 465 additions and 0 deletions.
23 changes: 23 additions & 0 deletions charts/vero/.helmignore
Original file line number Diff line number Diff line change
@@ -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/
6 changes: 6 additions & 0 deletions charts/vero/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dependencies:
- name: common
repository: https://charts.stakewise.io/
version: 1.0.0
digest: sha256:a52d823dcd535c64eafc9df56fe41455c602032e084b8adcaa34e536451d2ab2
generated: "2023-04-03T10:46:51.136024+03:00"
30 changes: 30 additions & 0 deletions charts/vero/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
apiVersion: v2
name: vero
description: Vero is a multi-node validator client software implementation, targeting Ethereum and Gnosis Chain.
icon: https://storage.googleapis.com/stakewise-charts/stakewise.png

# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.8.1

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "v0.8.0"

dependencies:
- name: common
repository: https://charts.stakewise.io/
version: 1.x.x
23 changes: 23 additions & 0 deletions charts/vero/templates/prometheusrules.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{{- if and (or .Values.global.metrics.enabled .Values.metrics.enabled)
(or .Values.global.metrics.prometheusRule.enabled .Values.metrics.prometheusRule.enabled) }}
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
name: {{ include "common.names.fullname" . }}
{{- if .Values.metrics.prometheusRule.namespace }}
namespace: {{ .Values.metrics.prometheusRule.namespace }}
{{- else }}
namespace: {{ .Release.Namespace | quote }}
{{- end }}
labels:
{{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.metrics.prometheusRule.additionalLabels }}
{{- toYaml .Values.metrics.prometheusRule.additionalLabels | nindent 4 }}
{{- end }}
spec:
groups:
{{- with .Values.metrics.prometheusRule.rules }}
- name: {{ include "common.names.fullname" $ }}
rules: {{- tpl (toYaml .) $ | nindent 8 }}
{{- end }}
{{- end }}
15 changes: 15 additions & 0 deletions charts/vero/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "common.names.fullname" . }}
labels:
{{- include "common.labels.standard" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.metrics.port }}
targetPort: metrics
protocol: TCP
name: metrics
selector:
{{- include "common.labels.matchLabels" . | nindent 4 }}
12 changes: 12 additions & 0 deletions charts/vero/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{{- if or .Values.global.serviceAccount.create .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 }}
42 changes: 42 additions & 0 deletions charts/vero/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{{- if and (or .Values.global.metrics.enabled .Values.metrics.enabled)
(or .Values.global.metrics.serviceMonitor.enabled .Values.metrics.serviceMonitor.enabled) }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ template "common.names.fullname" . }}
{{- if .Values.metrics.serviceMonitor.namespace }}
namespace: {{ .Values.metrics.serviceMonitor.namespace }}
{{- else }}
namespace: {{ .Release.Namespace | quote }}
{{- end }}
labels:
{{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.metrics.serviceMonitor.additionalLabels }}
{{- toYaml .Values.metrics.serviceMonitor.additionalLabels | nindent 4 }}
{{- end }}
spec:
endpoints:
- port: metrics
path: /metrics
{{- if .Values.metrics.serviceMonitor.interval }}
interval: {{ .Values.metrics.serviceMonitor.interval }}
{{- end }}
{{- if .Values.metrics.serviceMonitor.scrapeTimeout }}
scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }}
{{- end }}
{{- if .Values.metrics.serviceMonitor.honorLabels }}
honorLabels: {{ .Values.metrics.serviceMonitor.honorLabels }}
{{- end }}
{{- if .Values.metrics.serviceMonitor.relabelings }}
relabelings: {{- toYaml .Values.metrics.serviceMonitor.relabelings | nindent 6 }}
{{- end }}
{{- if .Values.metrics.serviceMonitor.metricRelabelings }}
metricRelabelings: {{- toYaml .Values.metrics.serviceMonitor.metricRelabelings | nindent 6 }}
{{- end }}
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
selector:
matchLabels:
{{- include "common.labels.matchLabels" . | nindent 6 }}
{{- end }}
99 changes: 99 additions & 0 deletions charts/vero/templates/statefulset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
apiVersion: {{ include "common.capabilities.statefulset.apiVersion" . }}
kind: StatefulSet
metadata:
name: {{ include "common.names.fullname" . }}
labels:
{{- include "common.labels.statefulset" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
podManagementPolicy: "Parallel"
serviceName: {{ include "common.names.fullname" . }}
selector:
matchLabels:
{{- include "common.labels.matchLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "common.labels.matchLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "common.names.serviceAccountName" . }}
{{- with .Values.securityContext }}
securityContext:
{{ toYaml . | nindent 8 | trim }}
{{- end }}
{{- if and .Values.persistence.enabled .Values.initChownData }}
initContainers:
- name: init-chown
image: "{{ .Values.initImage.registry }}/{{ .Values.initImage.repository }}:{{ .Values.initImage.tag }}"
imagePullPolicy: {{ .Values.initImage.pullPolicy }}
securityContext:
runAsNonRoot: false
runAsUser: 0
command: ["chown", "-R", "{{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.runAsUser }}", "/data"]
volumeMounts:
- name: data
mountPath: /data
{{- end }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
args:
- "--beacon-node-urls={{ .Values.global.beaconNodes }}"
- "--remote-signer-url={{ .Values.global.web3signerEndpoint }}"
- "--fee-recipient={{ .Values.feeRecipientAddress }}"
- "--metrics-address={{ .Values.metrics.address }}"
- "--metrics-port={{ .Values.metrics.port }}"
{{- range .Values.extraFlags }}
{{ . }}
{{- end }}
ports:
- name: metrics
containerPort: {{ .Values.metrics.port }}
protocol: TCP
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
- name: data
mountPath: /data
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
{{- if (not .Values.persistence.enabled) }}
- name: data
emptyDir: {}
{{- else }}
volumeClaimTemplates:
- metadata:
name: data
labels:
{{- include "common.labels.statefulset" . | nindent 10 }}
{{- with .Values.persistence.annotations }}
annotations:
{{ toYaml . | nindent 10 | trim }}
{{- end }}
spec:
accessModes: {{ .Values.persistence.accessModes }}
storageClassName: {{ .Values.persistence.storageClassName }}
resources:
requests:
storage: {{ .Values.persistence.size | quote }}
{{- end }}
Loading

0 comments on commit 1b350fd

Please sign in to comment.