diff --git a/charts/dvt-relayer/Chart.lock b/charts/dvt-relayer/Chart.lock new file mode 100644 index 00000000..811a4886 --- /dev/null +++ b/charts/dvt-relayer/Chart.lock @@ -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" diff --git a/charts/dvt-relayer/Chart.yaml b/charts/dvt-relayer/Chart.yaml new file mode 100644 index 00000000..cffc74d7 --- /dev/null +++ b/charts/dvt-relayer/Chart.yaml @@ -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 diff --git a/charts/dvt-relayer/templates/configmap.yaml b/charts/dvt-relayer/templates/configmap.yaml new file mode 100644 index 00000000..62d03fc7 --- /dev/null +++ b/charts/dvt-relayer/templates/configmap.yaml @@ -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 }} \ No newline at end of file diff --git a/charts/dvt-relayer/templates/ingress.yaml b/charts/dvt-relayer/templates/ingress.yaml new file mode 100644 index 00000000..e4fd02cd --- /dev/null +++ b/charts/dvt-relayer/templates/ingress.yaml @@ -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 }} diff --git a/charts/dvt-relayer/templates/service.yaml b/charts/dvt-relayer/templates/service.yaml new file mode 100644 index 00000000..0c14a8d6 --- /dev/null +++ b/charts/dvt-relayer/templates/service.yaml @@ -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 }} diff --git a/charts/dvt-relayer/templates/serviceaccount.yaml b/charts/dvt-relayer/templates/serviceaccount.yaml new file mode 100644 index 00000000..65d30421 --- /dev/null +++ b/charts/dvt-relayer/templates/serviceaccount.yaml @@ -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 }} \ No newline at end of file diff --git a/charts/dvt-relayer/templates/statefulset.yaml b/charts/dvt-relayer/templates/statefulset.yaml new file mode 100644 index 00000000..8318515c --- /dev/null +++ b/charts/dvt-relayer/templates/statefulset.yaml @@ -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 }} diff --git a/charts/dvt-relayer/values.yaml b/charts/dvt-relayer/values.yaml new file mode 100644 index 00000000..4f32a1e5 --- /dev/null +++ b/charts/dvt-relayer/values.yaml @@ -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 diff --git a/charts/v3-operator/Chart.yaml b/charts/v3-operator/Chart.yaml index 37bd2f72..1b15d4ac 100644 --- a/charts/v3-operator/Chart.yaml +++ b/charts/v3-operator/Chart.yaml @@ -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 diff --git a/charts/v3-operator/templates/configmap.yaml b/charts/v3-operator/templates/configmap.yaml index 8813bdca..6a380fa7 100644 --- a/charts/v3-operator/templates/configmap.yaml +++ b/charts/v3-operator/templates/configmap.yaml @@ -26,3 +26,4 @@ data: {{- if .Values.settings.sentryDSN }} SENTRY_DSN: {{ .Values.settings.sentryDSN | quote }} {{- end }} + DISABLE_DEPOSIT_DATA_WARNINGS: {{ .Values.settings.disableDepositDataWarnings | quote }} diff --git a/charts/v3-operator/values.yaml b/charts/v3-operator/values.yaml index 6f6baa75..8435b6fa 100644 --- a/charts/v3-operator/values.yaml +++ b/charts/v3-operator/values.yaml @@ -112,6 +112,8 @@ settings: # If specified, wallet will be obtained from the secret walletSecretName: "" + disableDepositDataWarnings: "False" + # Sentry connection string # sentryDSN: ""