Skip to content

Commit d15ae08

Browse files
Merge pull request #208 from chronicleprotocol/create-hype-evm-chart
WIP: New hyperliquid node chart
2 parents fde0ee7 + 81ec9e8 commit d15ae08

File tree

10 files changed

+481
-0
lines changed

10 files changed

+481
-0
lines changed

Diff for: charts/hyperliquid/.helmignore

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*.orig
18+
*~
19+
# Various IDEs
20+
.project
21+
.idea/
22+
*.tmproj
23+
.vscode/

Diff for: charts/hyperliquid/Chart.yaml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
apiVersion: v2
2+
name: hyperliquid
3+
description: A Helm chart for running a hyperliquid node
4+
5+
maintainers:
6+
- name: WesleyCharlesBlake
7+
url: https://github.com/WesleyCharlesBlake
8+
- name: chronicleprotocol
9+
url: https://chroniclelabs.org
10+
11+
# A chart can be either an 'application' or a 'library' chart.
12+
#
13+
# Application charts are a collection of templates that can be packaged into versioned archives
14+
# to be deployed.
15+
#
16+
# Library charts provide useful utilities or functions for the chart developer. They're included as
17+
# a dependency of application charts to inject those utilities and functions into the rendering
18+
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
19+
type: application
20+
21+
# This is the chart version. This version number should be incremented each time you make changes
22+
# to the chart and its templates, including the app version.
23+
# Versions are expected to follow Semantic Versioning (https://semver.org/)
24+
version: 0.1.0
25+
26+
# This is the version number of the application being deployed. This version number should be
27+
# incremented each time you make changes to the application. Versions are not expected to
28+
# follow Semantic Versioning. They should reflect the version the application is using.
29+
# It is recommended to use it with quotes.
30+
appVersion: "1.16.0"

Diff for: charts/hyperliquid/README.md

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# hyperliquid
2+
3+
![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square)
4+
5+
A Helm chart for running a hyperliquid node
6+
7+
## Maintainers
8+
9+
| Name | Email | Url |
10+
| ---- | ------ | --- |
11+
| WesleyCharlesBlake | | <https://github.com/WesleyCharlesBlake> |
12+
| chronicleprotocol | | <https://chroniclelabs.org> |
13+
14+
## Values
15+
16+
| Key | Type | Default | Description |
17+
|-----|------|---------|-------------|
18+
| affinity | object | `{}` | |
19+
| imagePullSecrets | list | `[]` | |
20+
| node.image.pullPolicy | string | `"IfNotPresent"` | |
21+
| node.image.repository | string | `"ghcr.io/chronicleprotocol/hyperliquid"` | |
22+
| node.image.tag | string | `"latest"` | |
23+
| node.persistence.hl_data.accessMode[0] | string | `"ReadWriteOnce"` | |
24+
| node.persistence.hl_data.enabled | bool | `false` | |
25+
| node.persistence.hl_data.size | string | `"200Gi"` | |
26+
| node.persistence.hl_data.storageClass | string | `"gp3"` | |
27+
| node.replicas | int | `1` | |
28+
| node.resources | object | `{}` | |
29+
| nodeSelector | object | `{}` | |
30+
| podSecurityContext | object | `{}` | |
31+
| pruner.image.pullPolicy | string | `"IfNotPresent"` | |
32+
| pruner.image.repository | string | `"ghcr.io/chronicleprotocol/hyperliquid-pruner"` | |
33+
| pruner.image.tag | string | `"latest"` | |
34+
| pruner.resources | object | `{}` | |
35+
| replicaCount | int | `1` | |
36+
| securityContext | object | `{}` | |
37+
| service.annotations | object | `{}` | |
38+
| service.labels | object | `{}` | |
39+
| service.ports.gossip0.port | int | `4000` | |
40+
| service.ports.gossip0.protocol | string | `"TCP"` | |
41+
| service.ports.gossip1.port | int | `4001` | |
42+
| service.ports.gossip1.protocol | string | `"TCP"` | |
43+
| service.ports.gossip10.port | int | `4010` | |
44+
| service.ports.gossip10.protocol | string | `"TCP"` | |
45+
| service.ports.gossip2.port | int | `4002` | |
46+
| service.ports.gossip2.protocol | string | `"TCP"` | |
47+
| service.ports.gossip3.port | int | `4003` | |
48+
| service.ports.gossip3.protocol | string | `"TCP"` | |
49+
| service.ports.gossip4.port | int | `4004` | |
50+
| service.ports.gossip4.protocol | string | `"TCP"` | |
51+
| service.ports.gossip5.port | int | `4005` | |
52+
| service.ports.gossip5.protocol | string | `"TCP"` | |
53+
| service.ports.gossip6.port | int | `4006` | |
54+
| service.ports.gossip6.protocol | string | `"TCP"` | |
55+
| service.ports.gossip7.port | int | `4007` | |
56+
| service.ports.gossip7.protocol | string | `"TCP"` | |
57+
| service.ports.gossip8.port | int | `4008` | |
58+
| service.ports.gossip8.protocol | string | `"TCP"` | |
59+
| service.ports.gossip9.port | int | `4009` | |
60+
| service.ports.gossip9.protocol | string | `"TCP"` | |
61+
| service.ports.httprpc.port | int | `3001` | |
62+
| service.ports.httprpc.protocol | string | `"TCP"` | |
63+
| service.type | string | `"ClusterIP"` | |
64+
| serviceAccount.annotations | object | `{}` | |
65+
| serviceAccount.create | bool | `true` | |
66+
| serviceAccount.name | string | `""` | |
67+
| tolerations | list | `[]` | |
68+
69+
----------------------------------------------
70+
Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2)

Diff for: charts/hyperliquid/templates/NOTES.txt

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
Thanks to have installed {{ .Chart.Name }} {{ .Chart.Version }} as {{ .Release.Name }} ({{.Chart.AppVersion }}).
2+
3+
# Get release information
4+
5+
To learn more about the release, try:
6+
7+
$ helm -n {{ .Release.Namespace }} status {{ .Release.Name }}
8+
$ helm -n {{ .Release.Namespace }} get values {{ .Release.Name }}
9+
$ helm -n {{ .Release.Namespace }} get all {{ .Release.Name }}
10+
11+
# To delete the release
12+
13+
Use helm uninstall command to delete the release.
14+
15+
$ helm -n {{ .Release.Namespace }} uninstall {{ .Release.Name }}
16+
17+
Note that some resources may still be in use after a release is deleted. For exemple, PersistentVolumeClaims are not deleted by default for some storage classes or if some annotations are set.
18+
19+
# More information
20+
21+
You can see this notes again by running:
22+
23+
$ helm -n {{ .Release.Namespace }} get notes {{ .Release.Name }}
24+
25+
{{- $count := 0 -}}
26+
{{- $listOfURL := "" -}}
27+
{{- if and .Values.node.ingress .Values.node.ingress.enabled }}
28+
{{- $count = add1 $count -}}{{- $listOfURL = printf "%s\n- http://%s" $listOfURL (tpl .Values.node.ingress.host .) -}}
29+
{{- end }}
30+
{{- if and .Values.pruner.ingress .Values.pruner.ingress.enabled }}
31+
{{- $count = add1 $count -}}{{- $listOfURL = printf "%s\n- http://%s" $listOfURL (tpl .Values.pruner.ingress.host .) -}}
32+
{{- end }}
33+
{{- if gt $count 0 }}
34+
35+
# List of activated ingresses URL:
36+
{{ $listOfURL }}
37+
38+
You can get these urls with kubectl:
39+
40+
kubeclt get ingress -n {{ .Release.Namespace }}
41+
42+
{{- end }}
43+
44+
Thanks for using Helm!

Diff for: charts/hyperliquid/templates/_helpers.tpl

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{{- define "hyperliquid.fullname" -}}
2+
{{- if .Values.fullnameOverride -}}
3+
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
4+
{{- else -}}
5+
{{- $name := default .Chart.Name .Values.nameOverride -}}
6+
{{- if contains $name .Release.Name -}}
7+
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
8+
{{- else -}}
9+
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
10+
{{- end -}}
11+
{{- end -}}
12+
{{- end -}}
13+
14+
{{- define "hyperliquid.name" -}}
15+
{{- if .Values.nameOverride -}}
16+
{{- .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
17+
{{- else -}}
18+
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
19+
{{- end -}}
20+
{{- end -}}
21+
22+
{{- define "hyperliquid.labels" -}}
23+
{{ include "hyperliquid.selectorLabels" .}}
24+
{{ if .Chart.Version -}}
25+
{{ printf "katenary.v3/chart-version: '%s'" .Chart.Version }}
26+
{{- end }}
27+
{{ if .Chart.AppVersion -}}
28+
{{ printf "katenary.v3/app-version: '%s'" .Chart.AppVersion }}
29+
{{- end }}
30+
{{- end -}}
31+
32+
{{- define "hyperliquid.selectorLabels" -}}
33+
{{- $name := default .Chart.Name .Values.nameOverride -}}
34+
{{ printf "katenary.v3/name: %s" $name }}
35+
{{ printf "katenary.v3/instance: %s" .Release.Name }}
36+
{{- end -}}
37+
38+
{{/*
39+
Create the name of the service account to use
40+
*/}}
41+
{{- define "hyperliquid.serviceAccountName" -}}
42+
{{- if .Values.serviceAccount.create }}
43+
{{- default (include "hyperliquid.fullname" .) .Values.serviceAccount.name }}
44+
{{- else }}
45+
{{- default "default" .Values.serviceAccount.name }}
46+
{{- end }}
47+
{{- end }}

Diff for: charts/hyperliquid/templates/pvc.yaml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{{- if .Values.node.persistence.hl_data.enabled }}
2+
apiVersion: v1
3+
kind: PersistentVolumeClaim
4+
metadata:
5+
annotations:
6+
labels:
7+
{{- include "hyperliquid.labels" . | nindent 4 }}
8+
name: '{{ include "hyperliquid.fullname" . }}-node-hl-data'
9+
spec:
10+
accessModes:
11+
{{- .Values.node.persistence.hl_data.accessMode | toYaml | nindent 2 }}
12+
resources:
13+
requests:
14+
storage: {{ tpl .Values.node.persistence.hl_data.size $ }}
15+
{{- if ne .Values.node.persistence.hl_data.storageClass "-" }}
16+
storageClassName: '{{ .Values.node.persistence.hl_data.storageClass }}'
17+
{{- end }}
18+
19+
{{- end }}

Diff for: charts/hyperliquid/templates/service.yaml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: {{ include "hyperliquid.fullname" . }}
5+
labels:
6+
{{- include "hyperliquid.labels" . | nindent 4 }}
7+
{{- with .Values.service.labels }}
8+
{{- toYaml . | nindent 4 }}
9+
{{- end }}
10+
annotations:
11+
{{- with .Values.service.annotations }}
12+
{{- toYaml . | nindent 4 }}
13+
{{- end }}
14+
spec:
15+
type: {{ .Values.service.type }}
16+
ports:
17+
{{- range $key, $val := .Values.service.ports }}
18+
- port: {{ $val.port }}
19+
targetPort: {{ $val.port }}
20+
protocol: {{ $val.protocol }}
21+
name: {{ $key }}
22+
{{- end }}
23+
selector:
24+
{{- include "hyperliquid.selectorLabels" . | nindent 4 }}

Diff for: charts/hyperliquid/templates/serviceaccount.yaml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{{- if .Values.serviceAccount.create -}}
2+
apiVersion: v1
3+
kind: ServiceAccount
4+
metadata:
5+
name: {{ include "hyperliquid.serviceAccountName" . }}
6+
labels:
7+
{{- include "hyperliquid.labels" . | nindent 4 }}
8+
{{- with .Values.serviceAccount.annotations }}
9+
annotations:
10+
{{- toYaml . | nindent 4 }}
11+
{{- end }}
12+
{{- end }}

Diff for: charts/hyperliquid/templates/statefulset.yaml

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
apiVersion: apps/v1
2+
kind: StatefulSet
3+
metadata:
4+
labels:
5+
{{- include "hyperliquid.labels" . | nindent 4 }}
6+
name: '{{ include "hyperliquid.fullname" . }}'
7+
spec:
8+
replicas: {{ .Values.node.replicas }}
9+
selector:
10+
matchLabels:
11+
{{- include "hyperliquid.selectorLabels" . | nindent 6 }}
12+
serviceName: {{ include "hyperliquid.fullname" . }}
13+
template:
14+
metadata:
15+
labels:
16+
{{- include "hyperliquid.selectorLabels" . | nindent 8 }}
17+
spec:
18+
{{- with .Values.imagePullSecrets }}
19+
imagePullSecrets:
20+
{{- toYaml . | nindent 8 }}
21+
{{- end }}
22+
securityContext:
23+
{{- toYaml .Values.podSecurityContext | nindent 8 }}
24+
serviceAccountName: {{ include "hyperliquid.serviceAccountName" . }}
25+
containers:
26+
- image: '{{ tpl .Values.node.image.repository $ }}:{{ tpl .Values.node.image.tag $ | default "latest" }}'
27+
imagePullPolicy: {{ .Values.node.image.pullPolicy }}
28+
securityContext:
29+
{{- toYaml .Values.securityContext | nindent 12 }}
30+
name: node
31+
command:
32+
- /home/hluser/hl-visor
33+
args:
34+
- run-non-validator
35+
- --serve-eth-rpc
36+
ports:
37+
{{- range $key, $val := .Values.service.ports }}
38+
- name: {{ $key }}
39+
containerPort: {{ $val.port }}
40+
protocol: {{ $val.protocol }}
41+
{{- end }}
42+
{{- if .Values.node.resources }}
43+
resources:
44+
{{ .Values.node.resources | toYaml | nindent 10 }}
45+
{{- end }}
46+
volumeMounts:
47+
{{- if .Values.node.persistence.hl_data.enabled }}
48+
- mountPath: /home/hluser/hl/data
49+
name: hl-data
50+
{{- end }}
51+
- image: '{{ tpl .Values.pruner.image.repository $ }}:{{ tpl .Values.pruner.image.tag $ | default "latest" }}'
52+
imagePullPolicy: {{ .Values.pruner.image.pullPolicy }}
53+
securityContext:
54+
{{- toYaml .Values.securityContext | nindent 12 }}
55+
name: pruner
56+
{{- if .Values.pruner.resources }}
57+
resources:
58+
{{ .Values.pruner.resources | toYaml | nindent 10 }}
59+
{{- end }}
60+
volumeMounts:
61+
{{- if .Values.node.persistence.hl_data.enabled }}
62+
- mountPath: /home/hluser/hl/data
63+
name: hl-data
64+
{{- end }}
65+
nodeSelector:
66+
{{- toYaml .Values.nodeSelector | nindent 8 }}
67+
affinity:
68+
{{- toYaml .Values.affinity | nindent 8 }}
69+
tolerations:
70+
{{- toYaml .Values.tolerations | nindent 8 }}
71+
volumes:
72+
{{- if .Values.node.persistence.hl_data.enabled }}
73+
- name: hl-data
74+
persistentVolumeClaim:
75+
claimName: '{{ include "hyperliquid.fullname" . }}-node-hl-data'
76+
{{- end }}

0 commit comments

Comments
 (0)