Skip to content

Commit 7615dad

Browse files
authored
fix: allow mixing of network and custom network settings (#17892)
For next-net we were mixing the `NETWORK` env var with some custom settings. The chart did not allow that (it read either `network` or `customNetwork`) and this PR merges the two settings
2 parents e5f4e1e + d2e80b6 commit 7615dad

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

.github/workflows/test-network-scenarios.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ jobs:
114114
mkdir -p ~/.ssh
115115
echo ${{ secrets.BUILD_INSTANCE_SSH_KEY }} | base64 --decode > ~/.ssh/build_instance_key
116116
chmod 600 ~/.ssh/build_instance_key
117-
sudo apt install -y --no-install-recommends redis-tools parallel
117+
sudo apt update && sudo apt install -y --no-install-recommends redis-tools parallel
118118
119119
- name: Store the GCP key in a file
120120
if: env.SEMVER != '' || env.DOCKER_IMAGE != ''

spartan/aztec-node/templates/_pod-template.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,16 +137,23 @@ spec:
137137
valueFrom:
138138
fieldRef:
139139
fieldPath: metadata.namespace
140-
{{- if .Values.global.customAztecNetwork.enabled }}
140+
{{- if .Values.global.customAztecNetwork.l1ChainId }}
141141
- name: L1_CHAIN_ID
142142
value: "{{ .Values.global.customAztecNetwork.l1ChainId }}"
143+
{{- end }}
144+
{{- if .Values.global.customAztecNetwork.registryContractAddress }}
143145
- name: REGISTRY_CONTRACT_ADDRESS
144146
value: "{{ .Values.global.customAztecNetwork.registryContractAddress }}"
147+
{{- end }}
148+
{{- if .Values.global.customAztecNetwork.slashFactoryContractAddress }}
145149
- name: SLASH_FACTORY_CONTRACT_ADDRESS
146150
value: "{{ .Values.global.customAztecNetwork.slashFactoryContractAddress }}"
151+
{{- end }}
152+
{{- if .Values.global.customAztecNetwork.feeAssetHandlerContractAddress }}
147153
- name: FEE_ASSET_HANDLER_CONTRACT_ADDRESS
148154
value: "{{ .Values.global.customAztecNetwork.feeAssetHandlerContractAddress }}"
149-
{{- else if .Values.global.aztecNetwork }}
155+
{{- end }}
156+
{{- if .Values.global.aztecNetwork }}
150157
- name: NETWORK
151158
value: "{{ .Values.global.aztecNetwork }}"
152159
{{- end }}

spartan/aztec-node/values.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ global:
1717
aztecNetwork: ""
1818
# -- Custom network - (not recommended) - Only for custom testnet usecases, (must have deployed your own protocol contracts first)
1919
customAztecNetwork:
20-
enabled: false
2120
l1ChainId:
2221
registryContractAddress:
2322
slashFactoryContractAddress:

spartan/terraform/deploy-aztec-infra/main.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ locals {
7373
"global.aztecImage.repository" = local.aztec_image.repository
7474
"global.aztecImage.tag" = local.aztec_image.tag
7575
"global.useGcloudLogging" = true
76-
"global.customAztecNetwork.enabled" = var.NETWORK == null || var.NETWORK == ""
7776
"global.aztecNetwork" = var.NETWORK
7877
"global.customAztecNetwork.registryContractAddress" = var.REGISTRY_CONTRACT_ADDRESS
7978
"global.customAztecNetwork.slashFactoryContractAddress" = var.SLASH_FACTORY_CONTRACT_ADDRESS

0 commit comments

Comments
 (0)