Skip to content

Commit

Permalink
optional hardcoded identity for DAL nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasochem committed Dec 9, 2023
1 parent 230e93d commit 8377099
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 4 deletions.
7 changes: 7 additions & 0 deletions charts/tezos/scripts/dal-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ fi
if [ "${PUBLIC_ADDR}" != "" ]; then
extra_args="${extra_args} --public-addr ${PUBLIC_ADDR}"
fi
# populate identity, if provided
if [ -n "$IDENTITY_JSON" ]; then
identity_path=/var/tezos/dal/identity.json
printf "Found persistent identity, writing to $identity_path"
echo "$IDENTITY_JSON" > $identity_path
fi
#

CMD="$TEZ_BIN/octez-dal-node run ${extra_args} --data-dir ${DAL_DATA_DIR} \
--endpoint http://tezos-node-rpc:8732 \
Expand Down
4 changes: 4 additions & 0 deletions charts/tezos/templates/octez-dal-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ spec:
- name: PUBLIC_ADDR
value: "{{ $v.publicAddr }}"
{{- end }}
{{- if $v.identity | default false }}
- name: IDENTITY_JSON
value: {{ toJson $v.identity | quote }}
{{- end }}
{{- end }}
securityContext:
fsGroup: 1000
Expand Down
19 changes: 15 additions & 4 deletions charts/tezos/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,8 @@ should_generate_unsafe_deterministic_data: false
# statefulset level.
# - `is_bootstrap_node`: Boolean for is this node a bootstrap peer.
# - `identity`: An optional map containing a pre-generated Tezos node
# identity. This is useful for local storage nodes which would
# need to generate an identity at every boot. The identity file
# will be created at /var/tezos/node/data/identity.json.
# identity. The identity file will be created at
# /var/tezos/node/data/identity.json.
# Required fields are `peer_id`, `public_key`, `secret_key`,
# and `proof_of_work_timestamp`.
#
Expand Down Expand Up @@ -391,7 +390,19 @@ dalNodes: {}
# bootstrap:
# bootstrapProfile: true
# ingress:
# # ingress details filled up by pulumi
# enabled: false
# host: ""
# annotations: {}
# className: ""
# labels: {}
# pathType: Prefix
# tls: []
# identity:
# # fill here the identity of the node, if you want it to persist
# peer_id:
# public_key:
# secret_key:
# proof_of_work_stamp:
# dal1:
# attesterProfiles: tz1foXHgRzdYdaLgX6XhpZGxbBv42LZ6ubvE

Expand Down

0 comments on commit 8377099

Please sign in to comment.