Skip to content

Commit feb844a

Browse files
authored
Merge pull request #1 from NethermindEth/feat/add-initial-chart
feat: add aztec-prover chart
2 parents f82172a + d99e7e1 commit feb844a

14 files changed

+632
-0
lines changed

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.idea
2+
.DS_Store
3+
4+
charts/**/charts
5+
values.override.yaml

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.1
19+
maintainers:
20+
- name: 0xDones

charts/aztec-prover/README.md

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# aztec-prover
2+
3+
![Version: 0.1.1](https://img.shields.io/badge/Version-0.1.1-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+
## Maintainers
8+
9+
| Name | Email | Url |
10+
| ---- | ------ | --- |
11+
| 0xDones | | |
12+
13+
## Values
14+
15+
| Key | Type | Default | Description |
16+
|-----|------|---------|-------------|
17+
| affinity | object | `{}` | |
18+
| autoscaling.enabled | bool | `false` | |
19+
| autoscaling.maxReplicas | int | `100` | |
20+
| autoscaling.minReplicas | int | `1` | |
21+
| autoscaling.targetCPUUtilizationPercentage | int | `80` | |
22+
| envFrom | list | `[]` | |
23+
| extraObjects | list | `[]` | |
24+
| fullnameOverride | string | `""` | |
25+
| image.pullPolicy | string | `"IfNotPresent"` | |
26+
| image.repository | string | `"aztecprotocol/aztec"` | |
27+
| image.tag | string | `"provernet"` | |
28+
| imagePullSecrets | list | `[]` | |
29+
| ingress.annotations | object | `{}` | |
30+
| ingress.className | string | `""` | |
31+
| ingress.enabled | bool | `false` | |
32+
| ingress.hosts[0].host | string | `"chart-example.local"` | |
33+
| ingress.hosts[0].paths[0].path | string | `"/"` | |
34+
| ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | |
35+
| ingress.tls | list | `[]` | |
36+
| livenessProbe.httpGet.path | string | `"/status"` | |
37+
| livenessProbe.httpGet.port | string | `"http"` | |
38+
| nameOverride | string | `""` | |
39+
| nodeSelector | object | `{}` | |
40+
| persistence.accessModes[0] | string | `"ReadWriteOnce"` | |
41+
| persistence.enabled | bool | `true` | |
42+
| persistence.mountPath | string | `"/data"` | |
43+
| persistence.size | string | `"50Gi"` | |
44+
| persistence.storageClass | string | `""` | |
45+
| podAnnotations | object | `{}` | |
46+
| podLabels | object | `{}` | |
47+
| podSecurityContext | object | `{}` | |
48+
| proverAgent.args[0] | string | `"start"` | |
49+
| proverAgent.args[1] | string | `"--prover"` | |
50+
| proverAgent.enabled | bool | `false` | |
51+
| proverAgent.env | object | `{}` | |
52+
| proverAgent.name | string | `"agent"` | |
53+
| proverNode.args[0] | string | `"start"` | |
54+
| proverNode.args[1] | string | `"--prover-node"` | |
55+
| proverNode.args[2] | string | `"--archiver"` | |
56+
| proverNode.enabled | bool | `true` | |
57+
| proverNode.env | object | `{}` | |
58+
| proverNode.name | string | `"node"` | |
59+
| readinessProbe.httpGet.path | string | `"/status"` | |
60+
| readinessProbe.httpGet.port | string | `"http"` | |
61+
| replicaCount | int | `1` | |
62+
| resources | object | `{}` | |
63+
| securityContext | object | `{}` | |
64+
| service.port | int | `8080` | |
65+
| service.type | string | `"ClusterIP"` | |
66+
| serviceAccount.annotations | object | `{}` | |
67+
| serviceAccount.automount | bool | `true` | |
68+
| serviceAccount.create | bool | `true` | |
69+
| serviceAccount.name | string | `""` | |
70+
| tolerations | list | `[]` | |
71+
| volumeMounts | list | `[]` | |
72+
| volumes | list | `[]` | |
73+
74+
----------------------------------------------
75+
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)