-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[node] add support for extraDerivation for existingSecrets. (#351)
* Test `existingSecrets` option. * add support for extraDerivation
- Loading branch information
Showing
7 changed files
with
123 additions
and
7 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
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
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
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,72 @@ | ||
image: | ||
repository: parity/polkadot-parachain | ||
tag: latest | ||
pullPolicy: Always | ||
|
||
node: | ||
chain: bridge-hub-rococo-local | ||
command: polkadot-parachain | ||
role: collator | ||
replicas: 2 | ||
chainData: | ||
pruning: 1000 | ||
storageClass: "" | ||
chainKeystore: | ||
storageClass: "" | ||
existingSecrets: | ||
keys: | ||
- my-key-aura | ||
extraDerivation: '$([ "${HOSTNAME##*-}" = "0" ] && echo "//Alice" || echo "//Bob")' | ||
nodeKey: | ||
secretName: my-node-key | ||
secretKey: custom-node-key | ||
appendPodIndex: true | ||
flags: | ||
- "--bootnodes /dns/parachain2-node-0/tcp/30334/p2p/12D3KooWF4B55vTeXa7g88nUdSHVk6DiRXTrsfQyJcg7TrXcCK8U" | ||
isParachain: true | ||
collatorRelayChain: | ||
chain: rococo-local | ||
customChainspecUrl: http://bootnode:8080/chainspec.json | ||
forceDownloadChainspec: true | ||
chainData: | ||
storageClass: "" | ||
flags: | ||
- "--allow-private-ipv4" | ||
- "--discover-local" | ||
|
||
extraInitContainers: | ||
- name: dump-state-and-wasm | ||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" | ||
imagePullPolicy: "{{ .Values.image.pullPolicy }}" | ||
securityContext: | ||
runAsUser: 0 | ||
command: [ "/bin/bash" ] | ||
args: | ||
- -c | ||
- | | ||
if [ "${HOSTNAME##*-}" = "0" ]; then | ||
echo "Parachain Id:" | ||
{{ .Values.node.command }} build-spec --chain {{ .Values.node.chain }} | grep -E 'para_id|parachainId' | ||
echo "Genesis head:" | ||
{{ .Values.node.command }} export-genesis-state --chain {{ .Values.node.chain }} | ||
echo "" | ||
echo "Genesis wasm (validationCode) stored in /chain-data/genesis-wasm" | ||
{{ .Values.node.command }} export-genesis-wasm --chain {{ .Values.node.chain }} > /chain-data/genesis-wasm | ||
else | ||
echo "Genesis head and wasm are in pod ${HOSTNAME%-*}-0" | ||
fi | ||
volumeMounts: | ||
- mountPath: /chain-data | ||
name: chain-data | ||
- name: dump-session-keys | ||
resources: | ||
requests: | ||
memory: 8Mi | ||
cpu: 0.01 | ||
limits: | ||
memory: 32Mi | ||
image: docker.io/paritytech/substrate-session-keys-grabber:a5dd354f-20240716 | ||
args: ["/keystore"] | ||
volumeMounts: | ||
- mountPath: /keystore | ||
name: chain-keystore |
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,21 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: my-key-aura | ||
stringData: | ||
type: aura | ||
scheme: sr25519 | ||
# This is Alice seed. To generate new seed run: `docker run parity/polkadot key generate` | ||
seed: 'bottom drive obey lake curtain smoke basket hold race lonely fit walk' | ||
--- | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: my-node-key | ||
stringData: | ||
# To generate new node key run: `docker run -t parity/polkadot key generate-node-key` | ||
# 12D3KooWF4B55vTeXa7g88nUdSHVk6DiRXTrsfQyJcg7TrXcCK8U | ||
custom-node-key-0: "aaaabbbbbccccddddeeeeffff111122223333444455556666777788889999aab" | ||
# 12D3KooWEEZbB6hYKKhMo4hVexcPuTTFGJXbV8q3mobnAC91r8BR | ||
custom-node-key-1: "aaaabbbbbccccddddeeeeffff111122223333444455556666777788889999aac" |
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
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