Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add timeboost chart #90

Draft
wants to merge 41 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
608b54c
add timeboost chart
chris-vest Dec 10, 2024
b930870
add timeboost chart
chris-vest Dec 10, 2024
a4b9552
add timeboost chart
chris-vest Dec 10, 2024
b8a58fb
add timeboost chart
chris-vest Dec 10, 2024
804b1ba
add timeboost chart
chris-vest Dec 10, 2024
9e1626d
add timeboost chart
chris-vest Dec 10, 2024
8390343
add timeboost chart
chris-vest Dec 10, 2024
7fd275c
add timeboost chart
chris-vest Dec 10, 2024
a712821
add timeboost chart
chris-vest Dec 10, 2024
32e0806
add timeboost chart
chris-vest Dec 10, 2024
85f3acf
add timeboost chart
chris-vest Dec 11, 2024
eb40486
add timeboost chart
chris-vest Dec 11, 2024
e22f6d3
add timeboost chart
chris-vest Dec 11, 2024
51ddda9
fix values comments
chris-vest Dec 11, 2024
d5567b1
fix values comments
chris-vest Dec 11, 2024
63b856a
fix values comments
chris-vest Dec 11, 2024
1eab766
fix values comments
chris-vest Dec 11, 2024
4687c8a
add readme
chris-vest Dec 11, 2024
75e1451
Update README and values.schema.json for modified charts
chris-vest Dec 11, 2024
8d5abce
add wallets file
chris-vest Dec 11, 2024
4f59e61
add jwt
chris-vest Dec 11, 2024
c6c222d
Update README and values.schema.json for modified charts
chris-vest Dec 11, 2024
c3d9f9d
add jwt
chris-vest Dec 11, 2024
c560119
add jwt
chris-vest Dec 11, 2024
48f19b6
Add global image value
a-thomas-22 Dec 11, 2024
f7602de
Update README and values.schema.json for modified charts
a-thomas-22 Dec 11, 2024
10f3cc3
fix entrypoints
a-thomas-22 Dec 11, 2024
a01f3fe
use autogenerated readme
a-thomas-22 Dec 11, 2024
905cdac
Merge branch 'ref/srep-752-timeboost' of https://github.com/OffchainL…
a-thomas-22 Dec 11, 2024
ac31737
fix appversion
a-thomas-22 Dec 11, 2024
8197c7c
Update README and values.schema.json for modified charts
a-thomas-22 Dec 11, 2024
2b7665f
dont template auctioneer svc if there are no ports
a-thomas-22 Dec 11, 2024
a1b6d5d
helper wording
a-thomas-22 Dec 11, 2024
c6c8708
fix configmap
a-thomas-22 Dec 11, 2024
b2fa0cb
fix chart logic error
a-thomas-22 Dec 11, 2024
9cebe21
Update readmecli.py
a-thomas-22 Dec 11, 2024
17d4b61
fix persistent mount path
a-thomas-22 Dec 11, 2024
d8150e2
persistent change
a-thomas-22 Dec 12, 2024
d02ea5d
add timeboost
chris-vest Dec 12, 2024
657bd38
add timeboost
chris-vest Dec 12, 2024
cdedfe5
update to v0.2.0
chris-vest Dec 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions charts/timeboost/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
12 changes: 12 additions & 0 deletions charts/timeboost/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v2
name: timeboost
description: A Helm chart for Arbitrum Timeboost components

maintainers:
- name: OffchainLabs

type: application

version: 0.2.0

appVersion: "express-lane-timeboost-cee611d"
19 changes: 19 additions & 0 deletions charts/timeboost/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2023 Offchain Labs

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
248 changes: 248 additions & 0 deletions charts/timeboost/README.md

Large diffs are not rendered by default.

41 changes: 41 additions & 0 deletions charts/timeboost/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{{/* Get the image repository */}}
{{- define "timeboost.image.repository" -}}
{{- $component := .component -}}
{{- if and $component.image (not (empty $component.image)) $component.image.repository -}}
{{- $component.image.repository -}}
{{- else -}}
{{- .root.Values.image.repository -}}
{{- end -}}
{{- end -}}

{{/* Get the image pullPolicy */}}
{{- define "timeboost.image.pullPolicy" -}}
{{- $component := .component -}}
{{- if and $component.image (not (empty $component.image)) $component.image.pullPolicy -}}
{{- $component.image.pullPolicy -}}
{{- else -}}
{{- .root.Values.image.pullPolicy -}}
{{- end -}}
{{- end -}}

{{/* Get the image tag */}}
{{- define "timeboost.image.tag" -}}
{{- $component := .component -}}
{{- if and $component.image (not (empty $component.image)) $component.image.tag -}}
{{- $component.image.tag -}}
{{- else if .root.Values.image.tag -}}
{{- .root.Values.image.tag -}}
{{- else -}}
{{- .root.Chart.AppVersion -}}
{{- end -}}
{{- end -}}

{{/* Get the image pull secrets */}}
{{- define "timeboost.imagePullSecrets" -}}
{{- $component := .component -}}
{{- if and $component.imagePullSecrets (not (empty $component.imagePullSecrets)) -}}
{{- toYaml $component.imagePullSecrets -}}
{{- else -}}
{{- toYaml .root.Values.image.pullSecrets -}}
{{- end -}}
{{- end -}}
97 changes: 97 additions & 0 deletions charts/timeboost/templates/auctioneer/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "timeboost.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "timeboost.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}

{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "timeboost.chart" -}}
{{- printf "%s" .Chart.Name | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels Auctioneer
*/}}
{{- define "timeboost.auctioneer.labels" -}}
helm.sh/chart: {{ include "timeboost.chart" . }}
{{ include "timeboost.auctioneer.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels Auctioneer
*/}}
{{- define "timeboost.auctioneer.selectorLabels" -}}
app.kubernetes.io/name: {{ include "timeboost.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{- define "startupProbe" -}}
{{- if .Values.startupProbe.command }}
{{ .Values.startupProbe.command }}
{{- else }}
curl "http://localhost:{{ .Values.configmap.data.http.port }}{{ .Values.configmap.data.http.rpcprefix }}" -H "Content-Type: application/json" \
-sd "{\"jsonrpc\":\"2.0\",\"id\":0,\"method\":\"eth_syncing\",\"params\":[]}" \
| jq -ne "input.result == false"
{{- end }}
{{- end -}}

{{/*
auctioneer args
*/}}
{{- define "timeboost.auctioneer.customArgs" -}}

{{- $auctioneerCustomArgs := list -}}
{{- range $k, $v := .Values.auctioneer.auctioneerCustomArgs -}}
{{- $auctioneerCustomArgs = concat $auctioneerCustomArgs (list (printf "--%s" $v)) -}}
{{- end -}}

{{- $auctioneerCustomArgs | compact | toStrings | toYaml -}}

{{- end -}}

{{- define "timeboost.initContainers" -}}
{{- end }}

{{- define "timeboost.sidecars" -}}
{{- end }}

{{/*
Process config data
*/}}
{{- define "timeboost.auctioneer.configProcessor" -}}

{{- /* Make a deep copy of the values from the Helm chart */ -}}
{{- $values := deepCopy .Values -}}

{{- /* Process the final configmap data into pretty JSON format */ -}}
{{- $processed := $values.auctioneer.configmap.data | toPrettyJson | replace "\\u0026" "&" | replace "\\u003c" "<" | replace "\\u003e" ">" -}}

{{- /* Return the processed JSON data */ -}}
{{- $processed -}}

{{- end -}}
11 changes: 11 additions & 0 deletions charts/timeboost/templates/auctioneer/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{{- if .Values.auctioneer.configmap.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "timeboost.fullname" . }}-auctioneer
labels:
{{- include "timeboost.auctioneer.labels" . | nindent 4 }}
data:
config.json: |
{{- include "timeboost.auctioneer.configProcessor" . | nindent 4 }}
{{- end }}
10 changes: 10 additions & 0 deletions charts/timeboost/templates/auctioneer/jwtsecret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{{- if .Values.auctioneer.jwtSecret.enabled }}
apiVersion: v1
kind: Secret
metadata:
name: {{ include "timeboost.fullname" . }}-jwt
labels:
{{- include "timeboost.auctioneer.labels" . | nindent 4 }}
data:
jwtSecret: {{ .Values.auctioneer.jwtSecret.value | b64enc | quote }}
{{- end }}
40 changes: 40 additions & 0 deletions charts/timeboost/templates/auctioneer/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{{- $hasPorts := false }}
{{- if .Values.auctioneer.configmap.data.metrics }}
{{- $hasPorts = true }}
{{- end }}
{{- range .Values.auctioneer.extraPorts }}
{{- if .serviceEnabled | default true }}
{{- $hasPorts = true }}
{{- end }}
{{- end }}

{{- if $hasPorts }}
apiVersion: v1
kind: Service
metadata:
name: {{ include "timeboost.fullname" . }}-auctioneer
labels:
{{- include "timeboost.auctioneer.labels" . | nindent 4 }}
function: nitro-svc
spec:
type: {{ .Values.auctioneer.service.type }}
ports:
{{- if .Values.auctioneer.configmap.data.metrics }}
- port: {{ index .Values.auctioneer "configmap" "data" "metrics-server" "port" }}
targetPort: metrics
protocol: TCP
name: metrics
{{- end }}
{{- range .Values.auctioneer.extraPorts }}
{{- if .serviceEnabled | default true }}
- name: {{ .name }}
port: {{ .servicePort | default .port }}
targetPort: {{ .port }}
protocol: {{ .protocol | default "TCP" }}
{{- end }}
{{- end }}
selector:
{{- include "timeboost.auctioneer.selectorLabels" . | nindent 4 }}
function: nitro
publishNotReadyAddresses: {{ .Values.auctioneer.service.publishNotReadyAddresses }}
{{- end }}
12 changes: 12 additions & 0 deletions charts/timeboost/templates/auctioneer/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{{- if .Values.auctioneer.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "timeboost.fullname" . }}-auctioneer
labels:
{{- include "timeboost.auctioneer.labels" . | nindent 4 }}
{{- with .Values.auctioneer.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
40 changes: 40 additions & 0 deletions charts/timeboost/templates/auctioneer/servicemonitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{{- if .Values.auctioneer.serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "timeboost.fullname" . }}-auctioneer
labels:
{{- include "timeboost.auctioneer.labels" . | nindent 4 }}
{{- if .Values.auctioneer.serviceMonitor.additionalLabels }}
{{- toYaml .Values.auctioneer.serviceMonitor.additionalLabels | nindent 4 }}
{{- end }}
spec:
endpoints:
- port: {{ .Values.auctioneer.serviceMonitor.portName | default "http" }}
{{- if .Values.auctioneer.serviceMonitor.interval }}
interval: {{ .Values.auctioneer.serviceMonitor.interval }}
{{- end }}
{{- if .Values.auctioneer.serviceMonitor.scrapeTimeout }}
scrapeTimeout: {{ .Values.auctioneer.serviceMonitor.scrapeTimeout }}
{{- end }}
{{- if .Values.auctioneer.serviceMonitor.path }}
path: {{ .Values.auctioneer.serviceMonitor.path }}
{{- end }}
{{- if .Values.auctioneer.serviceMonitor.scheme }}
scheme: {{ .Values.auctioneer.serviceMonitor.scheme }}
{{- end }}
{{- if .Values.auctioneer.serviceMonitor.tlsConfig }}
tlsConfig:
{{- toYaml .Values.auctioneer.serviceMonitor.tlsConfig | nindent 8 }}
{{- end }}
{{- with .Values.auctioneer.serviceMonitor.relabelings }}
relabelings: {{- toYaml . | nindent 8 }}
{{- end }}
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
selector:
matchLabels:
{{- include "timeboost.auctioneer.selectorLabels" . | nindent 6 }}
function: timeboost-svc
{{- end }}
Loading
Loading