Skip to content

Commit 6cb34d0

Browse files
Added seed node mode
1 parent 6ef143b commit 6cb34d0

File tree

5 files changed

+52
-1
lines changed

5 files changed

+52
-1
lines changed

charts/osmosis-fullnode/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: osmosis-fullnode
33
description: A Helm chart for deploying Osmosis fullnode with monitoring and sentinel
44
type: application
5-
version: 0.1.7
5+
version: 0.1.8
66
appVersion: "29.0.2"
77
keywords:
88
- osmosis

charts/osmosis-fullnode/templates/configmaps.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,26 @@ data:
125125
copy_node_key.sh: |
126126
#!/bin/sh
127127
echo "🔑 Copying node key files if present"
128+
{{- if .Values.seedNode.enabled }}
129+
echo "🌱 Seed node mode enabled, checking for seed node keys"
130+
# Copy seed node keys if available
131+
if [ -e {{ .Values.seedNode.secret.mountPath }}/node_key.json ]; then
132+
echo "🔑 Copying seed node key"
133+
cp {{ .Values.seedNode.secret.mountPath }}/node_key.json $OSMOSIS_HOME/config/node_key.json
134+
fi
135+
if [ -e {{ .Values.seedNode.secret.mountPath }}/priv_validator_key.json ]; then
136+
echo "🔑 Copying seed node validator key"
137+
cp {{ .Values.seedNode.secret.mountPath }}/priv_validator_key.json $OSMOSIS_HOME/config/priv_validator_key.json
138+
fi
139+
{{- else }}
140+
# Regular node key copy logic
128141
if [ -e /etc/osmosis/node_keys/node_key.json ]; then
129142
cp /etc/osmosis/node_keys/node_key.json $OSMOSIS_HOME/config/node_key.json
130143
fi
131144
if [ -e /etc/osmosis/node_keys/priv_validator_key.json ]; then
132145
cp /etc/osmosis/node_keys/priv_validator_key.json $OSMOSIS_HOME/config/priv_validator_key.json
133146
fi
147+
{{- end }}
134148
135149
---
136150
apiVersion: v1

charts/osmosis-fullnode/templates/statefulset.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,11 @@ spec:
101101
mountPath: /etc/osmosis/config/
102102
- name: osmosis-scripts
103103
mountPath: /etc/osmosis/scripts/
104+
{{- if .Values.seedNode.enabled }}
105+
- name: seed-node-keys
106+
mountPath: {{ .Values.seedNode.secret.mountPath }}
107+
readOnly: true
108+
{{- end }}
104109
{{- if .Values.sqs.enabled }}
105110
- name: sqs
106111
image: {{ .Values.sqs.container.image.repository }}:{{ .Values.sqs.container.image.tag }}
@@ -156,6 +161,12 @@ spec:
156161
configMap:
157162
name: {{ include "osmosis-fullnode.fullname" . }}-scripts
158163
defaultMode: 0755
164+
{{- if .Values.seedNode.enabled }}
165+
- name: seed-node-keys
166+
secret:
167+
secretName: {{ .Values.seedNode.secret.name }}
168+
defaultMode: 0600
169+
{{- end }}
159170
{{- if .Values.sqs.enabled }}
160171
- name: sqs-config
161172
configMap:

charts/osmosis-fullnode/values-testnet.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,20 @@ monitoring:
378378
}
379379
]
380380
381+
# Seed Node configuration (example for testnet)
382+
# Uncomment and configure when running as a seed node
383+
seedNode:
384+
# Enable seed node only mode
385+
enabled: false
386+
387+
# Secret configuration for seed node keys
388+
secret:
389+
# Name of the secret containing seed node keys
390+
# Example: "osmosis-testnet-seed-keys"
391+
name: ""
392+
# Mount path where the secret will be mounted
393+
mountPath: "/etc/osmosis/seed_keys"
394+
381395
# Configuration files
382396
config:
383397
# Osmosis configuration files

charts/osmosis-fullnode/values.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,18 @@ monitoring:
333333
}
334334
]
335335
336+
# Seed Node configuration
337+
seedNode:
338+
# Enable seed node only mode
339+
enabled: false
340+
341+
# Secret configuration for seed node keys
342+
secret:
343+
# Name of the secret containing seed node keys
344+
name: ""
345+
# Mount path where the secret will be mounted
346+
mountPath: "/etc/osmosis/seed_keys"
347+
336348
# SQS configuration
337349
sqs:
338350
enabled: false

0 commit comments

Comments
 (0)