From 8ba16aab11885ea7254f644fcd6f53e3ab14dcf3 Mon Sep 17 00:00:00 2001 From: Jimmy <5608027+orcutt989@users.noreply.github.com> Date: Wed, 13 Jul 2022 15:16:19 -0400 Subject: [PATCH] fix network override value (#474) Co-authored-by: orcutt989 --- charts/snapshotEngine/templates/configmap.yaml | 2 +- charts/snapshotEngine/values.yaml | 2 +- snapshotEngine/mainJob.yaml | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/charts/snapshotEngine/templates/configmap.yaml b/charts/snapshotEngine/templates/configmap.yaml index 123afc093..6d17a37be 100644 --- a/charts/snapshotEngine/templates/configmap.yaml +++ b/charts/snapshotEngine/templates/configmap.yaml @@ -10,7 +10,7 @@ data: SERVICE_ACCOUNT: {{ $.Values.service_account }} RESTORED_STORAGE_INIT_TIME: {{ $.Values.restoredStorageInitTime }} DISABLE_STORAGE_INIT_TIME: {{ $.Values.disableStorageInitTime | quote }} - NETWORK: {{ $.Values.network }} + NETWORK_OVERRIDE: {{ $.Values.networkOverride | default "" | quote }} kind: ConfigMap metadata: name: snapshot-configmap diff --git a/charts/snapshotEngine/values.yaml b/charts/snapshotEngine/values.yaml index 463744edc..7dc99adb2 100755 --- a/charts/snapshotEngine/values.yaml +++ b/charts/snapshotEngine/values.yaml @@ -90,4 +90,4 @@ disableStorageInitTime: "false" # Used to start the snapshotable node, and for the initialization network on the restored snapshot. # Can be useful if namespace does not begin with network name. # Optional, defaults to beginning word of namespace before "-shots" ex "mainnet-shots" = "mainnet" -network: "" \ No newline at end of file +networkOverride: "" \ No newline at end of file diff --git a/snapshotEngine/mainJob.yaml b/snapshotEngine/mainJob.yaml index f049a0105..ef19d2d53 100644 --- a/snapshotEngine/mainJob.yaml +++ b/snapshotEngine/mainJob.yaml @@ -29,7 +29,7 @@ spec: trap "exit" SIGINT SIGTERM # Strip network from namespace or use configmap value - NETWORK="${NETWORK:-${NAMESPACE%%-*}}" + NETWORK="${NETWORK_OVERRIDE:-${NAMESPACE%%-*}}" # Set up config for headless RPC using new restored storage tezos-node config init \ @@ -154,11 +154,11 @@ spec: configMapKeyRef: name: snapshot-configmap key: NAMESPACE - - name: NETWORK + - name: NETWORK_OVERRIDE valueFrom: configMapKeyRef: name: snapshot-configmap - key: NETWORK + key: NETWORK_OVERRIDE containers: - name: create-tezos-rolling-snapshot image: "" @@ -173,7 +173,7 @@ spec: sudo chown -R 100:100 /rolling-tarball-restore # Strip network from namespace or use configmap value - NETWORK="${NETWORK:-${NAMESPACE%%-*}}" + NETWORK="${NETWORK_OVERRIDE:-${NAMESPACE%%-*}}" BLOCK_HEIGHT=$(cat /"${HISTORY_MODE}"-snapshot-cache-volume/BLOCK_HEIGHT) BLOCK_HASH=$(cat /"${HISTORY_MODE}"-snapshot-cache-volume/BLOCK_HASH) @@ -221,11 +221,11 @@ spec: configMapKeyRef: name: snapshot-configmap key: NAMESPACE - - name: NETWORK + - name: NETWORK_OVERRIDE valueFrom: configMapKeyRef: name: snapshot-configmap - key: NETWORK + key: NETWORK_OVERRIDE - name: zip-and-upload image: "" imagePullPolicy: Always