Skip to content

Commit

Permalink
fix network override value (#474)
Browse files Browse the repository at this point in the history
Co-authored-by: orcutt989 <[email protected]>
  • Loading branch information
orcutt989 and orcutt989 authored Jul 13, 2022
1 parent bfe4b37 commit 8ba16aa
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion charts/snapshotEngine/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion charts/snapshotEngine/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: ""
networkOverride: ""
12 changes: 6 additions & 6 deletions snapshotEngine/mainJob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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: ""
Expand All @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 8ba16aa

Please sign in to comment.