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

feat: setting type of node #2

Merged
merged 29 commits into from
Jul 5, 2024
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
fa292f3
add arabica-11
aWN4Y25pa2EK Jun 26, 2024
91924ac
add arabica-11
aWN4Y25pa2EK Jun 26, 2024
7ee1072
add p2p-udp
aWN4Y25pa2EK Jun 26, 2024
739b18d
bump celestia-node version
aWN4Y25pa2EK Jun 26, 2024
0e8093a
add readiness probe logic based on node type
aWN4Y25pa2EK Jun 27, 2024
7f8eab2
fix arabica examples for bridge and full
aWN4Y25pa2EK Jun 27, 2024
08e5968
remove udp from PR
aWN4Y25pa2EK Jun 27, 2024
b25ea9c
remove udp from PR
aWN4Y25pa2EK Jun 27, 2024
3670c71
add change requests
aWN4Y25pa2EK Jun 27, 2024
f2c4ba8
add change requests
aWN4Y25pa2EK Jun 27, 2024
fb3f221
add change requests
aWN4Y25pa2EK Jun 27, 2024
5bd7436
add change requests
aWN4Y25pa2EK Jun 27, 2024
c3ee6e9
add change requests
aWN4Y25pa2EK Jun 27, 2024
155ac04
add logic for nodeType validations, set ClusteIP for SVCs by default
aWN4Y25pa2EK Jun 28, 2024
9304c1e
fix cluster ip for external service
aWN4Y25pa2EK Jun 28, 2024
394dd11
add svc headless examples
aWN4Y25pa2EK Jun 28, 2024
bb3cc7d
add nodeType logic for args validation
aWN4Y25pa2EK Jun 28, 2024
179ef76
add nodeSelector for DA pool
aWN4Y25pa2EK Jun 28, 2024
70d22fe
add Enabled for RPC in config.toml
aWN4Y25pa2EK Jun 28, 2024
79d6e86
add Enabled for RPC in config.toml
aWN4Y25pa2EK Jun 28, 2024
715e778
add hostPorts
aWN4Y25pa2EK Jul 2, 2024
dee948c
remove cpu limits for node
aWN4Y25pa2EK Jul 3, 2024
29de6cb
remove enabled value for rpc in config.toml
aWN4Y25pa2EK Jul 5, 2024
a5f968f
Update charts/celestia-node/templates/_helpers.tpl
tty47 Jul 5, 2024
a1b0c15
Update examples/celestia-node/arabica-bridge.yaml
tty47 Jul 5, 2024
6e74fc1
enable resources on otel-agent
aWN4Y25pa2EK Jul 5, 2024
6d2d039
enable resources on otel-agent
aWN4Y25pa2EK Jul 5, 2024
aa6fefd
Merge remote-tracking branch 'origin/task/add-arabica-2' into task/ad…
aWN4Y25pa2EK Jul 5, 2024
43c0d63
Merge branch 'main' into task/add-arabica-2
smuu Jul 5, 2024
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -194,3 +194,4 @@ $RECYCLE.BIN/

# End of https://www.toptal.com/developers/gitignore/api/helm,linux,macos,windows,intellij

.idea
2 changes: 1 addition & 1 deletion charts/celestia-node/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ maintainers:
name: celestia-node
sources:
- https://github.com/celestiaorg/celestia-node
version: 0.1.0
version: 0.1.0
4 changes: 2 additions & 2 deletions charts/celestia-node/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ spec:
selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: node
---
{{- end }}
{{- end }}

apiVersion: v1
kind: Service
Expand Down Expand Up @@ -163,4 +163,4 @@ spec:
{{- end }}
{{- $podLabels := include "common.tplvalues.merge" (dict "values" (list .Values.node.podLabels .Values.commonLabels) "context" .) | fromYaml }}
selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: node
app.kubernetes.io/component: node
8 changes: 7 additions & 1 deletion charts/celestia-node/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -207,16 +207,22 @@ spec:
{{- if .Values.node.customReadinessProbe }}
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.node.customReadinessProbe "context" $) | nindent 12 }}
{{- else if .Values.node.readinessProbe.enabled }}
readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.node.readinessProbe "enabled") "context" $) | nindent 12 }}
{{- if or (eq .Values.node.nodeType "bridge") (eq .Values.node.nodeType "full") }}
readinessProbe:
exec:
command:
- sh
- '-c'
- >
AUTH_TOKEN=$(celestia bridge auth read --node.store=/home/celestia 2>/dev/null);
{{- if eq .Values.node.nodeType "bridge" }}
curl --max-time 0.5 -s -X POST -H "Content-type: application/json" -H "Accept: application/json" -H "Authorization: Bearer $AUTH_TOKEN" -d '{"id":1,"jsonrpc":"2.0","method":"header.SyncWait","params":[]}' "http://localhost:26658";
{{- else if eq .Values.node.nodeType "full" }}
smuu marked this conversation as resolved.
Show resolved Hide resolved
curl --max-time 0.5 -s -X POST -H "Content-type: application/json" -H "Accept: application/json" -H "Authorization: Bearer $AUTH_TOKEN" -d '{"id":1,"jsonrpc":"2.0","method":"das.WaitCatchUp","params":[]}' "http://localhost:26658";
{{- end }}
if [ "$?" -eq 0 ]; then exit 0; else echo "Catching up"; exit 1; fi
{{- end }}
{{- end }}
{{- if .Values.node.customStartupProbe }}
startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.node.customStartupProbe "context" $) | nindent 12 }}
{{- else if .Values.node.startupProbe.enabled }}
Expand Down
8 changes: 7 additions & 1 deletion charts/celestia-node/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ diagnosticMode:
## %%MAIN_CONTAINER/POD_DESCRIPTION%%
##
node:
## Select from: bridge, full, light
## Valid values:
## - bridge
## - full
## - light:
smuu marked this conversation as resolved.
Show resolved Hide resolved
nodeType: bridge
smuu marked this conversation as resolved.
Show resolved Hide resolved
smuu marked this conversation as resolved.
Show resolved Hide resolved
## Celestia celestia-node image
## ref: https://github.com/celestiaorg/celestia-node/pkgs/container/celestia-node/versions?filters%5Bversion_type%5D=tagged
## @param node.image.registry [default: REGISTRY_NAME] celestia-node image registry
Expand Down Expand Up @@ -368,7 +374,7 @@ node:
##
readinessProbe:
# -- enable readiness probe on node containers, false by default
enabled: false
enabled: true
# -- initial delay seconds for readinessProbe, 0 by default
initialDelaySeconds: 0
# -- period seconds for readinessProbe, 10 by default
Expand Down
58 changes: 58 additions & 0 deletions examples/celestia-app/arabica.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
commonLabels:
chain_id: arabica-11
environment: arabica
network: consensus
type: full
persistence:
size: 1000Gi
dataSource:
apiGroup: snapshot.storage.k8s.io
kind: VolumeSnapshot
name: consensus-latest
app:
persistentVolumeClaimRetentionPolicy:
whenDeleted: Delete
whenScaled: Retain
otelAgent:
enabled: true
grafanaOtelSecret:
name: grafana-otel-token
resources:
requests:
cpu: 3
memory: 12Gi
limits:
cpu: 6
memory: 24Gi
livenessProbe:
enabled: true
periodSeconds: 10
failureThreshold: 3
readinessProbe:
enabled: true
periodSeconds: 10
failureThreshold: 30
startupProbe:
enabled: true
periodSeconds: 10
failureThreshold: 30
settings:
genesisURL: "https://raw.githubusercontent.com/celestiaorg/networks/master/arabica-11/genesis.json"
secret:
name: keys-consensus-1
config:
clienttoml:
chain_id: "arabica-11"
configtoml:
p2p:
seeds: "ee9f90974f85c59d3861fc7f7edb10894f6ac3c8@seed-mocha.pops.one:26656,258f523c96efde50d5fe0a9faeea8a3e83be22ca@seed.mocha-4.celestia.aviaone.com:20279,5d0bf034d6e6a8b5ee31a2f42f753f1107b3a00e@celestia-testnet-seed.itrocket.net:11656,7da0fb48d6ef0823bc9770c0c8068dd7c89ed4ee@celest-test-seed.theamsolutions.info:443"
persistent_peers: "34499b1ac473fbb03894c883178ecc83f0d6eaf6@64.227.18.169:26656,43e9da043318a4ea0141259c17fcb06ecff816af@rpc-1.celestia.nodes.guru:43656,f9e950870eccdb40e2386896d7b6a7687a103c99@rpc-2.celestia.nodes.guru:43656,daf2cecee2bd7f1b3bf94839f993f807c6b15fbf@celestia-testnet-peer.itrocket.net:11656"
instrumentation:
prometheus: true
tx_index:
indexer: "kv"
rpc:
laddr: "tcp://0.0.0.0:26657"
max_subscriptions_per_client: 1000
diagnosticMode:
enabled: false
66 changes: 66 additions & 0 deletions examples/celestia-node/arabica-bridge.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
commonLabels:
chain_id: arabica-11
environment: arabica
network: da
type: bridge # check
persistence:
size: 1000Gi
dataSource:
apiGroup: snapshot.storage.k8s.io
kind: VolumeSnapshot
name: da-latest
node:
nodeType: bridge # check
persistentVolumeClaimRetentionPolicy:
whenDeleted: Delete
whenScaled: Retain
otelAgent:
enabled: true
grafanaOtelSecret:
name: grafana-otel-token
resources:
requests:
cpu: 3
memory: 15Gi
limits:
cpu: 6
memory: 24Gi
livenessProbe:
enabled: true
periodSeconds: 10
failureThreshold: 3
readinessProbe:
enabled: true
periodSeconds: 10
failureThreshold: 30
startupProbe:
enabled: true
periodSeconds: 10
failureThreshold: 60
args:
- bridge # check
- start
- --p2p.network=arabica-11
- --node.store=$(CELESTIA_HOME)
- --metrics
- --metrics.tls=false
- --p2p.metrics
settings:
address: "eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJjcmVhdGVkIjoiMjAyNC0wMS0wMiAxMjo1NzoyMC4yNjk1Mjg2NTQgKzAwMDAgVVRDIG09KzAuMDQwNDkyNDk0IiwiZW5jIjoiQTI1NkdDTSIsInAyYyI6ODE5MiwicDJzIjoibHBUb0pLUkFvS3NPbmRhaCJ9.SFen5RaM_7JverpZQN6VxtJ06XePE5VKjyzMyIPgqURSge-XbiLHqA.vZ4fuVFbrLODe8RM.EGKwO3uGEifnPanziF-AD4i6q_92IetSVAEz-7Grg75AJyFLV3Flt4CmfLxrJ2JHWJEKUQBNyIU81u7pd01iNzEECDy9b0jO3DYZ_5PRET8zrVPv6SKKZ_U7MLWmAe_eUajipnbqZ6NzG8UcG4qAt278ttZB1KQsKqocKlE39fSvo3iaZEzOKxS0N3tU1Xw2C3w6HgHJFk0QiP36NIHuKoP_4QJkeAomhJX-cNOYwvTd8qTFTk2-1TzLJ5DasLXsVXTUSUzCzYQhEfL8F0qFoGvuY1dWRD5BESw2Gg2oLH1w957Xd2UhRbo5ORz9POR7goEv9AZ_rWrjSV8HozUmgFwDQyM89M7oiNedEfGQoDjypzcUBcVkZLEMIdrFRpshjcpNEzy6-PZ9rSxouKb7wemG_sueX3V3gIPCTfFr6hB8_b2mV-kKeIXQRS5pJz_wXxeFHFKOHDjt3L8n5eqh.fy-zygX7rjTUqgX02sZKKg"
node_id: "92a499fc2ce7cabd2de89416aa0d0d07838f625d"
secret:
name: keys-da-bridge-1
config:
configtoml:
Core:
IP: consensus-validator-1
RPC:
Enabled: true
Address: 0.0.0.0
Gateway:
Enabled: true
Address: 0.0.0.0
Node:
StartupTimeout: 2m
diagnosticMode:
enabled: false
tty47 marked this conversation as resolved.
Show resolved Hide resolved
66 changes: 66 additions & 0 deletions examples/celestia-node/arabica-full.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
commonLabels:
chain_id: arabica-11
environment: arabica
network: da
type: full # check
persistence:
size: 1000Gi
dataSource:
apiGroup: snapshot.storage.k8s.io
kind: VolumeSnapshot
name: da-latest
node:
nodeType: full # check
persistentVolumeClaimRetentionPolicy:
whenDeleted: Delete
whenScaled: Retain
otelAgent:
enabled: true
grafanaOtelSecret:
name: grafana-otel-token
resources:
requests:
cpu: 3
memory: 15Gi
limits:
cpu: 6
memory: 24Gi
livenessProbe:
enabled: true
periodSeconds: 10
failureThreshold: 3
readinessProbe:
enabled: true
periodSeconds: 10
failureThreshold: 30
startupProbe:
enabled: true
periodSeconds: 10
failureThreshold: 60
args:
- full # check
- start
- --p2p.network=arabica-11
- --node.store=$(CELESTIA_HOME)
- --metrics
- --metrics.tls=false
- --p2p.metrics
settings:
address: "eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJjcmVhdGVkIjoiMjAyNC0wMS0wMiAxMjo1NzoyMC4yNjk1Mjg2NTQgKzAwMDAgVVRDIG09KzAuMDQwNDkyNDk0IiwiZW5jIjoiQTI1NkdDTSIsInAyYyI6ODE5MiwicDJzIjoibHBUb0pLUkFvS3NPbmRhaCJ9.SFen5RaM_7JverpZQN6VxtJ06XePE5VKjyzMyIPgqURSge-XbiLHqA.vZ4fuVFbrLODe8RM.EGKwO3uGEifnPanziF-AD4i6q_92IetSVAEz-7Grg75AJyFLV3Flt4CmfLxrJ2JHWJEKUQBNyIU81u7pd01iNzEECDy9b0jO3DYZ_5PRET8zrVPv6SKKZ_U7MLWmAe_eUajipnbqZ6NzG8UcG4qAt278ttZB1KQsKqocKlE39fSvo3iaZEzOKxS0N3tU1Xw2C3w6HgHJFk0QiP36NIHuKoP_4QJkeAomhJX-cNOYwvTd8qTFTk2-1TzLJ5DasLXsVXTUSUzCzYQhEfL8F0qFoGvuY1dWRD5BESw2Gg2oLH1w957Xd2UhRbo5ORz9POR7goEv9AZ_rWrjSV8HozUmgFwDQyM89M7oiNedEfGQoDjypzcUBcVkZLEMIdrFRpshjcpNEzy6-PZ9rSxouKb7wemG_sueX3V3gIPCTfFr6hB8_b2mV-kKeIXQRS5pJz_wXxeFHFKOHDjt3L8n5eqh.fy-zygX7rjTUqgX02sZKKg"
node_id: "92a499fc2ce7cabd2de89416aa0d0d07838f625d"
secret:
name: keys-da-bridge-1
config:
configtoml:
Core:
IP: consensus-validator-1
RPC:
Enabled: true
Address: 0.0.0.0
Gateway:
Enabled: true
Address: 0.0.0.0
Node:
StartupTimeout: 2m
diagnosticMode:
enabled: false
Loading