Skip to content

Commit 3992ec9

Browse files
authored
[aztec-prover] feat: add aztec prover (#142)
* feat: add aztec-prover node and agent chart * feat: add maintainers * feat: add CODEOWNERS
1 parent 5794731 commit 3992ec9

14 files changed

+632
-0
lines changed

.github/CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
/.github/workflows/ @NethermindEth/angkor-validator-operators @AntiD2ta @aivarasko @matilote
1414

15+
/charts/aztec-prover/ @0xDones
1516
/charts/cert-manager/ @gehlotanish @Manjeet-Nethermind
1617
/charts/common/ @aivarasko @matilote
1718
/charts/dirk/ @aivarasko @matilote

charts/aztec-prover/.helmignore

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*.orig
18+
*~
19+
# Various IDEs
20+
.project
21+
.idea/
22+
*.tmproj
23+
.vscode/

charts/aztec-prover/Chart.yaml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
apiVersion: v2
2+
name: aztec-prover
3+
description: A Helm chart for Kubernetes
4+
5+
# A chart can be either an 'application' or a 'library' chart.
6+
#
7+
# Application charts are a collection of templates that can be packaged into versioned archives
8+
# to be deployed.
9+
#
10+
# Library charts provide useful utilities or functions for the chart developer. They're included as
11+
# a dependency of application charts to inject those utilities and functions into the rendering
12+
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
13+
type: application
14+
15+
# This is the chart version. This version number should be incremented each time you make changes
16+
# to the chart and its templates, including the app version.
17+
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18+
version: 0.1.0
19+
maintainers:
20+
- name: 0xDones

charts/aztec-prover/README.md

+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# aztec-prover
2+
3+
![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
4+
5+
A Helm chart for Kubernetes
6+
7+
## Values
8+
9+
| Key | Type | Default | Description |
10+
|-----|------|---------|-------------|
11+
| affinity | object | `{}` | |
12+
| autoscaling.enabled | bool | `false` | |
13+
| autoscaling.maxReplicas | int | `100` | |
14+
| autoscaling.minReplicas | int | `1` | |
15+
| autoscaling.targetCPUUtilizationPercentage | int | `80` | |
16+
| envFrom | list | `[]` | |
17+
| extraObjects | list | `[]` | |
18+
| fullnameOverride | string | `""` | |
19+
| image.pullPolicy | string | `"IfNotPresent"` | |
20+
| image.repository | string | `"aztecprotocol/aztec"` | |
21+
| image.tag | string | `"provernet"` | |
22+
| imagePullSecrets | list | `[]` | |
23+
| ingress.annotations | object | `{}` | |
24+
| ingress.className | string | `""` | |
25+
| ingress.enabled | bool | `false` | |
26+
| ingress.hosts[0].host | string | `"chart-example.local"` | |
27+
| ingress.hosts[0].paths[0].path | string | `"/"` | |
28+
| ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | |
29+
| ingress.tls | list | `[]` | |
30+
| livenessProbe.httpGet.path | string | `"/status"` | |
31+
| livenessProbe.httpGet.port | string | `"http"` | |
32+
| nameOverride | string | `""` | |
33+
| nodeSelector | object | `{}` | |
34+
| persistence.accessModes[0] | string | `"ReadWriteOnce"` | |
35+
| persistence.enabled | bool | `false` | |
36+
| persistence.mountPath | string | `"/data"` | |
37+
| persistence.size | string | `"50Gi"` | |
38+
| persistence.storageClass | string | `""` | |
39+
| podAnnotations | object | `{}` | |
40+
| podLabels | object | `{}` | |
41+
| podSecurityContext | object | `{}` | |
42+
| proverAgent.args[0] | string | `"start --prover"` | |
43+
| proverAgent.enabled | bool | `false` | |
44+
| proverAgent.env.AZTEC_NODE_URL | string | `"http://aztec-prover-node:8080"` | |
45+
| proverAgent.env.IS_DEV_NET | string | `"true"` | |
46+
| proverAgent.env.LOG_JSON | string | `"false"` | |
47+
| proverAgent.env.LOG_LEVEL | string | `"debug"` | |
48+
| proverAgent.env.OTEL_EXPORTER_OTLP_ENDPOINT | string | `""` | |
49+
| proverAgent.env.PROVER_AGENTS | string | `"1"` | |
50+
| proverAgent.env.PROVER_REAL_PROOFS | string | `"true"` | |
51+
| proverAgent.name | string | `"agent"` | |
52+
| proverNode.args[0] | string | `"start --prover-node --archiver"` | |
53+
| proverNode.enabled | bool | `true` | |
54+
| proverNode.env.AZTEC_PORT | string | `"8080"` | |
55+
| proverNode.env.DATA_DIRECTORY | string | `"/data"` | |
56+
| proverNode.env.ETHEREUM_HOST | string | `"https://provernet-mainnet-fork.aztec.network:8545/$APIKEY"` | |
57+
| proverNode.env.IS_DEV_NET | string | `"true"` | |
58+
| proverNode.env.L1_CHAIN_ID | string | `"677692"` | |
59+
| proverNode.env.LOG_JSON | string | `"false"` | |
60+
| proverNode.env.LOG_LEVEL | string | `"debug"` | |
61+
| proverNode.env.OTEL_EXPORTER_OTLP_ENDPOINT | string | `""` | |
62+
| proverNode.env.PROVER_REAL_PROOFS | string | `"true"` | |
63+
| proverNode.env.TX_PROVIDER_NODE_URL | string | `"https://api.aztec.network/provernet/aztec-node-1/$APIKEY"` | |
64+
| proverNode.name | string | `"node"` | |
65+
| readinessProbe.httpGet.path | string | `"/status"` | |
66+
| readinessProbe.httpGet.port | string | `"http"` | |
67+
| replicaCount | int | `1` | |
68+
| resources | object | `{}` | |
69+
| securityContext | object | `{}` | |
70+
| service.port | int | `8080` | |
71+
| service.type | string | `"ClusterIP"` | |
72+
| serviceAccount.annotations | object | `{}` | |
73+
| serviceAccount.automount | bool | `true` | |
74+
| serviceAccount.create | bool | `true` | |
75+
| serviceAccount.name | string | `""` | |
76+
| tolerations | list | `[]` | |
77+
| volumeMounts | list | `[]` | |
78+
| volumes | list | `[]` | |
79+
80+
----------------------------------------------
81+
Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2)
+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
{{/*
2+
Expand the name of the chart.
3+
*/}}
4+
{{- define "aztec-prover.name" -}}
5+
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
6+
{{- end }}
7+
8+
{{/*
9+
Create a default fully qualified app name.
10+
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
11+
If release name contains chart name it will be used as a full name.
12+
*/}}
13+
{{- define "aztec-prover.fullname" -}}
14+
{{- if .Values.fullnameOverride }}
15+
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
16+
{{- else }}
17+
{{- $name := default .Chart.Name .Values.nameOverride }}
18+
{{- if contains $name .Release.Name }}
19+
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
20+
{{- else }}
21+
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
22+
{{- end }}
23+
{{- end }}
24+
{{- end }}
25+
26+
{{/*
27+
Create chart name and version as used by the chart label.
28+
*/}}
29+
{{- define "aztec-prover.chart" -}}
30+
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
31+
{{- end }}
32+
33+
{{/*
34+
Common labels
35+
*/}}
36+
{{- define "aztec-prover.labels" -}}
37+
helm.sh/chart: {{ include "aztec-prover.chart" . }}
38+
{{ include "aztec-prover.selectorLabels" . }}
39+
{{- if .Chart.AppVersion }}
40+
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
41+
{{- end }}
42+
app.kubernetes.io/managed-by: {{ .Release.Service }}
43+
{{- end }}
44+
45+
{{/*
46+
Selector labels
47+
*/}}
48+
{{- define "aztec-prover.selectorLabels" -}}
49+
app.kubernetes.io/name: {{ include "aztec-prover.name" . }}
50+
app.kubernetes.io/instance: {{ .Release.Name }}
51+
{{- end }}
52+
53+
{{/*
54+
Create the name of the service account to use
55+
*/}}
56+
{{- define "aztec-prover.serviceAccountName" -}}
57+
{{- if .Values.serviceAccount.create }}
58+
{{- default (include "aztec-prover.fullname" .) .Values.serviceAccount.name }}
59+
{{- else }}
60+
{{- default "default" .Values.serviceAccount.name }}
61+
{{- end }}
62+
{{- end }}
63+
64+
{{- define "aztec-prover.config" -}}
65+
{{- if .Values.proverNode.enabled }}
66+
{{- .Values.proverNode | toYaml }}
67+
{{- else if .Values.proverAgent.enabled }}
68+
{{- .Values.proverAgent | toYaml }}
69+
{{- end }}
70+
{{- end }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
apiVersion: v1
3+
kind: ConfigMap
4+
metadata:
5+
name: {{ include "aztec-prover.fullname" . }}
6+
labels:
7+
{{- include "aztec-prover.labels" . | nindent 4 }}
8+
data:
9+
{{- with include "aztec-prover.config" . | fromYaml }}
10+
{{- .env | toYaml | nindent 2 }}
11+
{{- end }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{{- range .Values.extraObjects }}
2+
---
3+
{{- if kindIs "map" . }}
4+
{{ tpl (toYaml .) $ }}
5+
{{- else }}
6+
{{ tpl . $ }}
7+
{{- end }}
8+
{{- end }}
+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{{- if .Values.autoscaling.enabled }}
2+
apiVersion: autoscaling/v2
3+
kind: HorizontalPodAutoscaler
4+
metadata:
5+
name: {{ include "aztec-prover.fullname" . }}
6+
labels:
7+
{{- include "aztec-prover.labels" . | nindent 4 }}
8+
spec:
9+
scaleTargetRef:
10+
apiVersion: apps/v1
11+
kind: Deployment
12+
name: {{ include "aztec-prover.fullname" . }}
13+
minReplicas: {{ .Values.autoscaling.minReplicas }}
14+
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
15+
metrics:
16+
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
17+
- type: Resource
18+
resource:
19+
name: cpu
20+
target:
21+
type: Utilization
22+
averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
23+
{{- end }}
24+
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
25+
- type: Resource
26+
resource:
27+
name: memory
28+
target:
29+
type: Utilization
30+
averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
31+
{{- end }}
32+
{{- end }}
+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
{{- if .Values.ingress.enabled -}}
2+
{{- $fullName := include "aztec-prover.fullname" . -}}
3+
{{- $svcPort := .Values.service.port -}}
4+
{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
5+
{{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }}
6+
{{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}}
7+
{{- end }}
8+
{{- end }}
9+
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
10+
apiVersion: networking.k8s.io/v1
11+
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
12+
apiVersion: networking.k8s.io/v1beta1
13+
{{- else -}}
14+
apiVersion: extensions/v1beta1
15+
{{- end }}
16+
kind: Ingress
17+
metadata:
18+
name: {{ $fullName }}
19+
labels:
20+
{{- include "aztec-prover.labels" . | nindent 4 }}
21+
{{- with .Values.ingress.annotations }}
22+
annotations:
23+
{{- toYaml . | nindent 4 }}
24+
{{- end }}
25+
spec:
26+
{{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}
27+
ingressClassName: {{ .Values.ingress.className }}
28+
{{- end }}
29+
{{- if .Values.ingress.tls }}
30+
tls:
31+
{{- range .Values.ingress.tls }}
32+
- hosts:
33+
{{- range .hosts }}
34+
- {{ . | quote }}
35+
{{- end }}
36+
secretName: {{ .secretName }}
37+
{{- end }}
38+
{{- end }}
39+
rules:
40+
{{- range .Values.ingress.hosts }}
41+
- host: {{ .host | quote }}
42+
http:
43+
paths:
44+
{{- range .paths }}
45+
- path: {{ .path }}
46+
{{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }}
47+
pathType: {{ .pathType }}
48+
{{- end }}
49+
backend:
50+
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
51+
service:
52+
name: {{ $fullName }}
53+
port:
54+
number: {{ $svcPort }}
55+
{{- else }}
56+
serviceName: {{ $fullName }}
57+
servicePort: {{ $svcPort }}
58+
{{- end }}
59+
{{- end }}
60+
{{- end }}
61+
{{- end }}
+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: {{ include "aztec-prover.fullname" . }}
5+
labels:
6+
{{- include "aztec-prover.labels" . | nindent 4 }}
7+
spec:
8+
type: {{ .Values.service.type }}
9+
ports:
10+
- port: {{ .Values.service.port }}
11+
targetPort: http
12+
protocol: TCP
13+
name: http
14+
selector:
15+
{{- include "aztec-prover.selectorLabels" . | nindent 4 }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{{- if .Values.serviceAccount.create -}}
2+
apiVersion: v1
3+
kind: ServiceAccount
4+
metadata:
5+
name: {{ include "aztec-prover.serviceAccountName" . }}
6+
labels:
7+
{{- include "aztec-prover.labels" . | nindent 4 }}
8+
{{- with .Values.serviceAccount.annotations }}
9+
annotations:
10+
{{- toYaml . | nindent 4 }}
11+
{{- end }}
12+
automountServiceAccountToken: {{ .Values.serviceAccount.automount }}
13+
{{- end }}

0 commit comments

Comments
 (0)