Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dvt-relayer and add disableDepositDataWarnings for operator #576

Merged
merged 1 commit into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions charts/dvt-relayer/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: "2024-08-21T09:13:44.370036+03:00"
23 changes: 23 additions & 0 deletions charts/dvt-relayer/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: v2
name: dvt-relayer
version: 0.0.1
appVersion: "relayer"
kubeVersion: "^1.14.0-0"
description: The relayer for the v3-operator service to register DVT validators that used DKG to generate the private keys.
type: application
icon: https://storage.googleapis.com/stakewise-charts/stakewise.png
keywords:
- ethereum
- blockchain
- staking
home: https://stakewise.io/
sources:
- https://github.com/stakewise/dvt-relayer
maintainers:
- name: Dmitri Tsumak
email: dmitri@stakewise.io

dependencies:
- name: common
repository: https://charts.stakewise.io/
version: 1.x.x
14 changes: 14 additions & 0 deletions charts/dvt-relayer/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "common.names.fullname" . }}
labels:
{{- include "common.labels.standard" . | nindent 4 }}
data:
RELAYER_HOST: "0.0.0.0"
RELAYER_PORT: {{ .Values.service.port | quote }}
SIGNATURE_THRESHOLD: {{ .Values.settings.signatureThreshold | quote }}
NETWORK: {{ .Values.settings.network | quote }}
EXECUTION_ENDPOINT: {{ .Values.settings.executionEndpoint | quote }}
CONSENSUS_ENDPOINT: {{ .Values.settings.consensusEndpoint | quote }}
DATABASE: {{ .Values.settings.databasePath | quote }}
55 changes: 55 additions & 0 deletions charts/dvt-relayer/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "common.names.fullname" . -}}
{{- $svcPort := .Values.service.ports.http -}}
{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
{{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }}
{{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}}
{{- end }}
{{- end }}
apiVersion: {{ include "common.capabilities.ingress.apiVersion" . }}
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
{{- include "common.labels.standard" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}
ingressClassName: {{ .Values.ingress.className }}
{{- end }}
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ .host | quote }}
http:
paths:
{{- range .paths }}
- path: {{ .path }}
{{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }}
pathType: {{ .pathType }}
{{- end }}
backend:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
service:
name: {{ $fullName }}
port:
number: {{ $svcPort }}
{{- else }}
serviceName: {{ $fullName }}
servicePort: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
15 changes: 15 additions & 0 deletions charts/dvt-relayer/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.service.port }}
targetPort: http
protocol: TCP
name: http
selector:
{{- include "common.labels.matchLabels" . | nindent 4 }}
8 changes: 8 additions & 0 deletions charts/dvt-relayer/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{{- if or .Values.global.serviceAccount.create .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ template "common.names.fullname" . }}
labels:
{{- include "common.labels.standard" . | nindent 4 }}
{{- end }}
82 changes: 82 additions & 0 deletions charts/dvt-relayer/templates/statefulset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
kind: StatefulSet
apiVersion: {{ include "common.capabilities.statefulset.apiVersion" . }}
metadata:
name: {{ include "common.names.fullname" . }}
labels:
{{- include "common.labels.standard" . | nindent 4 }}
spec:
replicas: 1
selector:
matchLabels:
{{- include "common.labels.matchLabels" . | nindent 6 }}
serviceName: {{ include "common.names.fullname" . }}
template:
metadata:
labels:
{{- include "common.labels.matchLabels" . | nindent 8 }}
spec:
{{- if .Values.tolerations }}
tolerations:
{{ tpl .Values.tolerations . | nindent 8 | trim }}
{{- end }}
{{- if .Values.affinity }}
affinity:
{{ tpl .Values.affinity . | nindent 8 | trim }}
{{- end }}
{{- with .Values.securityContext }}
securityContext:
{{ toYaml . | nindent 8 | trim }}
{{- end }}
serviceAccountName: {{ include "common.names.fullname" . }}
priorityClassName: {{ .Values.priorityClassName | quote }}
{{- if .Values.terminationGracePeriodSeconds }}
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
{{- end }}
{{- with .Values.image.pullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- 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:
runAsUser: 0
command: ["chown", "-R", "{{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.runAsUser }}", "{{ .Values.persistence.mountPath }}"]
volumeMounts:
- name: data
mountPath: {{ .Values.persistence.mountPath }}
{{- end }}
containers:
- name: relayer
image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- name: PYTHONPATH
value: "."
envFrom:
- configMapRef:
name: {{ include "common.names.fullname" . }}
ports:
- name: http
containerPort: {{ .Values.service.port }}
protocol: TCP
volumeMounts:
- name: data
mountPath: {{ .Values.persistence.mountPath }}
{{- with .Values.resources }}
resources:
{{ toYaml . | nindent 12 | trim }}
{{- end }}
volumeClaimTemplates:
- metadata:
name: data
labels:
{{- include "common.labels.standard" . | nindent 10 }}
spec:
accessModes: {{ .Values.persistence.accessModes }}
storageClassName: {{ .Values.persistence.storageClassName }}
resources:
requests:
storage: {{ .Values.persistence.size | quote }}
121 changes: 121 additions & 0 deletions charts/dvt-relayer/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
# Default values for dvt-relayer.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

global:
serviceAccount:
create: true

## Pod Security Context
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
##
securityContext:
fsGroup: 1001
runAsUser: 1001

## Init image is used to chown data volume, initialise genesis, etc.
##
initImage:
registry: "docker.io"
repository: "busybox"
tag: "1.34"
pullPolicy: IfNotPresent

fullnameOverride: ""

## Termination Grace Period
## ref: https://kubernetes.io/docs/tasks/run-application/force-delete-stateful-set-pod/#delete-pods
##
terminationGracePeriodSeconds: 10

## Affinity Settings
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
##
affinity: {}

## Toleration Settings
## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/
##
tolerations: []

serviceAccount:
## 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: ""

## Docker image
##
image:
registry: "europe-west4-docker.pkg.dev"
repository: "stakewiselabs/public/dvt-relayer"
tag: ""
pullPolicy: IfNotPresent
pullSecrets: []

## Configure resource requests and limits.
## http://kubernetes.io/docs/user-guide/compute-resources/
##
resources:
requests:
cpu: "1"
memory: "1Gi"
limits:
cpu: "1"
memory: "1Gi"

## Used to assign priority to pod
## ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/
##
priorityClassName: ""

service:
type: ClusterIP
port: 8003

ingress:
enabled: false
className: ""
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
# nginx.ingress.kubernetes.io/limit-rpm: "100"
# nginx.ingress.kubernetes.io/limit-rps: "5"
# nginx.ingress.kubernetes.io/limit-req-status: "429"
hosts:
- host: chart-example.local
paths:
- path: /
pathType: ImplementationSpecific
tls: []
# - secretName: chart-example-tls
# hosts:
# - chart-example.local

settings:
# BLS signature threshold for a cluster
signatureThreshold: "3"
# Network choices: mainnet,holesky,gnosis,chiado
network: "holesky"
databasePath: "/data/relayer.db"
executionEndpoint: ""
consensusEndpoint: ""

## If false, data ownership will not be reset at startup
## This allows the geth node to be run with an arbitrary user
##
initChownData: true

## Whether or not to allocate persistent volume disk for the data directory.
## In case of node failure, the node data directory will still persist.
##
persistence:
enabled: true
storageClassName: ""
mountPath: "/data"
accessModes:
- ReadWriteOnce
size: 3Gi
4 changes: 2 additions & 2 deletions charts/v3-operator/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: v3-operator
version: 3.3.4
appVersion: v1.3.2
version: 3.3.5
appVersion: v1.3.3
description: Operator hosted service for Stakewise V3 protocol.
type: application
icon: https://storage.googleapis.com/stakewise-charts/stakewise.png
Expand Down
1 change: 1 addition & 0 deletions charts/v3-operator/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ data:
{{- if .Values.settings.sentryDSN }}
SENTRY_DSN: {{ .Values.settings.sentryDSN | quote }}
{{- end }}
DISABLE_DEPOSIT_DATA_WARNINGS: {{ .Values.settings.disableDepositDataWarnings | quote }}
2 changes: 2 additions & 0 deletions charts/v3-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ settings:
# If specified, wallet will be obtained from the secret
walletSecretName: ""

disableDepositDataWarnings: "False"

# Sentry connection string
# sentryDSN: ""

Expand Down
Loading