From 8e2595c6b0077511b1c6023c584f13b86cf76e9b Mon Sep 17 00:00:00 2001 From: Steven Platt Date: Wed, 25 Sep 2024 11:01:53 -0400 Subject: [PATCH 1/4] updated deployment default values --- spartan/aztec-network/values.yaml | 48 +++++++++++++++++++++++++++---- 1 file changed, 42 insertions(+), 6 deletions(-) diff --git a/spartan/aztec-network/values.yaml b/spartan/aztec-network/values.yaml index c422508b7ff..4b196b82527 100644 --- a/spartan/aztec-network/values.yaml +++ b/spartan/aztec-network/values.yaml @@ -38,7 +38,13 @@ bootNode: disabled: true p2p: enabled: "true" - resources: {} + resources: + requests: + memory: "2Gi" + cpu: "200m" + limits: + memory: "4Gi" + cpu: "4" validator: replicas: 0 @@ -54,7 +60,13 @@ validator: disabled: false p2p: enabled: "true" - resources: {} + resources: + requests: + memory: "2Gi" + cpu: "200m" + limits: + memory: "28Gi" + cpu: "7" proverNode: replicas: 1 @@ -64,7 +76,13 @@ proverNode: debug: "aztec:*" realProofs: false proverAgentEnabled: true - resources: {} + resources: + requests: + memory: "2Gi" + cpu: "200m" + limits: + memory: "120Gi" + cpu: "15" pxe: logLevel: "debug" @@ -80,7 +98,13 @@ pxe: timeoutSeconds: 5 successThreshold: 1 failureThreshold: 3 - resources: {} + resources: + requests: + memory: "2Gi" + cpu: "200m" + limits: + memory: "4Gi" + cpu: "1" bot: logLevel: "debug" @@ -104,7 +128,13 @@ bot: timeoutSeconds: 5 successThreshold: 1 failureThreshold: 3 - resources: {} + resources: + requests: + memory: "2Gi" + cpu: "200m" + limits: + memory: "4Gi" + cpu: "1" ethereum: replicas: 1 @@ -126,7 +156,13 @@ ethereum: timeoutSeconds: 5 successThreshold: 1 failureThreshold: 3 - resources: {} + resources: + requests: + memory: "2Gi" + cpu: "200m" + limits: + memory: "4Gi" + cpu: "1" metrics: service: From 210d9026bfccab0d7b8d72996a54d04de2454f7d Mon Sep 17 00:00:00 2001 From: Steven Platt Date: Wed, 25 Sep 2024 15:56:33 -0400 Subject: [PATCH 2/4] added on/off options for bot traffic and external load balancers --- spartan/aztec-network/templates/boot-node.yaml | 2 +- spartan/aztec-network/templates/metrics.yaml | 2 +- spartan/aztec-network/templates/prover-node.yaml | 2 +- spartan/aztec-network/templates/pxe.yaml | 2 +- .../aztec-network/templates/transaction-bot.yaml | 4 +++- spartan/aztec-network/templates/validator.yaml | 2 +- spartan/aztec-network/values.yaml | 13 +++++++------ 7 files changed, 15 insertions(+), 12 deletions(-) diff --git a/spartan/aztec-network/templates/boot-node.yaml b/spartan/aztec-network/templates/boot-node.yaml index 779d90ee86f..6ea619b0059 100644 --- a/spartan/aztec-network/templates/boot-node.yaml +++ b/spartan/aztec-network/templates/boot-node.yaml @@ -136,7 +136,7 @@ metadata: labels: {{- include "aztec-network.labels" . | nindent 4 }} spec: - clusterIP: None + type: {{if .Values.network.public }}"LoadBalancer"{{ else }}"ClusterIP"{{ end }} selector: {{- include "aztec-network.selectorLabels" . | nindent 4 }} app: boot-node diff --git a/spartan/aztec-network/templates/metrics.yaml b/spartan/aztec-network/templates/metrics.yaml index 8af3aa2f1ab..ff62fad5f2c 100644 --- a/spartan/aztec-network/templates/metrics.yaml +++ b/spartan/aztec-network/templates/metrics.yaml @@ -78,7 +78,7 @@ metadata: labels: {{- include "aztec-network.labels" . | nindent 4 }} spec: - type: {{ .Values.metrics.service.type }} + type: {{if .Values.network.public }}"LoadBalancer"{{ else }}"ClusterIP"{{ end }} ports: - port: {{ .Values.metrics.ports.otlp }} targetPort: otlp diff --git a/spartan/aztec-network/templates/prover-node.yaml b/spartan/aztec-network/templates/prover-node.yaml index 13cb4762719..ccc0a92c96a 100644 --- a/spartan/aztec-network/templates/prover-node.yaml +++ b/spartan/aztec-network/templates/prover-node.yaml @@ -106,7 +106,7 @@ metadata: labels: {{- include "aztec-network.labels" . | nindent 4 }} spec: - clusterIP: None + type: {{if .Values.network.public }}"LoadBalancer"{{ else }}"ClusterIP"{{ end }} selector: {{- include "aztec-network.selectorLabels" . | nindent 4 }} app: prover-node diff --git a/spartan/aztec-network/templates/pxe.yaml b/spartan/aztec-network/templates/pxe.yaml index 709a0a190e3..e5d85f5c395 100644 --- a/spartan/aztec-network/templates/pxe.yaml +++ b/spartan/aztec-network/templates/pxe.yaml @@ -65,7 +65,7 @@ metadata: labels: {{- include "aztec-network.labels" . | nindent 4 }} spec: - type: {{ .Values.pxe.service.type }} + type: {{if .Values.network.public }}"LoadBalancer"{{ else }}"ClusterIP"{{ end }} selector: {{- include "aztec-network.selectorLabels" . | nindent 4 }} app: pxe diff --git a/spartan/aztec-network/templates/transaction-bot.yaml b/spartan/aztec-network/templates/transaction-bot.yaml index e1d191271a4..798a28de571 100644 --- a/spartan/aztec-network/templates/transaction-bot.yaml +++ b/spartan/aztec-network/templates/transaction-bot.yaml @@ -1,3 +1,4 @@ +{{- if .Values.network.enableBots }} apiVersion: apps/v1 kind: Deployment metadata: @@ -99,4 +100,5 @@ spec: targetPort: {{ .Values.bot.service.targetPort }} {{- if and (eq .Values.bot.service.type "NodePort") .Values.bot.service.nodePort }} nodePort: {{ .Values.bot.service.nodePort }} - {{- end }} \ No newline at end of file + {{- end }} +{{- end }} \ No newline at end of file diff --git a/spartan/aztec-network/templates/validator.yaml b/spartan/aztec-network/templates/validator.yaml index d6de0f2d5f4..4f7785efd89 100644 --- a/spartan/aztec-network/templates/validator.yaml +++ b/spartan/aztec-network/templates/validator.yaml @@ -115,7 +115,7 @@ metadata: labels: {{- include "aztec-network.labels" . | nindent 4 }} spec: - clusterIP: None + type: {{if .Values.network.public }}"LoadBalancer"{{ else }}"ClusterIP"{{ end }} selector: {{- include "aztec-network.selectorLabels" . | nindent 4 }} app: validator diff --git a/spartan/aztec-network/values.yaml b/spartan/aztec-network/values.yaml index 4b196b82527..1f1c8146c76 100644 --- a/spartan/aztec-network/values.yaml +++ b/spartan/aztec-network/values.yaml @@ -1,3 +1,10 @@ +test: "sample" +scenario: "default" + +network: + public: false + enableBots: true + images: test: image: aztecprotocol/end-to-end @@ -89,7 +96,6 @@ pxe: debug: "aztec:*" replicas: 1 service: - type: ClusterIP port: 8080 targetPort: 8080 readinessProbe: @@ -165,8 +171,6 @@ ethereum: cpu: "1" metrics: - service: - type: ClusterIP ports: otlp: 4316 metrics: 4315 @@ -179,6 +183,3 @@ metrics: timeoutSeconds: 5 successThreshold: 1 failureThreshold: 3 - -test: "sample" -scenario: "default" From 24404d3f971eefc1c74cb53e0fdf99b3796d190c Mon Sep 17 00:00:00 2001 From: Steven Platt Date: Wed, 25 Sep 2024 17:21:21 -0400 Subject: [PATCH 3/4] added ability to toggle pxe on/off --- spartan/aztec-network/templates/pxe.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spartan/aztec-network/templates/pxe.yaml b/spartan/aztec-network/templates/pxe.yaml index e5d85f5c395..e79cc4c9071 100644 --- a/spartan/aztec-network/templates/pxe.yaml +++ b/spartan/aztec-network/templates/pxe.yaml @@ -1,3 +1,4 @@ +{{ - if .Values.network.enableBots }} apiVersion: apps/v1 kind: Deployment metadata: @@ -75,4 +76,5 @@ spec: targetPort: {{ .Values.pxe.service.targetPort }} {{- if and (eq .Values.pxe.service.type "NodePort") .Values.pxe.service.nodePort }} nodePort: {{ .Values.pxe.service.nodePort }} - {{- end }} \ No newline at end of file + {{- end }} +{{- end }} \ No newline at end of file From 307fbb1dec23968ddf7456e0a31c1a6852cf3fa0 Mon Sep 17 00:00:00 2001 From: Steven Platt Date: Wed, 25 Sep 2024 17:22:46 -0400 Subject: [PATCH 4/4] fixed if statement syntax error in pxe template file --- spartan/aztec-network/templates/pxe.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spartan/aztec-network/templates/pxe.yaml b/spartan/aztec-network/templates/pxe.yaml index e79cc4c9071..52f1b8aed6a 100644 --- a/spartan/aztec-network/templates/pxe.yaml +++ b/spartan/aztec-network/templates/pxe.yaml @@ -1,4 +1,4 @@ -{{ - if .Values.network.enableBots }} +{{- if .Values.network.enableBots }} apiVersion: apps/v1 kind: Deployment metadata: