Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 6 additions & 0 deletions infrastructure/charts/mev-commit-dashboard/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v2
name: mev-commit-dashboard
description: A Helm chart for deploying mev-commit-dashboard service
type: application
version: 0.1.0
appVersion: "1.0.0"
46 changes: 46 additions & 0 deletions infrastructure/charts/mev-commit-dashboard/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "mev-commit-dashboard.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Create a default fully qualified app name.
*/}}
{{- define "mev-commit-dashboard.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}

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

{{/*
Common labels
*/}}
{{- define "mev-commit-dashboard.labels" -}}
helm.sh/chart: {{ include "mev-commit-dashboard.chart" . }}
{{ include "mev-commit-dashboard.selectorLabels" . }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- if .Values.commonLabels }}
{{ toYaml .Values.commonLabels }}
{{- end }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "mev-commit-dashboard.selectorLabels" -}}
app.kubernetes.io/name: {{ include "mev-commit-dashboard.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app: {{ include "mev-commit-dashboard.name" . }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "mev-commit-dashboard.fullname" . }}-config
namespace: {{ .Values.namespace | default "default" }}
labels:
{{- include "mev-commit-dashboard.labels" . | nindent 4 }}
{{- with .Values.commonAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
data:
DASHBOARD_RPC_URL: {{ .Values.config.rpcUrl | quote }}
DASHBOARD_HTTP_PORT: {{ .Values.config.httpPort | quote }}
DASHBOARD_START_BLOCK: {{ .Values.config.startBlock | quote }}
DASHBOARD_LOG_FMT: {{ .Values.config.logFormat | quote }}
DASHBOARD_LOG_LEVEL: {{ .Values.config.logLevel | quote }}
DASHBOARD_ORACLE_CONTRACT_ADDR: {{ .Values.config.oracleContractAddr | quote }}
DASHBOARD_PRECONF_CONTRACT_ADDR: {{ .Values.config.preconfContractAddr | quote }}
DASHBOARD_BLOCKTRACKER_CONTRACT_ADDR: {{ .Values.config.blocktrackerContractAddr | quote }}
DASHBOARD_BIDDERREGISTRY_CONTRACT_ADDR: {{ .Values.config.bidderregistryContractAddr | quote }}
DASHBOARD_PROVIDERREGISTRY_CONTRACT_ADDR: {{ .Values.config.providerregistryContractAddr | quote }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "mev-commit-dashboard.fullname" . }}
namespace: {{ .Values.namespace | default "default" }}
labels:
{{- include "mev-commit-dashboard.labels" . | nindent 4 }}
{{- with .Values.commonAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "mev-commit-dashboard.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
{{- include "mev-commit-dashboard.selectorLabels" . | nindent 8 }}
{{- with .Values.commonLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.commonAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: dashboard
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- containerPort: {{ .Values.service.port }}
name: http
envFrom:
- configMapRef:
name: {{ include "mev-commit-dashboard.fullname" . }}-config
resources:
requests:
cpu: {{ .Values.resources.requests.cpu | default "100m" }}
memory: {{ .Values.resources.requests.memory | default "128Mi" }}
limits:
cpu: {{ .Values.resources.limits.cpu | default "500m" }}
memory: {{ .Values.resources.limits.memory | default "512Mi" }}
24 changes: 24 additions & 0 deletions infrastructure/charts/mev-commit-dashboard/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "mev-commit-dashboard.fullname" . }}
namespace: {{ .Values.namespace | default "default" }}
labels:
{{- include "mev-commit-dashboard.labels" . | nindent 4 }}
{{- with .Values.commonAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: {{ .Values.service.targetPort }}
protocol: TCP
name: http
selector:
{{- if .Values.service.customSelectors }}
{{- toYaml .Values.service.customSelectors | nindent 4 }}
{{- else }}
{{- include "mev-commit-dashboard.selectorLabels" . | nindent 4 }}
{{- end }}
59 changes: 59 additions & 0 deletions infrastructure/charts/mev-commit-dashboard/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
replicaCount: 1

image:
repository:
tag:
pullPolicy: Always

nameOverride: ""
fullnameOverride: ""

# Namespace to deploy resources
namespace: mev-commit-observability

# Common labels to apply to all resources
commonLabels: {}
# team: blockchain
# environment: production

# Common annotations to apply to all resources
commonAnnotations: {}
# prometheus.io/scrape: "true"
# prometheus.io/port: "8080"

# Node selector for pod assignment
nodeSelector: {}
# disktype: ssd
# kubernetes.io/os: linux

# Service configuration
service:
type: ClusterIP
port: 8080
targetPort: 8080
# Custom selectors for the service (if empty, uses the default selector labels)
customSelectors: {}
# app: mev-commit-dashboard
# tier: frontend

# resource configuration
resources:
requests:
cpu: "100m"
memory: "128Mi"
limits:
cpu: "500m"
memory: "512Mi"

# Configuration for the Dashboard
config:
rpcUrl: "ws://<settlement-rpc>:8546"
httpPort: "8080"
startBlock: "0"
logFormat: "json"
logLevel: "info"
bidderregistryContractAddr: ""
blocktrackerContractAddr: ""
oracleContractAddr: ""
preconfContractAddr: ""
providerregistryContractAddr: ""
Loading