diff --git a/spartan/aztec-network/templates/_helpers.tpl b/spartan/aztec-network/templates/_helpers.tpl index 87322add2ac..9191dab8895 100644 --- a/spartan/aztec-network/templates/_helpers.tpl +++ b/spartan/aztec-network/templates/_helpers.tpl @@ -50,6 +50,14 @@ app.kubernetes.io/name: {{ include "aztec-network.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end }} +{{/* +Aztec Image +*/}} +{{- define "aztec-network.image" -}} +image: {{ .Values.images.aztec.image }} +imagePullPolicy: {{ .Values.images.aztec.pullPolicy }} +{{- end -}} + {{- define "aztec-network.pxeUrl" -}} diff --git a/spartan/aztec-network/templates/boot-node.yaml b/spartan/aztec-network/templates/boot-node.yaml index 93a146a8c2e..1774c16fd66 100644 --- a/spartan/aztec-network/templates/boot-node.yaml +++ b/spartan/aztec-network/templates/boot-node.yaml @@ -35,7 +35,7 @@ spec: {{- include "aztec-network.p2pSetupContainer" . | nindent 8 }} {{- include "aztec-network.serviceAddressSetupContainer" . | nindent 8 }} - name: wait-for-ethereum - image: {{ .Values.images.aztec.image }} + {{- include "aztec-network.image" . | nindent 10 }} command: - /bin/bash - -c @@ -62,7 +62,7 @@ spec: mountPath: /shared/config {{- if .Values.bootNode.deployContracts }} - name: deploy-l1-contracts - image: {{ .Values.images.aztec.image }} + {{- include "aztec-network.image" . | nindent 10 }} command: [ "/bin/bash", @@ -97,7 +97,7 @@ spec: {{- end }} containers: - name: boot-node - image: {{ .Values.images.aztec.image }} + {{- include "aztec-network.image" . | nindent 10 }} command: - /bin/bash - -c diff --git a/spartan/aztec-network/templates/deploy-l1-verifier.yaml b/spartan/aztec-network/templates/deploy-l1-verifier.yaml index b69dcd58f65..16d09668221 100644 --- a/spartan/aztec-network/templates/deploy-l1-verifier.yaml +++ b/spartan/aztec-network/templates/deploy-l1-verifier.yaml @@ -27,7 +27,7 @@ spec: name: {{ include "aztec-network.fullname" . }}-scripts containers: - name: deploy-l1-verifier - image: {{ .Values.images.aztec.image }} + {{- include "aztec-network.image" . | nindent 10 }} command: - /bin/bash - -c diff --git a/spartan/aztec-network/templates/prover-agent.yaml b/spartan/aztec-network/templates/prover-agent.yaml index c27adb96eeb..c945f89e4aa 100644 --- a/spartan/aztec-network/templates/prover-agent.yaml +++ b/spartan/aztec-network/templates/prover-agent.yaml @@ -45,7 +45,7 @@ spec: initContainers: {{- include "aztec-network.serviceAddressSetupContainer" . | nindent 8 }} - name: wait-for-prover-node - image: {{ .Values.images.aztec.image }} + {{- include "aztec-network.image" . | nindent 10 }} command: - /bin/bash - -c @@ -69,8 +69,7 @@ spec: mountPath: /shared/config containers: - name: prover-agent - image: "{{ .Values.images.aztec.image }}" - imagePullPolicy: {{ .Values.images.aztec.pullPolicy }} + {{- include "aztec-network.image" . | nindent 10 }} volumeMounts: - name: config mountPath: /shared/config diff --git a/spartan/aztec-network/templates/prover-broker.yaml b/spartan/aztec-network/templates/prover-broker.yaml index 5f6a571b167..f722e5108aa 100644 --- a/spartan/aztec-network/templates/prover-broker.yaml +++ b/spartan/aztec-network/templates/prover-broker.yaml @@ -32,7 +32,7 @@ spec: initContainers: {{- include "aztec-network.serviceAddressSetupContainer" . | nindent 8 }} - name: wait-for-prover-node - image: {{ .Values.images.aztec.image }} + {{- include "aztec-network.image" . | nindent 10 }} command: - /bin/bash - -c @@ -51,8 +51,7 @@ spec: mountPath: /shared/config containers: - name: prover-broker - image: "{{ .Values.images.aztec.image }}" - imagePullPolicy: {{ .Values.images.aztec.pullPolicy }} + {{- include "aztec-network.image" . | nindent 10 }} volumeMounts: - name: config mountPath: /shared/config diff --git a/spartan/aztec-network/templates/prover-node.yaml b/spartan/aztec-network/templates/prover-node.yaml index 44984a2fb2a..452ccb00251 100644 --- a/spartan/aztec-network/templates/prover-node.yaml +++ b/spartan/aztec-network/templates/prover-node.yaml @@ -27,7 +27,7 @@ spec: {{- include "aztec-network.serviceAddressSetupContainer" . | nindent 8 }} {{- include "aztec-network.p2pSetupContainer" . | nindent 8 }} - name: wait-for-services - image: {{ .Values.images.aztec.image }} + {{- include "aztec-network.image" . | nindent 10 }} command: - /bin/bash - -c @@ -71,8 +71,7 @@ spec: value: "{{ .Values.proverNode.proverBroker.enabled }}" - name: configure-prover-env - image: "{{ .Values.images.aztec.image }}" - imagePullPolicy: {{ .Values.images.aztec.pullPolicy }} + {{- include "aztec-network.image" . | nindent 10 }} command: - "/bin/bash" - "-c" @@ -90,8 +89,7 @@ spec: containers: - name: prover-node - image: "{{ .Values.images.aztec.image }}" - imagePullPolicy: {{ .Values.images.aztec.pullPolicy }} + {{- include "aztec-network.image" . | nindent 10 }} command: - "/bin/bash" - "-c" diff --git a/spartan/aztec-network/templates/pxe.yaml b/spartan/aztec-network/templates/pxe.yaml index d61df752190..3fee3e64181 100644 --- a/spartan/aztec-network/templates/pxe.yaml +++ b/spartan/aztec-network/templates/pxe.yaml @@ -61,7 +61,7 @@ spec: {{- end }} containers: - name: pxe - image: "{{ .Values.images.aztec.image }}" + {{- include "aztec-network.image" . | nindent 10 }} volumeMounts: - name: config mountPath: /shared/config diff --git a/spartan/aztec-network/templates/setup-l2-contracts.yaml b/spartan/aztec-network/templates/setup-l2-contracts.yaml index c3167e89109..dc107937325 100644 --- a/spartan/aztec-network/templates/setup-l2-contracts.yaml +++ b/spartan/aztec-network/templates/setup-l2-contracts.yaml @@ -26,7 +26,7 @@ spec: emptyDir: {} containers: - name: setup-l2-contracts - image: {{ .Values.images.aztec.image }} + {{- include "aztec-network.image" . | nindent 10 }} volumeMounts: - name: config mountPath: /shared/config diff --git a/spartan/aztec-network/templates/transaction-bot.yaml b/spartan/aztec-network/templates/transaction-bot.yaml index 06c6ce7048b..2d3e2d8b393 100644 --- a/spartan/aztec-network/templates/transaction-bot.yaml +++ b/spartan/aztec-network/templates/transaction-bot.yaml @@ -53,7 +53,7 @@ spec: mountPath: /shared/config containers: - name: transaction-bot - image: "{{ .Values.images.aztec.image }}" + {{- include "aztec-network.image" . | nindent 10 }} volumeMounts: - name: config mountPath: /shared/config diff --git a/spartan/aztec-network/templates/validator.yaml b/spartan/aztec-network/templates/validator.yaml index b48acccee4d..942c130c609 100644 --- a/spartan/aztec-network/templates/validator.yaml +++ b/spartan/aztec-network/templates/validator.yaml @@ -36,7 +36,7 @@ spec: {{- include "aztec-network.p2pSetupContainer" . | nindent 8 }} {{- include "aztec-network.serviceAddressSetupContainer" . | nindent 8 }} - name: wait-for-services - image: {{ .Values.images.aztec.image }} + {{- include "aztec-network.image" . | nindent 10 }} command: - /bin/bash - -c @@ -79,8 +79,7 @@ spec: mountPath: /shared/config - name: configure-validator-env - image: "{{ .Values.images.aztec.image }}" - imagePullPolicy: {{ .Values.images.aztec.pullPolicy }} + {{- include "aztec-network.image" . | nindent 10 }} command: - "/bin/bash" - "-c" @@ -108,8 +107,7 @@ spec: fieldPath: metadata.name containers: - name: validator - image: "{{ .Values.images.aztec.image }}" - imagePullPolicy: {{ .Values.images.aztec.pullPolicy }} + {{- include "aztec-network.image" . | nindent 10 }} command: - "/bin/bash" - "-c"