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

ci: compress genesis file during deployment #2512

Merged
merged 3 commits into from
May 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 deployments/charts/penumbra/.helmignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ pdcli/vals.json

pdcli/.penumbra/testnet_data/node0/tendermint/data/
pdcli/.penumbra/testnet_data/node0/tendermint/config/config.toml
pdcli/.penumbra/testnet_data/node0/tendermint/config/genesis.json
pdcli/.penumbra/testnet_data/node0/pd/

pdcli/.penumbra/testnet_data/node1/tendermint/data/
Expand Down
6 changes: 3 additions & 3 deletions deployments/charts/penumbra/templates/fn-deployments.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ spec:
configMap:
name: {{ include "penumbra.fullname" $ }}-genesis-config
items:
- key: "genesis.json"
path: "genesis.json"
- key: "genesis.json.gz"
path: "genesis.json.gz"
initContainers:
- name: pvc-ownership
image: busybox
Expand Down Expand Up @@ -118,7 +118,7 @@ spec:
mkdir $MERGE_DIR
config-merge -f toml $CONFIG_DIR/config.toml $OVERLAY_DIR/config.toml > $MERGE_DIR/config.toml
mv $MERGE_DIR/* $CONFIG_DIR/
cp /genesis/genesis.json $CONFIG_DIR/
gzip -d -c /genesis/genesis.json.gz > $CONFIG_DIR/genesis.json
securityContext:
runAsUser: 1025
runAsGroup: 1025
Expand Down
4 changes: 2 additions & 2 deletions deployments/charts/penumbra/templates/genesis-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ metadata:
labels:
{{- include "penumbra.labels" . | nindent 4 }}
binaryData:
{{ $path := "pdcli/.penumbra/testnet_data/node0/tendermint/config/genesis.json" }}
{{- "genesis.json" | indent 2 }}{{ print ": "}}{{ $.Files.Get $path | b64enc -}}
{{ $path := "pdcli/genesis.json.gz" }}
{{- "genesis.json.gz" | indent 2 }}{{ print ": "}}{{ $.Files.Get $path | b64enc -}}
6 changes: 3 additions & 3 deletions deployments/charts/penumbra/templates/val-deployments.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ spec:
configMap:
name: {{ include "penumbra.fullname" $ }}-genesis-config
items:
- key: "genesis.json"
path: "genesis.json"
- key: "genesis.json.gz"
path: "genesis.json.gz"
- name: val-secrets
secret:
secretName: {{ include "penumbra.fullname" $ }}-val-secrets-{{$i}}
Expand Down Expand Up @@ -124,7 +124,7 @@ spec:
mkdir $MERGE_DIR
config-merge -f toml $CONFIG_DIR/config.toml $OVERLAY_DIR/config.toml > $MERGE_DIR/config.toml
mv $MERGE_DIR/* $CONFIG_DIR/
cp /genesis/genesis.json $CONFIG_DIR/
gzip -d -c /genesis/genesis.json.gz > $CONFIG_DIR/genesis.json
cp /val/priv_validator_key.json $CONFIG_DIR/
cp /val/node_key.json $CONFIG_DIR/
cp /val/validator_custody.json $CONFIG_DIR/
Expand Down
5 changes: 5 additions & 0 deletions deployments/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ function create_genesis() {
$preserve_chain_opt \
--validators-input-file "${CONTAINERHOME}/vals.json" > /dev/null

# Compress the genesis file, otherwise the Helm manifest will exceed the 1MB
# secret limit. See GH1783.
gzip -c "${WORKDIR}/.penumbra/testnet_data/node0/tendermint/config/genesis.json" \
> "${WORKDIR}/genesis.json.gz"

# Clear out persistent peers. Will peer after services are bootstrapped.
# The Helm chart requires that these local flat files exist, but we cannot
# populate them with external IPs just yet. Make sure they're present,
Expand Down
1,710 changes: 1,709 additions & 1 deletion testnets/052-amalthe/allocations.csv

Large diffs are not rendered by default.

7,358 changes: 6,908 additions & 450 deletions testnets/discord_history.csv

Large diffs are not rendered by default.