diff --git a/charts/tezos/templates/configs.yaml b/charts/tezos/templates/configs.yaml index aeb9f9589..84cd1f07f 100644 --- a/charts/tezos/templates/configs.yaml +++ b/charts/tezos/templates/configs.yaml @@ -21,6 +21,7 @@ data: ROLLING_TARBALL_URL: "{{ .Values.rolling_tarball_url }}" ARCHIVE_TARBALL_URL: "{{ .Values.archive_tarball_url }}" PREFER_TARBALLS: "{{ .Values.prefer_tarballs }}" + SNAPSHOT_METADATA_NETWORK_NAME: "{{ .Values.snapshot_metadata_network_name }}" SNAPSHOT_SOURCE: "{{ .Values.snapshot_source }}" OCTEZ_VERSION: "{{ .Values.images.octez }}" NODE_GLOBALS: | diff --git a/charts/tezos/values.yaml b/charts/tezos/values.yaml index f8f5b0f94..15f3fce18 100644 --- a/charts/tezos/values.yaml +++ b/charts/tezos/values.yaml @@ -360,6 +360,10 @@ snapshot_source: https://xtz-shots.io/tezos-snapshots.json # If you prefer tarballs, set to "true" below. prefer_tarballs: false +# In case the network name in the snapshot metadata does not correspond to the +# network_name configured in `node_config_network`, hardcode the value here. +# snapshot_metadata_network_name: "mondaynet" + # By default, tezos-k8s will attempt to download the right artifact from # `snapshot_source` set above. You can override and hard-code a snapshot URL # source below. When any of the below variables are set, `snapshot_source` above diff --git a/test/charts/mainnet2.expect.yaml b/test/charts/mainnet2.expect.yaml index ccc8c09b3..e3c380752 100644 --- a/test/charts/mainnet2.expect.yaml +++ b/test/charts/mainnet2.expect.yaml @@ -37,6 +37,7 @@ data: ROLLING_TARBALL_URL: "" ARCHIVE_TARBALL_URL: "" PREFER_TARBALLS: "false" + SNAPSHOT_METADATA_NETWORK_NAME: "" SNAPSHOT_SOURCE: "https://xtz-shots.io/tezos-snapshots.json" OCTEZ_VERSION: "tezos/tezos:v17.3" NODE_GLOBALS: | diff --git a/utils/config-generator.py b/utils/config-generator.py index 4d9fb2c1c..2c493162f 100755 --- a/utils/config-generator.py +++ b/utils/config-generator.py @@ -684,7 +684,10 @@ def create_node_config_json( def create_node_snapshot_config_json(history_mode): """Create this node's snapshot config""" - network_name = NETWORK_CONFIG.get("chain_name") + if os.environ.get("SNAPSHOT_METADATA_NETWORK_NAME"): + network_name = os.environ.get("SNAPSHOT_METADATA_NETWORK_NAME") + else: + network_name = NETWORK_CONFIG.get("chain_name") prefer_tarballs = os.environ.get("PREFER_TARBALLS", "").lower() in ( "true", "1",