diff --git a/internal/embed/networks/aztec/Chart.yaml b/internal/embed/networks/aztec/Chart.yaml new file mode 100644 index 0000000..0f93381 --- /dev/null +++ b/internal/embed/networks/aztec/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v2 +name: aztec-local +description: Local Aztec network resources +type: application +version: 0.1.0 diff --git a/internal/embed/networks/aztec/helmfile.yaml.gotmpl b/internal/embed/networks/aztec/helmfile.yaml.gotmpl index bf7ebbd..666ad28 100644 --- a/internal/embed/networks/aztec/helmfile.yaml.gotmpl +++ b/internal/embed/networks/aztec/helmfile.yaml.gotmpl @@ -1,6 +1,8 @@ repositories: - name: obol url: https://obolnetwork.github.io/helm-charts/ + - name: bedag + url: https://bedag.github.io/helm-charts/ releases: - name: aztec-sequencer @@ -9,13 +11,12 @@ releases: chart: obol/aztec-node version: 0.2.0 values: - - fullnameOverride: 'aztec-sequencer-{{ .Values.network }}' - role: sequencer + - role: sequencer sequencer: attesterPrivateKey: '{{ .Values.attesterPrivateKey }}' feeRecipient: "0x0000000000000000000000000000000000000000000000000000000000000000" network: '{{ .Values.network }}' - networkName: '{{ .Values.network }}' + networkName: '{{ .Values.id }}' image: repository: aztecprotocol/aztec tag: 2.1.5 @@ -65,3 +66,37 @@ releases: admin: enabled: true port: 8081 + + # Ingress for Aztec node + - name: aztec-ingress + namespace: aztec-{{ .Values.id }} + chart: . + values: + - id: {{ .Values.id }} + + # Metadata ConfigMap for frontend discovery + - name: aztec-metadata + namespace: aztec-{{ .Values.id }} + chart: bedag/raw + values: + - resources: + - apiVersion: v1 + kind: ConfigMap + metadata: + name: aztec-{{ .Values.id }}-metadata + namespace: aztec-{{ .Values.id }} + labels: + app.kubernetes.io/part-of: obol.stack + obol.stack/id: {{ .Values.id }} + obol.stack/app: aztec + data: + metadata.json: | + { + "network": "{{ .Values.network }}", + "endpoints": { + "rpc": { + "external": "http://obol.stack/aztec-{{ .Values.id }}", + "internal": "http://l2-sequencer-node-{{ .Values.id }}-node.aztec-{{ .Values.id }}.svc.cluster.local:8080" + } + } + } diff --git a/internal/embed/networks/aztec/templates/ingress.yaml b/internal/embed/networks/aztec/templates/ingress.yaml new file mode 100644 index 0000000..1e8ddd3 --- /dev/null +++ b/internal/embed/networks/aztec/templates/ingress.yaml @@ -0,0 +1,23 @@ +{{- if eq .Release.Name "aztec-ingress" }} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: aztec + namespace: {{ .Release.Namespace }} + annotations: + nginx.ingress.kubernetes.io/rewrite-target: /$2 + nginx.ingress.kubernetes.io/use-regex: "true" +spec: + ingressClassName: nginx + rules: + - host: obol.stack + http: + paths: + - path: /{{ .Release.Namespace }}(/|$)(.*) + pathType: ImplementationSpecific + backend: + service: + name: l2-sequencer-node-{{ .Values.id }}-node + port: + number: 8080 +{{- end }} diff --git a/internal/embed/networks/aztec/values.yaml.gotmpl b/internal/embed/networks/aztec/values.yaml.gotmpl index 07140b9..59bde14 100644 --- a/internal/embed/networks/aztec/values.yaml.gotmpl +++ b/internal/embed/networks/aztec/values.yaml.gotmpl @@ -9,7 +9,7 @@ network: {{.Network}} # @description Attester private key (hex string) attesterPrivateKey: {{.AttesterPrivateKey}} -# @default +# @default "" # @description L1 Execution RPC URL (defaults to ERPC: http://erpc.erpc.svc.cluster.local:4000/rpc/{network}) l1ExecutionUrl: {{.L1ExecutionUrl}} diff --git a/internal/embed/networks/ethereum/helmfile.yaml.gotmpl b/internal/embed/networks/ethereum/helmfile.yaml.gotmpl index cc332ee..e363c11 100644 --- a/internal/embed/networks/ethereum/helmfile.yaml.gotmpl +++ b/internal/embed/networks/ethereum/helmfile.yaml.gotmpl @@ -1,6 +1,8 @@ repositories: - name: ethereum-helm-charts url: https://ethpandaops.github.io/ethereum-helm-charts + - name: bedag + url: https://bedag.github.io/helm-charts/ releases: # Create PVCs first - before the Ethereum node @@ -39,19 +41,6 @@ releases: # Execution client - {{ .Values.executionClient }}: enabled: true - nameOverride: execution-{{ .Values.executionClient }}-{{ .Values.network }} - labels: - app.kubernetes.io/part-of: obol.stack - obol.stack/chain: ethereum - obol.stack/network: {{ .Values.network }} - obol.stack/type: execution - obol.stack/client: {{ .Values.executionClient }} - podLabels: - app.kubernetes.io/part-of: obol.stack - obol.stack/chain: ethereum - obol.stack/network: {{ .Values.network }} - obol.stack/type: execution - obol.stack/client: {{ .Values.executionClient }} persistence: enabled: true size: 500Gi @@ -61,19 +50,6 @@ releases: # Consensus client - {{ .Values.consensusClient }}: enabled: true - nameOverride: consensus-{{ .Values.consensusClient }}-{{ .Values.network }} - labels: - app.kubernetes.io/part-of: obol.stack - obol.stack/chain: ethereum - obol.stack/network: {{ .Values.network }} - obol.stack/type: consensus - obol.stack/client: {{ .Values.consensusClient }} - podLabels: - app.kubernetes.io/part-of: obol.stack - obol.stack/chain: ethereum - obol.stack/network: {{ .Values.network }} - obol.stack/type: consensus - obol.stack/client: {{ .Values.consensusClient }} extraArgs: - --execution-endpoint=http://ethereum-execution-{{ .Values.executionClient }}-{{ .Values.network }}:8551 - --network={{ .Values.network }} @@ -91,3 +67,42 @@ releases: - executionClient: {{ .Values.executionClient }} consensusClient: {{ .Values.consensusClient }} network: {{ .Values.network }} + + # Metadata ConfigMap for frontend discovery + - name: ethereum-metadata + namespace: ethereum-{{ .Values.id }} + chart: bedag/raw + values: + - resources: + - apiVersion: v1 + kind: ConfigMap + metadata: + name: ethereum-{{ .Values.id }}-metadata + namespace: ethereum-{{ .Values.id }} + labels: + app.kubernetes.io/part-of: obol.stack + obol.stack/id: {{ .Values.id }} + obol.stack/app: ethereum + data: + metadata.json: | + { + "network": "{{ .Values.network }}", + "execution": { + "client": "{{ .Values.executionClient }}", + "endpoints": { + "rpc": { + "external": "http://obol.stack/ethereum-{{ .Values.id }}/execution", + "internal": "http://ethereum-execution.ethereum-{{ .Values.id }}.svc.cluster.local:8545" + } + } + }, + "consensus": { + "client": "{{ .Values.consensusClient }}", + "endpoints": { + "rpc": { + "external": "http://obol.stack/ethereum-{{ .Values.id }}/beacon", + "internal": "http://ethereum-beacon.ethereum-{{ .Values.id }}.svc.cluster.local:5052" + } + } + } + } diff --git a/internal/embed/networks/ethereum/templates/ingress.yaml b/internal/embed/networks/ethereum/templates/ingress.yaml index ca2a5bd..75a39a6 100644 --- a/internal/embed/networks/ethereum/templates/ingress.yaml +++ b/internal/embed/networks/ethereum/templates/ingress.yaml @@ -13,18 +13,18 @@ spec: - host: obol.stack http: paths: - - path: /ethereum/execution(/|$)(.*) + - path: /{{ .Release.Namespace }}/execution(/|$)(.*) pathType: ImplementationSpecific backend: service: - name: ethereum-execution-{{ .Values.executionClient }}-{{ .Values.network }} + name: ethereum-execution port: number: 8545 - - path: /ethereum/beacon(/|$)(.*) + - path: /{{ .Release.Namespace }}/beacon(/|$)(.*) pathType: ImplementationSpecific backend: service: - name: ethereum-consensus-{{ .Values.consensusClient }}-{{ .Values.network }} + name: ethereum-beacon port: number: 5052 {{- end }} diff --git a/internal/embed/networks/helios/helmfile.yaml.gotmpl b/internal/embed/networks/helios/helmfile.yaml.gotmpl index ff1040f..a77ef0b 100644 --- a/internal/embed/networks/helios/helmfile.yaml.gotmpl +++ b/internal/embed/networks/helios/helmfile.yaml.gotmpl @@ -4,6 +4,8 @@ repositories: - name: obol url: https://obolnetwork.github.io/helm-charts/ + - name: bedag + url: https://bedag.github.io/helm-charts/ releases: - name: helios @@ -35,5 +37,32 @@ releases: hosts: - host: obol.stack paths: - - path: /helios(/|$)(.*) + - path: /helios-{{ .Values.id }}(/|$)(.*) pathType: ImplementationSpecific + + # Metadata ConfigMap for frontend discovery + - name: helios-metadata + namespace: helios-{{ .Values.id }} + chart: bedag/raw + values: + - resources: + - apiVersion: v1 + kind: ConfigMap + metadata: + name: helios-{{ .Values.id }}-metadata + namespace: helios-{{ .Values.id }} + labels: + app.kubernetes.io/part-of: obol.stack + obol.stack/id: {{ .Values.id }} + obol.stack/app: helios + data: + metadata.json: | + { + "network": "{{ .Values.network }}", + "endpoints": { + "rpc": { + "external": "http://obol.stack/helios-{{ .Values.id }}", + "internal": "http://helios-{{ .Values.network }}.helios-{{ .Values.id }}.svc.cluster.local:8545" + } + } + }