-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
1,099 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apiVersion: v2 | ||
name: uni-helm | ||
description: A Helm chart for Kubernetes | ||
|
||
keywords: | ||
- blockchain | ||
- web3 | ||
|
||
maintainers: | ||
- email: [email protected] | ||
- email: [email protected] | ||
|
||
type: application | ||
|
||
version: 1.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,289 @@ | ||
fullnameOverride: fullname | ||
statefulsets: | ||
- name: heimdall # <- STATEFULSET_NAME | ||
# replicas: 1 | ||
horizontalPodAutoscaler: | ||
enabled: true | ||
minReplicas: 1 | ||
maxReplicas: 10 | ||
targetMemoryUtilizationPercentage: 50 | ||
targetCPUUtilizationPercentage: 60 | ||
|
||
nodeSelector: | ||
node.kubernetes.io/instance-type: n2-standard-16 | ||
persistence: | ||
size: 350Gi | ||
storageClassName: standard-rwo | ||
volumeMountPath: /data | ||
gcpVolumeSnapshot: polygon-mainnet-archival-heimdall-latest | ||
initContainers: | ||
init-configs: | ||
image: | ||
repository: heimdall/image | ||
tag: heimdall.tag | ||
command: | ||
- 'sh' | ||
- '-c' | ||
- | | ||
# rm -rf /data/config | ||
if [ ! -d /data/config ]; then | ||
echo "Initialising heimdall configs" | ||
fi | ||
volumeMounts: | ||
- name: heimdall-data | ||
mountPath: /data | ||
download-genesis: | ||
image: | ||
repository: heimdall/image | ||
tag: heimdall.tag | ||
env: | ||
- name: GENESIS_FILE | ||
value: "/data/config/genesis.json" | ||
- name: GENESIS_URL | ||
value: https://raw.githubusercontent.com/maticnetwork/heimdall/master/builder/files/genesis-mainnet-v1.json | ||
command: | ||
- 'sh' | ||
- '-c' | ||
- | | ||
if [ ! -f $GENESIS_FILE ]; then | ||
echo "Genesis not exist, downloading it." | ||
fi | ||
volumeMounts: | ||
- name: heimdall-data | ||
mountPath: /data | ||
|
||
containers: | ||
- name: heimdalld | ||
image: | ||
repository: heimdall/image | ||
tag: heimdall.tag | ||
resources: | ||
limits: | ||
memory: 2Gi | ||
cpu: 1 | ||
requests: | ||
memory: 512Mi | ||
cpu: 256m | ||
env: | ||
- name: GENESIS_FILE | ||
value: "/data/config/genesis.json" | ||
envFrom: | ||
- secretRef: | ||
name: some-secret | ||
command: | ||
- heimdalld | ||
- --home=/data | ||
- --chain=mainnet | ||
- start | ||
- --seeds=f4f605d60b8 | ||
- --rest-server | ||
- --laddr=tcp://0.0.0.0:1317 | ||
- --rpc.laddr=tcp://0.0.0.0:26657 | ||
ports: | ||
- name: heimdall-rpc | ||
port: 26657 | ||
protocol: TCP | ||
- name: heimdall-rest | ||
port: 1317 | ||
protocol: TCP | ||
service: | ||
type: ClusterIP | ||
annotations: | ||
cloud.google.com/neg: '{"ingress": true}' | ||
ingress: | ||
# enabled: false | ||
# className: "className" | ||
annotations: | ||
kubernetes.io/ingress.class: nginx | ||
kubernetes.io/tls-acme: "true" | ||
hosts: | ||
- host: chart-example.local | ||
paths: | ||
- path: / | ||
pathType: ImplementationSpecific | ||
tls: | ||
- secretName: chart-example-tls | ||
hosts: | ||
- chart-example.local | ||
startupProbe: | ||
tcpSocket: | ||
port: 1317 | ||
periodSeconds: 60 | ||
failureThreshold: 10 | ||
livenessProbe: | ||
tcpSocket: | ||
port: 1317 | ||
|
||
- name: erigonbor | ||
replicas: 3 | ||
dnsPolicy: "None" | ||
dnsConfig: | ||
searches: | ||
- qos.svc.eu-southwest1-prod.v2.pokt.network | ||
- svc.eu-southwest1-prod.v2.pokt.network | ||
- eu-southwest1-prod.v2.pokt.network | ||
- europe-southwest1-c.c.portal-eu-southwest1-prod.internal | ||
- c.portal-eu-southwest1-prod.internal | ||
- google.internal | ||
nameservers: | ||
- 10.12.183.20 | ||
options: | ||
- name: ndots | ||
value: "2" | ||
annotations: | ||
deployment-annotations: 'dfgfsdgsdgsdfgsdfgsdfgsdfgdsfgsd' | ||
podAnnotations: | ||
pod-annotations: 'dfgfsdgsdgsdfgsdfgsdfgsdfgdsfgsd' | ||
mountConfigMaps: | ||
- name: velas-entrypoint | ||
mountPath: /dat0 | ||
mountSecrets: | ||
- name: velas-entrypoint1 | ||
mountPath: /data1 | ||
- name: velas-entrypoint2 | ||
mountPath: /data2 | ||
|
||
initContainers: | ||
- name: download-snapshot | ||
image: | ||
repository: heimdall/image | ||
tag: heimdall.tag | ||
workingDir: /data | ||
env: | ||
- name: APP_HOME | ||
value: "/data" | ||
command: | ||
- 'sh' | ||
- '-c' | ||
- | | ||
set -ex | ||
# If heimdalld container and we need to bootstrap on first run then download the snapshot | ||
if [ ! -f "$APP_HOME/bootstrapped" ]; | ||
then | ||
echo "downloading snapshot from ${SNAPSHOT_URL}" | ||
fi | ||
securityContext: | ||
runAsUser: 0 | ||
resources: | ||
requests: | ||
cpu: 100m | ||
memory: 256Mi | ||
volumeMounts: | ||
- name: erigonbor-data | ||
mountPath: /data | ||
- name: wait-heimdall-synced | ||
image: | ||
repository: heimdall/image | ||
tag: heimdall.tag | ||
command: | ||
- /bin/sh | ||
- -c | ||
- | | ||
set -ex | ||
apk add curl jq | ||
while :; do | ||
CATCHINGUP=$(curl http://fullname-heimdall-rpc:26657/status | \ | ||
jq -r '.result.sync_info.catching_up') | ||
echo "CatchingUp: $CATCHINGUP" | ||
if [ "$CATCHINGUP" == "false" ]; then | ||
echo "HEIMDALL is up and synched, running BOR." | ||
break | ||
fi | ||
sleep 60 | ||
done | ||
securityContext: | ||
runAsUser: 0 | ||
resources: | ||
requests: | ||
cpu: 100m | ||
memory: 256Mi | ||
containers: | ||
- name: erigonbor | ||
image: | ||
repository: erigon/image | ||
tag: erigontag | ||
resources: | ||
limits: | ||
memory: 100Gi | ||
cpu: 8 | ||
requests: | ||
memory: 50Gi | ||
cpu: 1 | ||
command: | ||
- erigon | ||
- --chain=bor-mainnet | ||
- --http.addr=0.0.0.0 | ||
- --http.vhosts=* | ||
- --http.corsdomain=* | ||
ports: | ||
- name: rpc | ||
port: 8545 | ||
protocol: TCP | ||
service: | ||
type: ClusterIP | ||
annotations: | ||
cloud.google.com/neg: '{"ingress": true}' | ||
ingress: | ||
# enabled: false | ||
className: "className" | ||
annotations: | ||
kubernetes.io/ingress.class: nginx | ||
kubernetes.io/tls-acme: "true" | ||
hosts: | ||
- host: chart-example.local | ||
paths: | ||
- path: / | ||
pathType: ImplementationSpecific | ||
tls: | ||
- secretName: chart-example-tls | ||
hosts: | ||
- chart-example.local | ||
startupProbe: | ||
tcpSocket: | ||
port: 8545 | ||
periodSeconds: 60 | ||
failureThreshold: 120 | ||
livenessProbe: | ||
tcpSocket: | ||
port: 8545 | ||
|
||
global: | ||
serviceAccount: | ||
name: polygon | ||
securityContext: | ||
fsGroup: 1001 | ||
runAsUser: 1001 | ||
runAsGroup: 1001 | ||
fsGroupChangePolicy: "OnRootMismatch" | ||
|
||
# Additional manifests to deploy as an array | ||
additionalManifests: | ||
- kind: Host | ||
apiVersion: getambassador.io/v3alpha1 | ||
metadata: | ||
name: fullname-rpc | ||
annotations: | ||
external-dns.ambassador-service: emissary-ingress.emissary-ingress | ||
spec: | ||
hostname: hostname.domain.com | ||
tlsSecret: | ||
name: wildcard-poktnodes--network-tls | ||
namespace: emissary-ingress | ||
|
||
- kind: ConfigMap | ||
apiVersion: v1 | ||
metadata: | ||
name: velas-entrypoint | ||
data: | ||
entrypoint.sh: | | ||
#!/bin/bash | ||
velas-validator --ledger /data --evm-state-archive /data/evmarchive \ | ||
--entrypoint bootstrap.velas.com:8001 \ | ||
--trusted-validator 78rvyxYJAUXGaZHJWyz7Yx81ribpAYvwupVuF9CugGws \ | ||
--trusted-validator FSZbHLPerYngGGwgWbXHtqTLRvLmgKVeUZCKwbFttWng \ | ||
--limit-ledger-size \ | ||
--maximum-full-snapshots-to-retain 1 \ | ||
--maximum-incremental-snapshots-to-retain 1 \ | ||
--log - & | ||
Oops, something went wrong.